summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTslil Clingman <tslil.clingman@gmail.com>2015-06-13 23:16:14 +0200
committerTslil Clingman <tslil.clingman@gmail.com>2015-06-13 23:16:14 +0200
commit93d5703b12e8c5ca2043f871c60fea6b8d0ca69a (patch)
treea1625e712f0ab06c19bc1546ab74d591cefbc105
parent7f55198d9c0a2f8b6a61d8c596c89e502f491fe1 (diff)
Volume script and colour scheme
-rwxr-xr-xbat2
-rwxr-xr-xratdm2
-rwxr-xr-xratws4
-rwxr-xr-xvol13
4 files changed, 17 insertions, 4 deletions
diff --git a/bat b/bat
index 7b0e3b3..d98974c 100755
--- a/bat
+++ b/bat
@@ -3,4 +3,4 @@
# Quick hack to display battery levels for the laptop
str="s/ Charging, /C/;s/ Discharging, /D/;s/ Unknown,/U/"
-acpi | cut -d: -f 2- | sed "$str" | cut -d\ -f 1-2;
+acpi | cut -d: -f 2- | sed "$str" | cut -d\ -f 1-2 | cut -d: -f 1-2;
diff --git a/ratdm b/ratdm
index 916386d..a318355 100755
--- a/ratdm
+++ b/ratdm
@@ -10,4 +10,4 @@ w=$width #$(($width/2))
x=0 #$(($width/4))
y=$(($height/3))
-dmenu -p "Select >" -l 16 -s $s -x $x -y $y -w $w -sb '#0B0' -sf black -nb '#000' -fn "$font" -i -p foo "$@"
+dmenu -p "Select >" -l 16 -s $s -x $x -y $y -w $w -sb '#AAA' -sf black -nb '#000' -fn "$font" -i -p foo "$@"
diff --git a/ratws b/ratws
index 2e43904..af49cd3 100755
--- a/ratws
+++ b/ratws
@@ -1,8 +1,8 @@
#!/usr/bin/env sh
w=$(ratpoison -c windows)
-[ "$1" == "-s" ] && p="Tab" && w=$(echo "$w" | grep '(surf)')
-[ "$1" == "-w" ] && p="Windows" && w=$(echo "$w" | grep -v '(surf)')
+#[ "$1" == "-s" ] && p="Tab" && w=$(echo "$w" | grep '(surf)')
+#[ "$1" == "-w" ] && p="Windows" && w=$(echo "$w" | grep -v '(surf)')
[ -z $w ] && exit
sel=$(echo "$w" | ratdm -p ${p:-All}' >' | cut -d ' ' -f 1)
[ -n $sel ] && ratpoison -c "select $sel" || true
diff --git a/vol b/vol
new file mode 100755
index 0000000..5ff7b12
--- /dev/null
+++ b/vol
@@ -0,0 +1,13 @@
+#!/usr/bin/env sh
+
+# A small volume control script for the laptop
+
+cmd="amixer set Master"
+fle=$HOME/.vol
+case "$1" in
+ "up") $cmd 2%+;;
+ "down") $cmd 2%-;;
+ *) $cmd toggle;;
+esac | grep \% | cut -d\ -f 6,8 | tr -d '[]' > $fle
+
+ratpoison -c "echo Volume: `cat $fle`"