aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-10 04:53:57 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-10 04:53:57 +0200
commit5f97842b01d98c586d3b6bc0834ec6704a2b1d3a (patch)
tree3e08d8a58de90ca6f1879a1c08d631105e313171 /bin
parentc9a38b22e7b5ea507352a170fd4cf3ea73acc2cd (diff)
downloaddotfiles-5f97842b01d98c586d3b6bc0834ec6704a2b1d3a.tar.gz
dotfiles-5f97842b01d98c586d3b6bc0834ec6704a2b1d3a.tar.bz2
dotfiles-5f97842b01d98c586d3b6bc0834ec6704a2b1d3a.zip
Added notification on volume and backlight change
Diffstat (limited to 'bin')
-rwxr-xr-xbin/backlight-ctl11
-rwxr-xr-xbin/volume-ctl12
2 files changed, 23 insertions, 0 deletions
diff --git a/bin/backlight-ctl b/bin/backlight-ctl
new file mode 100755
index 0000000..7153276
--- /dev/null
+++ b/bin/backlight-ctl
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ "$#" -ne 1 ] && exit 1;
+
+case "$1" in
+ "up") xbacklight -inc 5 ;;
+ "down") xbacklight -dec 5 ;;
+ *) exit 1 ;;
+esac
+
+notify-send "backlight $(xbacklight | cut -d '.' -f 1)"
diff --git a/bin/volume-ctl b/bin/volume-ctl
new file mode 100755
index 0000000..7e3ec83
--- /dev/null
+++ b/bin/volume-ctl
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ "$#" -ne 1 ] && exit 1;
+
+case "$1" in
+ "up") pulseaudio-ctl up ;;
+ "down") pulseaudio-ctl down ;;
+ "mute") pulseaudio-ctl mute ;;
+ *) exit 1 ;;
+esac
+
+notify-send "volume $(pulseaudio-ctl full-status | cut -d ' ' -f 1)"