Compare commits
2 Commits
9d0e15d55e
...
08d908cd7b
| Author | SHA1 | Date | |
|---|---|---|---|
|
08d908cd7b
|
|||
|
838938f5fb
|
34
ghostty/.config/ghostty/config
Normal file
34
ghostty/.config/ghostty/config
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Dynamic theme colors
|
||||||
|
config-file = ?"~/.config/omarchy/current/theme/ghostty.conf"
|
||||||
|
|
||||||
|
# Font
|
||||||
|
font-family = "JetBrainsMono Nerd Font"
|
||||||
|
font-style = Regular
|
||||||
|
font-size = 16
|
||||||
|
|
||||||
|
# Window
|
||||||
|
window-theme = ghostty
|
||||||
|
window-padding-x = 14
|
||||||
|
window-padding-y = 14
|
||||||
|
confirm-close-surface=false
|
||||||
|
resize-overlay = never
|
||||||
|
gtk-toolbar-style = flat
|
||||||
|
|
||||||
|
# Cursor styling
|
||||||
|
cursor-style = "block"
|
||||||
|
cursor-style-blink = false
|
||||||
|
|
||||||
|
# Cursor styling + SSH session terminfo
|
||||||
|
# (all shell integration options must be passed together)
|
||||||
|
shell-integration-features = no-cursor,ssh-env
|
||||||
|
|
||||||
|
# Keyboard bindings
|
||||||
|
keybind = shift+insert=paste_from_clipboard
|
||||||
|
keybind = control+insert=copy_to_clipboard
|
||||||
|
keybind = super+control+shift+alt+arrow_down=resize_split:down,100
|
||||||
|
keybind = super+control+shift+alt+arrow_up=resize_split:up,100
|
||||||
|
keybind = super+control+shift+alt+arrow_left=resize_split:left,100
|
||||||
|
keybind = super+control+shift+alt+arrow_right=resize_split:right,100
|
||||||
|
|
||||||
|
# Slowdown mouse scrolling
|
||||||
|
mouse-scroll-multiplier = 0.95
|
||||||
142
ghostty/.config/ghostty/shaders/shader.glsl
Normal file
142
ghostty/.config/ghostty/shaders/shader.glsl
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
// Based on https://gist.github.com/chardskarth/95874c54e29da6b5a36ab7b50ae2d088
|
||||||
|
float ease(float x) {
|
||||||
|
return pow(1.0 - x, 10.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
float sdBox(in vec2 p, in vec2 xy, in vec2 b)
|
||||||
|
{
|
||||||
|
vec2 d = abs(p - xy) - b;
|
||||||
|
return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
float getSdfRectangle(in vec2 p, in vec2 xy, in vec2 b)
|
||||||
|
{
|
||||||
|
vec2 d = abs(p - xy) - b;
|
||||||
|
return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0);
|
||||||
|
}
|
||||||
|
// Based on Inigo Quilez's 2D distance functions article: https://iquilezles.org/articles/distfunctions2d/
|
||||||
|
// Potencially optimized by eliminating conditionals and loops to enhance performance and reduce branching
|
||||||
|
float seg(in vec2 p, in vec2 a, in vec2 b, inout float s, float d) {
|
||||||
|
vec2 e = b - a;
|
||||||
|
vec2 w = p - a;
|
||||||
|
vec2 proj = a + e * clamp(dot(w, e) / dot(e, e), 0.0, 1.0);
|
||||||
|
float segd = dot(p - proj, p - proj);
|
||||||
|
d = min(d, segd);
|
||||||
|
|
||||||
|
float c0 = step(0.0, p.y - a.y);
|
||||||
|
float c1 = 1.0 - step(0.0, p.y - b.y);
|
||||||
|
float c2 = 1.0 - step(0.0, e.x * w.y - e.y * w.x);
|
||||||
|
float allCond = c0 * c1 * c2;
|
||||||
|
float noneCond = (1.0 - c0) * (1.0 - c1) * (1.0 - c2);
|
||||||
|
float flip = mix(1.0, -1.0, step(0.5, allCond + noneCond));
|
||||||
|
s *= flip;
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
float getSdfParallelogram(in vec2 p, in vec2 v0, in vec2 v1, in vec2 v2, in vec2 v3) {
|
||||||
|
float s = 1.0;
|
||||||
|
float d = dot(p - v0, p - v0);
|
||||||
|
|
||||||
|
d = seg(p, v0, v3, s, d);
|
||||||
|
d = seg(p, v1, v0, s, d);
|
||||||
|
d = seg(p, v2, v1, s, d);
|
||||||
|
d = seg(p, v3, v2, s, d);
|
||||||
|
|
||||||
|
return s * sqrt(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
vec2 normalize(vec2 value, float isPosition) {
|
||||||
|
return (value * 2.0 - (iResolution.xy * isPosition)) / iResolution.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
float blend(float t)
|
||||||
|
{
|
||||||
|
float sqr = t * t;
|
||||||
|
return sqr / (2.0 * (sqr - t) + 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
float antialising(float distance) {
|
||||||
|
return 1. - smoothstep(0., normalize(vec2(2., 2.), 0.).x, distance);
|
||||||
|
}
|
||||||
|
|
||||||
|
float determineStartVertexFactor(vec2 a, vec2 b) {
|
||||||
|
// Conditions using step
|
||||||
|
float condition1 = step(b.x, a.x) * step(a.y, b.y); // a.x < b.x && a.y > b.y
|
||||||
|
float condition2 = step(a.x, b.x) * step(b.y, a.y); // a.x > b.x && a.y < b.y
|
||||||
|
|
||||||
|
// If neither condition is met, return 1 (else case)
|
||||||
|
return 1.0 - max(condition1, condition2);
|
||||||
|
}
|
||||||
|
vec2 getRectangleCenter(vec4 rectangle) {
|
||||||
|
return vec2(rectangle.x + (rectangle.z / 2.), rectangle.y - (rectangle.w / 2.));
|
||||||
|
}
|
||||||
|
|
||||||
|
const vec4 TRAIL_COLOR = vec4(1.0, 0.725, 0.161, 1.0); // yellow
|
||||||
|
const vec4 CURRENT_CURSOR_COLOR = TRAIL_COLOR;
|
||||||
|
const vec4 PREVIOUS_CURSOR_COLOR = TRAIL_COLOR;
|
||||||
|
const vec4 TRAIL_COLOR_ACCENT = vec4(1.0, 0., 0., 1.0); // red-orange
|
||||||
|
const float DURATION = .5;
|
||||||
|
const float OPACITY = .2;
|
||||||
|
// Don't draw trail within that distance * cursor size.
|
||||||
|
// This prevents trails from appearing when typing.
|
||||||
|
const float DRAW_THRESHOLD = 1.5;
|
||||||
|
// Don't draw trails within the same line: same line jumps are usually where
|
||||||
|
// people expect them.
|
||||||
|
const bool HIDE_TRAILS_ON_THE_SAME_LINE = false;
|
||||||
|
|
||||||
|
void mainImage(out vec4 fragColor, in vec2 fragCoord)
|
||||||
|
{
|
||||||
|
#if !defined(WEB)
|
||||||
|
fragColor = texture(iChannel0, fragCoord.xy / iResolution.xy);
|
||||||
|
#endif
|
||||||
|
//Normalization for fragCoord to a space of -1 to 1;
|
||||||
|
vec2 vu = normalize(fragCoord, 1.);
|
||||||
|
vec2 offsetFactor = vec2(-.5, 0.5);
|
||||||
|
|
||||||
|
//Normalization for cursor position and size;
|
||||||
|
//cursor xy has the postion in a space of -1 to 1;
|
||||||
|
//zw has the width and height
|
||||||
|
vec4 currentCursor = vec4(normalize(iCurrentCursor.xy, 1.), normalize(iCurrentCursor.zw, 0.));
|
||||||
|
vec4 previousCursor = vec4(normalize(iPreviousCursor.xy, 1.), normalize(iPreviousCursor.zw, 0.));
|
||||||
|
|
||||||
|
//When drawing a parellelogram between cursors for the trail i need to determine where to start at the top-left or top-right vertex of the cursor
|
||||||
|
float vertexFactor = determineStartVertexFactor(currentCursor.xy, previousCursor.xy);
|
||||||
|
float invertedVertexFactor = 1.0 - vertexFactor;
|
||||||
|
|
||||||
|
//Set every vertex of my parellogram
|
||||||
|
vec2 v0 = vec2(currentCursor.x + currentCursor.z * vertexFactor, currentCursor.y - currentCursor.w);
|
||||||
|
vec2 v1 = vec2(currentCursor.x + currentCursor.z * invertedVertexFactor, currentCursor.y);
|
||||||
|
vec2 v2 = vec2(previousCursor.x + currentCursor.z * invertedVertexFactor, previousCursor.y);
|
||||||
|
vec2 v3 = vec2(previousCursor.x + currentCursor.z * vertexFactor, previousCursor.y - previousCursor.w);
|
||||||
|
|
||||||
|
vec4 newColor = vec4(fragColor);
|
||||||
|
|
||||||
|
float progress = blend(clamp((iTime - iTimeCursorChange) / DURATION, 0.0, 1));
|
||||||
|
float easedProgress = ease(progress);
|
||||||
|
|
||||||
|
//Distance between cursors determine the total length of the parallelogram;
|
||||||
|
vec2 centerCC = getRectangleCenter(currentCursor);
|
||||||
|
vec2 centerCP = getRectangleCenter(previousCursor);
|
||||||
|
float cursorSize = max(currentCursor.z, currentCursor.w);
|
||||||
|
float trailThreshold = DRAW_THRESHOLD * cursorSize;
|
||||||
|
float lineLength = distance(centerCC, centerCP);
|
||||||
|
//
|
||||||
|
bool isFarEnough = lineLength > trailThreshold;
|
||||||
|
bool isOnSeparateLine = HIDE_TRAILS_ON_THE_SAME_LINE ? currentCursor.y != previousCursor.y : true;
|
||||||
|
if (isFarEnough && isOnSeparateLine) {
|
||||||
|
float distanceToEnd = distance(vu.xy, centerCC);
|
||||||
|
float alphaModifier = distanceToEnd / (lineLength * (easedProgress));
|
||||||
|
|
||||||
|
if (alphaModifier > 1.0) { // this change fixed it for me.
|
||||||
|
alphaModifier = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
float sdfCursor = getSdfRectangle(vu, currentCursor.xy - (currentCursor.zw * offsetFactor), currentCursor.zw * 0.5);
|
||||||
|
float sdfTrail = getSdfParallelogram(vu, v0, v1, v2, v3);
|
||||||
|
|
||||||
|
newColor = mix(newColor, TRAIL_COLOR_ACCENT, 1.0 - smoothstep(sdfTrail, -0.01, 0.001));
|
||||||
|
newColor = mix(newColor, TRAIL_COLOR, antialising(sdfTrail));
|
||||||
|
newColor = mix(fragColor, newColor, 1.0 - alphaModifier);
|
||||||
|
fragColor = mix(newColor, fragColor, step(sdfCursor, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -947,14 +947,15 @@ require('lazy').setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'scottmckendry/cyberdream.nvim',
|
'catppuccin/nvim',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
name = catppuccin,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require('cyberdream').setup {
|
require('catppuccin').setup {
|
||||||
transparent = true,
|
transparent = true,
|
||||||
}
|
}
|
||||||
vim.cmd.colorscheme 'cyberdream'
|
vim.cmd.colorscheme 'catppuccin'
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- Highlight todo, notes, etc in comments
|
-- Highlight todo, notes, etc in comments
|
||||||
|
|||||||
42
nvim/.config/nvim/lazy-lock.json
Normal file
42
nvim/.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
|
||||||
|
"alpha-nvim": { "branch": "main", "commit": "3979b01cb05734331c7873049001d3f2bb8477f4" },
|
||||||
|
"blink-copilot": { "branch": "main", "commit": "7ad8209b2f880a2840c94cdcd80ab4dc511d4f39" },
|
||||||
|
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
|
||||||
|
"codecompanion.nvim": { "branch": "main", "commit": "dfc85fe9299c36a6054ca2318ca0e9ee48f5446b" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" },
|
||||||
|
"copilot.lua": { "branch": "master", "commit": "508d8b00390ff3046323f61187a57069910c6e17" },
|
||||||
|
"copilot.vim": { "branch": "release", "commit": "f89e977c87180519ba3b942200e3d05b17b1e2fc" },
|
||||||
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
|
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "cdafc320f03f2572c40ab93a4eecb733d4016d07" },
|
||||||
|
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||||
|
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "7d527c76c43f46294de9c19d39c5a86317809b4b" },
|
||||||
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
|
||||||
|
"media-controls.nvim": { "branch": "main", "commit": "53ba17d3751194019c77113421e0e665cdaec0bb" },
|
||||||
|
"mini.nvim": { "branch": "main", "commit": "a995fe9cd4193fb492b5df69175a351a74b3d36b" },
|
||||||
|
"neogit": { "branch": "master", "commit": "d8bf9102692250193b855acd9025a826f1af2729" },
|
||||||
|
"neotest": { "branch": "master", "commit": "deadfb1af5ce458742671ad3a013acb9a6b41178" },
|
||||||
|
"neotest-vitest": { "branch": "main", "commit": "8bc784d319889a39c7ed8045ff7b0f12770c7b54" },
|
||||||
|
"nvim": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "e0fae251f8459940331960106d4bd9457cec23de" },
|
||||||
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
|
"nvim-treesitter": { "branch": "main", "commit": "bb83a676128d95c865e40ba71376d883bdadec14" },
|
||||||
|
"nvim-ufo": { "branch": "main", "commit": "72d54c31079d38d8dfc5456131b1d0fb5c0264b0" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
||||||
|
"obsidian.nvim": { "branch": "main", "commit": "de60246baec087aaf5bbf95e3f976e0897548d89" },
|
||||||
|
"octo.nvim": { "branch": "master", "commit": "a834e0bd6268746e4c1f49c95180777d152c9d87" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "cbcb3f997f6f261c577b943ec94e4ef55108dd95" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
|
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||||
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "3d757e586ff0bfc85bdb7b46c9d3d932147a0cde" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user