Many changes including introduction to menu system

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.
This commit is contained in:
Jonathan Hodgson 2021-04-04 16:04:22 +01:00
parent 72ecf44743
commit 43f0dd09bc
10 changed files with 206 additions and 2 deletions

27
bin/.bin/dmenu/spawn-phone-menu Executable file
View file

@ -0,0 +1,27 @@
#!/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"