Last active
November 19, 2020 14:53
-
-
Save Zenithar/cca0afe907f27c4859e8823908b7d040 to your computer and use it in GitHub Desktop.
i3 fancy volume && brightness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LEVEL=$(xbacklight -get | xargs printf "%.f") | |
case "$1" in | |
"up") | |
[[ "$LEVEL" -eq 100 ]] | |
xbacklight -inc 5 | |
;; | |
"down") | |
xbacklight -dec 10 | |
;; | |
esac | |
LEVEL=$(xbacklight -get | xargs printf "%.f") | |
# notification | |
volnoti-show -s /usr/share/pixmaps/volnoti/display-brightness-symbolic.svg $LEVEL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaourt -S volnoti-hcchu-git pamixer | |
exec --no-startup-id volnoti & | |
# multimedia keys | |
bindsym XF86AudioRaiseVolume exec "~/.i3/bin/volume up" | |
bindsym XF86AudioLowerVolume exec "~/.i3/bin/volume down" | |
bindsym XF86AudioMute exec "~/.i3/bin/volume mute" | |
bindsym XF86MonBrightnessUp exec "~/.i3/bin/brightness up" | |
bindsym XF86MonBrightnessDown exec "~/.i3/bin/brightness down" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VOLUME=$(pamixer --get-volume) | |
VALUE=5 | |
case "$1" in | |
"up") | |
[[ "$VOLUME" -eq 100 ]] && VALUE=0 | |
pamixer --increase $VALUE | |
;; | |
"down") | |
pamixer --decrease $VALUE | |
;; | |
"mute") | |
pamixer --toggle-mute | |
;; | |
esac | |
# notification | |
VOLUME=$(pamixer --get-volume) | |
MUTE=$(pamixer --get-mute) | |
if [ "$MUTE" == "false" ]; then | |
volnoti-show $VOLUME | |
else | |
volnoti-show -m $VOLUME | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the package is
volnoti-brightness-git
now. thanks for a useful set of scripts :)