From 516f5d30e4658d8659058ce297f01ccbd94a9cf6 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Sat, 12 Apr 2025 19:10:42 +0200 Subject: [PATCH] set mako as notification system --- dot_config/hypr/keybindings.conf | 6 +++--- dot_config/hypr/programs.conf.tmpl | 1 + dot_config/hypr/scripts/executable_wp-vol.sh | 8 ++++++++ dot_config/mako/executable_config | 11 +++++++++++ executable_install-fedora.sh | 2 +- 5 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 dot_config/hypr/scripts/executable_wp-vol.sh diff --git a/dot_config/hypr/keybindings.conf b/dot_config/hypr/keybindings.conf index 088910b..8f67e94 100644 --- a/dot_config/hypr/keybindings.conf +++ b/dot_config/hypr/keybindings.conf @@ -69,9 +69,9 @@ bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # Laptop multimedia keys for volume and LCD brightness -bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @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 = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ && ~/.config/hypr/scripts/wp-vol.sh +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && ~/.config/hypr/scripts/wp-vol.sh +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && ~/.config/hypr/scripts/wp-vol.sh bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- diff --git a/dot_config/hypr/programs.conf.tmpl b/dot_config/hypr/programs.conf.tmpl index 201e65f..d372e4d 100644 --- a/dot_config/hypr/programs.conf.tmpl +++ b/dot_config/hypr/programs.conf.tmpl @@ -19,6 +19,7 @@ $menu = fuzzel exec-once = [workspace 1 silent] $terminal exec-once = nm-applet & exec-once = blueman-applet & +exec-once = mako & exec-once = waybar & hyprpaper exec-once = [workspace 2 silent] firefox exec-once = hypridle diff --git a/dot_config/hypr/scripts/executable_wp-vol.sh b/dot_config/hypr/scripts/executable_wp-vol.sh new file mode 100644 index 0000000..9ac60ba --- /dev/null +++ b/dot_config/hypr/scripts/executable_wp-vol.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Get the volume level and convert it to a percentage +volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@) +volume=$(echo "$volume" | awk '{print $2}') +volume=$(echo "( $volume * 100 ) / 1" | bc) + +notify-send -t 1000 -a 'wp-vol' -h int:value:$volume "Volume: ${volume}%" diff --git a/dot_config/mako/executable_config b/dot_config/mako/executable_config index a33bc31..cbd1968 100644 --- a/dot_config/mako/executable_config +++ b/dot_config/mako/executable_config @@ -27,3 +27,14 @@ on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/dialog-error.oga [category=mpd] default-timeout=2000 group-by=category + +[app-name=wp-vol] +layer=overlay +history=0 +anchor=top-center + +[mode=do-not-disturb] +invisible=1 + +[mode=do-not-disturb app-name=wp-vol] +invisible=0 diff --git a/executable_install-fedora.sh b/executable_install-fedora.sh index df64c66..e916c31 100755 --- a/executable_install-fedora.sh +++ b/executable_install-fedora.sh @@ -38,7 +38,7 @@ sudo dnf install -y \ dkms libdrm-devel hplip ydotool pkg-config \ libxkbcommon-devel scdoc inotify-tools \ net-snmp-utils net-snmp snmpd virt-manager \ - @virtualization virt-what + @virtualization virt-what mako ## Multimedia sudo dnf install -y \