From 790e90515eecd240f7e490dafc54ed702b6b0fae Mon Sep 17 00:00:00 2001 From: Mateusz Cholewka Date: Tue, 22 Jul 2025 00:58:11 +0200 Subject: [PATCH] Add swayosd for on-screen volume and brightness indicators (#274) * Make these executable * Replace pavucontrol with wiremix (#225) Add to install * Revert "Replace pavucontrol with wiremix (#225)" This reverts commit 620b397859698cdc8e6207d33533c70e0e795171. * Add swayOSD to show brightness and volume status * Add swayOSD migration * Move swayosd from desktop to hyperlandia --------- Co-authored-by: David Heinemeier Hansson Co-authored-by: Roeland --- default/hypr/autostart.conf | 1 + default/hypr/bindings/media.conf | 14 +++++++------- install/hyprlandia.sh | 2 +- migrations/1752896365.sh | 2 ++ 4 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 migrations/1752896365.sh diff --git a/default/hypr/autostart.conf b/default/hypr/autostart.conf index 664b47a..8aeff6f 100644 --- a/default/hypr/autostart.conf +++ b/default/hypr/autostart.conf @@ -3,6 +3,7 @@ exec-once = uwsm app -- mako exec-once = uwsm app -- waybar exec-once = uwsm app -- fcitx5 exec-once = uwsm app -- swaybg -i ~/.config/omarchy/current/background -m fill +exec-once = uwsm app -- swayosd-server exec-once = uwsm app -- walker --gapplication-service exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec-once = wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+' diff --git a/default/hypr/bindings/media.conf b/default/hypr/bindings/media.conf index a70d8d6..46430cb 100644 --- a/default/hypr/bindings/media.conf +++ b/default/hypr/bindings/media.conf @@ -1,10 +1,10 @@ -# Laptop multimedia keys for volume and LCD brightness -bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ -bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle -bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ -bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- +# Laptop multimedia keys for volume and LCD brightness (with OSD) +bindel = ,XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise +bindel = ,XF86AudioLowerVolume, exec, swayosd-client --output-volume lower +bindel = ,XF86AudioMute, exec, swayosd-client --output-volume mute-toggle +bindel = ,XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle +bindel = ,XF86MonBrightnessUp, exec, swayosd-client --brightness raise +bindel = ,XF86MonBrightnessDown, exec, swayosd-client --brightness lower # Requires playerctl bindl = , XF86AudioNext, exec, playerctl next diff --git a/install/hyprlandia.sh b/install/hyprlandia.sh index 8c23142..e5d9368 100644 --- a/install/hyprlandia.sh +++ b/install/hyprlandia.sh @@ -2,5 +2,5 @@ yay -S --noconfirm --needed \ hyprland hyprshot hyprpicker hyprlock hypridle polkit-gnome hyprland-qtutils \ - walker-bin libqalculate waybar mako swaybg \ + walker-bin libqalculate waybar mako swaybg swayosd \ xdg-desktop-portal-hyprland xdg-desktop-portal-gtk diff --git a/migrations/1752896365.sh b/migrations/1752896365.sh new file mode 100644 index 0000000..443b4fd --- /dev/null +++ b/migrations/1752896365.sh @@ -0,0 +1,2 @@ +echo "Install swayOSD to show volume status" +yay -S --noconfirm --needed swayosd