THe main addition here is the menu system that is used to contoll the phone. THere are also some small helper scripts for calls etc.
27 lines
445 B
Bash
Executable file
27 lines
445 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# This script creates menus for applications running on my phone
|
|
|
|
error(){
|
|
echo "$@" > /dev/stderr
|
|
exit 1
|
|
}
|
|
|
|
windowFocus="$(xdotool getwindowfocus)"
|
|
if [ -n "$1" ]; then
|
|
menu="menu-$1"
|
|
else
|
|
class="$(xprop -id "$windowFocus" | grep "WM_CLASS" | cut -d '"' -f 2)"
|
|
case "$class" in
|
|
"xterm-256color") menu="menu-st" ;;
|
|
*) menu="menu-$class" ;;
|
|
esac
|
|
fi
|
|
|
|
|
|
type "$menu" > /dev/null 2>&1 || menu="menu-system"
|
|
|
|
"$menu"
|
|
|
|
|
|
|