diff --git a/dotfiles/config/hypr/hyprland/binds.lua b/dotfiles/config/hypr/hyprland/binds.lua index 57c259eb..cff3956f 100644 --- a/dotfiles/config/hypr/hyprland/binds.lua +++ b/dotfiles/config/hypr/hyprland/binds.lua @@ -15,7 +15,7 @@ function M.setup(ctx) bind(main_mod .. " + Tab", hyprwinview({ action = "show", start_in_filter_mode = true, - default_action = "bring", + default_action = "select", }), overview_bind_opts) bind(main_mod .. " + SHIFT + Tab", hyprwinview({ action = "show", @@ -24,7 +24,11 @@ function M.setup(ctx) default_action = "bring", }), overview_bind_opts) bind(main_mod .. " + SHIFT + slash", hyprwinview({ action = "toggle-filter" }), overview_bind_opts) - bind("ALT + Tab", hyprspace("toggle"), overview_bind_opts) + bind("ALT + Tab", enable_hyprspace and hyprspace("toggle") or hyprwinview({ + action = "show", + start_in_filter_mode = true, + default_action = "select", + }), overview_bind_opts) bind("ALT + SHIFT + Tab", hyprexpo("open"), overview_bind_opts) bind(main_mod .. " + G", hyprwinview({ action = "show", diff --git a/dotfiles/config/hypr/hyprland/core.lua b/dotfiles/config/hypr/hyprland/core.lua index db199d4e..ab9bc486 100644 --- a/dotfiles/config/hypr/hyprland/core.lua +++ b/dotfiles/config/hypr/hyprland/core.lua @@ -70,24 +70,6 @@ function M.setup(ctx) end end - local function hyprspace(action) - action = action or "toggle" - return function() - overview_trace("hyprspace " .. tostring(action)) - if hl.plugin and hl.plugin.hyprspace and hl.plugin.hyprspace.overview then - hl.plugin.hyprspace.overview(action) - else - hl.notification.create({ - text = "Hyprspace is not loaded", - duration = 1800, - icon = notification_icons.warning, - color = "rgba(edb443ff)", - font_size = 13, - }) - end - end - end - local function hyprwinview(action) return function() local label = "hyprwinview" @@ -132,6 +114,23 @@ function M.setup(ctx) end end + local function hyprspace(action) + return function() + overview_trace("hyprspace " .. tostring(action or "toggle")) + if hl.plugin and hl.plugin.hyprspace and hl.plugin.hyprspace.overview then + hl.plugin.hyprspace.overview({ action = action or "toggle" }) + else + hl.notification.create({ + text = "hyprspace is not loaded", + duration = 1800, + icon = notification_icons.warning, + color = "rgba(edb443ff)", + font_size = 13, + }) + end + end + end + local function apply_nstack_config() if verify_config or not enable_nstack or not configure_nstack_plugin_from_lua then return @@ -514,9 +513,9 @@ function M.setup(ctx) ctx.overview_trace = overview_trace ctx.window_selector = window_selector ctx.hyprexpo = hyprexpo - ctx.hyprspace = hyprspace ctx.hyprwinview = hyprwinview ctx.workspacehistory = workspacehistory + ctx.hyprspace = hyprspace ctx.apply_nstack_config = apply_nstack_config ctx.apply_hyprexpo_config = apply_hyprexpo_config ctx.apply_hyprwinview_config = apply_hyprwinview_config diff --git a/dotfiles/config/hypr/hyprland/state.lua b/dotfiles/config/hypr/hyprland/state.lua index 5ee4d5ab..dfe0996e 100644 --- a/dotfiles/config/hypr/hyprland/state.lua +++ b/dotfiles/config/hypr/hyprland/state.lua @@ -46,7 +46,8 @@ return { current_layout = columns_layout, enable_nstack = true, enable_hyprexpo = true, - enable_hyprspace = true, + -- Keep disabled until the PR231-patched Hyprspace build is switched into /run/current-system. + enable_hyprspace = false, enable_hyprwinview = true, enable_workspace_history = true, configure_nstack_plugin_from_lua = false, diff --git a/nixos/flake.lock b/nixos/flake.lock index 415be43e..200336a8 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -10,15 +10,16 @@ ] }, "locked": { - "lastModified": 1775071961, - "narHash": "sha256-LXkeeH9Blr6ohS1LAsVZbkJ/EAkkMDATh5qu45hC7Zo=", - "owner": "KZDKM", + "lastModified": 1778647860, + "narHash": "sha256-WIHQcCdzY/2MYYtVZyGkctjsISTsjHLVuunJXt5g92c=", + "owner": "colonelpanic8", "repo": "Hyprspace", - "rev": "12ddde04f8584bf7de3151e6169918e0dda9f822", + "rev": "a9d7685ef610d5a45c7c4f9f974bdf78443c9829", "type": "github" }, "original": { - "owner": "KZDKM", + "owner": "colonelpanic8", + "ref": "codex/defer-hyprspace-initial-reload", "repo": "Hyprspace", "type": "github" } @@ -795,6 +796,49 @@ "type": "github" } }, + "hyprexpo": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1778630563, + "narHash": "sha256-eMr0oqnBF0SayY5LsmcIEhSui3z8qrl97TQVVyqXCAU=", + "owner": "colonelpanic8", + "repo": "hyprexpo", + "rev": "3e70e82910801f8202e61a4c885d750df2720d58", + "type": "github" + }, + "original": { + "owner": "colonelpanic8", + "repo": "hyprexpo", + "type": "github" + } + }, + "hyprglass": { + "flake": false, + "locked": { + "lastModified": 1778646157, + "narHash": "sha256-SxEK4ftc6X28FZXtzwT7IH79rZ3UBNIUhTYoMoPLqpw=", + "owner": "colonelpanic8", + "repo": "hyprglass", + "rev": "244542b607f36d8b40822df94bb720bf4ebec5ca", + "type": "github" + }, + "original": { + "owner": "colonelpanic8", + "ref": "codex/hyprland-0.55-compat", + "repo": "hyprglass", + "type": "github" + } + }, "hyprgraphics": { "inputs": { "hyprutils": [ @@ -902,37 +946,6 @@ "type": "github" } }, - "hyprland-plugins-lua": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "nixpkgs": [ - "hyprland-plugins-lua", - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland-plugins-lua", - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1777692803, - "narHash": "sha256-wSJmIka4KUeicbRsUHuf2Bvxn7pZaSlKja3UBwyPevk=", - "owner": "colonelpanic8", - "repo": "hyprland-plugins", - "rev": "e796b1220379420907cb5a20bbe434eca533aa55", - "type": "github" - }, - "original": { - "owner": "colonelpanic8", - "ref": "codex/fix-main-ci-workspace-numbers", - "repo": "hyprland-plugins", - "type": "github" - } - }, "hyprland-protocols": { "inputs": { "nixpkgs": [ @@ -1127,11 +1140,11 @@ ] }, "locked": { - "lastModified": 1778234303, - "narHash": "sha256-4kgvtJbWtgKm7vduxqAph/RTgBtSpmnbxAFkkxvRjBU=", + "lastModified": 1778544371, + "narHash": "sha256-p/hRLy5B7iDM+MXEyj8dMw9QqVVYRL3ynhiEHZgB0NY=", "owner": "colonelpanic8", "repo": "hyprwinview", - "rev": "7c0719ab9e28b149fb6c134301c3006d61bb1e3e", + "rev": "a88da94878220fda744c5fd7506d595b3e35d3ca", "type": "github" }, "original": { @@ -1730,6 +1743,10 @@ "inputs": { "Hyprspace": "Hyprspace", "agenix": "agenix", + "aquamarine": [ + "hyprland", + "aquamarine" + ], "claude-code-nix": "claude-code-nix", "codex-cli-nix": "codex-cli-nix", "codex-desktop-linux": "codex-desktop-linux", @@ -1742,9 +1759,26 @@ "home-manager": "home-manager", "hypr-workspace-history": "hypr-workspace-history", "hyprNStack": "hyprNStack", + "hyprcursor": [ + "hyprland", + "hyprcursor" + ], + "hyprexpo": "hyprexpo", + "hyprglass": "hyprglass", + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], "hyprland": "hyprland", - "hyprland-plugins-lua": "hyprland-plugins-lua", + "hyprlang": [ + "hyprland", + "hyprlang" + ], "hyprscratch": "hyprscratch", + "hyprutils": [ + "hyprland", + "hyprutils" + ], "hyprwinview": "hyprwinview", "imalison-taffybar": "imalison-taffybar", "kanshi-sni": "kanshi-sni", diff --git a/nixos/flake.nix b/nixos/flake.nix index f7b5c92e..33dd23a8 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -96,6 +96,12 @@ url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; + aquamarine.follows = "hyprland/aquamarine"; + hyprcursor.follows = "hyprland/hyprcursor"; + hyprgraphics.follows = "hyprland/hyprgraphics"; + hyprlang.follows = "hyprland/hyprlang"; + hyprutils.follows = "hyprland/hyprutils"; + hyprNStack = { url = "github:colonelpanic8/hyprNStack?ref=codex/hyprnstack-combined"; inputs = { @@ -104,15 +110,21 @@ }; }; - hyprland-plugins-lua = { - url = "github:colonelpanic8/hyprland-plugins?ref=codex/fix-main-ci-workspace-numbers"; - inputs.hyprland.follows = "hyprland"; + hyprexpo = { + url = "github:colonelpanic8/hyprexpo"; + inputs = { + hyprland.follows = "hyprland"; + nixpkgs.follows = "nixpkgs"; + systems.follows = "systems"; + }; }; Hyprspace = { - url = "github:KZDKM/Hyprspace"; - inputs.hyprland.follows = "hyprland"; - inputs.systems.follows = "systems"; + url = "github:colonelpanic8/Hyprspace/codex/defer-hyprspace-initial-reload"; + inputs = { + hyprland.follows = "hyprland"; + systems.follows = "systems"; + }; }; hyprwinview = { @@ -126,6 +138,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + hyprglass = { + url = "github:colonelpanic8/hyprglass?ref=codex/hyprland-0.55-compat"; + flake = false; + }; + hyprscratch = { url = "github:colonelpanic8/hyprscratch/reapply-rules-on-toggle"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/nixos/flake/per-system.nix b/nixos/flake/per-system.nix index a013a60c..7261b87e 100644 --- a/nixos/flake/per-system.nix +++ b/nixos/flake/per-system.nix @@ -17,6 +17,15 @@ inherit pkgs system; inherit inputs; }; + hyprglass = pkgs.callPackage ../packages/hyprglass { + src = inputs.hyprglass; + hyprland = inputs.hyprland.packages.${system}.hyprland; + aquamarine = inputs.aquamarine.packages.${system}.aquamarine; + hyprcursor = inputs.hyprcursor.packages.${system}.hyprcursor; + hyprgraphics = inputs.hyprgraphics.packages.${system}.hyprgraphics; + hyprlang = inputs.hyprlang.packages.${system}.hyprlang; + hyprutils = inputs.hyprutils.packages.${system}.hyprutils; + }; tangledConfig = dotfilesOrgApi.org-agenda-custom-config; # Import container build logic @@ -33,9 +42,10 @@ in { } // lib.optionalAttrs pkgs.stdenv.isLinux { hyprNStack = inputs.hyprNStack.packages.${system}.hyprNStack; - hyprexpo-lua = inputs.hyprland-plugins-lua.packages.${system}.hyprexpo; + hyprexpo-lua = inputs.hyprexpo.packages.${system}.hyprexpo; hyprwinview = inputs.hyprwinview.packages.${system}.hyprwinview; hypr-workspace-history = inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history; + inherit hyprglass; }; checks = @@ -50,9 +60,10 @@ in { } // lib.optionalAttrs pkgs.stdenv.isLinux { hyprNStack = inputs.hyprNStack.packages.${system}.hyprNStack; - hyprexpo-lua = inputs.hyprland-plugins-lua.packages.${system}.hyprexpo; + hyprexpo-lua = inputs.hyprexpo.packages.${system}.hyprexpo; hyprwinview = inputs.hyprwinview.packages.${system}.hyprwinview; hypr-workspace-history = inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history; + inherit hyprglass; hyprland-config-syntax = import ../checks/hyprland-config-syntax { inherit pkgs; hyprlandConfigDir = ../../dotfiles/config/hypr; diff --git a/nixos/hyprland.nix b/nixos/hyprland.nix index e1e05372..a4ee1646 100644 --- a/nixos/hyprland.nix +++ b/nixos/hyprland.nix @@ -90,27 +90,33 @@ }; hyprlandPackage = makeHyprlandLuaPackage baseHyprlandPackage; hyprspace = inputs.Hyprspace.packages.${system}.Hyprspace.overrideAttrs (old: { - version = "${old.version}-pr230"; + version = "${old.version}-pr231"; __intentionallyOverridingVersion = true; patches = (old.patches or []) ++ [ - # Hyprspace main has not caught up with Hyprland 0.55 yet. - # https://github.com/KZDKM/Hyprspace/pull/230 - (pkgs.fetchpatch { - url = "https://github.com/KZDKM/Hyprspace/pull/230.patch"; - hash = "sha256-jwSuIyhUi8KMIpgBxqyDZvcRHxHjiji8GMipDX4Dot8="; - }) ./packages/hyprspace-lua-api.patch ]; }); - hyprlandPluginPackages = [ - inputs.hyprNStack.packages.${system}.hyprNStack - inputs.hyprland-plugins-lua.packages.${system}.hyprexpo - hyprspace - inputs.hyprwinview.packages.${system}.hyprwinview - inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history - ]; + enableHyprglass = true; + hyprglass = pkgs.callPackage ./packages/hyprglass { + src = inputs.hyprglass; + hyprland = baseHyprlandPackage; + aquamarine = inputs.aquamarine.packages.${system}.aquamarine; + hyprcursor = inputs.hyprcursor.packages.${system}.hyprcursor; + hyprgraphics = inputs.hyprgraphics.packages.${system}.hyprgraphics; + hyprlang = inputs.hyprlang.packages.${system}.hyprlang; + hyprutils = inputs.hyprutils.packages.${system}.hyprutils; + }; + hyprlandPluginPackages = + [ + inputs.hyprNStack.packages.${system}.hyprNStack + inputs.hyprexpo.packages.${system}.hyprexpo + hyprspace + inputs.hyprwinview.packages.${system}.hyprwinview + inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history + ] + ++ lib.optionals enableHyprglass [hyprglass]; hyprRofiWindow = pkgs.writeShellApplication { name = "hypr_rofi_window"; runtimeInputs = [ diff --git a/nixos/packages/hyprglass/default.nix b/nixos/packages/hyprglass/default.nix new file mode 100644 index 00000000..374796f4 --- /dev/null +++ b/nixos/packages/hyprglass/default.nix @@ -0,0 +1,69 @@ +{ + stdenv, + lib, + gnumake, + pkg-config, + aquamarine, + cairo, + glslang, + hyprland, + hyprcursor, + hyprgraphics, + hyprlang, + hyprutils, + libGL, + libxcb, + libxcb-errors, + libxcb-wm, + libdrm, + libinput, + libxkbcommon, + pixman, + wayland, + src, +}: +stdenv.mkDerivation { + pname = "hyprglass"; + version = "unstable-${src.shortRev or "unknown"}"; + inherit src; + + nativeBuildInputs = [ + gnumake + pkg-config + ]; + + buildInputs = [ + aquamarine + cairo + glslang + hyprland + hyprcursor + hyprgraphics + hyprlang + hyprutils + libGL + libxcb + libxcb-errors + libxcb-wm + libdrm + libinput + libxkbcommon + pixman + wayland + ]; + + installPhase = '' + runHook preInstall + + install -Dm755 hyprglass.so "$out/lib/hyprglass.so" + + runHook postInstall + ''; + + meta = { + description = "Liquid Glass inspired plugin for Hyprland"; + homepage = "https://github.com/hyprnux/hyprglass"; + license = lib.licenses.bsd3; + platforms = lib.platforms.linux; + }; +}