Browse Source

Switch from tvolnoti to swayosd

master
Arti Zirk 4 months ago
parent
commit
f42b5eb4ac
  1. 2
      .bin/volume_subscribe.sh
  2. 10
      .config/sway/config

2
.bin/volume_subscribe.sh

@ -4,7 +4,7 @@ pactl subscribe | grep --line-buffered "sink" |
while read; do while read; do
VOL=$(amixer get Master | grep -Po "[0-9]+(?=%)" | tail -1) VOL=$(amixer get Master | grep -Po "[0-9]+(?=%)" | tail -1)
if [[ $VOL != $OLD_VOL ]]; then if [[ $VOL != $OLD_VOL ]]; then
tvolnoti-show $VOL swayosd-client --output-volume=+0
OLD_VOL=$VOL OLD_VOL=$VOL
fi fi
done done

10
.config/sway/config

@ -53,7 +53,7 @@ exec xrdb -load ~/.Xresources
exec mako exec mako
# Volume and Brightness notification # Volume and Brightness notification
exec tvolnoti -n -T dark exec swayosd-server
# Monitor volume changes # Monitor volume changes
exec ~/.bin/volume_subscribe.sh exec ~/.bin/volume_subscribe.sh
@ -75,7 +75,8 @@ exec card_eventmgr config_file=.config/pam_pkcs11/card_eventmgr.conf
exec swayidle \ exec swayidle \
timeout 300 '$lockcmd' \ timeout 300 '$lockcmd' \
timeout 600 'swaymsg "output * dpms off"' \ timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \ resume 'swaymsg "output * dpms on"' \
after-resume 'swaymsg "output * enable"' \
before-sleep '$lockcmd' \ before-sleep '$lockcmd' \
lock '$lockcmd' \ lock '$lockcmd' \
unlock 'pkill -9 swaylock' unlock 'pkill -9 swaylock'
@ -261,8 +262,8 @@ bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
#brightness control #brightness control
bindsym XF86MonBrightnessUp exec brightnessctl -m set +5% | cut -d',' -f4 | cut -d'%' -f1 | xargs -n1 tvolnoti-show -s ~/.config/tvolnoti/themes/dark/display_brightness.svg bindsym XF86MonBrightnessUp exec swayosd-client --brightness=+5
bindsym XF86MonBrightnessDown exec brightnessctl -m set 5%- | cut -d',' -f4 | cut -d'%' -f1 | xargs -n1 tvolnoti-show -s ~/.config/tvolnoti/themes/dark/display_brightness.svg bindsym XF86MonBrightnessDown exec swayosd-client --brightness=-5
# Authy 2FA window # Authy 2FA window
for_window [title="^Authy$"] floating enable for_window [title="^Authy$"] floating enable
@ -299,6 +300,7 @@ for_window [title="Microsoft Teams Notification"] move absolute position 0 px 0
for_window [title="Slack \| mini panel"] move scratchpad for_window [title="Slack \| mini panel"] move scratchpad
for_window [class="Simplicity Studio™" title="Find\/Replace "] floating enable for_window [class="Simplicity Studio™" title="Find\/Replace "] floating enable
for_window [app_id="gnome-calculator"] floating enable for_window [app_id="gnome-calculator"] floating enable
for_window [class="drata-agent"] move absolute position 2160 px 0 px
# screenshots # screenshots
bindsym Print exec ~/.bin/wscreenshot.py bindsym Print exec ~/.bin/wscreenshot.py

Loading…
Cancel
Save