From 8c8f1ea22812796e23932a25a786d5491329606a Mon Sep 17 00:00:00 2001 From: pablu Date: Wed, 22 Jul 2026 14:43:26 +0200 Subject: [PATCH] updates --- README.md | 32 +++ dot_codex/private_config.toml | 24 +- dot_config/fish/config.fish.tmpl | 62 ----- dot_config/ghostty/config.tmpl | 7 + .../ghostty/shaders/crisp_cursor_tail.glsl | 227 ++++++++++++++++++ dot_config/hypr/config/autostart.lua | 1 + dot_config/hypr/config/general.lua | 8 +- dot_config/nvim/lua/plugins/treesitter.lua | 10 +- 8 files changed, 303 insertions(+), 68 deletions(-) create mode 100644 README.md delete mode 100644 dot_config/fish/config.fish.tmpl create mode 100644 dot_config/ghostty/shaders/crisp_cursor_tail.glsl diff --git a/README.md b/README.md new file mode 100644 index 0000000..a402330 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# keymap drawer adv360 base keymap + +```yaml +layout: + qmk_keyboard: adv360 + layout_name: LAYOUT +layers: + BASE: # Top rows + - ["=", "1", "2", "3", "4", "5", Fn, Fn, "6", "7", "8", "9", "0", "-"] + - [Tab, Q, W, E, R, T, Fn, Fn, Y, U, I, O, P, "\\"] # Third row left side + - [Esc, A, S, D, F, G, Fn] # Top row thumb keys + - [Ctrl, Alt, Super, Ctrl] # Third row right side + - [Fn, H, J, K, L, ";", "'"] # Fourth row left side + - [Shift, Z, X, C, V, B] # Second small key thumb row + - [Home, Page Up] # Fourth row right side + - [N, M, ",", ".", "/", Shift] # Last row left side + - [Fn, null, null, null, null] # Remaining Big thumb keys and small ones intertwined + - [Backspace, Delete, End, Page Down, Enter, {h: SYM, t: Space}] # Last row right side + - [Left, Up, Down, Right, Fn] + SYM: # Top rows + - [null, null, null, null, null, null, null, null, null, null, null, null, null, null] + - [null, "!", null, "*", "-", "<", ">", null, "[", "]", "", null, "\\", null] # Third row left side + - [null, "$", null, '~', "+", "=", "&"] # Top row thumb keys + - [Ctrl, Alt, Super, Ctrl] # Third row right side + - [null, "{", "}", "\"", null, ":", null] # Fourth row left side + - [null, "#", null, "^", "|", "_"] # Second small key thumb row + - [Home, Page Up] # Fourth row right side + - ["(", ")", "'", null, "?", null] # Last row left side + - [null, null, null, null, null] # Remaining Big thumb keys and small ones intertwined + - [Backspace, Delete, End, Page Down, Enter, Space] # Last row right side + - [null, null, null, null, null] +``` diff --git a/dot_codex/private_config.toml b/dot_codex/private_config.toml index 8df2cd0..e15610f 100644 --- a/dot_codex/private_config.toml +++ b/dot_codex/private_config.toml @@ -1,8 +1,8 @@ -model = "gpt-5.5" +model = "gpt-5.6-sol" +model_reasoning_effort = "medium" -approval_request = "untrusted" +approval_request = "on-request" sandbox_mode = "read-only" -model_reasoning_effort = "high" model_verbosity = "low" web_search = "cached" allow_login_shell = false @@ -41,10 +41,26 @@ trust_level = "trusted" [projects."/home/pablu/projects/logprep-data-server"] trust_level = "trusted" +[projects."/home/pablu/.codex"] +trust_level = "trusted" + +[projects."/home/pablu"] +trust_level = "trusted" + +[projects."/home/pablu/projects/domain-router"] +trust_level = "trusted" + +[projects."/home/pablu/projects/pybug"] +trust_level = "trusted" + +[projects."/home/pablu/projects/suchoi-v2"] +trust_level = "trusted" + [tui] theme = "catppuccin-mocha" -status_line = ["model-with-reasoning", "current-dir", "git-branch", "run-state", "permissions", "five-hour-limit"] +status_line = ["model-with-reasoning", "current-dir", "git-branch", "run-state", "permissions", "context-used"] status_line_use_colors = true [tui.model_availability_nux] "gpt-5.5" = 4 +"gpt-5.6-sol" = 4 diff --git a/dot_config/fish/config.fish.tmpl b/dot_config/fish/config.fish.tmpl deleted file mode 100644 index 30c8bc8..0000000 --- a/dot_config/fish/config.fish.tmpl +++ /dev/null @@ -1,62 +0,0 @@ -# source /usr/share/cachyos-fish-config/cachyos-config.fish - -function fish_greeting - {{- if eq .chezmoi.hostname "ubuntu" }} - if test -z "$TMUX" - tmux new -As default - end - {{- else }} - fastfetch - {{- end }} -end - -# Add ~/.local/bin to PATH -if test -d ~/.local/bin - if not contains -- ~/.local/bin $PATH - set -p PATH ~/.local/bin - end -end - -# Add depot_tools to PATH -if test -d ~/Applications/depot_tools - if not contains -- ~/Applications/depot_tools $PATH - set -p PATH ~/Applications/depot_tools - end -end - -# Fish command history -function history - builtin history --show-time='%F %T ' -end - -# Copy DIR1 DIR2 -function copy - set count (count $argv | tr -d \n) - if test "$count" = 2; and test -d "$argv[1]" - set from (echo $argv[1] | trim-right /) - set to (echo $argv[2]) - command cp -r $from $to - else - command cp $argv - end -end - -set -U fish_complete_path $fish_complete_path /nix/var/nix/profiles/default/share/fish/vendor_completions.d -set -Ux EDITOR nvim -set -U fish_history_max 1000 - -{{ if eq .chezmoi.hostname "ubuntu" -}} - fish_add_path /opt/nvim-linux-x86_64/bin ~/.cargo/bin/ -{{- end }} - -alias vim='nvim' -alias cd='z' -alias ls='eza --icons=always --color=always' -alias untar='tar -zxvf ' -alias grep='grep --color=auto' -alias cleanup='sudo pacman -Rns (pacman -Qtdq)' - -chezmoi completion fish | source -direnv hook fish | source -zoxide init fish | source -starship init fish | source diff --git a/dot_config/ghostty/config.tmpl b/dot_config/ghostty/config.tmpl index b24728b..fc1fd80 100644 --- a/dot_config/ghostty/config.tmpl +++ b/dot_config/ghostty/config.tmpl @@ -15,6 +15,8 @@ background-blur=true shell-integration-features = ssh-terminfo,ssh-env +link-url = true + keybind = cmd+t=unbind keybind = cmd+n=unbind keybind = cmd+w=unbind @@ -31,6 +33,7 @@ keybind = ctrl+v=paste_from_clipboard clipboard-paste-protection = false clipboard-paste-bracketed-safe = true +clipboard-trim-trailing-spaces = true window-padding-x = 0 window-padding-y = 0 @@ -44,3 +47,7 @@ shell-integration = zsh macos-option-as-alt = left macos-titlebar-style = transparent {{ end }} + +custom-shader-animation = true + +custom-shader = ./shaders/crisp_cursor_tail.glsl diff --git a/dot_config/ghostty/shaders/crisp_cursor_tail.glsl b/dot_config/ghostty/shaders/crisp_cursor_tail.glsl new file mode 100644 index 0000000..a99a3ba --- /dev/null +++ b/dot_config/ghostty/shaders/crisp_cursor_tail.glsl @@ -0,0 +1,227 @@ +// crisp_cursor_tail_v3.glsl +// +// A deliberately crisp Ghostty cursor trail: +// - no blur +// - no bloom or additive blending +// - the real cursor is never enlarged +// - several same-size cursor silhouettes fade behind it +// +// Requires Ghostty 1.3.0 or newer. + +const float DURATION = 0.200; + +// Strong enough to be clearly visible without additive glow. +const float MAX_OPACITY = 0.80; + +const int TRAIL_COPIES = 13; + +// Maximum trail length in approximate cursor-cell lengths. +const float MAX_TRAIL_CELLS = 3.5; + +// Ignore tiny sub-cell position changes. +const float MIN_MOVE_CELLS = 0.20; + +// Ghostty cannot tell the shader whether a move came from typing or navigation. +// Suppressing one-cell horizontal advances is the dependable approximation. +const bool SUPPRESS_SINGLE_CELL_HORIZONTAL = true; +const float CELL_TOLERANCE = 0.20; + +// Suppress the large last-column -> first-column jump produced by line wrap. +const float WRAP_MIN_HORIZONTAL_CELLS = 4.0; + +// Do not animate stale previous/current cursor state immediately after focus is +// restored. This also covers delayed frames from an unfocused surface. +const float REFOCUS_GUARD_TIME = 0.060; + +// Higher values make the far end fade more strongly. +const float SPATIAL_FADE_POWER = 0.65; + +// false: animate horizontal, vertical, and diagonal movement. +// true: only animate left/right movement. +const bool HORIZONTAL_ONLY = false; + +vec3 srgbToLinear(vec3 c) { + return mix( + c / 12.92, + pow((c + 0.055) / 1.055, vec3(2.4)), + step(vec3(0.04045), c) + ); +} + +// Convert pixel coordinates to the normalized coordinate system used by the +// known-working Ghostty cursor shaders. Positions use isPosition=1.0; +// dimensions use isPosition=0.0. +vec2 toNormalized(vec2 value, float isPosition) { + return (value * 2.0 - iResolution.xy * isPosition) / iResolution.y; +} + +float rectangleSdf(vec2 point, vec2 center, vec2 halfSize) { + vec2 d = abs(point - center) - halfSize; + return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0); +} + +float rectangleMask(vec2 point, vec2 center, vec2 halfSize) { + // Hard edge: intentionally no antialiasing or blur. + return step(rectangleSdf(point, center, halfSize), 0.0); +} + +float easeOutCubic(float x) { + float y = 1.0 - x; + return 1.0 - y * y * y; +} + +void mainImage(out vec4 fragColor, in vec2 fragCoord) { +#if !defined(WEB) + fragColor = texture(iChannel0, fragCoord.xy / iResolution.xy); +#endif + + // Ghostty deliberately renders unfocused surfaces less frequently. Drawing + // from their stale cursor uniforms causes detached or hollow-looking trails. + if (iFocus <= 0 || (iTime - iTimeFocus) < REFOCUS_GUARD_TIME) { + return; + } + + if (iResolution.x <= 0.0 || iResolution.y <= 0.0 || + any(lessThanEqual(iCurrentCursor.zw, vec2(0.0))) || + any(lessThanEqual(iPreviousCursor.zw, vec2(0.0)))) { + return; + } + + vec2 point = toNormalized(fragCoord, 1.0); + + vec4 currentCursor = vec4( + toNormalized(iCurrentCursor.xy, 1.0), + toNormalized(iCurrentCursor.zw, 0.0) + ); + + vec4 previousCursor = vec4( + toNormalized(iPreviousCursor.xy, 1.0), + toNormalized(iPreviousCursor.zw, 0.0) + ); + + // Ghostty cursor.xy is the left/top corner. + vec2 offsetFactor = vec2(-0.5, 0.5); + vec2 currentCenter = + currentCursor.xy - currentCursor.zw * offsetFactor; + vec2 previousCenter = + previousCursor.xy - previousCursor.zw * offsetFactor; + + vec2 movement = previousCenter - currentCenter; + float movementLength = length(movement); + + if (movementLength <= 0.000001) { + return; + } + + if (HORIZONTAL_ONLY && abs(movement.y) > 0.00001) { + return; + } + + vec2 direction = movement / movementLength; + + // Approximate one cell along the direction of travel. + float cellLength = + abs(direction.x) * currentCursor.z + + abs(direction.y) * currentCursor.w; + cellLength = max(cellLength, 0.000001); + + if ((movementLength / cellLength) < MIN_MOVE_CELLS) { + return; + } + + float horizontalCells = abs(movement.x) / currentCursor.z; + float verticalCells = abs(movement.y) / currentCursor.w; + + bool singleCellHorizontal = + verticalCells < CELL_TOLERANCE && + abs(horizontalCells - 1.0) <= CELL_TOLERANCE; + if (SUPPRESS_SINGLE_CELL_HORIZONTAL && singleCellHorizontal) { + return; + } + + bool likelyLineWrap = + abs(verticalCells - 1.0) <= CELL_TOLERANCE && + horizontalCells >= WRAP_MIN_HORIZONTAL_CELLS; + if (likelyLineWrap) { + return; + } + + float elapsed = iTime - iTimeCursorChange; + if (elapsed < 0.0) { + return; + } + float progress = clamp(elapsed / DURATION, 0.0, 1.0); + + if (progress >= 1.0) { + return; + } + + // Linear persistence keeps the trail clearly visible for most of its + // lifetime. The previous cubic curve became almost invisible too quickly. + float remaining = 1.0 - progress; + + // Keep opacity strong through the first half, then fade smoothly. + float timeOpacity = pow(remaining, 0.85); + + float cappedLength = + min(movementLength, MAX_TRAIL_CELLS * cellLength); + + vec2 cappedPreviousCenter = + currentCenter + direction * cappedLength; + + float trailAlpha = 0.0; + + for (int index = 1; index <= TRAIL_COPIES; ++index) { + float distanceRank = + float(index) / float(TRAIL_COPIES); + + // At t=0, copies span current -> previous. As time advances they all + // collapse toward current, leaving the real cursor unchanged. + vec2 copyCenter = mix( + currentCenter, + cappedPreviousCenter, + distanceRank * remaining + ); + + float copyMask = rectangleMask( + point, + copyCenter, + currentCursor.zw * 0.5 + ); + + // Nearest copies are strongest; distant copies are progressively faint. + float spatialFade = pow( + 1.0 - distanceRank * 0.82, + SPATIAL_FADE_POWER + ); + + float copyAlpha = + MAX_OPACITY * spatialFade * timeOpacity; + + // max(), not addition: overlapping copies never become a bright glow. + trailAlpha = max( + trailAlpha, + copyMask * copyAlpha + ); + } + + // Cut out the actual cursor rectangle so its apparent size and contrast are + // controlled entirely by Ghostty, not by this shader. + float currentCursorMask = rectangleMask( + point, + currentCenter, + currentCursor.zw * 0.5 + ); + trailAlpha *= 1.0 - currentCursorMask; + + vec4 trailColor = vec4( + srgbToLinear(iCurrentCursorColor.rgb), + iCurrentCursorColor.a + ); + + fragColor = mix( + fragColor, + trailColor, + trailAlpha * trailColor.a + ); +} diff --git a/dot_config/hypr/config/autostart.lua b/dot_config/hypr/config/autostart.lua index a85447d..d902fc9 100644 --- a/dot_config/hypr/config/autostart.lua +++ b/dot_config/hypr/config/autostart.lua @@ -6,4 +6,5 @@ hl.on("hyprland.start", function() hl.exec_cmd("dunst") hl.exec_cmd("killall -q waybar; sleep .5 && env LC_TIME=de_DE.UTF-8 waybar") hl.exec_cmd("hypridle") + hl.exec_cmd("kanata --cfg ~/.config/kanata/adv360.kbd --no-wait") end) diff --git a/dot_config/hypr/config/general.lua b/dot_config/hypr/config/general.lua index 6145d32..66e949c 100644 --- a/dot_config/hypr/config/general.lua +++ b/dot_config/hypr/config/general.lua @@ -82,7 +82,7 @@ hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1 } hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1 } } }) -- Default springs -hl.curve("easy", { type = "spring", mass = 1, stiffness = 71.2633, dampening = 15.8273644 }) +hl.curve("easy", { type = "spring", mass = 1, stiffness = 500, dampening = 41 }) hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" }) hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" }) @@ -137,3 +137,9 @@ hl.device({ kb_layout = "us", kb_variant = "", }) + +hl.device({ + name = "kanata-adv360", + kb_layout = "us", + kb_variant = "", +}) diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua index 1df588a..5198eaf 100644 --- a/dot_config/nvim/lua/plugins/treesitter.lua +++ b/dot_config/nvim/lua/plugins/treesitter.lua @@ -5,6 +5,14 @@ return { build = ":TSUpdate", config = function() local treesitter = require("nvim-treesitter") - treesitter.install({ "python", "go", "zig", "markdown", "json", "yaml", "javascript", "typescript", "bash", "python", "lua" }) + treesitter.install({ "python", "go", "zig", "markdown", "json", "yaml", "javascript", "typescript", "bash", "python", + "lua" }) + + vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("treesitter-start", { clear = true }), + callback = function() + pcall(vim.treesitter.start) + end + }) end }