wok annotate karmen/stuff/karmen-conf @ rev 16979
transmission: compile-schemas
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Wed Aug 06 15:43:24 2014 +0000 (2014-08-06) |
parents | 08943259e85e |
children |
rev | line source |
---|---|
pankso@2894 | 1 #!/bin/sh |
pankso@2894 | 2 # |
pankso@2894 | 3 # |
pankso@2894 | 4 : ${DIALOG=dialog} |
pankso@2894 | 5 |
pankso@2894 | 6 CONFIG_DIR="$HOME/.config/karmen" |
pankso@2894 | 7 |
pankso@2894 | 8 # Dialog menu. |
pankso@2894 | 9 exec 3>&1 |
pankso@2894 | 10 value=`$DIALOG --clear \ |
pankso@2894 | 11 --title " Karmen settings " \ |
pankso@2894 | 12 --menu "" 15 70 5 \ |
pankso@2894 | 13 "autostart" "Autostarted applications" \ |
pankso@12408 | 14 "exitwm" "Exit Karmen session" \ |
pankso@12408 | 15 "reboot" "Reboot system" \ |
pankso@12408 | 16 "quit" "Quit Karmen configuration" \ |
pankso@2894 | 17 2>&1 1>&3` |
pankso@2894 | 18 retval=$? |
pankso@2894 | 19 exec 3>&- |
pankso@12408 | 20 |
pankso@2894 | 21 case $retval in |
pankso@12408 | 22 0) continue ;; |
pankso@12408 | 23 1) echo "Cancel pressed." && exit 0 ;; |
pankso@2894 | 24 255) |
pankso@2894 | 25 if test -n "$value"; then |
pankso@2894 | 26 echo "$value" |
pankso@2894 | 27 else |
pankso@12408 | 28 echo "ESC pressed." && exit 0 |
pankso@2894 | 29 fi ;; |
pankso@2894 | 30 esac |
pankso@2894 | 31 |
pankso@2894 | 32 case $value in |
pankso@2894 | 33 autostart) |
pankso@2894 | 34 nano $CONFIG_DIR/autostart.sh |
pankso@12408 | 35 exec $(basename $0) ;; |
pankso@12408 | 36 exitwm) killall karmen ;; |
pankso@12408 | 37 reboot) reboot || reboot -f ;; |
pankso@12408 | 38 quit) continue ;; |
pankso@2894 | 39 esac |
pankso@2894 | 40 |
pankso@2894 | 41 exit 0 |
pankso@2894 | 42 |