Dunst add volume and brightness notifications
parent
5dbc30f4d4
commit
71c9b5470b
@ -1,13 +1,10 @@
|
|||||||
Privacy Pass|ajhmfdgkijocedmfjonnpjfojldioehi
|
Privacy Pass|ajhmfdgkijocedmfjonnpjfojldioehi
|
||||||
DuckDuckGo Privacy Essentials|bkdgflcldnnnapblkhphbgpggdiikppg
|
|
||||||
Magister Auto-Login|cekhhgcjpkahghpgeafhmkkjhidodplk
|
Magister Auto-Login|cekhhgcjpkahghpgeafhmkkjhidodplk
|
||||||
uBlock Origin|cjpalhdlnbpafiamejdnhcphjbkeiagm
|
uBlock Origin|cjpalhdlnbpafiamejdnhcphjbkeiagm
|
||||||
Dark Reader|eimadpbcbfnmbkopoojfekhnkhdbieeh
|
Dark Reader|eimadpbcbfnmbkopoojfekhnkhdbieeh
|
||||||
I don't care about cookies|fihnjjcciajhdojfnbdddfaoknhalnja
|
React Developer Tools|fmkadmapgofadopljbjfkapdkoienihi
|
||||||
NordVPN — #1 VPN Chrome Extension: Get a VPN|fjoaledfpmneenckfbpdfhkmimnjocfa
|
|
||||||
JSON Viewer|gbmdgpbipfallnflgajpaliibnhdgobh
|
JSON Viewer|gbmdgpbipfallnflgajpaliibnhdgobh
|
||||||
Return YouTube Dislike|gebbhagfogifgggkldgodflihgfeippi
|
User JavaScript and CSS|nbhcbdghjpllgmfilhnhkllmkecfmpld
|
||||||
GNOME Shell integration|gphhapmejobijbbhgpjhcjognlahblep
|
|
||||||
SponsorBlock for YouTube - Skip Sponsorships|mnjggcdmjocbbbhaepdhchncahnbgone
|
|
||||||
Bitwarden - Free Password Manager|nngceckbapebfimnlniiiahkandclblb
|
Bitwarden - Free Password Manager|nngceckbapebfimnlniiiahkandclblb
|
||||||
Chromium Web Store|ocaahdebbfolfmndjeplogmgcagdmblk|https://raw.githubusercontent.com/NeverDecaf/chromium-web-store/master/updates.xml
|
Chromium Web Store|ocaahdebbfolfmndjeplogmgcagdmblk|https://raw.githubusercontent.com/NeverDecaf/chromium-web-store/master/updates.xml
|
||||||
|
PDF Viewer|oemmndcbldboiebfnladdacbdfmadadm
|
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# chlight
|
||||||
|
|
||||||
|
msgTag="brightness-updater"
|
||||||
|
|
||||||
|
light "$@"
|
||||||
|
|
||||||
|
brightness="$(light -G)"
|
||||||
|
|
||||||
|
dunstify -a "chlight" -u low -i display-brightness -h string:x-dunst-stack-tag:$msgTag \
|
||||||
|
-h int:value:"$brightness" "Brightness: ${brightness}%"
|
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# chvolume
|
||||||
|
|
||||||
|
# Arbitrary but unique message tag
|
||||||
|
msgTag="volume-updater"
|
||||||
|
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ "$1"
|
||||||
|
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ "$2"
|
||||||
|
|
||||||
|
volume="$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | sed 's/[^0-9]*//g')"
|
||||||
|
mute="$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')"
|
||||||
|
|
||||||
|
if [[ $volume == 0 || "$mute" == "yes" ]]; then
|
||||||
|
# Show the sound muted notification
|
||||||
|
dunstify -a "chvolume" -u low -i audio-volume-muted -h string:x-dunst-stack-tag:$msgTag "Volume muted"
|
||||||
|
else
|
||||||
|
# Show the volume notification
|
||||||
|
dunstify -a "chvolume" -u low -i audio-volume-high -h string:x-dunst-stack-tag:$msgTag \
|
||||||
|
-h int:value:"$volume" "Volume: ${volume}%"
|
||||||
|
fi
|
||||||
|
|
||||||
|
canberra-gtk-play -i audio-volume-change -d "chvolume"
|
Reference in new issue