summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <amin@aminb.org>2018-07-24 17:13:58 -0400
committerAmin Bandali <amin@aminb.org>2018-07-24 17:13:58 -0400
commit4fc8d5d2da39a88c8ccf84cc80b506f37a890e1b (patch)
treede13e2e39e4e31c48227be3a94a4f1da848dd034
parent7564bd4dd624d1504dcf819dd1fb20ff16dbdd9d (diff)
downloadconfigs-4fc8d5d2da39a88c8ccf84cc80b506f37a890e1b.tar.gz
configs-4fc8d5d2da39a88c8ccf84cc80b506f37a890e1b.tar.xz
configs-4fc8d5d2da39a88c8ccf84cc80b506f37a890e1b.zip
[rc] add volume-info script for displaying volume in bar
Diffstat (limited to '')
-rw-r--r--rc.org20
1 files changed, 20 insertions, 0 deletions
diff --git a/rc.org b/rc.org
index de4435a..e787d8b 100644
--- a/rc.org
+++ b/rc.org
@@ -772,6 +772,11 @@ borders_color=#3D9970
#title=<span weight='heavy' fgcolor='#01FF70'> </span>
#borders_color=#01FF70
+[volume]
+command=volume-info
+title=<span weight='heavy' fgcolor='#7FDBFF'></span>
+borders_color=#7FDBFF
+
[battery]
preset=BAT
command=battery-percentage-time
@@ -5039,6 +5044,21 @@ import gnomekeyring as gk
gk.unlock_sync('Default_keyring',gk.item_get_info_sync('login',1L).get_secret())
#+end_src
+** volume-info
+:PROPERTIES:
+:header-args+: :tangle ~/.local/bin/volume-info :shebang "#!/bin/sh"
+:END:
+
+#+begin_src sh
+cur_vol=$(pamixer --get-volume)
+
+if [ $(pamixer --get-mute) = true ]; then
+ printf 'mt \n' "$cur_vol"
+else
+ printf '%02d \n' "$cur_vol"
+fi
+#+end_src
+
** wp
My little wallpaper changer script.