diff --git a/scripts/core/sxmo_dmenu_with_kb.sh b/scripts/core/sxmo_dmenu_with_kb.sh index 937f773..9661293 100755 --- a/scripts/core/sxmo_dmenu_with_kb.sh +++ b/scripts/core/sxmo_dmenu_with_kb.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -pidof svkbd-sxmo || svkbd-sxmo & +pidof svkbd-sxmo >&2 || svkbd-sxmo & OUTPUT="$(cat | dmenu -t $@)" -pkill svkbd-sxmo +pkill svkbd-sxmo >&2 echo "$OUTPUT" diff --git a/scripts/core/sxmo_statusbar.sh b/scripts/core/sxmo_statusbar.sh index 4272913..ca08745 100755 --- a/scripts/core/sxmo_statusbar.sh +++ b/scripts/core/sxmo_statusbar.sh @@ -4,14 +4,14 @@ touch $UPDATEFILE while : do - PCT=$(cat /sys/class/power_supply/axp20x-battery/capacity) + PCT=$(cat /sys/class/power_supply/*-battery/capacity) BATSTATUS=$( - cat /sys/class/power_supply/axp20x-battery/status | - cut -b0 + cat /sys/class/power_supply/*-battery/status | + cut -c1 ) VOL=$( - amixer sget Headphone | + echo "$(amixer sget Headphone || amixer sget Speaker)" | grep -oE '([0-9]+)%' | tr -d ' %' | awk '{ s += $1; c++ } END { print s/c }' | diff --git a/scripts/core/sxmo_vol.sh b/scripts/core/sxmo_vol.sh index 8706069..72979b5 100755 --- a/scripts/core/sxmo_vol.sh +++ b/scripts/core/sxmo_vol.sh @@ -1,17 +1,21 @@ #!/usr/bin/env sh +device() { + amixer sget Headphone && echo Headphone || echo Speaker +} + incvol() { - amixer set Headphone 1+ + amixer set $(device) 1+ echo 1 > /tmp/sxmo_bar } decvol() { - amixer set Headphone 1- + amixer set $(device) 1- echo 1 > /tmp/sxmo_bar } echo $1 | grep up && echo 1 > /tmp/sxmo_bar && incvol echo $1 | grep down && echo 1 > /tmp/sxmo_bar && decvol sxmo_notify.sh 200 "Volume $( - amixer sget Headphone | + echo "$(amixer sget Headphone || amixer sget Speaker)" | grep -oE '([0-9]+)%' | tr -d ' %' | awk '{ s += $1; c++ } END { print s/c }' | diff --git a/scripts/core/sxmo_xinit.sh b/scripts/core/sxmo_xinit.sh index 3b5bf80..72e6283 100755 --- a/scripts/core/sxmo_xinit.sh +++ b/scripts/core/sxmo_xinit.sh @@ -7,6 +7,10 @@ xmodmap /usr/share/sxmo/xmodmap_caps_esc xsetroot -mod 3 2 -fg '#000000' -bg '#888888' conky -c /usr/share/sxmo/conky.conf -d +# E.g. for PBP +synclient TapButton1=1 TapButton2=3 TapButton3=2 +keynav & + lisgd & sxmo_statusbar.sh & xset s off -dpms