Enable synclient/keynav; fix kb w/ dmenu script; make bat/volume control device independent

master
Miles Alan 5 years ago
parent f47feb559b
commit b96789df69
  1. 4
      scripts/core/sxmo_dmenu_with_kb.sh
  2. 8
      scripts/core/sxmo_statusbar.sh
  3. 10
      scripts/core/sxmo_vol.sh
  4. 4
      scripts/core/sxmo_xinit.sh

@ -1,6 +1,6 @@
#!/usr/bin/env sh #!/usr/bin/env sh
pidof svkbd-sxmo || svkbd-sxmo & pidof svkbd-sxmo >&2 || svkbd-sxmo &
OUTPUT="$(cat | dmenu -t $@)" OUTPUT="$(cat | dmenu -t $@)"
pkill svkbd-sxmo pkill svkbd-sxmo >&2
echo "$OUTPUT" echo "$OUTPUT"

@ -4,14 +4,14 @@ touch $UPDATEFILE
while : while :
do do
PCT=$(cat /sys/class/power_supply/axp20x-battery/capacity) PCT=$(cat /sys/class/power_supply/*-battery/capacity)
BATSTATUS=$( BATSTATUS=$(
cat /sys/class/power_supply/axp20x-battery/status | cat /sys/class/power_supply/*-battery/status |
cut -b0 cut -c1
) )
VOL=$( VOL=$(
amixer sget Headphone | echo "$(amixer sget Headphone || amixer sget Speaker)" |
grep -oE '([0-9]+)%' | grep -oE '([0-9]+)%' |
tr -d ' %' | tr -d ' %' |
awk '{ s += $1; c++ } END { print s/c }' | awk '{ s += $1; c++ } END { print s/c }' |

@ -1,17 +1,21 @@
#!/usr/bin/env sh #!/usr/bin/env sh
device() {
amixer sget Headphone && echo Headphone || echo Speaker
}
incvol() { incvol() {
amixer set Headphone 1+ amixer set $(device) 1+
echo 1 > /tmp/sxmo_bar echo 1 > /tmp/sxmo_bar
} }
decvol() { decvol() {
amixer set Headphone 1- amixer set $(device) 1-
echo 1 > /tmp/sxmo_bar echo 1 > /tmp/sxmo_bar
} }
echo $1 | grep up && echo 1 > /tmp/sxmo_bar && incvol echo $1 | grep up && echo 1 > /tmp/sxmo_bar && incvol
echo $1 | grep down && echo 1 > /tmp/sxmo_bar && decvol echo $1 | grep down && echo 1 > /tmp/sxmo_bar && decvol
sxmo_notify.sh 200 "Volume $( sxmo_notify.sh 200 "Volume $(
amixer sget Headphone | echo "$(amixer sget Headphone || amixer sget Speaker)" |
grep -oE '([0-9]+)%' | grep -oE '([0-9]+)%' |
tr -d ' %' | tr -d ' %' |
awk '{ s += $1; c++ } END { print s/c }' | awk '{ s += $1; c++ } END { print s/c }' |

@ -7,6 +7,10 @@ xmodmap /usr/share/sxmo/xmodmap_caps_esc
xsetroot -mod 3 2 -fg '#000000' -bg '#888888' xsetroot -mod 3 2 -fg '#000000' -bg '#888888'
conky -c /usr/share/sxmo/conky.conf -d conky -c /usr/share/sxmo/conky.conf -d
# E.g. for PBP
synclient TapButton1=1 TapButton2=3 TapButton3=2
keynav &
lisgd & lisgd &
sxmo_statusbar.sh & sxmo_statusbar.sh &
xset s off -dpms xset s off -dpms

Loading…
Cancel
Save