Added wob support for brightness & volume.
Project is early, but I'm hoping this will be a proper replacement for xob. https://github.com/francma/wob
This commit is contained in:
parent
ea49a908f7
commit
ae3dd9681e
10
sway/config
10
sway/config
|
@ -192,12 +192,12 @@ bindsym $mod+r mode "resize"
|
||||||
#
|
#
|
||||||
# Media Keys
|
# Media Keys
|
||||||
#
|
#
|
||||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pamixer --get-volume > /tmp/wobpipe
|
||||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && pamixer --get-volume > /tmp/wobpipe
|
||||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && ( `pamixer --get-mute` && echo 0 || pamixer --get-volume ) > /tmp/wobpipe
|
||||||
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||||
bindsym XF86MonBrightnessDown exec light -U 5
|
bindsym XF86MonBrightnessDown exec light -U 5 && light -G | cut -d'.' -f1 > /tmp/wobpipe
|
||||||
bindsym XF86MonBrightnessUp exec light -A 5
|
bindsym XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > /tmp/wobpipe
|
||||||
bindsym Pause exec playerctl play-pause
|
bindsym Pause exec playerctl play-pause
|
||||||
bindsym Shift+Pause exec bash ~/.config/rofi/scripts/media_controls
|
bindsym Shift+Pause exec bash ~/.config/rofi/scripts/media_controls
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,13 @@ exec mako
|
||||||
# https://github.com/nwg-piotr/autotiling
|
# https://github.com/nwg-piotr/autotiling
|
||||||
exec --no-startup-id autotiling
|
exec --no-startup-id autotiling
|
||||||
|
|
||||||
|
# wob configuration
|
||||||
|
exec_always {
|
||||||
|
killall -q wob || true
|
||||||
|
mkfifo /tmp/wobpipe
|
||||||
|
tail -f /tmp/wobpipe | ~/.config/sway/scripts/sanitize_wob | wob
|
||||||
|
}
|
||||||
|
|
||||||
### Clipboard manager
|
### Clipboard manager
|
||||||
# https://github.com/yory8/clipman
|
# https://github.com/yory8/clipman
|
||||||
#exec clipman -d
|
#exec clipman -d
|
||||||
|
|
8
sway/scripts/sanitize_wob
Executable file
8
sway/scripts/sanitize_wob
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
while read IN
|
||||||
|
do
|
||||||
|
[[ ! $IN =~ ^[+-]?[0-9]+$ ]] && IN=0
|
||||||
|
[[ $IN -gt 100 ]] && IN=100
|
||||||
|
[[ $IN -lt 0 ]] && IN=0
|
||||||
|
echo $IN
|
||||||
|
done < "${1:-/dev/stdin}"
|
Loading…
Reference in New Issue
Block a user