diff options
Diffstat (limited to 'modules/packages/niri')
| -rw-r--r-- | modules/packages/niri/hosts/tiamat.nix | 15 | ||||
| -rw-r--r-- | modules/packages/niri/package.nix | 9 | ||||
| -rw-r--r-- | modules/packages/niri/settings.nix | 71 |
3 files changed, 85 insertions, 10 deletions
diff --git a/modules/packages/niri/hosts/tiamat.nix b/modules/packages/niri/hosts/tiamat.nix index a088940..3fdf6aa 100644 --- a/modules/packages/niri/hosts/tiamat.nix +++ b/modules/packages/niri/hosts/tiamat.nix @@ -16,10 +16,20 @@ xdg.portal = { enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; }; - services.displayManager.ly.enable = true; + environment.systemPackages = [pkgs.wlr-randr]; + + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --asterisks --cmd niri"; + user = "jck"; + }; + }; + }; }; perSystem = { @@ -36,6 +46,7 @@ output "eDP-1" { mode "2880x1920@120" scale 1.67 + variable-refresh-rate } ''; } diff --git a/modules/packages/niri/package.nix b/modules/packages/niri/package.nix index baae9a6..ad1144e 100644 --- a/modules/packages/niri/package.nix +++ b/modules/packages/niri/package.nix @@ -16,14 +16,13 @@ xdg.portal = { enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; }; + + environment.systemPackages = [pkgs.wlr-randr]; }; - perSystem = { - pkgs, - ... - }: { + perSystem = {pkgs, ...}: { packages.niri = inputs.wrapper-modules.wrappers.niri.wrap { inherit pkgs; imports = [self.wrapperModules.niri]; diff --git a/modules/packages/niri/settings.nix b/modules/packages/niri/settings.nix index 52ad72f..897bc50 100644 --- a/modules/packages/niri/settings.nix +++ b/modules/packages/niri/settings.nix @@ -1,5 +1,10 @@ -{inputs, self, ...}: { - flake.wrapperModules.niri = {lib, config, pkgs, ...}: { +{self, ...}: { + flake.wrapperModules.niri = { + lib, + config, + pkgs, + ... + }: { settings = { input = { focus-follows-mouse = {}; @@ -35,6 +40,7 @@ xwayland-satellite.path = lib.getExe config.pkgs.xwayland-satellite; prefer-no-csd = {}; + hotkey-overlay.skip-at-startup = {}; binds = { "Mod+Shift+M".quit = {}; @@ -42,10 +48,69 @@ "Mod+F1".spawn-sh = "${lib.getExe self.packages.${config.pkgs.stdenv.hostPlatform.system}.noctalia-shell} ipc call launcher toggle"; "Mod+F2".spawn = lib.getExe self.packages.${config.pkgs.stdenv.hostPlatform.system}.terminal; - "Mod+F3".spawn = "${lib.getExe self.packages.${config.pkgs.stdenv.hostPlatform.system}.terminal} -e yazi"; + "Mod+F3".spawn = lib.getExe config.pkgs.thunar; "Mod+F4".close-window = {}; "Mod+R".switch-preset-column-width = {}; + + "Mod+1".focus-workspace = "w0"; + "Mod+2".focus-workspace = "w1"; + "Mod+3".focus-workspace = "w2"; + "Mod+4".focus-workspace = "w3"; + "Mod+5".focus-workspace = "w4"; + "Mod+6".focus-workspace = "w5"; + "Mod+7".focus-workspace = "w6"; + "Mod+8".focus-workspace = "w7"; + "Mod+9".focus-workspace = "w8"; + "Mod+0".focus-workspace = "w9"; + + "Mod+Shift+1".move-column-to-workspace = "w0"; + "Mod+Shift+2".move-column-to-workspace = "w1"; + "Mod+Shift+3".move-column-to-workspace = "w2"; + "Mod+Shift+4".move-column-to-workspace = "w3"; + "Mod+Shift+5".move-column-to-workspace = "w4"; + "Mod+Shift+6".move-column-to-workspace = "w5"; + "Mod+Shift+7".move-column-to-workspace = "w6"; + "Mod+Shift+8".move-column-to-workspace = "w7"; + "Mod+Shift+9".move-column-to-workspace = "w8"; + "Mod+Shift+0".move-column-to-workspace = "w9"; + + "Mod+WheelScrollDown".focus-column-left = {}; + "Mod+WheelScrollUp".focus-column-right = {}; + "Mod+Shift+WheelScrollDown".focus-workspace-down = {}; + "Mod+Shift+WheelScrollUp".focus-workspace-up = {}; + + "XF86AudioPrev".spawn-sh = "playerctl previous"; + "XF86AudioPause".spawn-sh = "playerctl play-pause"; + "XF86AudioPlay".spawn-sh = "playerctl play-pause"; + "XF86AudioNext".spawn-sh = "playerctl next"; + "XF86AudioStop".spawn-sh = "playerctl stop"; + + "Shift+XF86AudioPrev".spawn-sh = "playerctl --player=Feishin previous"; + "Shift+XF86AudioPause".spawn-sh = "playerctl --player=Feishin play-pause"; + "Shift+XF86AudioPlay".spawn-sh = "playerctl --player=Feishin play-pause"; + "Shift+XF86AudioNext".spawn-sh = "playerctl --player=Feishin next"; + "Shift+XF86AudioStop".spawn-sh = "playerctl --player=Feishin stop"; + + "XF86AudioRaiseVolume".spawn-sh = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"; + "XF86AudioLowerVolume".spawn-sh = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"; + "XF86AudioMute".spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + + "XF86MonBrightnessUp".spawn-sh = "${lib.getExe config.pkgs.brightnessctl} set 5%+"; + "XF86MonBrightnessDown".spawn-sh = "${lib.getExe config.pkgs.brightnessctl} set 5%-"; + }; + + workspaces = { + "w0" = {}; + "w1" = {}; + "w2" = {}; + "w3" = {}; + "w4" = {}; + "w5" = {}; + "w6" = {}; + "w7" = {}; + "w8" = {}; + "w9" = {}; }; spawn-at-startup = [ |
