diff --git a/apps/hyprland/hypr/binds.nix b/apps/hyprland/hypr/binds.nix index 37a3e18..d4f0d05 100644 --- a/apps/hyprland/hypr/binds.nix +++ b/apps/hyprland/hypr/binds.nix @@ -1,9 +1,22 @@ -{ +{pkgs, ...}: { + services.swayosd.enable = true; + home.packages = [ + pkgs.playerctl + ]; wayland.windowManager.hyprland.settings = { - binddm = [ - "SUPER, mouse:272, Move Window via Mouse, movewindow" - "SUPER, mouse:273, Resize Window with Mouse, resizewindow" + bindel = [ + ", XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise" + ", XF86AudioLowerVolume, exec, swayosd-client --output-volume lower" ]; + + bindl = [ + ", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle" + ", Caps_Lock, exec, swayosd-client --caps-lock" + ", XF86AudioPlay, exec, playerctl play-pause && notify-send -u low -t 1000 \"Media\" \"$(playerctl status)\"" + ", XF86AudioPrev, exec, playerctl previous && notify-send -u low -t 1000 \"Previous Track\" \"$(playerctl metadata title)\"" + ", XF86AudioNext, exec, playerctl next && notify-send -u low -t 1000 \"Next Track\" \"$(playerctl metadata title)\"" + ", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle" + ]; # FIXME: not working bindd = [ # essential diff --git a/apps/hyprland/hypr/exec.nix b/apps/hyprland/hypr/exec.nix index 779a71a..1797f3c 100644 --- a/apps/hyprland/hypr/exec.nix +++ b/apps/hyprland/hypr/exec.nix @@ -7,6 +7,7 @@ "uwsm app -- waybar" "uwsm app -- hyprpaper" "uwsm app -- elephant" + "uwsm app -- swayosd" ]; exec = [ "pkill -x hyprpaper; uwsm app -- hyprpaper"