diff --git a/README.md b/README.md index c10f43e..716094a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ There may be some useful parts in the clusterfuck that I made and maybe I'll try ## My systems I have three active systems, my pc (lambdaOS), my laptop (muOS) and my server (nuOS). -Both my pc and laptop are running mainly hyprland with plasma mostly just +Both my pc and laptop are running mainly niri with plasma mostly just there because I didn't want to setup sddm themes myself. the server has some nginx helper functions so I can easily add more proxies for random websites I make. diff --git a/common/home.nix b/common/home.nix index 358cdec..e9a7b0a 100644 --- a/common/home.nix +++ b/common/home.nix @@ -29,9 +29,7 @@ in { imports = [ - ../modules/applications - ../modules/games - ../modules/hyprland.nix + ../modules ./nvim/nvim.nix extraConfig ] @@ -84,20 +82,24 @@ in ''; }; preferXdgDirectories = true; - sessionVariables = + sessionVariables = lib.mkMerge [ { EDITOR = "nvim"; TERM = "kitty"; } - // lib.mkIf enableGraphical { + lib.mkIf + enableGraphical + { + DISPLAY = ":0"; GDK_BACKEND = "wayland,x11"; QT_QPA_PLATFORM = "wayland;xcb"; CLUTTER_BACKEND = "wayland"; - XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_CURRENT_DESKTOP = "niri"; XDG_SESSION_TYPE = "wayland"; - XDG_SESSION_DESKTOP = "Hyprland"; + XDG_SESSION_DESKTOP = "niri"; WLR_NO_HARDWARE_CURSORS = "1"; - }; + } + ]; stateVersion = "23.11"; # Do not change :3 username = me.nickname; }; @@ -105,10 +107,6 @@ in nixpkgs.config.allowUnfree = true; modules = { - hyprland = { - enable = enableGraphical; - displays = displays; - }; games.enable = enableGraphical && enableGames; apps = { zsh.enable = true; diff --git a/common/substitutors.nix b/common/substitutors.nix index 24bd6f1..bb67043 100644 --- a/common/substitutors.nix +++ b/common/substitutors.nix @@ -12,7 +12,6 @@ ]; substituters = [ "https://cosmic.cachix.org/" - "https://hyprland.cachix.org" "https://cache.iog.io" "https://cuda-maintainers.cachix.org" "https://nix-community.cachix.org" @@ -20,7 +19,6 @@ ]; trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" diff --git a/extra/niri.kdl b/extra/niri.kdl index 53687e5..7383d92 100644 --- a/extra/niri.kdl +++ b/extra/niri.kdl @@ -124,6 +124,9 @@ layout { spawn-at-startup "@spotify@" spawn-at-startup "@keepass@" spawn-at-startup "@thunderbird@" +spawn-at-startup "@appbar@" + +@extra@ // Uncomment this line to ask the clients to omit their client-side decorations if possible. // If the client will specifically ask for CSD, the request will be honored. @@ -163,12 +166,6 @@ window-rule { open-on-workspace "media" } -window-rule { - match app-id=r#"^thunderbird$"# - - open-on-workspace "utils" -} - // Window rules let you adjust behavior for individual windows. // Find more information on the wiki: // https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules @@ -201,6 +198,7 @@ window-rule { window-rule { match app-id=r#"^org\.keepassxc\.KeePassXC$"# + match app-id=r#"^thunderbird$"# block-out-from "screen-capture" open-on-workspace "utils" } diff --git a/flake.lock b/flake.lock index 6659909..7a70fec 100644 --- a/flake.lock +++ b/flake.lock @@ -21,39 +21,6 @@ "type": "github" } }, - "aquamarine": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1731774881, - "narHash": "sha256-1Dxryiw8u2ejntxrrv3sMtIE8WHKxmlN4KeH+uMGbmc=", - "owner": "hyprwm", - "repo": "aquamarine", - "rev": "b31a6a4da8199ae3489057db7d36069a70749a56", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "aquamarine", - "type": "github" - } - }, "automapaper": { "inputs": { "nixpkgs": [ @@ -228,7 +195,7 @@ }, "fenix_3": { "inputs": { - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_8", "rust-analyzer-src": "rust-analyzer-src_3" }, "locked": { @@ -293,22 +260,6 @@ "type": "github" } }, - "flake-compat_4": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -333,7 +284,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_4" + "systems": "systems_2" }, "locked": { "lastModified": 1726560853, @@ -372,28 +323,6 @@ } }, "gitignore": { - "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_2": { "inputs": { "nixpkgs": [ "lazy", @@ -494,245 +423,12 @@ "type": "github" } }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1728669738, - "narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "0264e698149fcb857a66a53018157b41f8d97bb0", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "aquamarine": "aquamarine", - "hyprcursor": "hyprcursor", - "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", - "hyprutils": "hyprutils", - "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_5", - "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_2", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1732100541, - "narHash": "sha256-ryxqTo2N5EOwHjrDXCoVFKuG1ZKpoMlRmCjqqUhjQPU=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "940f7aa990dbc99815bab8d355999d8277534b17", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1728345020, - "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "a7c183800e74f337753de186522b9017a07a8cee", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1728168612, - "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprpicker": { - "inputs": { - "hyprutils": "hyprutils_2", - "hyprwayland-scanner": "hyprwayland-scanner_2", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems_3" - }, - "locked": { - "lastModified": 1731193353, - "narHash": "sha256-oiNuCxbwtfLOPGEoXjsojdVOXNEL5aFPtdELdaz65hw=", - "owner": "hyprwm", - "repo": "hyprpicker", - "rev": "4e8837ddabf669600c9571189e8a6a7937ba336a", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprpicker", - "type": "github" - } - }, - "hyprutils": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1731702627, - "narHash": "sha256-+JeO9gevnXannQxMfR5xzZtF4sYmSlWkX/BPmPx0mWk=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "e911361a687753bbbdfe3b6a9eab755ecaf1d9e1", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprutils_2": { - "inputs": { - "nixpkgs": [ - "hyprpicker", - "nixpkgs" - ], - "systems": [ - "hyprpicker", - "systems" - ] - }, - "locked": { - "lastModified": 1727300645, - "narHash": "sha256-OvAtVLaSRPnbXzOwlR1fVqCXR7i+ICRX3aPMCdIiv+c=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "3f5293432b6dc6a99f26aca2eba3876d2660665c", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprwayland-scanner": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1726874836, - "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, - "hyprwayland-scanner_2": { - "inputs": { - "nixpkgs": [ - "hyprpicker", - "nixpkgs" - ], - "systems": [ - "hyprpicker", - "systems" - ] - }, - "locked": { - "lastModified": 1726874836, - "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_5", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay" }, @@ -759,7 +455,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_4" + "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { "lastModified": 1730454453, @@ -778,7 +474,7 @@ "mailserver": { "inputs": { "blobs": "blobs", - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_3", "nixpkgs": [ "nixpkgs" ], @@ -856,7 +552,7 @@ }, "nix-index-database": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1729999765, @@ -935,22 +631,6 @@ } }, "nixpkgs-stable_2": { - "locked": { - "lastModified": 1730741070, - "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_3": { "locked": { "lastModified": 1720386169, "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", @@ -966,7 +646,7 @@ "type": "github" } }, - "nixpkgs-stable_4": { + "nixpkgs-stable_3": { "locked": { "lastModified": 1730137625, "narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=", @@ -1031,22 +711,6 @@ } }, "nixpkgs_5": { - "locked": { - "lastModified": 1731676054, - "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { "locked": { "lastModified": 1730025694, "narHash": "sha256-Isj+5RY86+N+JrotqpaXqi6hUAABcF6pIOlIWy2leC8=", @@ -1062,7 +726,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_6": { "locked": { "lastModified": 1729665710, "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", @@ -1078,13 +742,13 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_7": { "locked": { - "lastModified": 1732118869, - "narHash": "sha256-xevSfuf8//mDTgZ1af9R8eh89UNnmbabn1d0cR2Yumg=", + "lastModified": 1732125482, + "narHash": "sha256-yO1VtH2bfyA197j+anHM4GVY+8X2gpZ4yLCwmyhEC2s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4a5287dcb87fb598afc1f7eccf75059b9e45ae95", + "rev": "b948c596aaa785cefdd19bd6acff6bac74c55256", "type": "github" }, "original": { @@ -1094,7 +758,7 @@ "type": "github" } }, - "nixpkgs_9": { + "nixpkgs_8": { "locked": { "lastModified": 1729413321, "narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=", @@ -1130,30 +794,6 @@ "type": "github" } }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_2", - "gitignore": "gitignore", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_2" - }, - "locked": { - "lastModified": 1731363552, - "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -1161,13 +801,13 @@ "lanzaboote", "flake-compat" ], - "gitignore": "gitignore_2", + "gitignore": "gitignore", "nixpkgs": [ "lazy", "lanzaboote", "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_3" + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { "lastModified": 1729104314, @@ -1192,13 +832,11 @@ "flurry": "flurry", "hardware": "hardware", "home-manager": "home-manager_2", - "hyprland": "hyprland", - "hyprpicker": "hyprpicker", "lazy": "lazy", "mailserver": "mailserver", "niri": "niri", "nix-colors": "nix-colors", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_7", "oxalica": "oxalica", "tsunami": "tsunami_2" } @@ -1313,36 +951,6 @@ } }, "systems_2": { - "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_3": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1396,47 +1004,6 @@ "repo": "tsunami", "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": 1731703417, - "narHash": "sha256-rheDc/7C+yI+QspYr9J2z9kQ5P9F4ATapI7qyFAe1XA=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "8070f36deec723de71e7557441acb17e478204d3", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index e7ec599..a9dc028 100644 --- a/flake.nix +++ b/flake.nix @@ -19,16 +19,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland = { - url = "github:hyprwm/Hyprland?submodules=1"; - #inputs.nixpkgs.follows = "nixpkgs"; # broken until libseat fix - }; - - hyprpicker = { - url = "github:hyprwm/hyprpicker"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; @@ -89,7 +79,6 @@ nix-colors, automapaper, disko, - hyprland, lazy, ... }@inputs: diff --git a/hosts/lambdaos/configuration.nix b/hosts/lambdaos/configuration.nix index 9d975bc..8cd074b 100644 --- a/hosts/lambdaos/configuration.nix +++ b/hosts/lambdaos/configuration.nix @@ -185,11 +185,6 @@ pinentryPackage = pkgs.pinentry-curses; }; - hyprland = { - enable = true; - package = inputs.hyprland.packages.${pkgs.system}.hyprland; - }; - nix-ld.enable = true; nix-ld.libraries = with pkgs; [ @@ -271,16 +266,6 @@ jack.enable = true; }; fail2ban.enable = true; - greetd = { - enable = false; - settings = rec { - initial_session = { - command = "${pkgs.hyprland}/bin/Hyprland"; - user = "noa"; - }; - default_session = initial_session; - }; - }; hardware = { openrgb = { enable = true; diff --git a/hosts/muos/configuration.nix b/hosts/muos/configuration.nix index 27b0a34..cf53d8d 100644 --- a/hosts/muos/configuration.nix +++ b/hosts/muos/configuration.nix @@ -92,38 +92,92 @@ scale = "1"; } ]; - extraConfig = - let - hconfig = config.home-manager.users.noa; - in - { - xdg.configFile = - let - wpkgs = inputs.self.packages.${pkgs.system}; - in - { - "niri/config.kdl".source = pkgs.substituteAll { - src = ../../extra/niri.kdl; - env = { - kitty = "${pkgs.kitty}/bin/kitty"; - launcher = "${wpkgs.wofi-launch}/bin/wofi-launch"; - powermenu = "${wpkgs.wofi-power}/bin/wofi-power"; - swaylock = "${pkgs.swaylock}/bin/swaylock"; - automapaper = lib.strings.concatMapStringsSep "\n" ( - command: - ( - ''spawn-at-startup "${(lib.strings.concatStringsSep ''" "'' (lib.strings.splitString " " command))}"'' - ) - ) hconfig.modules.automapaper.startStrings; - spotify = "spotify"; - keepass = "keepassxc"; - thunderbird = "thunderbird"; - appbar = "${pkgs.waybar}/bin/waybar"; - extra = lib.strings.concatStringsSep "\nspawn-at-startup \"" [ "${pkgs.dunst}/bin/dunst\"" ]; + extraConfig = { + modules.waybar = { + modules = { + left = [ + "niri/workspaces" + "tray" + "niri/window" + ]; + center = [ + "clock" + "custom/spotify" + ]; + right = [ + "custom/vpn" + "wireplumber" + "network" + "cpu" + "memory" + "custom/poweroff" + ]; + }; + enable = lib.mkDefault true; + }; + home.packages = with pkgs; [ + wl-clipboard + libnotify + playerctl + ]; + xdg.configFile = + let + spkgs = inputs.self.packages.${pkgs.system}; + automapaper-configs = builtins.map ( + display: + let + display-shader = pkgs.substituteAll { + src = ../../modules/automapaper/display-with_vars.glsl; + background = nix-colors.lib.conversions.hexToGLSLVec "101012"; + foreground = nix-colors.lib.conversions.hexToGLSLVec "192291"; }; + state-shader = ../../modules/automapaper/state-game_of_life.glsl; + init-shader = ../../modules/automapaper/init.glsl; + in + (import ../../modules/automapaper/config.nix { + inherit (pkgs) writeTextFile; + inherit + init-shader + state-shader + display-shader + display + ; + horizontal = 225; + vertical = 150; + cycles = 2000; + }) + ) [ "eDP-1" ]; + automapaper = lib.strings.concatMapStringsSep "\n" ( + file: + ''spawn-at-startup "${ + inputs.automapaper.packages.${pkgs.system}.automapaper + }/bin/automapaper" "-C" "${file}/config.toml"'' + ) automapaper-configs; + in + { + # "autostart/spotify.desktop".source = config.lib.file.mkOutOfStoreSymlink ""; + "niri/config.kdl".source = pkgs.substituteAll { + src = ../../extra/niri.kdl; + env = { + kitty = "${pkgs.kitty}/bin/kitty"; + launcher = "${spkgs.fuzzel-launch}/bin/fuzzel-launch"; + powermenu = "${spkgs.fuzzel-power}/bin/fuzzel-power"; + swaylock = "${pkgs.swaylock}/bin/swaylock"; + automapaper = automapaper; + spotify = "spotify"; + keepass = "keepassxc"; + thunderbird = "thunderbird"; + appbar = "${pkgs.waybar}/bin/waybar"; + extra = + "spawn-at-startup \"" + + lib.strings.concatStringsSep "\nspawn-at-startup \"" [ + "${pkgs.dunst}/bin/dunst\"" + "${pkgs.xwayland-satellite}/bin/xwayland-satellite\"" + ]; }; }; - }; + }; + }; }; "root" = import ./root.nix; }; @@ -160,11 +214,6 @@ pinentryPackage = pkgs.pinentry-curses; }; - hyprland = { - enable = true; - package = inputs.hyprland.packages.${pkgs.system}.hyprland; - }; - niri = { enable = true; package = inputs.niri.packages.${pkgs.system}.niri; @@ -233,7 +282,7 @@ services = { displayManager = { - defaultSession = "hyprland"; + defaultSession = "niri"; sddm = { enable = true; wayland.enable = true; @@ -251,16 +300,6 @@ pulse.enable = true; jack.enable = true; }; - greetd = { - enable = false; - settings = rec { - initial_session = { - command = "${pkgs.hyprland}/bin/Hyprland"; - user = "noa"; - }; - default_session = initial_session; - }; - }; openssh = { enable = true; settings.PasswordAuthentication = false; diff --git a/modules/automapaper/config.nix b/modules/automapaper/config.nix new file mode 100644 index 0000000..1f2084a --- /dev/null +++ b/modules/automapaper/config.nix @@ -0,0 +1,28 @@ +{ + writeTextFile, + display, + init-shader, + state-shader, + display-shader, + horizontal, + vertical, + tps ? 30, + cycles ? horizontal, + frames_per_tick ? 1, +}: +writeTextFile { + name = "automapaper-config-${display}"; + text = '' + [display] + name="${display}" + horizontal=${builtins.toString horizontal} + vertical=${builtins.toString vertical} + tps=${builtins.toString tps} + state_frag="${state-shader}" + init_frag="${init-shader}" + display_frag="${display-shader}" + cycles=${builtins.toString cycles} + frames_per_tick=${builtins.toString frames_per_tick} + ''; + destination = "/config.toml"; +} diff --git a/modules/automapaper/default.nix b/modules/automapaper/default.nix deleted file mode 100644 index 9316923..0000000 --- a/modules/automapaper/default.nix +++ /dev/null @@ -1,193 +0,0 @@ -{ - lib, - config, - pkgs, - inputs, - nix-colors, - ... -}: -let - cfg = config.modules.automapaper; -in -{ - options.modules.automapaper = { - enable = lib.mkEnableOption "enable automapaper"; - hyprland = lib.mkEnableOption "enable hyprland exec-once integration"; - startStrings = lib.mkOption { - type = lib.types.listOf lib.types.str; - }; - default-configuration = { - init = lib.mkOption { - type = lib.types.str; - description = "the shader executed to get the state for the initialisation, and re-initialisation steps"; - default = '' - #version 310 es - precision highp float; - - uniform float time; - uniform vec2 resolution; - - out vec4 stateColor; - - float PHI = 1.61803398874989484820459; // Φ = Golden Ratio - - float gold_noise(in vec2 xy, in float seed){ - return fract(tan(distance(xy*PHI, xy)*seed)*xy.x); - } - - void main( void ) { - - vec2 position = gl_FragCoord.xy; - float color = gold_noise(position.xy, fract(time)); - - - stateColor = vec4(step(0.3, color), 0,0,step(0.3, color)); - }''; - }; - state = lib.mkOption { - type = lib.types.str; - description = "the shader executed to increment the state to the next generation"; - default = '' - #version 310 es - precision highp float; - - uniform sampler2D state; - uniform vec2 scale; - - out vec4 stateColor; - - vec4 get(int x, int y) { - return texture(state, (gl_FragCoord.xy + vec2(x, y)) / scale); - } - - void main() { - int sum = int(get(-1, -1).r + - get(-1, 0).r + - get(-1, 1).r + - get( 0, -1).r + - get( 0, 1).r + - get( 1, -1).r + - get( 1, 0).r + - get( 1, 1).r); - vec4 current = get(0,0); - if (sum == 3) { - stateColor.r = 1.0; - stateColor.g = 1.0; - } else if (sum == 2) { - stateColor = current; - if (current.r == 0.0) { - stateColor.g = max(current.g - 0.01, 0.0); - } - } else { - stateColor = vec4(0.0, max(current.g - 0.01, 0.0), 0.0, 1.0); - } - }''; - }; - display = lib.mkOption { - type = lib.types.str; - description = "the shader executed to display the state to the monitor"; - default = '' - #version 310 es - precision - highp - float; - - uniform sampler2D tex2D; - uniform sampler2D old2D; - uniform ivec2 resolution; - uniform float frame_part; - - in highp vec2 texCoords; - out vec4 stateColor; - - const vec4 bgColor = ${nix-colors.lib.conversions.hexToGLSLVec config.colorScheme.palette.background_paper}; - const vec4 fgColor = ${nix-colors.lib.conversions.hexToGLSLVec config.colorScheme.palette.foreground_paper}; - - void main() { - vec2 canvasSize = vec2 (textureSize (tex2D, 0)); - vec4 state = texture (tex2D, texCoords); - vec4 ostate = texture (old2D, texCoords); - - vec2 localCoords = fract (gl_FragCoord.xy / vec2 (resolution) * canvasSize); - localCoords = localCoords - 0.5; - float dist = sqrt (dot (localCoords, localCoords)); - - float size = smoothstep (0.0, 1.0, pow(mix(ostate.g,state.g, frame_part), 3.0)) * 0.35; - float mask = 1.0 - step (size, dist); - - float brightness = mix (ostate.r, state.r, frame_part) + 0.2 * pow(mix(ostate.g,state.g, frame_part), 3.0); - stateColor = mix (bgColor, fgColor, brightness * mask); - } ''; - }; - horizontal = lib.mkOption { - type = lib.types.int; - default = 10; - }; - vertical = lib.mkOption { - type = lib.types.int; - default = 10; - }; - tps = lib.mkOption { - type = lib.types.int; - description = "the target amount of ticks to simulate each second"; - default = 30; - }; - cycles = lib.mkOption { - type = lib.types.int; - description = "the amount of state increments before the init shader is called again"; - default = 2500; - }; - frames_per_tick = lib.mkOption { - type = lib.types.int; - description = "the amount of times to call the display shader for each iteration of the state shader"; - default = 1; - }; - }; - }; - - config = - let - mkDisplayConfig = - conf: - let - init = builtins.toFile "init.frag" conf.init; - state = builtins.toFile "state.frag" conf.state; - display = builtins.toFile "display.frag" conf.display; - in - '' - [display] - name="${conf.name}" - horizontal=${builtins.toString conf.horizontal} - vertical=${builtins.toString conf.vertical} - tps=${builtins.toString conf.tps} - state_frag="${state}" - init_frag="${init}" - display_frag="${display}" - cycles=${builtins.toString conf.cycles} - frames_per_tick=${builtins.toString conf.frames_per_tick} - ''; - confFile = - let - def = config.modules.automapaper.default-configuration; - in - conf: - builtins.toFile "${conf.name}.toml" (mkDisplayConfig { - name = conf.name; - horizontal = builtins.div conf.horizontal def.horizontal; - vertical = builtins.div conf.vertical def.vertical; - tps = def.tps; - state = def.state; - init = def.init; - display = def.display; - cycles = def.cycles; - frames_per_tick = def.frames_per_tick; - }); - in - lib.mkIf cfg.enable rec { - modules.automapaper.startStrings = builtins.map ( - conf: "${inputs.automapaper.packages.${pkgs.system}.default}/bin/automapaper -C ${confFile conf}" - ) config.modules.hyprland.displays; - - wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.hyprland modules.automapaper.startStrings; - }; -} diff --git a/modules/automapaper/display-with_vars.glsl b/modules/automapaper/display-with_vars.glsl new file mode 100644 index 0000000..78896d2 --- /dev/null +++ b/modules/automapaper/display-with_vars.glsl @@ -0,0 +1,31 @@ +#version 310 es +precision +highp +float; + +uniform sampler2D tex2D; +uniform sampler2D old2D; +uniform ivec2 resolution; +uniform float frame_part; + +in highp vec2 texCoords; +out vec4 stateColor; + +const vec4 bgColor = @background@ ; +const vec4 fgColor = @foreground@ ; + +void main() { + vec2 canvasSize = vec2(textureSize(tex2D, 0)); + vec4 state = texture(tex2D, texCoords); + vec4 ostate = texture(old2D, texCoords); + + vec2 localCoords = fract(gl_FragCoord.xy / vec2(resolution) * canvasSize); + localCoords = localCoords - 0.5; + float dist = sqrt(dot(localCoords, localCoords)); + + float size = smoothstep(0.0, 1.0, pow(mix(ostate.g, state.g, frame_part), 3.0)) * 0.35; + float mask = 1.0 - step(size, dist); + + float brightness = mix(ostate.r, state.r, frame_part) + 0.2 * pow(mix(ostate.g, state.g, frame_part), 3.0); + stateColor = mix(bgColor, fgColor, brightness * mask); +} diff --git a/modules/automapaper/init.glsl b/modules/automapaper/init.glsl new file mode 100644 index 0000000..9d03e60 --- /dev/null +++ b/modules/automapaper/init.glsl @@ -0,0 +1,26 @@ +#version 310 es +precision highp float; + +uniform float time; +uniform vec2 resolution; + +out vec4 stateColor; + +uint xxhash32(uvec2 p) +{ + const uint PRIME32_2 = 2246822519U, PRIME32_3 = 3266489917U; + const uint PRIME32_4 = 668265263U, PRIME32_5 = 374761393U; + uint h32 = p.y + PRIME32_5 + p.x * PRIME32_3; + h32 = PRIME32_4 * ((h32 << 17) | (h32 >> (32 - 17))); + h32 = PRIME32_2 * (h32 ^ (h32 >> 15)); + h32 = PRIME32_3 * (h32 ^ (h32 >> 13)); + return h32 ^ (h32 >> 16); +} + +void main(void) { + vec2 position = gl_FragCoord.xy; + position += 100.0 * time; + uint hash = xxhash32(uvec2(position.x, position.y)); + float value = float(hash) * (1.0 / float(0xffffffffu)); + stateColor = vec4(step(0.3, value), 0, 0, step(0.3, value)); +} diff --git a/modules/automapaper/state-game_of_life.glsl b/modules/automapaper/state-game_of_life.glsl new file mode 100644 index 0000000..e9dc882 --- /dev/null +++ b/modules/automapaper/state-game_of_life.glsl @@ -0,0 +1,34 @@ +#version 310 es +precision highp float; + +uniform sampler2D state; +uniform vec2 scale; + +out vec4 stateColor; + +vec4 get(int x, int y) { + return texture(state, (gl_FragCoord.xy + vec2(x, y)) / scale); +} + +void main() { + int sum = int(get(-1, -1).r + + get(-1, 0).r + + get(-1, 1).r + + get(0, -1).r + + get(0, 1).r + + get(1, -1).r + + get(1, 0).r + + get(1, 1).r); + vec4 current = get(0, 0); + if (sum == 3) { + stateColor.r = 1.0; + stateColor.g = 1.0; + } else if (sum == 2) { + stateColor = current; + if (current.r == 0.0) { + stateColor.g = max(current.g - 0.01, 0.0); + } + } else { + stateColor = vec4(0.0, max(current.g - 0.01, 0.0), 0.0, 1.0); + } +} diff --git a/modules/default.nix b/modules/default.nix index a23fb55..9ea9027 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,6 +1,9 @@ { ... }: { imports = [ - ./hyprland.nix + ./waybar + ./applications + ./games + ./dunst.nix ]; } diff --git a/modules/hyprland.nix b/modules/hyprland.nix deleted file mode 100644 index cca3f0f..0000000 --- a/modules/hyprland.nix +++ /dev/null @@ -1,255 +0,0 @@ -{ - config, - lib, - pkgs, - inputs, - ... -}: -let - cfg = config.modules.hyprland; -in -{ - options.modules.hyprland = { - enable = lib.mkEnableOption "enable hyprland"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.hyprland; - example = lib.literalExpression ''inputs.hyprland.packages.${pkgs.system}.hyprland''; - }; - terminal = lib.mkOption { - type = lib.types.package; - default = pkgs.kitty; - description = "What terminal emulator should be used in hyprland"; - }; - wallpapers.automapaper = { - enable = lib.mkEnableOption "enable automapaper"; - }; - portalPackage = lib.mkOption { - type = lib.types.package; - default = pkgs.xdg-desktop-portal-hyprland; - }; - displays = lib.mkOption { - type = lib.types.listOf ( - lib.types.submodule { - options = { - name = lib.mkOption { - type = lib.types.str; - description = "the display identifier"; - example = "DP-2"; - }; - horizontal = lib.mkOption { - type = lib.types.ints.positive; - description = "the horizontal resolution"; - example = 1920; - }; - vertical = lib.mkOption { - type = lib.types.ints.positive; - description = "the vertical resolution"; - example = 1080; - }; - horizontal-offset = lib.mkOption { - type = lib.types.ints.unsigned; - description = "the horizontal resolution"; - example = 1920; - }; - vertical-offset = lib.mkOption { - type = lib.types.ints.unsigned; - description = "the vertical resolution"; - example = 0; - }; - refresh-rate = lib.mkOption { - type = lib.types.ints.unsigned; - description = "the refresh rate of the monitor"; - example = 60; - }; - scale = lib.mkOption { - type = lib.types.str; - description = "the scale of the monitor"; - default = "1"; - example = "1.5"; - }; - }; - } - ); - description = "the display layout to use"; - }; - }; - - imports = [ - ./waybar/default.nix - ./wofi.nix - ./dunst.nix - ./automapaper - ]; - - config = lib.mkIf cfg.enable { - modules = { - automapaper = { - enable = lib.mkDefault true; - hyprland = cfg.enable; - }; - waybar = { - modules = { - left = [ - "hyprland/workspaces" - "tray" - "hyprland/window" - ]; - center = [ - "clock" - "custom/spotify" - ]; - right = [ - "custom/vpn" - "wireplumber" - "network" - "cpu" - "memory" - "custom/poweroff" - ]; - }; - enable = lib.mkDefault true; - }; - wofi.enable = lib.mkDefault true; - dunst.enable = lib.mkDefault true; - }; - # these are necessary for the config to function correctly - home.packages = with pkgs; [ - # I always want these with hyprland anyways - libnotify # to enable the notify-send command - wl-clipboard # wl-copy and wl-paste - - playerctl - ]; - - xdg.portal = { - extraPortals = [ cfg.portalPackage ]; - config.common.default = "*"; - }; - - services = { - - hypridle = { - enable = true; - settings.listener = [ - { - timeout = 330; - on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed - on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired. - } - ]; - }; - playerctld.enable = true; - }; - wayland.windowManager.hyprland = { - enable = true; - package = cfg.package; - settings = - let - make-display-string = - display: - "${display.name}, ${builtins.toString display.horizontal}x${builtins.toString display.vertical}@${builtins.toString display.refresh-rate}, ${builtins.toString display.horizontal-offset}x${builtins.toString display.vertical-offset}, ${display.scale}"; - in - { - monitor = builtins.map make-display-string cfg.displays; - windowrulev2 = [ - "opacity 1.0 0.6,class:^(kitty)$" - "stayfocused,class:^(wofi)$" - ]; - env = [ - "WLR_NO_HARDWARE_CURSORS,1" - ]; - exec-once = [ - "${pkgs.waybar}/bin/waybar" - "${pkgs.dunst}/bin/dunst" - "${cfg.package}/bin/hyprctl dispatcher focusmonitor 1" - "${pkgs.keepassxc}/bin/keepassxc" - "${pkgs.spotify}/bin/spotify" - ]; - general = { - gaps_in = "2"; - gaps_out = "3"; - border_size = "3"; - "col.active_border" = "0xff${config.colorScheme.palette.base01}"; - "col.inactive_border" = "0xff${config.colorScheme.palette.base00}"; - }; - input = { - touchpad = { - clickfinger_behavior = 1; - disable_while_typing = 1; - natural_scroll = 1; - tap-to-click = 1; - scroll_factor = 0.3; - }; - }; - misc = { - key_press_enables_dpms = true; - }; - decoration = { - rounding = "6"; - active_opacity = "1"; - inactive_opacity = "1"; - }; - animations = { - enabled = "1"; - animation = [ - "windows,1,2,default" - "border,1,10,default" - "fade,0,5,default" - "workspaces,1,4,default" - ]; - }; - "$mod" = "SUPER"; - bind = - let - wpkgs = inputs.self.packages.${pkgs.system}; - in - [ - "$mod,Return,exec,${cfg.terminal}/bin/${cfg.terminal.pname}" - "$mod,tab,cyclenext" - "SUPERSHIFT,Q,killactive" - "$mod,SPACE,exec,${wpkgs.wofi-launch}/bin/wofi-launch" - "$mod,P,exec,${wpkgs.wofi-power}/bin/wofi-power" - "SUPERSHIFT,m,exit" - "$mod,H,movefocus,l" - "$mod,J,movefocus,u" - "$mod,K,movefocus,d" - "$mod,L,movefocus,r" - "SUPERSHIFT,H,movewindow,l" - "SUPERSHIFT,J,movewindow,u" - "SUPERSHIFT,K,movewindow,d" - "SUPERSHIFT,L,movewindow,r" - "$mod,F,togglefloating" - "$mod,X,togglespecialworkspace" - "SUPERSHIFT,X,movetoworkspace,special" - "SUPERSHIFT,S,exec,${pkgs.hyprshot}/bin/hyprshot -m region --clipboard-only" - "$mod,f11,fullscreen,0" - ",XF86AudioLowerVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%-" - ",XF86AudioRaiseVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%+" - ",XF86AudioMute,exec,${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle" - ",XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause" - ",XF86AudioPrev,exec,${pkgs.playerctl}/bin/playerctl previous" - ",XF86AudioNext,exec,${pkgs.playerctl}/bin/playerctl next" - "$mod,mouse_up,workspace,r-1" - "$mod,mouse_down,workspace,r+1" - ] - ++ (builtins.concatLists ( - builtins.genList ( - x: - let - ws = builtins.toString (x); - in - [ - "$mod,${ws},workspace,${ws}" - "ALT,${ws},movetoworkspace,${ws}" - ] - ) 10 - )); - bindm = [ - "$mod,mouse:272,movewindow" - "$mod,mouse:273,resizewindow" - ]; - }; - }; - }; -} diff --git a/modules/plasma/default.nix b/modules/plasma/default.nix index 261a34b..2cc4854 100644 --- a/modules/plasma/default.nix +++ b/modules/plasma/default.nix @@ -16,7 +16,7 @@ in config = lib.mkIf cfg.enable { services = { desktopManager.plasma6.enable = true; - displayManager.defaultSession = "hyprland"; + displayManager.defaultSession = "niri"; }; xdg.portal.config.common.default = "*"; diff --git a/modules/waybar/default.nix b/modules/waybar/default.nix index 13b638d..96fa6ee 100644 --- a/modules/waybar/default.nix +++ b/modules/waybar/default.nix @@ -76,7 +76,8 @@ in margin-top = 8; margin-left = 10; margin-right = 10; - output = builtins.map (display: display.name) config.modules.hyprland.displays; + # TODO: find a new way to do outputs nicely + # output = builtins.map (display: display.name) config.modules.hyprland.displays; modules-left = cfg.modules.left; modules-center = cfg.modules.center; modules-right = cfg.modules.right; diff --git a/modules/waybar/power.nix b/modules/waybar/power.nix index 1ea7e8a..4845126 100644 --- a/modules/waybar/power.nix +++ b/modules/waybar/power.nix @@ -1,4 +1,10 @@ -{ lib, config, ... }: +{ + lib, + config, + pkgs, + inputs, + ... +}: let name = "custom/poweroff"; in @@ -9,16 +15,12 @@ in enable = lib.mkEnableOption "enable ${name} waybar module"; }; }; - imports = [ - ../wofi.nix - ]; config = lib.mkIf config.modules.waybar.enabled.${name}.enable { - modules.wofi.enable = true; programs.waybar = { settings.mainBar."${name}" = { format = ""; - on-click = "wofi-power"; - on-click-right = "swaylock"; # TODO: change to whatever lock screen i want + on-click = "${inputs.self.packages.${pkgs.system}.fuzzel-launch}"; + on-click-right = "${pkgs.swaylock}/bin/swaylock"; # TODO: change to whatever lock screen i want }; style = '' #custom-poweroff { diff --git a/modules/waybar/window.nix b/modules/waybar/window.nix index f5ffe9d..e1db6d7 100644 --- a/modules/waybar/window.nix +++ b/modules/waybar/window.nix @@ -1,6 +1,6 @@ { lib, config, ... }: let - name = "hyprland/window"; + name = "niri/window"; in { options.modules.waybar = { diff --git a/modules/waybar/workspaces.nix b/modules/waybar/workspaces.nix index 0a2b724..c8e35c2 100644 --- a/modules/waybar/workspaces.nix +++ b/modules/waybar/workspaces.nix @@ -1,6 +1,6 @@ { lib, config, ... }: let - name = "hyprland/workspaces"; + name = "niri/workspaces"; in { options.modules.waybar = { diff --git a/modules/wofi.nix b/modules/wofi.nix deleted file mode 100644 index 5a35fe5..0000000 --- a/modules/wofi.nix +++ /dev/null @@ -1,105 +0,0 @@ -{ - lib, - config, - pkgs, - inputs, - ... -}: -let - cfg = config.modules.wofi; -in -{ - options.modules.wofi = { - enable = lib.mkEnableOption "enable wofi app launcher"; - }; - imports = [ - ../common/colors.nix - ]; - config = lib.mkIf cfg.enable { - home.packages = - let - wpkgs = inputs.self.packages.${pkgs.system}; - in - [ - wpkgs.wofi-launch - wpkgs.wofi-power - ]; - programs.wofi = { - enable = true; - settings = { }; - style = '' - * { - outline: none; - outline-style: none; - } - - #window { - margin: 10px; - border: none; - background-color: #${config.colorScheme.palette.base01}; - border-radius: 10px; - font-family: - JetBrains Mono NF, - monospace; - font-weight: bold; - font-size: 14px; - } - - #outer-box { - margin: 10px; - border: 2px #${config.colorScheme.palette.base00}; - border-radius: 10px; - background-color: transparent; - } - - #input { - border: none; - border-radius: 10px; - margin-left: 2px; - color: #${config.colorScheme.palette.base05}; - outline-style: none; - background-color: #${config.colorScheme.palette.base03}; - } - - #scroll { - border: 5px solid #${config.colorScheme.palette.base02}; - border-radius: 10px; - /*padding-right: 10px;*/ - outline: none; - background-color: #${config.colorScheme.palette.base00}; - } - - #inner-box { - border: none; - border-radius: 10px; - background-color: transparent; - } - - #entry { - border: none; - border-radius: 10px; - margin-right: 15px; - margin-left: 15px; - padding-right: 10px; - padding-left: 10px; - color: #${config.colorScheme.palette.base05}; - background-color: #${config.colorScheme.palette.base00}; - } - #entry:selected { - border: none; - background-color: #${config.colorScheme.palette.base02}; - } - - #text:selected { - border: none; - color: #${config.colorScheme.palette.base05}; - } - - #img { - background-color: transparent; - margin-right: 6px; - } - ''; - }; - }; -} diff --git a/packages/default.nix b/packages/default.nix index b69cb5c..90c9945 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -22,7 +22,7 @@ forAllSystems ( call = path: import path { inherit pkgs system; }; in { - wofi-launch = call ./wofi-launch.nix; - wofi-power = call ./wofi-power.nix; + fuzzel-launch = call ./fuzzel-launch.nix; + fuzzel-power = call ./fuzzel-power.nix; } ) diff --git a/packages/fuzzel-launch.nix b/packages/fuzzel-launch.nix new file mode 100644 index 0000000..de74e6c --- /dev/null +++ b/packages/fuzzel-launch.nix @@ -0,0 +1,4 @@ +{ pkgs, ... }: +pkgs.writeShellScriptBin "fuzzel-launch" '' + ${pkgs.fuzzel}/bin/fuzzel +'' diff --git a/packages/wofi-power.nix b/packages/fuzzel-power.nix similarity index 77% rename from packages/wofi-power.nix rename to packages/fuzzel-power.nix index 315f2cd..c01e721 100644 --- a/packages/wofi-power.nix +++ b/packages/fuzzel-power.nix @@ -1,11 +1,11 @@ { pkgs, ... }: -pkgs.writeShellScriptBin "wofi-power" '' +pkgs.writeShellScriptBin "fuzzel-power" '' lock="Lock" poweroff="Poweroff" reboot="Reboot" sleep="Suspend" logout="Log out" - selected_option=$(echo -e "$lock\n$sleep\n$reboot\n$logout\n$poweroff" | ${pkgs.wofi}/bin/wofi --dmenu -i -p "Powermenu") + selected_option=$(echo -e "$lock\n$sleep\n$reboot\n$logout\n$poweroff" | ${pkgs.fuzzel}/bin/fuzzel --dmenu -i -p "Powermenu") if [ "$selected_option" == "$lock" ] then @@ -26,7 +26,7 @@ pkgs.writeShellScriptBin "wofi-power" '' elif [ "$selected_option" == "$logout" ] then echo "logout" - hyprctl dispatch exit + ${pkgs.niri}/bin/niri msg action quit --skip-confirmation else echo "No match" fi diff --git a/packages/wofi-launch.nix b/packages/wofi-launch.nix deleted file mode 100644 index 9a210c2..0000000 --- a/packages/wofi-launch.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ pkgs, ... }: -pkgs.writeShellScriptBin "wofi-launch" '' - ${pkgs.wofi}/bin/wofi --show drun -''