diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e6fb06..d474662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,20 @@ # ๐Ÿš€ **Current Release - ZaneyOS v2.6.1** -#### ๐Ÿ“… **Updated: March 16th, 2026** +- Changed to NixOS unstable branch +- Ported `DropTerminal` from `KoolDots` to ZaneyOS + - Replaces pyprland and some python dependencies +- Hyprland updated to v0.54 + - Added support for scrolling and monocle layouts + - Fixed hyprland float-all bindings + - Updated Window Rules for new Hyprland format +- Disabled steam by default +- Removed `adb.enable` no longer supported and not needed for ZaneyOS +- Changed `nixfmt-rfc-style` package for updated `nitfmt` + - `nixfmt-rfc-style` no longer supported +- Fixed other evaluation warnings with `Xorg` package changes -- Fixed issues with `qs-wallpaper,qs-wlogout` - - Forced Qt/QML logs to console in qs-wallpapers, qs-vid-wallpapers, and qs-wlogout - - Soo the wrapper scripts can parse selections/commands when launched from Waybar/Rofi. - - Made disown nonโ€‘fatal in qs-wallpapers-apply, qs-vid-wallpapers-apply, and qs-wallpapers-restore. +# ๐Ÿš€ **Current Release - ZaneyOS v2.6.0** #### ๐Ÿ“… **Updated: February 19th, 2026** diff --git a/flake.lock b/flake.lock index ddcbf05..8628ca4 100644 --- a/flake.lock +++ b/flake.lock @@ -30,11 +30,11 @@ ] }, "locked": { - "lastModified": 1773854383, - "narHash": "sha256-ra8jcAG9WHDsGvqgumqK7Bq6DQqOrbYm18S+TMKaots=", + "lastModified": 1772867847, + "narHash": "sha256-nIXWsnURXPqK4bAwYciu0bLzxHGB9UsmhOmQdeLpegk=", "owner": "jacopone", "repo": "antigravity-nix", - "rev": "54f7caf3dff6ae6131669e91203fb06f2f82db3a", + "rev": "a610db44f5c24da9cbde3bbd22f1dd4690d9553e", "type": "github" }, "original": { @@ -173,11 +173,11 @@ ] }, "locked": { - "lastModified": 1768135262, - "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", "type": "github" }, "original": { @@ -246,24 +246,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "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" - } - }, "flakeCompat": { "flake": false, "locked": { @@ -322,16 +304,16 @@ ] }, "locked": { - "lastModified": 1773963144, - "narHash": "sha256-WzBOBfSay3GYilUfKaUa1Mbf8/jtuAiJIedx7fWuIX4=", + "lastModified": 1772845525, + "narHash": "sha256-Dp5Ir2u4jJDGCgeMRviHvEQDe+U37hMxp6RSNOoMMPc=", "owner": "nix-community", "repo": "home-manager", - "rev": "a91b3ea73a765614d90360580b689c48102d1d33", + "rev": "27b93804fbef1544cb07718d3f0a451f4c4cd6c0", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-25.11", + "ref": "master", "repo": "home-manager", "type": "github" } @@ -344,11 +326,11 @@ ] }, "locked": { - "lastModified": 1773422513, - "narHash": "sha256-MPjR48roW7CUMU6lu0+qQGqj92Kuh3paIulMWFZy+NQ=", + "lastModified": 1772330611, + "narHash": "sha256-UZjPc/d5XRxvjDbk4veAO4XFdvx6BUum2l40V688Xq8=", "owner": "nix-community", "repo": "home-manager", - "rev": "ef12a9a2b0f77c8fa3dda1e7e494fca668909056", + "rev": "58fd7ff0eec2cda43e705c4c0585729ec471d400", "type": "github" }, "original": { @@ -357,34 +339,6 @@ "type": "github" } }, - "ixx": { - "inputs": { - "flake-utils": [ - "nixvim", - "nuschtosSearch", - "flake-utils" - ], - "nixpkgs": [ - "nixvim", - "nuschtosSearch", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1754860581, - "narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=", - "owner": "NuschtOS", - "repo": "ixx", - "rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "ref": "v0.1.1", - "repo": "ixx", - "type": "github" - } - }, "mnw": { "locked": { "lastModified": 1770419553, @@ -440,43 +394,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1774052792, - "narHash": "sha256-u+vmvWyYhd1Z1QybtNW7LdqiQVr+sTGibW7AkaAW2G8=", + "lastModified": 1772773019, + "narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b6202066f0c0f15bf24ac554b1460b83cd7f0802", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1768649915, - "narHash": "sha256-jc21hKogFnxU7KXSVTRmxC7u5D4RHwm9BAvDf5/Z1Uo=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "3e3f3c7f9977dc123c23ee21e8085ed63daf8c37", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1773821835, - "narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0", + "rev": "aca4d95fce4914b3892661bcb80b8087293536c6", "type": "github" }, "original": { @@ -487,22 +409,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1770107345, - "narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1771008912, "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", @@ -518,18 +424,18 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { - "lastModified": 1767799921, - "narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=", + "lastModified": 1767767207, + "narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d351d0653aeb7877273920cd3e823994e7579b0b", + "rev": "5912c1772a44e31bf1c63c0390b90501e5026886", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-25.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -540,20 +446,18 @@ "nixpkgs": [ "nixpkgs" ], - "nuschtosSearch": "nuschtosSearch", - "systems": "systems_3" + "systems": "systems_2" }, "locked": { - "lastModified": 1769049374, - "narHash": "sha256-h0Os2qqNyycDY1FyZgtbn28VF1ySP74/n0f+LDd8j+w=", + "lastModified": 1772402258, + "narHash": "sha256-3DmCFOdmbkFML1/G9gj8Wb+rCCZFPOQtNoMCpqOF8SA=", "owner": "nix-community", "repo": "nixvim", - "rev": "b8f76bf5751835647538ef8784e4e6ee8deb8f95", + "rev": "21ae25e13b01d3b4cdc750b5f9e7bad68b150c10", "type": "github" }, "original": { "owner": "nix-community", - "ref": "nixos-25.11", "repo": "nixvim", "type": "github" } @@ -566,11 +470,11 @@ "noctalia-qs": "noctalia-qs" }, "locked": { - "lastModified": 1774053689, - "narHash": "sha256-8tuH2SJvPi4bjMcXUK5WQYJKql+Aw6V5f3D4UiIP9LI=", + "lastModified": 1772925400, + "narHash": "sha256-I0Gb+CO6bXi1U5PYgCqnuvI1B+R9kZtamLwhVvOywSo=", "owner": "noctalia-dev", "repo": "noctalia-shell", - "rev": "9285188981c3a6f44c0de45eff881d053a312e75", + "rev": "5f319987a5003c383678f4aae0cf71f78c7ea49e", "type": "github" }, "original": { @@ -584,16 +488,14 @@ "nixpkgs": [ "noctalia", "nixpkgs" - ], - "systems": "systems_4", - "treefmt-nix": "treefmt-nix" + ] }, "locked": { - "lastModified": 1773842483, - "narHash": "sha256-oRqz+5AbNKfUWWwN5c83CsSOsUWVGITh0HZg+wX5Q/8=", + "lastModified": 1772673824, + "narHash": "sha256-TLHXPoELZA6VeuzC1Zpx+MnSsYzrJs+DSieMgfjAOJc=", "owner": "noctalia-dev", "repo": "noctalia-qs", - "rev": "3962ff1e0b59ef067c57199d31271ddbf23b29cd", + "rev": "f8531192cd09b9ea2e78d18e9cfc9d3dba498690", "type": "github" }, "original": { @@ -614,11 +516,11 @@ ] }, "locked": { - "lastModified": 1767886815, - "narHash": "sha256-pB2BBv6X9cVGydEV/9Y8+uGCvuYJAlsprs1v1QHjccA=", + "lastModified": 1767810917, + "narHash": "sha256-ZKqhk772+v/bujjhla9VABwcvz+hB2IaRyeLT6CFnT0=", "owner": "nix-community", "repo": "NUR", - "rev": "4ff84374d77ff62e2e13a46c33bfeb73590f9fef", + "rev": "dead29c804adc928d3a69dfe7f9f12d0eec1f1a4", "type": "github" }, "original": { @@ -627,44 +529,21 @@ "type": "github" } }, - "nuschtosSearch": { - "inputs": { - "flake-utils": "flake-utils_2", - "ixx": "ixx", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1768249818, - "narHash": "sha256-ANfn5OqIxq3HONPIXZ6zuI5sLzX1sS+2qcf/Pa0kQEc=", - "owner": "NuschtOS", - "repo": "search", - "rev": "b6f77b88e9009bfde28e2130e218e5123dc66796", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "repo": "search", - "type": "github" - } - }, "nvf": { "inputs": { "flake-compat": "flake-compat", "flake-parts": "flake-parts_2", "mnw": "mnw", "ndg": "ndg", - "nixpkgs": "nixpkgs_3", - "systems": "systems_5" + "nixpkgs": "nixpkgs_2", + "systems": "systems_3" }, "locked": { - "lastModified": 1773970322, - "narHash": "sha256-xyO9ZV+cZk+HVmjS6P5Jzwl6ioRCKgeLQSSbUFtPrZk=", + "lastModified": 1772875143, + "narHash": "sha256-ENBRe7vCCp/SIG2WRKI2pyAxwnrc9CPuwZ4CtMu4KU4=", "owner": "notashelf", "repo": "nvf", - "rev": "8aad181ec9057c56b6fe5d6081a399427e1d1dec", + "rev": "6681e33727409d4ccfa687de981b594110a735d6", "type": "github" }, "original": { @@ -680,8 +559,6 @@ "home-manager": "home-manager", "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable", - "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "noctalia": "noctalia", "nvf": "nvf", @@ -715,9 +592,9 @@ "firefox-gnome-theme": "firefox-gnome-theme", "flake-parts": "flake-parts_3", "gnome-shell": "gnome-shell", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "nur": "nur", - "systems": "systems_6", + "systems": "systems_4", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -725,16 +602,16 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1773790548, - "narHash": "sha256-6lI+ZM1yWL4cNRT39s8AUC+kwq237PZCrWc1ubLOwqc=", + "lastModified": 1772296853, + "narHash": "sha256-pAtzPsgHRKw/2Kv8HgAjSJg450FDldHPWsP3AKG/Xj0=", "owner": "danth", "repo": "stylix", - "rev": "e8ffdddd42062ebc90178db9d013aa38c20b7b2f", + "rev": "c4b8e80a1020e09a1f081ad0f98ce804a6e85acf", "type": "github" }, "original": { "owner": "danth", - "ref": "release-25.11", + "ref": "master", "repo": "stylix", "type": "github" } @@ -785,36 +662,6 @@ } }, "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=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_6": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -865,11 +712,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1767817087, - "narHash": "sha256-eGE8OYoK6HzhJt/7bOiNV2cx01IdIrHL7gXgjkHRdNo=", + "lastModified": 1767710407, + "narHash": "sha256-+W1EB79Jl0/gm4JqmO0Nuc5C7hRdp4vfsV/VdzI+des=", "owner": "tinted-theming", "repo": "schemes", - "rev": "bd99656235aab343e3d597bf196df9bc67429507", + "rev": "2800e2b8ac90f678d7e4acebe4fa253f602e05b2", "type": "github" }, "original": { @@ -910,24 +757,6 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1772660329, - "narHash": "sha256-IjU1FxYqm+VDe5qIOxoW+pISBlGvVApRjiw/Y/ttJzY=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "3710e0e1218041bbad640352a0440114b1e10428", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "zen-browser": { "inputs": { "home-manager": "home-manager_2", @@ -936,11 +765,11 @@ ] }, "locked": { - "lastModified": 1773661718, - "narHash": "sha256-MYm1EKp/gbBi9wMEf7Lx0agIVnej/P61sg97EruWzrU=", + "lastModified": 1772858378, + "narHash": "sha256-VPRlTud1REOz0GPjq3XQNjk5GpH/xNbeadiul4gkPGA=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "3ac6ea223b32ff63c45e3577712df991a35aaf33", + "rev": "42e1e9a1cb5b507789a51193113d56f8f1bb08d9", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ad7cff5..e3a88f6 100644 --- a/flake.nix +++ b/flake.nix @@ -3,14 +3,12 @@ inputs = { home-manager = { - url = "github:nix-community/home-manager/release-25.11"; + url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - nixpkgs.url = "github:nixos/nixpkgs/release-25.11"; - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "github:nixos/nixpkgs/release-25.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nvf.url = "github:notashelf/nvf"; - stylix.url = "github:danth/stylix/release-25.11"; + stylix.url = "github:danth/stylix/master"; nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest"; noctalia = { @@ -20,7 +18,7 @@ # Checking nixvim to see if it's better nixvim = { - url = "github:nix-community/nixvim/nixos-25.11"; + url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/hosts/default/variables.nix b/hosts/default/variables.nix index aff6cc0..8badf01 100644 --- a/hosts/default/variables.nix +++ b/hosts/default/variables.nix @@ -1,7 +1,7 @@ { # Git Configuration ( For Pulling Software Repos ) - gitUsername = "Tyler Kelley"; - gitEmail = "tylerzanekelley@gmail.com"; + gitUsername = "Don Williams"; + gitEmail = "don.e.williams@gmail.com"; # Set Displau Manager # `tui` for Text login @@ -30,7 +30,7 @@ # You can configure multiple monitors. # Inside the quotes, create a new line for each monitor. extraMonitorSettings = " - + monitor = Virtual-1,1920x1080@60,auto,1 "; # Bar/Shell Settings @@ -84,8 +84,8 @@ printEnable = false; # Enable Thunar GUI File Manager - # Yazi is default File Manager - thunarEnable = false; + # Yazi is alternate File Manager + thunarEnable = true; # Themes, waybar and animation. # Only uncomment your selection @@ -95,17 +95,17 @@ # This will set your color palette # Default background # Add new images to ~/zaneyos/wallpapers - stylixImage = ../../wallpapers/mountainscapedark.jpg; + #stylixImage = ../../wallpapers/mountainscapedark.jpg; #stylixImage = ../../wallpapers/AnimeGirlNightSky.jpg; #stylixImage = ../../wallpapers/Anime-Purple-eyes.png; - #stylixImage = ../../wallpapers/Rainnight.jpg; + stylixImage = ../../wallpapers/Rainnight.jpg; #stylixImage = ../../wallpapers/zaney-wallpaper.jpg; #stylixImage = ../../wallpapers/nix-wallpaper-stripes-logo.png; #stylixImage = ../../wallpapers/beautifulmountainscape.jpg; # Set Waybar # Available Options: - waybarChoice = ../../modules/home/waybar/waybar-curved.nix; + #waybarChoice = ../../modules/home/waybar/waybar-curved.nix; #waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix; #waybarChoice = ../../modules/home/waybar/waybar-ddubs-2.nix; #waybarChoice = ../../modules/home/waybar/waybar-simple.nix; @@ -124,12 +124,12 @@ #waybarChoice = ../../modules/home/waybar/waybar-jwt-transparent.nix; #waybarChoice = ../../modules/home/waybar/waybar-jwt-ultradark.nix; #waybarChoice = ../../modules/home/waybar/waybar-pctrade-catppuccin.nix; - #waybarChoice = ../../modules/home/waybar/waybar-mangowc-jak-catppuccin.nix; + waybarChoice = ../../modules/home/waybar/waybar-mangowc-jak-catppuccin.nix; #waybarChoice = ../../modules/home/waybar/waybar-old-ddubsos.nix; # Set Animation style # Available options are: - animChoice = ../../modules/home/hyprland/animations-def.nix; + #animChoice = ../../modules/home/hyprland/animations-def.nix; #animChoice = ../../modules/home/hyprland/animations-end4.nix; #animChoice = ../../modules/home/hyprland/animations-end4-slide.nix; #animChoice = ../../modules/home/hyprland/animations-end-slide.nix; @@ -138,7 +138,7 @@ #animChoice = ../../modules/home/hyprland/animations-hyde-optimized.nix; #animChoice = ../../modules/home/hyprland/animations-mahaveer-me-1.nix; #animChoice = ../../modules/home/hyprland/animations-mahaveer-me-2.nix; - #animChoice = ../../modules/home/hyprland/animations-ml4w-classic.nix; + animChoice = ../../modules/home/hyprland/animations-ml4w-classic.nix; #animChoice = ../../modules/home/hyprland/animations-ml4w-fast.nix; #animChoice = ../../modules/home/hyprland/animations-ml4w-high.nix; diff --git a/hosts/zaneyos-24-vm/variables.nix b/hosts/zaneyos-24-vm/variables.nix index d0a1a7b..05dfff9 100644 --- a/hosts/zaneyos-24-vm/variables.nix +++ b/hosts/zaneyos-24-vm/variables.nix @@ -99,8 +99,8 @@ #stylixImage = ../../wallpapers/mountainscapedark.jpg; #stylixImage = ../../wallpapers/AnimeGirlNightSky.jpg; #stylixImage = ../../wallpapers/Anime-Purple-eyes.png; - #stylixImage = ../../wallpapers/Rainnight.jpg; - stylixImage = ../../wallpapers/zaney-wallpaper.jpg; + stylixImage = ../../wallpapers/Rainnight.jpg; + #stylixImage = ../../wallpapers/zaney-wallpaper.jpg; #stylixImage = ../../wallpapers/nix-wallpapers-strips-logo.jpg; #stylixImage = ../../wallpapers/beautifulmountainscape.jpg; @@ -131,7 +131,7 @@ # Set Animation style # Available options are: #animChoice = ../../modules/home/hyprland/animations-def.nix; - animChoice = ../../modules/home/hyprland/animations-end4.nix; + #animChoice = ../../modules/home/hyprland/animations-end4.nix; #animChoice = ../../modules/home/hyprland/animations-end4-slide.nix; #animChoice = ../../modules/home/hyprland/animations-end-slide.nix; #animChoice = ../../modules/home/hyprland/animations-dynamic.nix; @@ -139,7 +139,7 @@ #animChoice = ../../modules/home/hyprland/animations-hyde-optimized.nix; #animChoice = ../../modules/home/hyprland/animations-mahaveer-me-1.nix; #animChoice = ../../modules/home/hyprland/animations-mahaveer-me-2.nix; - #animChoice = ../../modules/home/hyprland/animations-ml4w-classic.nix; + animChoice = ../../modules/home/hyprland/animations-ml4w-classic.nix; #animChoice = ../../modules/home/hyprland/animations-ml4w-fast.nix; #animChoice = ../../modules/home/hyprland/animations-ml4w-high.nix; diff --git a/modules/core/overlays.nix b/modules/core/overlays.nix index 137cfe6..1f473aa 100644 --- a/modules/core/overlays.nix +++ b/modules/core/overlays.nix @@ -2,18 +2,6 @@ nixpkgs.overlays = [ # Provide pkgs.google-antigravity via antigravity-nix overlay inputs.antigravity-nix.overlays.default - # pkgs.unstable overlay for bleeding edge applications - (_final: prev: { - unstable = import inputs.nixpkgs-unstable { - inherit (prev.stdenv.hostPlatform) system; - config.allowUnfree = true; - }; - }) - # Prefer stable mpv-with-scripts and yt-dlp to avoid deno source builds - (final: _prev: { - mpv-with-scripts = inputs.nixpkgs-stable.legacyPackages.${final.stdenv.hostPlatform.system}.mpv-with-scripts; - yt-dlp = inputs.nixpkgs-stable.legacyPackages.${final.stdenv.hostPlatform.system}.yt-dlp; - }) # Build tumbler without EPUB thumbnailer (libgepub) to avoid webkitgtk (_final: prev: { xfce = prev.xfce // { diff --git a/modules/core/packages.nix b/modules/core/packages.nix index 9bea5c2..3b7d27d 100644 --- a/modules/core/packages.nix +++ b/modules/core/packages.nix @@ -30,7 +30,6 @@ in { seahorse.enable = true; fuse.userAllowOther = true; mtr.enable = true; - adb.enable = true; hyprlock.enable = true; gnupg.agent = { enable = true; @@ -75,7 +74,7 @@ in { mdcat # CLI markdown parser mpv # Incredible Video Player ncdu # Disk Usage Analyzer With Ncurses Interface - nixfmt-rfc-style # Nix Formatter + nixfmt # Nix Formatter nwg-displays # configure monitor configs via GUI nwg-drawer # Application launcher for wayland nwg-dock-hyprland # Dock for hyprland diff --git a/modules/core/steam.nix b/modules/core/steam.nix index 6fafcf7..84829ec 100644 --- a/modules/core/steam.nix +++ b/modules/core/steam.nix @@ -1,7 +1,7 @@ {pkgs, ...}: { programs = { steam = { - enable = true; + enable = false; remotePlay.openFirewall = true; dedicatedServer.openFirewall = false; gamescopeSession.enable = true; diff --git a/modules/core/thunar.nix b/modules/core/thunar.nix index c7419e0..9c82ac5 100644 --- a/modules/core/thunar.nix +++ b/modules/core/thunar.nix @@ -8,9 +8,9 @@ in { programs = { thunar = { enable = thunarEnable; - plugins = with pkgs.xfce; [ - thunar-archive-plugin - thunar-volman + plugins = [ + pkgs.thunar-archive-plugin + pkgs.thunar-volman ]; }; }; diff --git a/modules/home/hyprland/binds.nix b/modules/home/hyprland/binds.nix index 383b744..5d8491f 100644 --- a/modules/home/hyprland/binds.nix +++ b/modules/home/hyprland/binds.nix @@ -16,7 +16,7 @@ "$modifier,V, Noctalia Clipboard, exec, noctalia-shell ipc call launcher clipboard" "$modifier ALT,P, Noctalia Settings, exec, noctalia-shell ipc call settings toggle" "$modifier SHIFT,comma, Noctalia Settings, exec, noctalia-shell ipc call settings toggle" - "$modifier ALT,L, Noctalia Lock Screen, exec, noctalia-shell ipc call sessionMenu lockAndSuspend" + "$modifier CTRL,L, Noctalia Lock Screen, exec, noctalia-shell ipc call sessionMenu lockscreen lock" "$modifier SHIFT,W, Noctalia Wallpaper, exec, noctalia-shell ipc call wallpaper toggle" "$modifier,X, Noctalia Power Menu, exec, noctalia-shell ipc call sessionMenu toggle" "$modifier,C, Noctalia Control Center, exec, noctalia-shell ipc call controlCenter toggle" @@ -70,16 +70,22 @@ in { "$modifier,O, OBS Studio, exec, obs" "$modifier ALT,C, Color Picker, exec, hyprpicker -a" "$modifier,G, GIMP, exec, gimp" - "$modifier shift,T, Dropdown Terminal, exec, pypr toggle term" + "$modifier SHIFT,T, Dropdown Terminal, exec, sh -lc 'DropTerminal'" "$modifier,T, Thunar, exec, thunar" "$modifier ALT,M, Audio Control, exec, pavucontrol" # ============= WINDOW MANAGEMENT ============= "$modifier,Q, Kill Active Window, killactive," "$modifier,P, Pseudo Tile, pseudo," - "$modifier SHIFT,I, Toggle Split, layoutmsg, togglesplit," + "$modifier SHIFT,I, Toggle Split, layoutmsg, togglesplit" "$modifier,F, Maximize, fullscreen," "$modifier SHIFT,F, Toggle Floating, togglefloating," - "$modifier ALT,F, Float All Windows, workspaceopt, allfloat" + "$modifier ALT,F, Float All Windows, exec, hyprland-float-all" + # ============= LAYOUTS ============= + "$modifier ALT,L, Toggle Layouts, exec, hyprland-change-layout toggle" + "$modifier ALT,1, Layout Dwindle, exec, hyprland-change-layout dwindle" + "$modifier ALT,2, Layout Master, exec, hyprland-change-layout master" + "$modifier ALT,3, Layout Scrolling, exec, hyprland-change-layout scrolling" + "$modifier ALT,4, Layout Monocle, exec, hyprland-change-layout monocle" "$modifier SHIFT,C, Exit/Logout of Hyprland, exit," # ============= WINDOW MOVEMENT (ARROW KEYS) ============= "$modifier SHIFT,left, Move Left, movewindow, l" diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix index ab286ca..0e41181 100644 --- a/modules/home/hyprland/default.nix +++ b/modules/home/hyprland/default.nix @@ -9,7 +9,6 @@ in { ./hypridle.nix ./hyprland.nix ./hyprlock.nix - ./pyprland.nix ./windowrules.nix ]; } diff --git a/modules/home/hyprland/exec-once.nix b/modules/home/hyprland/exec-once.nix index adec6b2..130233a 100644 --- a/modules/home/hyprland/exec-once.nix +++ b/modules/home/hyprland/exec-once.nix @@ -38,6 +38,7 @@ in { "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" "systemctl --user start hyprpolkitagent" "qs -c overview" # Start quickshell-overview daemon + "hyprland-change-layout init" ] ++ noctaliaExec ++ waybarExec; }; diff --git a/modules/home/hyprland/hyprland.nix b/modules/home/hyprland/hyprland.nix index 79dab33..367e28a 100644 --- a/modules/home/hyprland/hyprland.nix +++ b/modules/home/hyprland/hyprland.nix @@ -108,9 +108,18 @@ in { workspace_swipe_create_new = true; workspace_swipe_forever = true; }; + "$modifier" = "SUPER"; + + scrolling = { + column_width = 0.80; + fullscreen_on_one_column = true; + direction = "right"; + follow_focus = true; + }; + + monocle = {}; general = { - "$modifier" = "SUPER"; layout = "dwindle"; gaps_in = 6; gaps_out = 8; @@ -139,9 +148,15 @@ in { }; dwindle = { - pseudotile = true; + pseudotile = false; preserve_split = true; - force_split = 2; + smart_resizing = true; + use_active_for_splits = true; + smart_split = false; + default_split_ratio = 1.0; + split_bias = 0; + precise_mouse_move = false; + special_scale_factor = 0.8; }; decoration = { @@ -182,9 +197,16 @@ in { }; master = { - new_status = "master"; - new_on_top = 1; - mfact = 0.5; + new_status = "slave"; + new_on_top = false; + new_on_active = "none"; + orientation = "left"; + mfact = 0.55; + slave_count_for_center_master = 2; + center_master_fallback = "left"; + smart_resizing = true; + drop_at_cursor = true; + always_keep_position = false; }; # Ensure Xwayland windows render at integer scale; compositor scales them diff --git a/modules/home/hyprland/pyprland.nix b/modules/home/hyprland/pyprland.nix deleted file mode 100644 index 0bffe11..0000000 --- a/modules/home/hyprland/pyprland.nix +++ /dev/null @@ -1,18 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [pyprland]; - - home.file.".config/hypr/pyprland.toml".text = '' - [pyprland] - plugins = [ - "scratchpads", - ] - - [scratchpads.term] - animation = "fromTop" - command = "kitty --class kitty-dropterm" - class = "kitty-dropterm" - size = "70% 70%" - max_size = "1920px 100%" - position = "150px 150px" - ''; -} diff --git a/modules/home/hyprland/windowrules.nix b/modules/home/hyprland/windowrules.nix index 87cd9aa..be4fc9a 100644 --- a/modules/home/hyprland/windowrules.nix +++ b/modules/home/hyprland/windowrules.nix @@ -1,130 +1,436 @@ -{host, ...}: let - inherit - (import ../../../hosts/${host}/variables.nix) - extraMonitorSettings - ; -in { +_: { wayland.windowManager.hyprland = { - settings = { - windowrule = [ - #"noblur, xwayland:1" # Helps prevent odd borders/shadows for xwayland apps - # downside it can impact other xwayland apps - # This rule is a template for a more targeted approach - "noblur, class:^(\bresolve\b)$, xwayland:1" # Window rule for just resolve - "tag +file-manager, class:^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$" - "tag +terminal, class:^(com.mitchellh.ghostty|org.wezfurlong.wezterm|Alacritty|kitty|kitty-dropterm)$" - "tag +browser, class:^(Brave-browser(-beta|-dev|-unstable)?)$" - "tag +browser, class:^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr)$" - "tag +browser, class:^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$" - "tag +browser, class:^([Tt]horium-browser|[Cc]achy-browser)$" - "tag +projects, class:^(codium|codium-url-handler|VSCodium)$" - "tag +projects, class:^(VSCode|code-url-handler)$" - "tag +im, class:^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$" - "tag +im, class:^([Ff]erdium)$" - "tag +im, class:^([Ww]hatsapp-for-linux)$" - "tag +im, class:^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$" - "tag +im, class:^(teams-for-linux)$" - "tag +games, class:^(gamescope)$" - "tag +games, class:^(steam_app_\d+)$" - "tag +gamestore, class:^([Ss]team)$" - "tag +gamestore, title:^([Ll]utris)$" - "tag +gamestore, class:^(com.heroicgameslauncher.hgl)$" - "tag +settings, class:^(gnome-disks|wihotspot(-gui)?)$" - "tag +settings, class:^([Rr]ofi)$" - "tag +settings, class:^(file-roller|org.gnome.FileRoller)$" - "tag +settings, class:^(nm-applet|nm-connection-editor|blueman-manager)$" - "tag +settings, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$" - "tag +settings, class:^(nwg-look|qt5ct|qt6ct|[Yy]ad)$" - "tag +settings, class:(xdg-desktop-portal-gtk)" - "tag +settings, class:(.blueman-manager-wrapped)" - "tag +settings, class:(nwg-displays)" - "move 72% 7%,title:^(Picture-in-Picture)$" - # qs-keybinds floating viewer - "float, title:^(Hyprland Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration)$" - "center, title:^(Hyprland Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration)$" - "size 55% 66%, title:^(Hyprland Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration)$" - # qs-cheatsheets floating viewer - "float, title:^(Cheatsheets Viewer)$" - "center, title:^(Cheatsheets Viewer)$" - "size 65% 60%, title:^(Cheatsheets Viewer)$" - "center, class:^([Ff]erdium)$" - "float, class:^([Ww]aypaper)$" - "float, class:^(org\\.qt-project\\.qml)$, title:^(Wallpapers)$" - "float, class:^(org\\.qt-project\\.qml)$, title:^(Video Wallpapers)$" - "center, class:^(org\\.qt-project\\.qml)$, title:^(Video Wallpapers)$" - "float, class:^(org\\.qt-project\\.qml)$, title:^(qs-wlogout)$" - "center, class:^(org\\.qt-project\\.qml)$, title:^(qs-wlogout)$" - "float, class:^(org\\.qt-project\\.qml)$, title:^(Panels)$" - "center, class:^(org\\.qt-project\\.qml)$, title:^(Panels)$" - "noshadow, class:^(org\\.qt-project\\.qml)$, title:^(Panels)$" - "noblur, class:^(org\\.qt-project\\.qml)$, title:^(Panels)$" - "rounding 12, class:^(org\\.qt-project\\.qml)$, title:^(Panels)$" - # qs-keybinds, qs-docs, qs-chevron floating viewer - "float, title:^(Hyprland Keybinds|Niri Keybinds|BSPWM Keybinds|i3 Keybinds|Sway Keybinds|DWM Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration|Cheatsheets Viewer|Documentation Viewer)$" - "center, title:^(Hyprland Keybinds|Niri Keybinds|BSPWM Keybinds|i3 Keybinds|Sway Keybinds|DWM Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration|Cheatsheets Viewer|Documentation Viewer)$" - "size 55% 66%, title:^(Hyprland Keybinds|Niri Keybinds|BSPWM Keybinds|i3 Keybinds|Sway Keybinds|DWM Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration|Cheatsheets Viewer|Documentation Viewer)$" - "center, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$" - "center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*)" - "center, title:^(Authentication Required)$" - "idleinhibit fullscreen, class:^(*)$" - "idleinhibit fullscreen, title:^(*)$" - "idleinhibit fullscreen, fullscreen:1" - "float, tag:settings*" - "float, class:^([Ff]erdium)$" - "float, title:^(Picture-in-Picture)$" - "float, class:^(mpv|com.github.rafostar.Clapper)$" - "float, title:^(Authentication Required)$" - "float, class:(codium|codium-url-handler|VSCodium), title:negative:(.*codium.*|.*VSCodium.*)" - "float, class:^(com.heroicgameslauncher.hgl)$, title:negative:(Heroic Games Launcher)" - "float, class:^([Ss]team)$, title:negative:^([Ss]team)$" - "float, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*)" - "float, initialTitle:(Add Folder to Workspace)" - "float, initialTitle:(Open Files)" - "float, initialTitle:(wants to save)" - "size 70% 60%, initialTitle:(Open Files)" - "size 70% 60%, initialTitle:(Add Folder to Workspace)" - "size 70% 70%, tag:settings*" - "size 60% 70%, class:^([Ff]erdium)$" - "opacity 1.0 1.0, tag:browser*" - "opacity 0.9 0.8, tag:projects*" - "opacity 0.94 0.86, tag:im*" - "opacity 0.9 0.8, tag:file-manager*" - "opacity 0.8 0.7, tag:terminal*" - "opacity 0.8 0.7, tag:settings*" - "opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor|mousepad)$" - "opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui" - "opacity 0.95 0.75, title:^(Picture-in-Picture)$" - "pin, title:^(Picture-in-Picture)$" - "keepaspectratio, title:^(Picture-in-Picture)$" - "noblur, tag:games*" - "fullscreen, tag:games*" - ]; - windowrulev2 = [ - # qs-wallpapers styling via compositor - "noborder, class:^(org\\.qt-project\\.qml)$, title:^(Wallpapers)$" - "noshadow, class:^(org\\.qt-project\\.qml)$, title:^(Wallpapers)$" - "noblur, class:^(org\\.qt-project\\.qml)$, title:^(Wallpapers)$" - "rounding 12, class:^(org\\.qt-project\\.qml)$, title:^(Wallpapers)$" + extraConfig = '' + # Set float and centering for dialog boxes + rule = float(true), match:modal:1 + rule = center(true), match:modal:1 - # qs-vid-wallpapers styling via compositor - "noborder, class:^(org\\.qt-project\\.qml)$, title:^(Video Wallpapers)$" - "noshadow, class:^(org\\.qt-project\\.qml)$, title:^(Video Wallpapers)$" - "noblur, class:^(org\\.qt-project\\.qml)$, title:^(Video Wallpapers)$" - "rounding 12, class:^(org\\.qt-project\\.qml)$, title:^(Video Wallpapers)$" + windowrule { + name = Resolve + match:class = ^(\bresolve\b)$ + match:xwayland = 1 + no_blur = on + } - # qs-wlogout styling via compositor - power menu overlay - "noborder, class:^(org\\.qt-project\\.qml)$, title:^(qs-wlogout)$" - "rounding 20, class:^(org\\.qt-project\\.qml)$, title:^(qs-wlogout)$" - "opacity 1.0 1.0, class:^(org\\.qt-project\\.qml)$, title:^(qs-wlogout)$" + windowrule { + name = Thunar + match:class = ^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$ + tag = +file-manager + } - # qs-docs / qs-cheatsheets overlay windows - "noborder, class:^(org\\.qt-project\\.qml)$, title:^(Cheatsheets Viewer)$" - "noshadow, class:^(org\\.qt-project\\.qml)$, title:^(Cheatsheets Viewer)$" - "rounding 12, class:^(org\\.qt-project\\.qml)$, title:^(Cheatsheets Viewer)$" - "noborder, class:^(org\\.qt-project\\.qml)$, title:^(Documentation Viewer)$" - "noshadow, class:^(org\\.qt-project\\.qml)$, title:^(Documentation Viewer)$" - "rounding 12, class:^(org\\.qt-project\\.qml)$, title:^(Documentation Viewer)$" - ]; - }; + windowrule { + name = Terminals + match:class = ^(com.mitchellh.ghostty|org.wezfurlong.wezterm|Alacritty|kitty|kitty-dropterm|dropterminal)$ + tag = +terminal + } + + windowrule { + name = Brave-browser + match:class = ^(Brave-browser(-beta|-dev|-unstable)?)$ + tag = +browser + } + + windowrule { + name = Firefox + match:class = ^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr)$ + tag = +browser + } + + windowrule { + name = Google-chrome + match:class = ^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$ + tag = +browser + } + + windowrule { + name = Thorium-browser + match:class = ^([Tt]horium-browser|[Cc]achy-browser)$ + tag = +browser + } + + windowrule { + name = vscodium + match:class = ^(codium|codium-url-handler|VSCodium)$ + tag = +projects + } + + windowrule { + name = vscode + match:class = ^(VSCode|code-url-handler)$ + tag = +projects + } + + windowrule { + name = Discord + match:class = ^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$ + tag = +im + } + + windowrule { + name = Ferdium + match:class = ^([Ff]erdium)$ + center = on + float = on + size = 60% = 70% + tag = +im + } + + windowrule { + name = Whatsapp + match:class = ^([Ww]hatsapp-for-linux)$ + tag = +im + } + + windowrule { + name = Telegram-desktop + match:class = ^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$ + tag = +im + } + + windowrule { + name = teams-for-linux + match:class = ^(teams-for-linux)$ + tag = +im + } + + windowrule { + name = gamescope + match:class = ^(gamescope)$ + tag = +games + } + + windowrule { + name = steam-app + match:class = ^(steam_app\d+)$ + tag = +games + } + + windowrule { + name = Steam + match:class = ^([Ss]team)$ + tag = +gamestore + } + + windowrule { + name = Lutris + match:title = ^([Ll]utris)$ + tag = +gamestore + } + + windowrule { + name = heroicgameslauncher + match:class = ^(com.heroicgameslauncher.hgl)$ + tag = +gamestore + } + + windowrule { + name = gnome-disks + match:class = ^(gnome-disks|wihotspot(-gui)?)$ + tag = +settings + } + + windowrule { + name = rofi + match:class = ^([Rr]ofi)$ + tag = +settings + no_blur = off + } + + windowrule { + name = FileRoller + match:class = ^(file-roller|org.gnome.FileRoller)$ + tag = +settings + } + + windowrule { + name = NetworkManger + match:class = ^(nm-applet|nm-connection-editor|blueman-manager)$ + tag = +settings + } + + windowrule { + name = PlusAudio + match:class = ^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ + center = on + tag = +settings + no_blur = off + } + + windowrule { + name = nwg-look + match:class = ^(nwg-look|qt5ct|qt6ct|[Yy]ad)$ + tag = +settings + } + + windowrule { + name = xdg-desktop-portal-gtk + match:class = (xdg-desktop-portal-gtk) + tag = +settings + } + + windowrule { + name = blueman + match:class = (.blueman-manager-wrapped) + tag = +settings + } + + windowrule { + name = nwg-displays + match:class = (nwg-displays) + tag = +settings + } + + windowrule { + name = Picture-in-Picture + match:title = ^(Picture-in-Picture)$ + float = on + move = 72% = 7% + opacity = 0.95 = 0.75 + pin = 0 + keep_aspect_ratio = on + } + + windowrule { + name = ThunarFileMgr + match:class = ([Tt]hunar) + match:title = negative:(.*[Tt]hunar.*) + center = on + float = on + } + + windowrule { + name = Authentication-Required + match:title = ^(Authentication Required)$ + center = on + float = on + } + + windowrule { + name = IdleInhibit-fullscreen-1 + match:class = ^(*)$ + idle_inhibit = fullscreen + } + + windowrule { + name = IdleInhibit-fullscreen-2 + match:title = ^(*)$ + idle_inhibit = fullscreen + } + + windowrule { + name = IdleInhibit-fullscreen-3 + match:fullscreen = 1 + idle_inhibit = fullscreen + } + + windowrule { + name = Settings-Tag + match:tag = settings* + float = on + opacity = 0.8 = 0.7 + size = 70% = 70% + no_blur = off + } + + windowrule { + name = WayPaper + match:class = ^([Ww]aypaper)$ + float = on + no_blur = off + } + + windowrule { + name = mpv-or-clapper + match:class = ^(mpv|com.github.rafostar.Clapper)$ + float = on + } + + windowrule { + name = codium-url-handler + match:class = (codium|codium-url-handler|VSCodium) + match:title = negative:(.*codium.*|.*VSCodium.*) + float = on + } + + windowrule { + name = heroicgameslauncher-1 + match:class = ^(com.heroicgameslauncher.hgl)$ + match:title = negative:(Heroic Games Launcher) + float = on + } + + windowrule { + name = Steam + match:class = ^([Ss]team)$ + match:title = negative:^([Ss]team)$ + float = on + } + + windowrule { + name = Add-Folder + match:initial_title = (Add Folder to Workspace) + float = on + size = 70% = 60% + } + + windowrule { + name = Open-File + match:initial_title = (Open Files) + float = on + size = 70% = 60% + } + + windowrule { + name = Wants-to-Save + match:initial_title = (wants to save) + float = on + } + + windowrule { + name = Browsers + match:tag = browser* + opacity = 1.0 = 1.0 + } + + windowrule { + name = Projects + match:tag = projects* + opacity = 0.9 = 0.8 + } + + windowrule { + name = Instant-Messaging + match:tag = im* + opacity = 0.94 = 0.86 + } + + windowrule { + name = File-Managers + match:tag = file-manager* + opacity = 0.9 = 0.8 + } + + windowrule { + name = Terminals-opacity + match:tag = terminal* + opacity = 0.8 = 0.7 + no_blur = off + } + + windowrule { + name = windowrule-77 + match:class = ^(gedit|org.gnome.TextEditor|mousepad)$ + opacity = 0.8 = 0.7 + } + + windowrule { + name = windowrule-78 + match:class = ^(seahorse)$ + opacity = 0.9 = 0.8 + } + + windowrule { + name = windowrule-79 + match:tag = games* + no_blur = on + } + + windowrule { + name = windowrule-80 + match:tag = games* + fullscreen = on + } + + windowrule { + name = qs-keybinds + match:title = ^(Hyprland Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration)$ + float = on + center = on + size = 55% = 66% + } + + windowrule { + name = qs-cheatsheets + match:title = ^(Cheatsheets Viewer)$ + float = on + center = on + size = 65% = 60% + } + + windowrule { + name = qs-extended-viewers + match:title = ^(Hyprland Keybinds|Niri Keybinds|BSPWM Keybinds|i3 Keybinds|Sway Keybinds|DWM Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration|Cheatsheets Viewer|Documentation Viewer)$ + float = on + center = on + size = 55% = 66% + } + + windowrule { + name = QS-Wallpapers + match:class = ^(org\.qt-project\.qml)$ + match:title = ^(Wallpapers)$ + border_size = 0 + float = on + no_blur = on + no_shadow = on + rounding = 12 + } + + windowrule { + name = QA-Video-Wallpapers + match:class = ^(org\.qt-project\.qml)$ + match:title = ^(Video Wallpapers)$ + border_size = 0 + center = on + float = on + no_blur = on + no_shadow = on + rounding = 12 + } + + windowrule { + name = QS-wlogout + match:class = ^(org\.qt-project\.qml)$ + match:title = ^(qs-wlogout)$ + border_size = 0 + center = on + float = on + opacity = 1.0 = 1.0 + rounding = 20 + } + + windowrule { + name = QA-Panels + match:class = ^(org\.qt-project\.qml)$ + match:title = ^(Panels)$ + center = on + float = on + no_blur = on + no_shadow = on + rounding = 12 + } + + windowrule { + name = QS-Cheatsheets + match:class = ^(org\.qt-project\.qml)$ + match:title = ^(Cheatsheets Viewer)$ + border_size = 0 + center = on + float = on + no_shadow = on + rounding = 12 + } + + windowrule { + name = QS-Documentation-Viewer + match:class = ^(org\.qt-project\.qml)$ + match:title = ^(Documentation Viewer)$ + border_size = 0 + center = on + float = on + no_shadow = on + rounding = 12 + } + ''; }; } diff --git a/modules/home/scripts/DropTerminal.nix b/modules/home/scripts/DropTerminal.nix new file mode 100644 index 0000000..cbc14d1 --- /dev/null +++ b/modules/home/scripts/DropTerminal.nix @@ -0,0 +1,446 @@ +{pkgs}: +pkgs.writeShellScriptBin "DropTerminal" '' + #!/usr/bin/env bash + # Dropdown Terminal for Hyprland (Nix-managed) + # Source: adapted from Dropterminal.sh by Kiran George (SherLock707) + # Usage: + # DropTerminal [-d] [] + # Behavior: + # - If is omitted, uses $TERM, with fallback to kitty when $TERM is unset/empty + + set -euo pipefail + + DEBUG=false + # Use a dedicated special workspace so preload never flashes on screen + SPECIAL_WS="special:dropterminal" + ADDR_FILE="/tmp/dropdown_terminal_addr" + SPAWN_ONLY=false # if true, just create hidden in scratchpad and exit + + # Sanitize Hyprland JSON to strict JSON (work around NaN/Inf issues) + hyprjson() { + # Usage: hyprjson + # Emits strict JSON, replacing invalid numeric literals with null + hyprctl "$@" -j 2>/dev/null | sed -E 's/: *nan([,}])/ : null\1/gi; s/: *-nan([,}])/ : null\1/gi; s/: *inf([,}])/ : null\1/gi; s/: *-inf([,}])/ : null\1/gi' + } + + # Dropdown size and position configuration (percentages) + WIDTH_PERCENT=65 # Width as percentage of screen width + HEIGHT_PERCENT=65 # Height as percentage of screen height + Y_PERCENT=10 # Y position as percentage from top (X is auto-centered) + + # Animation settings + ANIMATION_DURATION=100 # milliseconds + SLIDE_STEPS=5 + SLIDE_DELAY=5 # milliseconds between steps + + # Parse arguments + if [ "''${1-}" = "-d" ] || [ "''${1-}" = "--debug" ]; then + DEBUG=true + shift || true + fi + if [ "''${1-}" = "-S" ] || [ "''${1-}" = "--spawn-only" ]; then + SPAWN_ONLY=true + shift || true + fi + # Env override for startup usage + if [ "''${DROPTERM_SPAWN_ONLY-}" = "1" ]; then + SPAWN_ONLY=true + fi + + # Terminal command: prefer explicit arg; otherwise always use kitty + TERMINAL_CMD="''${1-}" + if [ -z "''${TERMINAL_CMD}" ]; then + TERMINAL_CMD="kitty" + fi + + # Debug echo function + debug_echo() { + if [ "$DEBUG" = true ]; then + echo "$@" >&2 + fi + } + + # Wait until Hyprland returns sane JSON (monitors/workspace ready) + wait_for_hypr() { + for i in $(seq 1 60); do + if hyprjson monitors | ${pkgs.jq}/bin/jq -e 'length > 0' >/dev/null 2>&1 \ + && hyprjson activeworkspace | ${pkgs.jq}/bin/jq -e '.id | numbers' >/dev/null 2>&1; then + return 0 + fi + sleep 0.05 + done + return 0 + } + + # Function to get window geometry + get_window_geometry() { + local addr="$1" + hyprjson clients | ${pkgs.jq}/bin/jq -r --arg ADDR "$addr" '.[] | select(.address == $ADDR) | "\(.at[0]) \(.at[1]) \(.size[0]) \(.size[1])"' + } + + # Ensure a window is floating + ensure_floating() { + local addr="$1" + local is_float=$(hyprjson clients | ${pkgs.jq}/bin/jq -r --arg ADDR "$addr" '.[] | select(.address == $ADDR) | .floating // false') + if [ "$is_float" != "true" ]; then + hyprctl dispatch togglefloating "address:$addr" >/dev/null 2>&1 || true + sleep 0.02 + fi + } + + # Function to animate window slide down (show) + animate_slide_down() { + local addr="$1" + local target_x="$2" + local target_y="$3" + local width="$4" + local height="$5" + if ! [[ "$target_x" =~ ^-?[0-9]+$ ]] || ! [[ "$target_y" =~ ^-?[0-9]+$ ]] || \ + ! [[ "$width" =~ ^[0-9]+$ ]] || ! [[ "$height" =~ ^[0-9]+$ ]]; then + debug_echo "Invalid geometry for slide down; skipping animation" + return 1 + fi + + debug_echo "Animating slide down for window $addr to position $target_x,$target_y" + + # Start position (above screen) + local start_y=$((target_y - height - 50)) + + # Calculate step size + local step_y=$(((target_y - start_y) / SLIDE_STEPS)) + + # Move window to start position instantly (off-screen) + hyprctl dispatch movewindowpixel "exact $target_x $start_y,address:$addr" >/dev/null 2>&1 + sleep 0.05 + + # Animate slide down + for i in $(seq 1 $SLIDE_STEPS); do + local current_y=$((start_y + (step_y * i))) + hyprctl dispatch movewindowpixel "exact $target_x $current_y,address:$addr" >/dev/null 2>&1 + sleep 0.03 + done + + # Ensure final position is exact + hyprctl dispatch movewindowpixel "exact $target_x $target_y,address:$addr" >/dev/null 2>&1 + } + + # Function to animate window slide up (hide) + animate_slide_up() { + local addr="$1" + local start_x="$2" + local start_y="$3" + local width="$4" + local height="$5" + if ! [[ "$start_x" =~ ^-?[0-9]+$ ]] || ! [[ "$start_y" =~ ^-?[0-9]+$ ]] || \ + ! [[ "$width" =~ ^[0-9]+$ ]] || ! [[ "$height" =~ ^[0-9]+$ ]]; then + debug_echo "Invalid geometry for slide up; skipping animation" + return 1 + fi + + debug_echo "Animating slide up for window $addr from position $start_x,$start_y" + + # End position (above screen) + local end_y=$((start_y - height - 50)) + + # Calculate step size + local step_y=$(((start_y - end_y) / SLIDE_STEPS)) + + # Animate slide up + for i in $(seq 1 $SLIDE_STEPS); do + local current_y=$((start_y - (step_y * i))) + hyprctl dispatch movewindowpixel "exact $start_x $current_y,address:$addr" >/dev/null 2>&1 + sleep 0.03 + done + + debug_echo "Slide up animation completed" + } + + # Function to get monitor info including scale and name of focused monitor + get_monitor_info() { + local monitor_data=$(hyprjson monitors | ${pkgs.jq}/bin/jq -r '.[] | select(.focused == true) | "\(.x) \(.y) \(.width) \(.height) \(.scale // 1) \(.name)"') + if [ -z "$monitor_data" ] || [[ "$monitor_data" =~ ^null ]]; then + debug_echo "Error: Could not get focused monitor information" + return 1 + fi + echo "$monitor_data" + } + + # Function to calculate dropdown position with proper scaling and centering + calculate_dropdown_position() { + local monitor_info=$(get_monitor_info) + + if [ $? -ne 0 ] || [ -z "$monitor_info" ]; then + debug_echo "Error: Failed to get monitor info, using fallback values" + echo "100 100 800 600 fallback-monitor" + return 1 + fi + + local mon_x=$(echo $monitor_info | cut -d' ' -f1) + local mon_y=$(echo $monitor_info | cut -d' ' -f2) + local mon_width=$(echo $monitor_info | cut -d' ' -f3) + local mon_height=$(echo $monitor_info | cut -d' ' -f4) + local mon_scale=$(echo $monitor_info | cut -d' ' -f5) + local mon_name=$(echo $monitor_info | cut -d' ' -f6) + # Ensure geometry values are numeric; Hyprland can emit non-JSON status lines during startup + if ! [[ "$mon_x" =~ ^-?[0-9]+$ ]] || ! [[ "$mon_y" =~ ^-?[0-9]+$ ]] || \ + ! [[ "$mon_width" =~ ^[0-9]+$ ]] || ! [[ "$mon_height" =~ ^[0-9]+$ ]]; then + debug_echo "Error: Non-numeric monitor geometry; using fallback values" + echo "100 100 800 600 fallback-monitor" + return 1 + fi + + debug_echo "Monitor info: x=$mon_x, y=$mon_y, width=$mon_width, height=$mon_height, scale=$mon_scale" + + # Validate scale value and provide fallback + if [ -z "$mon_scale" ] || [ "$mon_scale" = "null" ] || [ "$mon_scale" = "0" ]; then + debug_echo "Invalid scale value, using 1.0 as fallback" + mon_scale="1.0" + fi + + # Calculate logical dimensions by dividing physical dimensions by scale + local logical_width logical_height + if [ -x "${pkgs.bc}/bin/bc" ]; then + logical_width=$(echo "scale=0; $mon_width / $mon_scale" | ${pkgs.bc}/bin/bc | cut -d'.' -f1) + logical_height=$(echo "scale=0; $mon_height / $mon_scale" | ${pkgs.bc}/bin/bc | cut -d'.' -f1) + else + # Fallback to integer math (multiply by 100 for precision, then divide) + local scale_int=$(echo "$mon_scale" | sed 's/\.///' | sed 's/^0*//') + if [ -z "$scale_int" ]; then scale_int=100; fi + + logical_width=$(((mon_width * 100) / scale_int)) + logical_height=$(((mon_height * 100) / scale_int)) + fi + + # Ensure we have valid integer values + if ! [[ "$logical_width" =~ ^-?[0-9]+$ ]]; then logical_width=$mon_width; fi + if ! [[ "$logical_height" =~ ^-?[0-9]+$ ]]; then logical_height=$mon_height; fi + + debug_echo "Physical resolution: ''${mon_width}x''${mon_height}" + debug_echo "Logical resolution: ''${logical_width}x''${logical_height} (physical รท scale)" + + # Calculate window dimensions based on LOGICAL space percentages + local width=$((logical_width * WIDTH_PERCENT / 100)) + local height=$((logical_height * HEIGHT_PERCENT / 100)) + + # Calculate Y position from top based on percentage of LOGICAL height + local y_offset=$((logical_height * Y_PERCENT / 100)) + + # Calculate centered X position in LOGICAL space + local x_offset=$(((logical_width - width) / 2)) + + # Apply monitor offset to get final positions in logical coordinates + local final_x=$((mon_x + x_offset)) + local final_y=$((mon_y + y_offset)) + + debug_echo "Window size: ''${width}x''${height} (logical pixels)" + debug_echo "Final position: x=$final_x, y=$final_y (logical coordinates)" + debug_echo "Hyprland will scale these to physical coordinates automatically" + + echo "$final_x $final_y $width $height $mon_name" + } + + # Ensure Hyprland is ready and get the current workspace + wait_for_hypr + CURRENT_WS=$(hyprjson activeworkspace | ${pkgs.jq}/bin/jq -r '.id // empty') + if [ -z "''${CURRENT_WS}" ]; then + # Try once more after a short wait + sleep 0.1 + CURRENT_WS=$(hyprjson activeworkspace | ${pkgs.jq}/bin/jq -r '.id // empty') + fi + if [ -z "''${CURRENT_WS}" ]; then + debug_echo "Warning: unable to read active workspace; using workspace 1" + CURRENT_WS="1" + fi + + # Function to get stored terminal address + get_terminal_address() { + if [ -f "$ADDR_FILE" ] && [ -s "$ADDR_FILE" ]; then + cut -d' ' -f1 "$ADDR_FILE" + fi + } + + # Function to get stored monitor name + get_terminal_monitor() { + if [ -f "$ADDR_FILE" ] && [ -s "$ADDR_FILE" ]; then + cut -d' ' -f2- "$ADDR_FILE" + fi + } + + # Function to check if terminal exists + terminal_exists() { + local addr=$(get_terminal_address) + if [ -n "$addr" ]; then + hyprjson clients | ${pkgs.jq}/bin/jq -e --arg ADDR "$addr" 'map(select(.address == $ADDR)) | any' >/dev/null 2>&1 + else + return 1 + fi + } + + # Function to check if terminal is in special workspace + terminal_in_special() { + local addr=$(get_terminal_address) + if [ -n "$addr" ]; then + hyprjson clients | ${pkgs.jq}/bin/jq -e --arg ADDR "$addr" --arg WS "$SPECIAL_WS" 'map(select(.address == $ADDR and .workspace.name == $WS)) | any' >/dev/null 2>&1 + else + return 1 + fi + } + + # Function to spawn terminal and capture its address + spawn_terminal() { + debug_echo "Creating new dropdown terminal with command: $TERMINAL_CMD" + + # Calculate dropdown position for later use + local pos_info=$(calculate_dropdown_position) + if [ $? -ne 0 ]; then + debug_echo "Warning: Using fallback positioning" + fi + local target_x target_y width height monitor_name + read -r target_x target_y width height monitor_name <<<"$pos_info" + if ! [[ "$target_x" =~ ^-?[0-9]+$ ]] || ! [[ "$target_y" =~ ^-?[0-9]+$ ]] || \ + ! [[ "$width" =~ ^[0-9]+$ ]] || ! [[ "$height" =~ ^[0-9]+$ ]]; then + debug_echo "Invalid position parsed; using fallback values" + target_x=100 + target_y=100 + width=800 + height=600 + monitor_name="fallback-monitor" + fi + + debug_echo "Target position: ''${target_x},''${target_y}, size: ''${width}x''${height}" + + # Create a unique title so we can robustly identify the new window + local token=$(date +%s%N) + local title="dropterm-$token" + local spawn_cmd="$TERMINAL_CMD --class dropterminal --instance-group dropterminal --title $title" + + # Launch in scratchpad to avoid visible spawn; size will be enforced after detection + hyprctl dispatch exec "[float; workspace $SPECIAL_WS silent] $spawn_cmd" >/dev/null 2>&1 || true + + # Wait for the new window with our unique class/title (up to ~3s) + local new_addr="" + for i in $(seq 1 60); do + new_addr=$(hyprjson clients | ${pkgs.jq}/bin/jq -r --arg CLS "dropterminal" --arg TITLE "$title" \ + '.[] | select(.class == $CLS and .title == $TITLE) | .address' | head -1) + if [ -n "$new_addr" ]; then break; fi + sleep 0.05 + done + + if [ -n "$new_addr" ] && [ "$new_addr" != "null" ]; then + # Store the address and monitor name + echo "$new_addr $monitor_name" >"$ADDR_FILE" + debug_echo "Terminal created with address: $new_addr in special workspace on monitor $monitor_name" + + # Ensure scratchpad placement (in case exec flags were ignored) + hyprctl dispatch movetoworkspacesilent "$SPECIAL_WS,address:$new_addr" >/dev/null 2>&1 || true + ensure_floating "$new_addr" + hyprctl dispatch resizewindowpixel "exact $width $height,address:$new_addr" >/dev/null 2>&1 || true + + if [ "$SPAWN_ONLY" = true ]; then + # Keep it hidden for startup preload + debug_echo "Spawn-only: leaving terminal hidden in scratchpad" + return 0 + fi + + # Bring to current workspace and set up geometry/animation + hyprctl dispatch movetoworkspacesilent "$CURRENT_WS,address:$new_addr" + ensure_floating "$new_addr" + hyprctl dispatch pin "address:$new_addr" + hyprctl dispatch resizewindowpixel "exact $width $height,address:$new_addr" + animate_slide_down "$new_addr" "$target_x" "$target_y" "$width" "$height" + + return 0 + fi + + debug_echo "Failed to detect new kitty window; aborting spawn" + return 1 + } + + # Main logic + if terminal_exists; then + TERMINAL_ADDR=$(get_terminal_address) + debug_echo "Found existing terminal: $TERMINAL_ADDR" + focused_monitor=$(get_monitor_info | awk '{print $6}') + dropdown_monitor=$(get_terminal_monitor) + if [ "$focused_monitor" != "$dropdown_monitor" ]; then + debug_echo "Monitor focus changed: moving dropdown to $focused_monitor" + # Calculate new position for focused monitor + pos_info=$(calculate_dropdown_position) + read -r target_x target_y width height monitor_name <<<"$pos_info" + if ! [[ "$target_x" =~ ^-?[0-9]+$ ]] || ! [[ "$target_y" =~ ^-?[0-9]+$ ]] || \ + ! [[ "$width" =~ ^[0-9]+$ ]] || ! [[ "$height" =~ ^[0-9]+$ ]]; then + debug_echo "Invalid position parsed; using fallback values" + target_x=100 + target_y=100 + width=800 + height=600 + monitor_name="fallback-monitor" + fi + # Move and resize window + hyprctl dispatch movewindowpixel "exact $target_x $target_y,address:$TERMINAL_ADDR" + hyprctl dispatch resizewindowpixel "exact $width $height,address:$TERMINAL_ADDR" + # Update ADDR_FILE + echo "$TERMINAL_ADDR $monitor_name" >"$ADDR_FILE" + fi + + if terminal_in_special; then + debug_echo "Bringing terminal from scratchpad with slide down animation" + + # Calculate target position + pos_info=$(calculate_dropdown_position) + read -r target_x target_y width height monitor_name <<<"$pos_info" + if ! [[ "$target_x" =~ ^-?[0-9]+$ ]] || ! [[ "$target_y" =~ ^-?[0-9]+$ ]] || \ + ! [[ "$width" =~ ^[0-9]+$ ]] || ! [[ "$height" =~ ^[0-9]+$ ]]; then + debug_echo "Invalid position parsed; using fallback values" + target_x=100 + target_y=100 + width=800 + height=600 + fi + + # Use movetoworkspacesilent to avoid affecting workspace history + hyprctl dispatch movetoworkspacesilent "$CURRENT_WS,address:$TERMINAL_ADDR" + ensure_floating "$TERMINAL_ADDR" + hyprctl dispatch pin "address:$TERMINAL_ADDR" + + # Set size and animate slide down + hyprctl dispatch resizewindowpixel "exact $width $height,address:$TERMINAL_ADDR" + animate_slide_down "$TERMINAL_ADDR" "$target_x" "$target_y" "$width" "$height" + + hyprctl dispatch focuswindow "address:$TERMINAL_ADDR" + else + debug_echo "Hiding terminal to scratchpad with slide up animation" + + # Get current geometry for animation + geometry=$(get_window_geometry "$TERMINAL_ADDR") + if [ -n "$geometry" ]; then + curr_x=$(echo $geometry | cut -d' ' -f1) + curr_y=$(echo $geometry | cut -d' ' -f2) + curr_width=$(echo $geometry | cut -d' ' -f3) + curr_height=$(echo $geometry | cut -d' ' -f4) + + debug_echo "Current geometry: ''${curr_x},''${curr_y} ''${curr_width}x''${curr_height}" + + # Animate slide up first + animate_slide_up "$TERMINAL_ADDR" "$curr_x" "$curr_y" "$curr_width" "$curr_height" + + # Small delay then move to special workspace and unpin + sleep 0.1 + hyprctl dispatch pin "address:$TERMINAL_ADDR" # Unpin (toggle) + hyprctl dispatch movetoworkspacesilent "$SPECIAL_WS,address:$TERMINAL_ADDR" + else + debug_echo "Could not get window geometry, moving to scratchpad without animation" + hyprctl dispatch pin "address:$TERMINAL_ADDR" + hyprctl dispatch movetoworkspacesilent "$SPECIAL_WS,address:$TERMINAL_ADDR" + fi + fi + else + debug_echo "No existing terminal found, creating new one" + if spawn_terminal; then + TERMINAL_ADDR=$(get_terminal_address) + if [ "$SPAWN_ONLY" = false ] && [ -n "$TERMINAL_ADDR" ]; then + hyprctl dispatch focuswindow "address:$TERMINAL_ADDR" + fi + fi + fi +'' diff --git a/modules/home/scripts/default.nix b/modules/home/scripts/default.nix index 94f1355..6e99baa 100644 --- a/modules/home/scripts/default.nix +++ b/modules/home/scripts/default.nix @@ -17,6 +17,7 @@ (import ./screenshootin.nix {inherit pkgs;}) (import ./squirtle.nix {inherit pkgs;}) (import ./task-waybar.nix {inherit pkgs;}) + (import ./DropTerminal.nix {inherit pkgs;}) (import ./wallsetter.nix { inherit pkgs; inherit username; @@ -36,6 +37,8 @@ (import ./qs-wlogout.nix {inherit pkgs;}) (import ./qs-docs.nix {inherit pkgs;}) (import ./docs-parser.nix {inherit pkgs;}) + (import ./hyprland-float-all.nix {inherit pkgs;}) + (import ./hyprland-change-layout.nix {inherit pkgs;}) (import ./launch-nwg-menu.nix {inherit pkgs;}) (import ./hyprland-dock.nix {inherit pkgs;}) (import ./restart.noctalia.nix {inherit pkgs;}) @@ -46,4 +49,15 @@ ]; }) ]; + + xdg.desktopEntries.dropterminal = { + name = "Drop Terminal"; + comment = "Dropdown terminal (Hyprland)"; + exec = "DropTerminal"; + terminal = false; + type = "Application"; + icon = "kitty"; + settings.StartupWMClass = "dropterminal"; + categories = ["System" "Utility" "TerminalEmulator"]; + }; } diff --git a/modules/home/scripts/hyprland-change-layout.nix b/modules/home/scripts/hyprland-change-layout.nix new file mode 100644 index 0000000..0ce0e65 --- /dev/null +++ b/modules/home/scripts/hyprland-change-layout.nix @@ -0,0 +1,85 @@ +{pkgs}: +pkgs.writeShellScriptBin "hyprland-change-layout" '' + #!/usr/bin/env bash + set -euo pipefail + + notif="''${XDG_CONFIG_HOME:-$HOME/.config}/swaync/images/catppuccin-macchiato.png" + layouts=(dwindle master scrolling monocle) + + get_layout() { + ${pkgs.hyprland}/bin/hyprctl -j getoption general:layout | ${pkgs.jq}/bin/jq -r '.str' + } + + next_layout() { + local current="$1" + local i + for i in "''${!layouts[@]}"; do + if [[ "''${layouts[i]}" == "$current" ]]; then + echo "''${layouts[((i + 1) % ''${#layouts[@]})]}" + return + fi + done + echo "''${layouts[0]}" + } + + set_layout() { + local target="$1" + + ${pkgs.hyprland}/bin/hyprctl keyword general:layout "$target" + ${pkgs.hyprland}/bin/hyprctl keyword unbind SUPER,J || true + ${pkgs.hyprland}/bin/hyprctl keyword unbind SUPER,K || true + ${pkgs.hyprland}/bin/hyprctl keyword unbind SUPER,O || true + ${pkgs.hyprland}/bin/hyprctl keyword unbind SUPER_SHIFT,M || true + + case "$target" in + "dwindle") + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER,J,cyclenext + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER,K,cyclenext,prev + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER,O,layoutmsg,togglesplit + ${pkgs.libnotify}/bin/notify-send -e -u low -i "$notif" " Dwindle Layout" + ;; + "master") + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER,J,layoutmsg,cyclenext + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER,K,layoutmsg,cycleprev + ${pkgs.libnotify}/bin/notify-send -e -u low -i "$notif" " Master Layout" + ;; + "scrolling") + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER,J,cyclenext + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER,K,cyclenext,prev + ${pkgs.libnotify}/bin/notify-send -e -u low -i "$notif" " Scrolling Layout" + ;; + "monocle") + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER,J,layoutmsg,cyclenext + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER,K,layoutmsg,cycleprev + ${pkgs.hyprland}/bin/hyprctl keyword bind SUPER_SHIFT,M,layoutmsg,swapnext + ${pkgs.libnotify}/bin/notify-send -e -u low -i "$notif" " Monocle Layout" + ;; + *) + echo "Unknown layout: $target" >&2 + return 1 + ;; + esac + } + + current="$(get_layout)" + arg="''${1:-toggle}" + + case "$arg" in + init) + set_layout "$current" + ;; + toggle|next) + set_layout "$(next_layout "$current")" + ;; + set) + set_layout "''${2:-}" + ;; + master|dwindle|scrolling|monocle) + set_layout "$arg" + ;; + *) + echo "Usage: $(basename "$0") [toggle|next|init|set |master|dwindle|scrolling|monocle]" >&2 + exit 1 + ;; + esac +'' diff --git a/modules/home/scripts/hyprland-float-all.nix b/modules/home/scripts/hyprland-float-all.nix new file mode 100644 index 0000000..e99c30f --- /dev/null +++ b/modules/home/scripts/hyprland-float-all.nix @@ -0,0 +1,11 @@ +{pkgs}: +pkgs.writeShellScriptBin "hyprland-float-all" '' + #!/usr/bin/env bash + set -euo pipefail + + ws="$(${pkgs.hyprland}/bin/hyprctl activeworkspace -j | ${pkgs.jq}/bin/jq -r .id)" + ${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r --arg ws "$ws" '.[] | select(.workspace.id == ($ws|tonumber)) | .address' \ + | while read -r addr; do + [ -n "''${addr:-}" ] && ${pkgs.hyprland}/bin/hyprctl dispatch togglefloating "address:$addr" + done +'' diff --git a/modules/home/swaync.nix b/modules/home/swaync.nix index 07e6261..a29959b 100644 --- a/modules/home/swaync.nix +++ b/modules/home/swaync.nix @@ -1,4 +1,6 @@ {config, ...}: { + home.file."${config.xdg.configHome}/swaync/images/catppuccin-macchiato.png".source = + ./swaync/images/catppuccin-macchiato.png; services.swaync = { enable = true; settings = { diff --git a/modules/home/swaync/images/catppuccin-macchiato.png b/modules/home/swaync/images/catppuccin-macchiato.png new file mode 100644 index 0000000..ddb8cd6 Binary files /dev/null and b/modules/home/swaync/images/catppuccin-macchiato.png differ diff --git a/modules/home/zsh/default.nix b/modules/home/zsh/default.nix index 9f1bcbb..5df8b59 100644 --- a/modules/home/zsh/default.nix +++ b/modules/home/zsh/default.nix @@ -2,6 +2,7 @@ profile, pkgs, lib, + config, ... }: { imports = [ @@ -10,6 +11,7 @@ programs.zsh = { enable = true; + dotDir = config.home.homeDirectory; autosuggestion.enable = true; syntaxHighlighting = { enable = true;