SXHKD: better volume
This commit is contained in:
parent
fe488faef3
commit
a36b43bf4e
1 changed files with 9 additions and 2 deletions
|
|
@ -34,8 +34,15 @@
|
||||||
comm -23 <(bspc query -N | sort) <(bspc query -m primary -N | sort) | while read n; do bspc node $n -m primary; done
|
comm -23 <(bspc query -N | sort) <(bspc query -m primary -N | sort) | while read n; do bspc node $n -m primary; done
|
||||||
'';
|
'';
|
||||||
notifyVolume = pkgs.writeShellScript "notifyVolume" ''
|
notifyVolume = pkgs.writeShellScript "notifyVolume" ''
|
||||||
volume=`${pamixer} --get-volume`
|
PATH=$PATH:"${lib.makeBinPath [ pkgs.coreutils pkgs.pamixer ]}"
|
||||||
${notify} -r 1 -h "int:value:$volume" "Volume $volume%"
|
sink=`pamixer --get-default-sink | tail -n 1| sed -E 's/.+"(.+)"$/\1/'`
|
||||||
|
muted=`pamixer --get-mute`
|
||||||
|
volume=`pamixer --get-volume`
|
||||||
|
if [[ $muted == "true" ]]; then
|
||||||
|
${notify} -r 1 -h "int:value:0" "Muted" "$sink"
|
||||||
|
else
|
||||||
|
${notify} -r 1 -h "int:value:$volume" "Volume $volume%" "$sink"
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
notifyBrightness = pkgs.writeShellScript "notifyBrightness" ''
|
notifyBrightness = pkgs.writeShellScript "notifyBrightness" ''
|
||||||
level=`printf "%.0f" $(${xbacklight} -get)`
|
level=`printf "%.0f" $(${xbacklight} -get)`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue