diff --git a/flake.lock b/flake.lock index ee8a5c65..c8039f9c 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,38 @@ { "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1764714051, + "narHash": "sha256-AjcMlM3UoavFoLzr0YrcvsIxALShjyvwe+o7ikibpCM=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "a43bedcceced5c21ad36578ed823e6099af78214", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, "arcexprs": { "inputs": { "nixpkgs": [ @@ -377,6 +410,22 @@ "type": "github" } }, + "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -609,7 +658,7 @@ "simple-nixos-mailserver", "flake-compat" ], - "gitignore": "gitignore_4", + "gitignore": "gitignore_5", "nixpkgs": [ "simple-nixos-mailserver", "nixpkgs" @@ -673,6 +722,28 @@ } }, "gitignore_3": { + "inputs": { + "nixpkgs": [ + "hyprland", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_4": { "inputs": { "nixpkgs": [ "lanzaboote", @@ -694,7 +765,7 @@ "type": "github" } }, - "gitignore_4": { + "gitignore_5": { "inputs": { "nixpkgs": [ "simple-nixos-mailserver", @@ -756,6 +827,347 @@ "type": "github" } }, + "hy3": { + "inputs": { + "hyprland": [ + "hyprland" + ] + }, + "locked": { + "lastModified": 1765308255, + "narHash": "sha256-d0Lb47PeFCQLG4xeZKmx+iokJ0pL03b2hSiZZ94o6JA=", + "owner": "Immelancholy", + "repo": "hy3", + "rev": "609b4c9e5115abe293ea5a978f41fdb21d11f8c7", + "type": "github" + }, + "original": { + "owner": "Immelancholy", + "ref": "update-to-m_reserved_area", + "repo": "hy3", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1753964049, + "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1763733840, + "narHash": "sha256-JnET78yl5RvpGuDQy3rCycOCkiKoLr5DN1fPhRNNMco=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "8f1bec691b2d198c60cccabca7a94add2df4ed1a", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", + "hyprland-guiutils": "hyprland-guiutils", + "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwire": "hyprwire", + "nixpkgs": "nixpkgs_2", + "pre-commit-hooks": "pre-commit-hooks", + "systems": "systems", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1765284242, + "narHash": "sha256-r9ltXBKsowTVc/avfoBmd7M4H3NOxJUPm0+9o8sj03Y=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "6712fb954f2e4f701878b97f19b7185a2cd0e192", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "6712fb954f2e4f701878b97f19b7185a2cd0e192", + "type": "github" + } + }, + "hyprland-guiutils": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": "hyprtoolkit", + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1764801417, + "narHash": "sha256-9RBShG2FNfBWz4Y+O/w86Iwmgu+JrNkhjsY4fsGpRtw=", + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "rev": "fff53f22dc3a5926221a00028a85acb18fb65799", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1759610243, + "narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1764612430, + "narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "0d00dc118981531aa731150b6ea551ef037acddd", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprtoolkit": { + "inputs": { + "aquamarine": [ + "hyprland", + "hyprland-guiutils", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprland-guiutils", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprland-guiutils", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprland-guiutils", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprland-guiutils", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "hyprland-guiutils", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-guiutils", + "systems" + ] + }, + "locked": { + "lastModified": 1764592794, + "narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=", + "owner": "hyprwm", + "repo": "hyprtoolkit", + "rev": "5cfe0743f0e608e1462972303778d8a0859ee63e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprtoolkit", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1764637132, + "narHash": "sha256-vSyiKCzSY48kA3v39GFu6qgRfigjKCU/9k1KTK475gg=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "2f2413801beee37303913fc3c964bbe92252a963", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1763640274, + "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwire": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1765741352, + "narHash": "sha256-jTJQy1m2XkcZJABajYVP249fCWPl3GbLe3Z8KiQmZqg=", + "owner": "hyprwm", + "repo": "hyprwire", + "rev": "b8ca85082fd5c3cdd3d11027492cd0332b517078", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwire", + "type": "github" + } + }, "ida-pro-overlay": { "inputs": { "nixpkgs": [ @@ -1115,7 +1527,7 @@ "doomemacs": "doomemacs", "emacs-overlay": "emacs-overlay", "nixpkgs": [], - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1765961268, @@ -1136,7 +1548,7 @@ "flake-parts": [ "flake-parts" ], - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1765937051, @@ -1402,7 +1814,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_2", + "systems": "systems_3", "treefmt-nix": [ "treefmt-nix" ] @@ -1422,6 +1834,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1764667669, + "narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "418468ac9527e799809c900eda37cbff999199b6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1765457389, "narHash": "sha256-ddhDtNYvleZeYF7g7TRFSmuQuZh7HCgqstg5YBGwo5s=", @@ -1437,7 +1865,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1765779637, "narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=", @@ -1453,7 +1881,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1765772535, "narHash": "sha256-aq+dQoaPONOSjtFIBnAXseDm9TUhIbe215TPmkfMYww=", @@ -1469,7 +1897,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1761236834, "narHash": "sha256-+pthv6hrL5VLW2UqPdISGuLiUZ6SnAXdd2DdUE+fV2Q=", @@ -1490,8 +1918,8 @@ "flake-parts": [ "flake-parts" ], - "nixpkgs": "nixpkgs_4", - "systems": "systems_3" + "nixpkgs": "nixpkgs_5", + "systems": "systems_4" }, "locked": { "lastModified": 1765961056, @@ -1604,13 +2032,36 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_3", + "gitignore": "gitignore_3", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1763988335, + "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ "lanzaboote", "flake-compat" ], - "gitignore": "gitignore_3", + "gitignore": "gitignore_4", "nixpkgs": [ "lanzaboote", "nixpkgs" @@ -1760,6 +2211,8 @@ "fzfdapter": "fzfdapter", "git-hooks": "git-hooks_2", "home-manager": "home-manager", + "hy3": "hy3", + "hyprland": "hyprland", "ida-pro-overlay": "ida-pro-overlay", "infrastructure": "infrastructure", "konawall-py": "konawall-py", @@ -1778,7 +2231,7 @@ "nixcord": "nixcord", "nixos-cli": "nixos-cli", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-lib": "nixpkgs-lib_2", "nixpkgs-xr": "nixpkgs-xr", "nixvim": "nixvim", @@ -1800,7 +2253,7 @@ "spicetify-nix": "spicetify-nix", "std": "std", "stylix": "stylix", - "systems": "systems_4", + "systems": "systems_5", "tree": "tree", "treefmt-nix": "treefmt-nix_3", "ucodenix": "ucodenix", @@ -1852,7 +2305,7 @@ "simple-nixos-mailserver": { "inputs": { "blobs": "blobs", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "git-hooks": "git-hooks_3", "nixpkgs": [ "nixpkgs" @@ -2090,6 +2543,21 @@ } }, "systems": { + "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_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -2104,7 +2572,7 @@ "type": "github" } }, - "systems_2": { + "systems_3": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -2119,7 +2587,7 @@ "type": "github" } }, - "systems_3": { + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -2134,7 +2602,7 @@ "type": "github" } }, - "systems_4": { + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -2279,7 +2747,7 @@ }, "treefmt-nix_2": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1762410071, @@ -2398,6 +2866,47 @@ "type": "github" } }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1761431178, + "narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "4b8801228ff958d028f588f0c2b911dbf32297f9", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, "xwayland-satellite-stable": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 25c35cdd..777bfb5e 100644 --- a/flake.nix +++ b/flake.nix @@ -343,6 +343,12 @@ flake-compat.follows = "flake-compat"; }; }; + hyprland.url = "github:hyprwm/Hyprland/6712fb954f2e4f701878b97f19b7185a2cd0e192"; + hy3 = { + #url = "github:outfoxxed/hy3?ref=33fb5c01f192c0b1b6c1ab29f4a38e4bdfc85427"; + url = "github:Immelancholy/hy3/update-to-m_reserved_area"; + inputs.hyprland.follows = "hyprland"; + }; # a bunch of modules (also arcnmx is good) arcexprs = { #url = "github:kittywitch/arcexprs/master"; diff --git a/home/environments/hyprland/binds.nix b/home/environments/hyprland/binds.nix new file mode 100644 index 00000000..12258a16 --- /dev/null +++ b/home/environments/hyprland/binds.nix @@ -0,0 +1,128 @@ +{ config, lib, std, parent, pkgs, ... }: + +{ + wayland.windowManager.hyprland.settings = let + inherit (std) list; + inherit (lib.meta) getExe' getExe; + noctalia = "${getExe parent.services.noctalia-shell.package} ipc call"; + vol = "${noctalia} volume"; + bl = "${noctalia} brightness"; + term = getExe config.programs.alacritty.package; + in { + "$mod" = "SUPER"; + binds.workspace_back_and_forth = true; + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + bindl = [ + ", XF86AudioPlay, exec, ${getExe pkgs.playerctl} play-pause" + ", XF86AudioMute, exec, ${vol} muteOutput" + ", XF86AudioMicMute, exec, ${vol} muteInput" + ]; + binde = [ + ", XF86AudioRaiseVolume, exec, ${vol} increase" + ", XF86AudioLowerVolume, exec, ${vol} decrease" + ", XF86MonBrightnessUp, exec, ${bl} increase" + ", XF86MonBrightnessDown, exec, ${bl} decrease" + ]; + bind = let + uwsmCmd = lib.optionalString parent.programs.uwsm.enable "uwsm app -- "; + uwsmApp = cmd: uwsmCmd + cmd; + uwsmSingleApp = cmd: "pgrep ${cmd} || ${uwsmCmd + cmd}"; + in + [ + ", XF86AudioPlay, exec, ${getExe pkgs.playerctl} play-pause" + ", XF86AudioNext, exec, ${getExe pkgs.playerctl} next" + ", XF86AudioPrev, exec, ${getExe pkgs.playerctl} prev" + + "$mod, RETURN, exec, ${getExe config.programs.vicinae.package} toggle" + "$mod, grave, exec, ${uwsmApp term}" + "$mod SHIFT, grave, exec, ${uwsmApp term} --class AlacrittyFloating" + ", Print, exec, ${uwsmSingleApp "grimblast"} copy area" + "CTRL ALT, DELETE, exec, ${uwsmApp "hyprctl kill"}" + "CTRL ALT SHIFT, DELETE, exec, loginctl terminate-user \"\"" + + "$mod SHIFT, Q, hy3:killactive," + "$mod, F, fullscreenstate, 2 -1" # dont inform + "$mod SHIFT, F, fullscreenstate, -1 2" # do inform + "$mod, T, togglefloating," + "$mod, tab, hy3:togglefocuslayer" + "$mod SHIFT, T, togglesplit," + "$mod SHIFT, X, pseudo," + "$mod ALT, ,resizeactive," + "$mod, Escape, exec, ${noctalia} sessionMenu toggle" + "$mod SHIFT, Escape, exec, ${noctalia} controlCenter toggle" + "$mod, L, exec, ${uwsmSingleApp "${noctalia} lockScreen toggle"}" + "$mod, d, hy3:makegroup, h" + "$mod, s, hy3:makegroup, v" + "$mod, z, hy3:makegroup, tab" + "$mod, x, hy3:locktab, tab" + "$mod, a, hy3:changefocus, raise" + "$mod SHIFT, a, hy3:changefocus, lower" + "$mod, e, hy3:expand, expand" + "$mod SHIFT, e, hy3:expand, base" + "$mod, r, hy3:changegroup, opposite" + + + "$mod, left, hy3:movefocus, l" + "$mod, right, hy3:movefocus, r" + "$mod, up, hy3:movefocus, u" + "$mod, down, hy3:movefocus, d" + + "$mod SHIFT, left, hy3:movewindow, l, once" + "$mod SHIFT, right, hy3:movewindow, r, once" + "$mod SHIFT, up, hy3:movewindow, u, once" + "$mod SHIFT, down, hy3:movewindow, d, once" + + "$mod CTRL, left, hy3:movefocus, l, visible, nowarp" + "$mod CTRL, right, hy3:movefocus, r, visible, nowarp" + "$mod CTRL, up, hy3:movefocus, u, visible, nowarp" + "$mod CTRL, down, hy3:movefocus, d, visible, nowarp" + + "$mod CTRL SHIFT, left, hy3:movewindow, l, once, visible" + "$mod CTRL SHIFT, right, hy3:movewindow, r, once, visible" + "$mod CTRL SHIFT, up, hy3:movewindow, u, once, visible" + "$mod CTRL SHIFT, down, hy3:movewindow, d, once, visible" + + "$mod, P, exec, ${getExe pkgs.hyprpicker} -na" + + "CTRL, Print, exec, ${uwsmSingleApp "grimblast"} --notify --cursor copysave output" + "$mod SHIFT CTRL, R, exec, ${uwsmSingleApp "grimblast"} --notify --cursor copysave output" + + "ALT, Print, exec, ${uwsmSingleApp "grimblast"} --notify --cursor copysave screen" + "$mod SHIFT ALT, R, exec, ${uwsmSingleApp "grimblast"} --notify --cursor copysave screen" + + "$mod, page_down, workspace, e-1" + "$mod, page_up, workspace, e+1" + + "$mod, bracketleft, focusmonitor, l" + "$mod, bracketright, focusmonitor, r" + + "$mod SHIFT, bracketleft, movewindow, mon:-1" + "$mod SHIFT, bracketright, movewindow, mon:+1" + + "$mod CTRL SHIFT, bracketleft, movecurrentworkspacetomonitor, l" + "$mod CTRL SHIFT, bracketright, movecurrentworkspacetomonitor, r" + ] + ++ ( + # workspaces + # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} + list.concat (list.generate ( + x: let + ws = let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); + in [ + "$mod, ${ws}, workspace, ${toString (x + 1)}" + "$mod SHIFT, ${ws}, hy3:movetoworkspace, ${toString (x + 1)}" + "$mod, F${ws}, workspace, ${toString (x + 11)}" + "$mod SHIFT, F${ws}, hy3:movetoworkspace, ${toString (x + 11)}" + ] + ) + 10) + ); + }; +} diff --git a/home/environments/hyprland/exec.nix b/home/environments/hyprland/exec.nix new file mode 100644 index 00000000..1f63f6a7 --- /dev/null +++ b/home/environments/hyprland/exec.nix @@ -0,0 +1,11 @@ +{ lib, pkgs, ... }: { + wayland.windowManager.hyprland.settings.exec-once = let + inherit (lib.meta) getExe getExe'; + in [ + "${getExe pkgs.swww} init" + "${getExe' pkgs.dbus "dbus-update-activation-environment"} --all" + (getExe' pkgs.networkmanagerapplet "nm-applet") + (getExe pkgs.udiskie) + "${getExe' pkgs.systemd "systemctl"} restart konawall-py --user" + ]; +} diff --git a/home/environments/hyprland/hy3.nix b/home/environments/hyprland/hy3.nix new file mode 100644 index 00000000..6d90269b --- /dev/null +++ b/home/environments/hyprland/hy3.nix @@ -0,0 +1,29 @@ +{ config, ... }: + +{ + wayland.windowManager.hyprland.settings = { + general.layout = "hy3"; + plugin.hy3 = with config.stylix.generated.palette; { + tabs = { + height = 30; + text_font = config.stylix.fonts.sansSerif.name; + text_height = config.stylix.fonts.sizes.desktop; + border_width = 1; + + "col.urgent" = "rgb(${base08})"; + "col.urgent.border" = "rgb(${base08})"; + "col.urgent.text" = "rgb(${base05})"; + "col.inactive" = "rgb(${base03})"; + "col.inactive.border" = "rgb(${base03})"; + "col.inactive.text" = "rgb(${base01})"; + "col.active" = "rgb(${base0D})"; + "col.active.border" = "rgb(${base0D})"; + "col.active.text" = "rgb(${base05})"; + }; + autotitle = { + trigger_width = 800; + trigger_height = 500; + }; + }; + }; +} diff --git a/home/environments/hyprland/hyprland.nix b/home/environments/hyprland/hyprland.nix index 3de7ac87..9f698c30 100644 --- a/home/environments/hyprland/hyprland.nix +++ b/home/environments/hyprland/hyprland.nix @@ -1,4 +1,4 @@ -{ pkgs, std, lib, config, parent, ... }: let +{ pkgs, std, lib, config, parent, inputs, ... }: let inherit (std) list; inherit (lib.meta) getExe' getExe; in { @@ -25,27 +25,9 @@ in { wayland.windowManager.hyprland = { enable = true; xwayland.enable = true; + plugins = [ inputs.hy3.packages.x86_64-linux.hy3 ]; settings = let - noctalia = "${getExe parent.services.noctalia-shell.package} ipc call"; - vol = "${noctalia} volume"; - bl = "${noctalia} brightness"; - term = getExe config.programs.alacritty.package; in { - # TODO: break it up - windowrule = [ - "suppressevent fullscreen, class:steam_app_default" - "workspace 2, class:steam_app_default" - "suppressevent maximize, class:.*" - - "tile, class:battle\.net\.exe" - - "renderunfocused, class:discord, initialTitle:Discord" - - "unset, title:Wine System Tray" - "workspace special:hidden silent, title:Wine System Tray" - "noinitialfocus, title:Wine System Tray" - ]; - "$mod" = "SUPER"; input = { kb_options = "ctrl:nocaps"; accel_profile = "flat"; @@ -55,21 +37,16 @@ in { cursor = { use_cpu_buffer = true; }; - workspace = let - commonOptions = "gapsin:0,gapsout:0,rounding:false"; - in - ["1,${commonOptions}"] - ++ (list.map ( - workspace: "${toString workspace},${commonOptions}" - ) (list.range 2 10)); - env = [ "MOZ_ENABLE_WAYLAND,1" "XDG_CURRENT_DESKTOP,Hyprland" "GDK_BACKEND,wayland,x11" "CLUTTER_BACKEND,wayland" ]; - render.direct_scanout = false; + render = { + direct_scanout = true; + new_render_scheduling = true; + }; #debug.disable_logs = false; exec-once = [ "${pkgs.swww}/bin/swww init" @@ -78,107 +55,9 @@ in { "${pkgs.udiskie}/bin/udiskie &" "${getExe' pkgs.systemd "systemctl"} restart konawall-py --user" ]; - group.groupbar = { - # TODO: see if font necessary - }; xwayland = { force_zero_scaling = true; }; - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - "$mod ALT, mouse:272, resizewindow" - ]; - bindl = [ - ", XF86AudioPlay, exec, ${getExe pkgs.playerctl} play-pause" - ", XF86AudioMute, exec, ${vol} muteOutput" - ", XF86AudioMicMute, exec, ${vol} muteInput" - ]; - binde = [ - ", XF86AudioRaiseVolume, exec, ${vol} increase" - ", XF86AudioLowerVolume, exec, ${vol} decrease" - ", XF86MonBrightnessUp, exec, ${bl} increase" - ", XF86MonBrightnessDown, exec, ${bl} decrease" - ]; - bind = let - uwsmCmd = lib.optionalString parent.programs.uwsm.enable "uwsm app -- "; - uwsmApp = cmd: uwsmCmd + cmd; - uwsmSingleApp = cmd: "pgrep ${cmd} || ${uwsmCmd + cmd}"; - in - [ - ", XF86AudioPlay, exec, ${getExe pkgs.playerctl} play-pause" - ", XF86AudioNext, exec, ${getExe pkgs.playerctl} next" - ", XF86AudioPrev, exec, ${getExe pkgs.playerctl} prev" - - "$mod, D, exec, ${getExe config.programs.vicinae.package} toggle" - "$mod, RETURN, exec, ${uwsmApp term}" - "$mod, W, exec, ${uwsmApp "librewolf"}" - "$mod, E, exec, ${uwsmApp "pcmanfm"}" - ", Print, exec, ${uwsmSingleApp "grimblast"} copy area" - "CTRL ALT, DELETE, exec, ${uwsmApp "hyprctl kill"}" - "CTRL ALT SHIFT, DELETE, exec, loginctl terminate-user \"\"" - - "$mod SHIFT, E, exec, pkill Hyprland" - "$mod SHIFT, Q, killactive," - "$mod, F, fullscreenstate, 2 -1" # dont inform - "$mod SHIFT, F, fullscreenstate, -1 2" # do inform - "$mod, G, togglegroup," - "$mod SHIFT, N, changegroupactive, f" - "$mod SHIFT, P, changegroupactive, b" - "$mod, T, togglefloating," - "$mod SHIFT, T, togglesplit," - "$mod SHIFT, X, pseudo," - "$mod ALT, ,resizeactive," - "$mod, Escape, exec, ${noctalia} sessionMenu toggle" - "$mod SHIFT, Escape, exec, ${noctalia} controlCenter toggle" - "$mod, L, exec, ${uwsmSingleApp "${noctalia} lockScreen toggle"}" - - "$mod, left, movefocus, l" - "$mod, right, movefocus, r" - "$mod, up, movefocus, u" - "$mod, down, movefocus, d" - "$mod SHIFT, left, movewindow, l" - "$mod SHIFT, right, movewindow, r" - "$mod SHIFT, up, movewindow, u" - "$mod SHIFT, down, movewindow, d" - "$mod ALT, left, movewindoworgroup, l" - "$mod ALT, right, movewindoworgroup, r" - "$mod ALT, up, movewindoworgroup, u" - "$mod ALT, down, movewindoworgroup, d" - - "$mod, P, exec, ${pkgs.hyprpicker}/bin/hyprpicker -na" - - "CTRL, Print, exec, ${uwsmSingleApp "grimblast"} --notify --cursor copysave output" - "$mod SHIFT CTRL, R, exec, ${uwsmSingleApp "grimblast"} --notify --cursor copysave output" - - "ALT, Print, exec, ${uwsmSingleApp "grimblast"} --notify --cursor copysave screen" - "$mod SHIFT ALT, R, exec, ${uwsmSingleApp "grimblast"} --notify --cursor copysave screen" - - "$mod, bracketleft, workspace, e-1" - "$mod, bracketright, workspace, e+1" - - "$mod SHIFT, bracketleft, focusmonitor, l" - "$mod SHIFT, bracketright, focusmonitor, r" - - "$mod SHIFT ALT, bracketleft, movecurrentworkspacetomonitor, l" - "$mod SHIFT ALT, bracketright, movecurrentworkspacetomonitor, r" - ] - ++ ( - # workspaces - # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - list.concat (list.generate ( - x: let - ws = let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}" - ] - ) - 10) - ); }; }; } diff --git a/home/environments/hyprland/window-rules.nix b/home/environments/hyprland/window-rules.nix new file mode 100644 index 00000000..864b24d1 --- /dev/null +++ b/home/environments/hyprland/window-rules.nix @@ -0,0 +1,17 @@ +_: { + wayland.windowManager.hyprland.settings.windowrulev2 = [ + "suppressevent fullscreen, class:steam_app_default" + "workspace 2, class:steam_app_default" + "suppressevent maximize, class:.*" + + "tile, class:battle\.net\.exe" + + "renderunfocused, class:discord, initialTitle:Discord" + + "unset, title:Wine System Tray" + "workspace special:hidden silent, title:Wine System Tray" + "noinitialfocus, title:Wine System Tray" + + "float, class:^(AlacrittyFloating)$" + ]; +} diff --git a/home/environments/hyprland/workspaces.nix b/home/environments/hyprland/workspaces.nix new file mode 100644 index 00000000..553b3312 --- /dev/null +++ b/home/environments/hyprland/workspaces.nix @@ -0,0 +1,15 @@ +{ std, ... }: let + inherit (std) list; +in { + wayland.windowManager.hyprland.settings.workspace = let + commonOptions = "gapsin:0,gapsout:0,rounding:false"; + in + ["1,monitor:DP-1,default:true,${commonOptions}"] + ++ (list.map ( + workspace: "${toString workspace},monitor:DP-1${commonOptions}" + ) (list.range 2 10)) + ++ ["11,monitor:HDMI-A-1,default:true"] + ++ (list.map ( + workspace: "${toString workspace},monitor:HDMI-A-1${commonOptions}" + ) (list.range 12 20)); +} diff --git a/nixos/profiles/gaming/vr.nix b/nixos/profiles/gaming/vr.nix index 84ca66f5..7bc7c445 100644 --- a/nixos/profiles/gaming/vr.nix +++ b/nixos/profiles/gaming/vr.nix @@ -13,13 +13,27 @@ in { ExecStart = getExe' pkgs.wlx-overlay-s "wlx-overlay-s"; }; }; + programs.steam.extraPackages = with pkgs.gst_all_1; [ + gstreamer + gst-plugins-base + gst-plugins-bad + gst-plugins-good + # ffmpeg to play almost every format + gst-libav + # hardware acceleration + gst-vaapi + ]; services.wivrn = { enable = true; openFirewall = true; steam.importOXRRuntimes = true; monadoEnvironment = { XRT_COMPOSITOR_COMPUTE = "1"; + U_PACING_APP_USE_MIN_FRAME_PERIOD="1"; + U_PACING_APP_IMMEDIATE_WAIT_FRAME_RETURN="1"; + XRT_COMPOSITOR_FORCE_WAYLAND_DIRECT = "1"; }; + highPriority = true; package = pkgs.wivrn; defaultRuntime = true; config = { @@ -45,7 +59,8 @@ in { }; }; }; - + services.lact.enable = true; + # SlimeVR ports networking.firewall = let slimevr = { @@ -68,6 +83,7 @@ in { monado-vulkan-layers bs-manager vrcx + lact appimage-run (unityhub.override { extraLibs = unityhubPkgs: [ diff --git a/tree.nix b/tree.nix index 41b8389a..1cda2c0a 100644 --- a/tree.nix +++ b/tree.nix @@ -82,6 +82,7 @@ functor = { enable = true; external = with inputs; [ + hyprland.nixosModules.default simple-nixos-mailserver.nixosModules.default nix-index-database.nixosModules.nix-index home-manager.nixosModules.home-manager @@ -115,6 +116,7 @@ enable = true; external = with inputs; [ + hyprland.homeManagerModules.default nix-doom-emacs-unstraightened.hmModule nix-index-database.homeModules.nix-index sops-nix.homeManagerModules.sops