diff --git a/flake.lock b/flake.lock index 328be0c..1dfe82b 100644 --- a/flake.lock +++ b/flake.lock @@ -509,22 +509,6 @@ "type": "github" } }, - "ghostty-cursor-shaders": { - "flake": false, - "locked": { - "lastModified": 1778252515, - "narHash": "sha256-G/UIr1bKnxn1AcHl/4FL/jou6b7M2VeREslYVELxdmw=", - "owner": "sahaj-b", - "repo": "ghostty-cursor-shaders", - "rev": "06d4e90fb5410e9c4d0b3131584060adddf89406", - "type": "github" - }, - "original": { - "owner": "sahaj-b", - "repo": "ghostty-cursor-shaders", - "type": "github" - } - }, "git-hooks-nix": { "inputs": { "flake-compat": "flake-compat", @@ -1574,7 +1558,6 @@ "eh": "eh", "flake-file": "flake-file", "flake-parts": "flake-parts_2", - "ghostty-cursor-shaders": "ghostty-cursor-shaders", "home-manager": "home-manager", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", diff --git a/flake.nix b/flake.nix index 950a6ec..7c55425 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ # DO-NOT-EDIT. This file was auto-generated using github:vic/flake-file. # Use `nix run .#write-flake` to regenerate it. { - outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); + outputs = inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules); inputs = { determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/3"; @@ -18,10 +18,6 @@ url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; - ghostty-cursor-shaders = { - url = "github:sahaj-b/ghostty-cursor-shaders"; - flake = false; - }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/programs/gui/ghostty/default.nix b/modules/programs/gui/ghostty/default.nix index 99eb269..d11e288 100644 --- a/modules/programs/gui/ghostty/default.nix +++ b/modules/programs/gui/ghostty/default.nix @@ -1,32 +1,15 @@ -{inputs, ...}: { - flake-file.inputs.ghostty-cursor-shaders = { - url = "github:sahaj-b/ghostty-cursor-shaders"; - flake = false; - }; - +{ flake.modules.homeManager.ghostty = { # keep-sorted start config, lib, - pkgs, # keep-sorted end ... }: let inherit (lib) getExe; - - cursorShaders = pkgs.applyPatches { - name = "ghostty-cursor-shaders-patched"; - src = inputs.ghostty-cursor-shaders; - patches = [./patches/cursor-tail-local-settings.patch]; - }; in { # keep-sorted start block=yes newline_separated=yes - programs.ghostty = { - enable = true; - - # Add the cursor shader to ghostty config. - settings.custom-shader = "${cursorShaders}/cursor_tail.glsl"; - }; + programs.ghostty.enable = true; # Start Ghostty with a systemd service. systemd.user.services.ghostty = { diff --git a/modules/programs/gui/ghostty/patches/cursor-tail-local-settings.patch b/modules/programs/gui/ghostty/patches/cursor-tail-local-settings.patch deleted file mode 100644 index db67291..0000000 --- a/modules/programs/gui/ghostty/patches/cursor-tail-local-settings.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/cursor_tail.glsl b/cursor_tail.glsl -index 5a648cc..53a7a58 100644 ---- a/cursor_tail.glsl -+++ b/cursor_tail.glsl -@@ -5,9 +5,9 @@ vec3 sRGBToLinear(vec3 c) { - - // --- CONFIGURATION --- - vec4 TRAIL_COLOR = vec4(sRGBToLinear(iCurrentCursorColor.rgb), iCurrentCursorColor.a); // for custom color: vec4(0.2, 0.6, 1.0, 0.5); (wrap in sRGBToLinear for correct brightness) --const float DURATION = 0.09; // in seconds --const float MAX_TRAIL_LENGTH = 0.2; --const float THRESHOLD_MIN_DISTANCE = 1.5; // min distance to show trail (units of cursor width) -+const float DURATION = 0.2; // in seconds -+const float MAX_TRAIL_LENGTH = 0.5; -+const float THRESHOLD_MIN_DISTANCE = 0.2; // min distance to show trail (units of cursor width) - const float BLUR = 2.0; // blur size in pixels (for antialiasing) - - // --- CONSTANTS for easing functions --- -@@ -30,14 +30,13 @@ const float SPRING_DAMPING = 0.9; - // float ease(float x) { - // return 1.0 - (1.0 - x) * (1.0 - x); - // } - --// // EaseOutCubic --// float ease(float x) { --// return 1.0 - pow(1.0 - x, 3.0); --// } -- -+// EaseOutCubic -+float ease(float x) { -+ return 1.0 - pow(1.0 - x, 3.0); -+} - - // // EaseOutQuart - // float ease(float x) { - // return 1.0 - pow(1.0 - x, 4.0); - // } -@@ -57,10 +56,10 @@ const float SPRING_DAMPING = 0.9; - // float ease(float x) { - // return x == 1.0 ? 1.0 : 1.0 - pow(2.0, -10.0 * x); - // } - --// EaseOutCirc --float ease(float x) { -- return sqrt(1.0 - pow(x - 1.0, 2.0)); --} -+// // EaseOutCirc -+// float ease(float x) { -+// return sqrt(1.0 - pow(x - 1.0, 2.0)); -+// } - - // // EaseOutBack - // float ease(float x) { diff --git a/modules/programs/gui/ghostty/settings.nix b/modules/programs/gui/ghostty/settings.nix index 5e07d1b..70ec881 100644 --- a/modules/programs/gui/ghostty/settings.nix +++ b/modules/programs/gui/ghostty/settings.nix @@ -32,9 +32,6 @@ window-inherit-working-directory = false; tab-inherit-working-directory = false; split-inherit-working-directory = false; - - # Enable cursor shader animation. - custom-shader-animation = true; }; }; }