From c0532d96d24dee7863bf186093298c568532d10d Mon Sep 17 00:00:00 2001 From: Emmet Date: Sat, 10 May 2025 11:15:05 -0500 Subject: [PATCH] updates for hyprland + ashell --- flake.lock | 167 +++++++++-------------------- flake.nix | 16 +-- modules/user/hyprland/ashell.patch | 32 ++++++ modules/user/hyprland/default.nix | 6 +- 4 files changed, 89 insertions(+), 132 deletions(-) create mode 100644 modules/user/hyprland/ashell.patch diff --git a/flake.lock b/flake.lock index 7c1733e1..4a22a3b7 100644 --- a/flake.lock +++ b/flake.lock @@ -33,31 +33,6 @@ "type": "github" } }, - "ashell": { - "inputs": { - "crane": "crane", - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": [ - "rust-overlay" - ] - }, - "locked": { - "lastModified": 1741471836, - "narHash": "sha256-eI3mFllV2GUXkkySHWOSZ6g32amkDHi56nWYWg9LOag=", - "owner": "librephoenix", - "repo": "ashell", - "rev": "02f2d9ce7d04c2a76aa7578c1b9177c6342fbf80", - "type": "github" - }, - "original": { - "owner": "librephoenix", - "repo": "ashell", - "type": "github" - } - }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -163,21 +138,6 @@ "type": "github" } }, - "crane": { - "locked": { - "lastModified": 1739936662, - "narHash": "sha256-x4syUjNUuRblR07nDPeLDP7DpphaBVbUaSoeZkFbGSk=", - "owner": "ipetkov", - "repo": "crane", - "rev": "19de14aaeb869287647d9461cbd389187d8ecdb7", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, "emacs-overlay": { "inputs": { "nixpkgs": [ @@ -305,24 +265,6 @@ } }, "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { "inputs": { "systems": [ "stylix", @@ -604,28 +546,26 @@ "hyprland-protocols": "hyprland-protocols", "hyprland-qtutils": "hyprland-qtutils", "hyprlang": "hyprlang", - "hyprutils": [ - "hyprutils" - ], + "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": [ "nixpkgs" ], "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_2", + "systems": "systems", "xdph": "xdph" }, "locked": { - "lastModified": 1746825381, - "narHash": "sha256-q//4N6ZoN6eBelgzUheQ07Oj6UilDjAOld0eKjnXQd0=", + "lastModified": 1746735318, + "narHash": "sha256-iN0Ge4LaVT7rATqzIrAZFSdfYuIXbe4/HGcXle7qK1g=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "60cd5b7a48af4a23717201d70395161a3bb4ab24", + "rev": "9958d297641b5c84dcff93f9039d80a5ad37ab00", "type": "github" }, "original": { "owner": "hyprwm", - "ref": "main", + "ref": "v0.49.0", "repo": "Hyprland", "type": "github" } @@ -785,14 +725,12 @@ "inputs": { "hyprgraphics": "hyprgraphics_2", "hyprlang": "hyprlang_2", - "hyprutils": [ - "hyprutils" - ], + "hyprutils": "hyprutils_2", "hyprwayland-scanner": "hyprwayland-scanner_2", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1746809694, @@ -811,22 +749,51 @@ "hyprutils": { "inputs": { "nixpkgs": [ + "hyprland", "nixpkgs" ], - "systems": "systems_4" + "systems": [ + "hyprland", + "systems" + ] }, "locked": { "lastModified": 1746635225, "narHash": "sha256-W9G9bb0zRYDBRseHbVez0J8qVpD5QbizX67H/vsudhM=", - "ref": "refs/heads/main", + "owner": "hyprwm", + "repo": "hyprutils", "rev": "674ea57373f08b7609ce93baff131117a0dfe70d", - "revCount": 96, - "type": "git", - "url": "https://code.hyprland.org/hyprwm/hyprutils.git" + "type": "github" }, "original": { - "type": "git", - "url": "https://code.hyprland.org/hyprwm/hyprutils.git" + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprutils_2": { + "inputs": { + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1746635225, + "narHash": "sha256-W9G9bb0zRYDBRseHbVez0J8qVpD5QbizX67H/vsudhM=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "674ea57373f08b7609ce93baff131117a0dfe70d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" } }, "hyprwayland-scanner": { @@ -1089,14 +1056,12 @@ }, "root": { "inputs": { - "ashell": "ashell", "blocklist-hosts": "blocklist-hosts", "chaotic": "chaotic", "emacs-overlay": "emacs-overlay", "home-manager": "home-manager_2", "hyprland": "hyprland", "hyprlock": "hyprlock", - "hyprutils": "hyprutils", "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable_2", "plasma-manager": "plasma-manager", @@ -1168,13 +1133,13 @@ "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", "nixpkgs": "nixpkgs_4", "nur": "nur", - "systems": "systems_5", + "systems": "systems_3", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1197,16 +1162,16 @@ }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1226,36 +1191,6 @@ } }, "systems_3": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index 68b180e7..f1a35200 100644 --- a/flake.nix +++ b/flake.nix @@ -86,14 +86,7 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; hyprland = { - url = "github:hyprwm/Hyprland/main?submodules=true"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.hyprutils.follows = "hyprutils"; - }; - - hyprutils = { - type = "git"; - url = "https://code.hyprland.org/hyprwm/hyprutils.git"; + url = "github:hyprwm/Hyprland/v0.49.0?submodules=true"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -101,13 +94,6 @@ type = "git"; url = "https://code.hyprland.org/hyprwm/hyprlock.git"; inputs.nixpkgs.follows = "nixpkgs"; - inputs.hyprutils.follows = "hyprutils"; - }; - - ashell = { - url = "github:librephoenix/ashell"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.rust-overlay.follows = "rust-overlay"; }; plasma-manager = { diff --git a/modules/user/hyprland/ashell.patch b/modules/user/hyprland/ashell.patch new file mode 100644 index 00000000..f45c9035 --- /dev/null +++ b/modules/user/hyprland/ashell.patch @@ -0,0 +1,32 @@ +diff --git a/src/modules/workspaces.rs b/src/modules/workspaces.rs +index 806d499..3737a82 100644 +--- a/src/modules/workspaces.rs ++++ b/src/modules/workspaces.rs +@@ -41,6 +41,7 @@ fn get_workspaces(enable_workspace_filling: bool) -> Vec { + let mut workspaces = hyprland::data::Workspaces::get() + .map(|w| w.to_vec()) + .unwrap_or_default(); ++ workspaces.retain(|w| w.id > 0); + + workspaces.sort_by_key(|w| w.id); + +diff --git a/src/outputs.rs b/src/outputs.rs +index adc616b..ce63b57 100644 +--- a/src/outputs.rs ++++ b/src/outputs.rs +@@ -58,6 +58,7 @@ impl Outputs { + id, + size: Some((None, Some(HEIGHT))), + layer: Layer::Bottom, ++ namespace: String::from("ashell"), + pointer_interactivity: true, + keyboard_interactivity: KeyboardInteractivity::None, + exclusive_zone: HEIGHT as i32, +@@ -77,6 +78,7 @@ impl Outputs { + id: menu_id, + size: Some((None, None)), + layer: Layer::Background, ++ namespace: String::from("ashell"), + pointer_interactivity: true, + keyboard_interactivity: KeyboardInteractivity::None, + output: wl_output.map_or(IcedOutput::Active, |wl_output| { diff --git a/modules/user/hyprland/default.nix b/modules/user/hyprland/default.nix index 7e2ec255..2defcd8f 100644 --- a/modules/user/hyprland/default.nix +++ b/modules/user/hyprland/default.nix @@ -382,7 +382,11 @@ in kitty killall polkit_gnome - (inputs.ashell.defaultPackage.${system}) + (ashell.overrideAttrs (o: { + patches = (o.patches or [ ]) ++ [ + ./ashell.patch + ]; + })) nwg-launchers papirus-icon-theme (pkgs.writeScriptBin "nwggrid-wrapper" ''