Cuts everything after the comma and returns an integer
This commit is contained in:
parent
56c51002e3
commit
2e77c22644
@ -5,7 +5,7 @@
|
|||||||
# $./dunst-backlight.sh down
|
# $./dunst-backlight.sh down
|
||||||
|
|
||||||
get_light() {
|
get_light() {
|
||||||
xbacklight -get
|
xbacklight -get | cut -f1 -d"."
|
||||||
}
|
}
|
||||||
|
|
||||||
send_notification() {
|
send_notification() {
|
||||||
@ -20,12 +20,12 @@ send_notification() {
|
|||||||
case $1 in
|
case $1 in
|
||||||
up)
|
up)
|
||||||
# Increase backlight
|
# Increase backlight
|
||||||
xbacklight -inc 10
|
xbacklight -inc 10.000000
|
||||||
send_notification
|
send_notification
|
||||||
;;
|
;;
|
||||||
down)
|
down)
|
||||||
# Decrease backlight
|
# Decrease backlight
|
||||||
xbacklight -dec 10
|
xbacklight -dec 10.000000
|
||||||
send_notification
|
send_notification
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user