commit fb5e0e5965f0262945e1076d1bbca8fba75ace46
parent 6ef0e3bbd6d4b34b3af8533eb150af428b9d3c78
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Tue, 26 Aug 2025 12:54:36 +0200
parent 6ef0e3bbd6d4b34b3af8533eb150af428b9d3c78
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Tue, 26 Aug 2025 12:54:36 +0200
config/home-manager/zaphyra/configure/niri: replace `swayosd` with `wob`
2 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/config/home-manager/zaphyra/configure/niri.nix b/config/home-manager/zaphyra/configure/niri.nix @@ -8,10 +8,6 @@ ... }: -let - nixStd = inputs.nixStd.lib; - -in { imports = @@ -23,7 +19,7 @@ in services.wpaperd services.shaderbg services.waybar - services.swayosd + services.wob services.swaync services.swayidle services.wlsunset
diff --git a/config/home-manager/zaphyra/services/wob.nix b/config/home-manager/zaphyra/services/wob.nix @@ -0,0 +1,36 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + + services.wob = { + enable = true; + settings."" = { + anchor = "top center"; + }; + }; + + programs.niri.settings.binds = with config.lib.niri.actions; { + "XF86AudioMute".action = + spawn (lib.getExe pkgs.bash) "-c" + "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && (wpctl get-volume @DEFAULT_AUDIO_SINK@ | ${lib.getExe pkgs.gnugrep} -q MUTED && echo 0 > $XDG_RUNTIME_DIR/wob.sock) || wpctl get-volume @DEFAULT_AUDIO_SINK@ | ${lib.getExe pkgs.gnused} 's/[^0-9]//g' > $XDG_RUNTIME_DIR/wob.sock)"; + "XF86AudioRaiseVolume".action = + spawn (lib.getExe pkgs.bash) "-c" + "(wpctl get-volume @DEFAULT_AUDIO_SINK@ | ${lib.getExe pkgs.gnugrep} -q MUTED && echo 0 > $XDG_RUNTIME_DIR/wob.sock) || (wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ && wpctl get-volume @DEFAULT_AUDIO_SINK@ | ${lib.getExe pkgs.gnused} 's/[^0-9]//g' > $XDG_RUNTIME_DIR/wob.sock)"; + "XF86AudioLowerVolume".action = + spawn (lib.getExe pkgs.bash) "-c" + "(wpctl get-volume @DEFAULT_AUDIO_SINK@ | ${lib.getExe pkgs.gnugrep} -q MUTED && echo 0 > $XDG_RUNTIME_DIR/wob.sock) || (wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && wpctl get-volume @DEFAULT_AUDIO_SINK@ | ${lib.getExe pkgs.gnused} 's/[^0-9]//g' > $XDG_RUNTIME_DIR/wob.sock)"; + + "XF86MonBrightnessUp".action = + spawn (lib.getExe pkgs.bash) "-c" + "${lib.getExe pkgs.brightnessctl} set +2% | ${lib.getExe pkgs.gnused} -En 's/.*\\(([0-9]+)%\\).*/\\1/p' > $XDG_RUNTIME_DIR/wob.sock"; + "XF86MonBrightnessDown".action = + spawn (lib.getExe pkgs.bash) "-c" + "${lib.getExe pkgs.brightnessctl} set 2%- | ${lib.getExe pkgs.gnused} -En 's/.*\\(([0-9]+)%\\).*/\\1/p' > $XDG_RUNTIME_DIR/wob.sock"; + }; + +}