From 93d5703b12e8c5ca2043f871c60fea6b8d0ca69a Mon Sep 17 00:00:00 2001 From: Tslil Clingman Date: Sat, 13 Jun 2015 23:16:14 +0200 Subject: Volume script and colour scheme --- bat | 2 +- ratdm | 2 +- ratws | 4 ++-- vol | 13 +++++++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100755 vol 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`" -- cgit v1.2.3