summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/wayland/niri/binds.nix66
-rw-r--r--home/wayland/niri/niri.nix30
-rw-r--r--home/wayland/noctalia.nix6
3 files changed, 101 insertions, 1 deletions
diff --git a/home/wayland/niri/binds.nix b/home/wayland/niri/binds.nix
new file mode 100644
index 0000000..1e3e281
--- /dev/null
+++ b/home/wayland/niri/binds.nix
@@ -0,0 +1,66 @@
+{ config, pkgs, ... }:
+{
+ programs.niri.settings.binds = with config.lib.niri.actions;
+ let
+ set-volume = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@";
+ playerctl = spawn "${pkgs.playerctl}/bin/playerctl";
+ in
+ {
+ "Mod+Slash".action = show-hotkey-overlay;
+ XF86AudioRaiseVolume.action = set-volume "2%+";
+ XF86AudioLowerVolume.action = set-volume "2%-";
+ XF86AudioMute.action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
+ XF86AudioMicMute.action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
+ XF86AudioPlay.action = playerctl "play-pause";
+ XF86AudioStop.action = playerctl "pause";
+ XF86AudioPrev.action = playerctl "previous";
+ XF86AudioNext.action = playerctl "next";
+ "Mod+Minus".action = set-column-width "-10%";
+ "Mod+Equal".action = set-column-width "+10%";
+
+ # // Finer height adjustments when in column with other windows.
+ "Mod+Shift+Minus".action = set-window-height "-10%";
+ "Mod+Shift+Equal".action = set-window-height "+10%";
+ # "Mod+Shift+V".action = switch-focus-between-floating-and-tiling;
+ "Mod+Shift+P".action = power-off-monitors;
+
+ # --- System / General ---
+ "Mod+Return".action = spawn "foot";
+ "Mod+D".action = spawn "fuzzel";
+
+ # The 'quit' action without arguments performs the action with confirmation.
+ "Mod+Shift+E".action = quit;
+
+ # --- Window Navigation (Focus) ---
+ "Mod+H".action = focus-column-left;
+ "Mod+L".action = focus-column-right;
+ "Mod+J".action = focus-window-down;
+ "Mod+K".action = focus-window-up;
+
+ # --- Window Management (Move) ---
+ "Mod+Shift+H".action = move-column-left;
+ "Mod+Shift+L".action = move-column-right;
+ "Mod+Shift+J".action = move-window-down;
+ "Mod+Shift+K".action = move-window-up;
+
+ # --- Window State ---
+ "Mod+Shift+Q".action = close-window;
+ "Mod+F".action = maximize-column;
+ # "Mod+V".action = toggle-window-floating; # Renamed from toggle-floating to match docs};
+
+ "Mod+1".action = focus-workspace 1;
+ "Mod+2".action = focus-workspace 2;
+ "Mod+3".action = focus-workspace 3;
+ "Mod+4".action = focus-workspace 4;
+ "Mod+5".action = focus-workspace 5;
+ "Mod+6".action = focus-workspace 6;
+
+ # The wonky format used here is to work-around https://github.com/sodiboo/niri-flake/issues/944
+ "Mod+Ctrl+1".action.move-column-to-workspace = [ 1 ];
+ "Mod+Ctrl+2".action.move-column-to-workspace = [ 2 ];
+ "Mod+Ctrl+3".action.move-column-to-workspace = [ 3 ];
+ "Mod+Ctrl+4".action.move-column-to-workspace = [ 4 ];
+ "Mod+Ctrl+5".action.move-column-to-workspace = [ 5 ];
+ "Mod+Ctrl+6".action.move-column-to-workspace = [ 6 ];
+ };
+}
diff --git a/home/wayland/niri/niri.nix b/home/wayland/niri/niri.nix
index facb35d..0391699 100644
--- a/home/wayland/niri/niri.nix
+++ b/home/wayland/niri/niri.nix
@@ -1,4 +1,34 @@
{ ... }:
{
+ imports = [
+ ./binds.nix
+ ];
+ programs.niri.settings = {
+ prefer-no-csd = true;
+ layout.shadow.enable = true;
+ input = {
+ mouse = {
+ accel-profile = "flat";
+ accel-speed = -0.5;
+ middle-emulation = true;
+ };
+ focus-follows-mouse = {
+ enable = true;
+ max-scroll-amount = "0%";
+ };
+ mod-key = "Alt";
+ keyboard.xkb.layout = "pl";
+ };
+ outputs = {
+ "DP-1" = {
+ mode = {
+ width = 2560;
+ height = 1440;
+ refresh = null;
+ };
+ scale = 1.0;
+ };
+ };
+ };
}
diff --git a/home/wayland/noctalia.nix b/home/wayland/noctalia.nix
index e0b402d..e51a09a 100644
--- a/home/wayland/noctalia.nix
+++ b/home/wayland/noctalia.nix
@@ -1,7 +1,11 @@
-{ inputs, ... }:
+{ pkgs, inputs, ... }:
{
imports = [ inputs.noctalia.homeModules.default ];
+ programs.noctalia-shell.package = inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
+ quickshell = inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.quickshell;
+ };
+
programs.noctalia-shell = {
enable = true;
};