thingmenu

A simple graphical menu launcher for X11.
git clone git://r-36.net/thingmenu
Log | Files | Refs | LICENSE

thingmenu-menu.sh (1308B)


      1 #!/bin/sh
      2 
      3 POSARGS="-ww 400 -wh 400"
      4 
      5 case "$1" in
      6 	"svkbd")
      7 		thingmenu $POSARGS -- \
      8 			"svkbd de" "svkbd-de -wy -16" \
      9 			"svkbd en" "svkbd-en -wy -16" \
     10 			"svkbd arrows" "svkbd-arrows -wy -16" \
     11 			"back" "thingmenu-menu.sh"
     12 		;;
     13 	"conn")
     14 		thingmenu $POSARGS -- \
     15 			"WWAN start" "sudo conn -s wwan" \
     16 			"WWAN stop" "sudo conn -k wwan" \
     17 			"WiFi start" "sudo conn -s wifi" \
     18 			"WiFi stop" "sudo conn -k wifi" \
     19 			"Ethernet start" "sudo conn -s eth" \
     20 			"Ethernet stop" "sudo conn -k eth" \
     21 			"back" "thingmenu-menu.sh"
     22 		;;
     23 	"fn")
     24 		thingmenu $POSARGS -- \
     25 			"backlight +10%" "xbacklight -inc 10%" \
     26 			"backlight -10%" "xbacklight -dec 10%" \
     27 			"battery" "sleep 1; xset dpms force off" \
     28 			"suspend" "pm-suspend" \
     29 			"hibernate" "pm-hibernate" \
     30 			"rotate" "thinkpad-rotate.sh" \
     31 			"monitor switch" "thinkpad-fn-f7.sh" \
     32 			"back" "thingmenu-menu.sh"
     33 		;;
     34 	"sound")
     35 		thingmenu $POSARGS -- \
     36 			"volume +10%" "amixer set Master 10%+" \
     37 			"volume -10%" "amixer set Master 10%-" \
     38 			"toggle mute" "amixer set Master toggle" \
     39 			"back" "thingmenu-menu.sh"
     40 		;;
     41 	*)
     42 		thingmenu $POSARGS -- \
     43 			"svkbd menu" "thingmenu-menu.sh svkbd" \
     44 			"conn menu" "thingmenu-menu.sh conn" \
     45 			"fn menu" "thingmenu-menu.sh fn" \
     46 			"sound menu" "thingmenu-menu.sh sound" \
     47 			"xkill" "xkill"
     48 		;;
     49 esac
     50