Update sound and brightness scripts
This commit is contained in:
parent
c331844f0d
commit
7b473511a1
@ -2,7 +2,10 @@
|
||||
|
||||
SAVE_FILE="${HOME}/.cache/brightness-control-cache"
|
||||
|
||||
let really_notify=1
|
||||
|
||||
notify-brightness() {
|
||||
((${really_notify})) || return
|
||||
brightness="$(brightnessctl -m | sed 's/,/ /g' | awk '{print $4}' | tr -d '\n' | tr -d '%')"
|
||||
notify-send -h string:x-canonical-private-synchronous:brightness-control-sh -t 4000 -u normal -a "Brightness" -h int:value:"$brightness" "$brightness%"
|
||||
}
|
||||
@ -30,6 +33,11 @@ if [ "$#" -lt 1 ]; then
|
||||
print-usage
|
||||
fi
|
||||
|
||||
if [[ "${1}" == -n ]]; then
|
||||
really_notify=0
|
||||
shift 1
|
||||
fi
|
||||
|
||||
ammount='5%'
|
||||
value='50%'
|
||||
if [ "${#}" -gt 1 ]; then
|
||||
|
@ -19,9 +19,7 @@ function print_help {
|
||||
let notify=1
|
||||
|
||||
function notify_vol {
|
||||
if ! ((${notify})); then
|
||||
return
|
||||
fi
|
||||
((${notify})) || return
|
||||
let vol="$(pamixer --get-volume)"
|
||||
local icon
|
||||
if [[ "$(pamixer --get-mute)" == 'true' ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user