# HG changeset patch # User Christophe Lincoln # Date 1210548231 -7200 # Node ID dbf2e0b2feb767e6c589d7815c1db079ac4416f7 # Parent b3e9410f28ca5c84fe0283f46a8c4fa5bea23861 deskopbox: add logout command and dialog box diff -r b3e9410f28ca -r dbf2e0b2feb7 tinyutils/desktopbox --- a/tinyutils/desktopbox Sun May 11 15:02:54 2008 +0000 +++ b/tinyutils/desktopbox Mon May 12 01:23:51 2008 +0200 @@ -5,7 +5,7 @@ # # (C) GNU gpl v3 - SliTaz GNU/Linux 2008. # -VERSION=20080509 +VERSION=20080512 # Standards directories. mkdir -p $HOME/Desktop $HOME/.local/share/applications @@ -18,21 +18,24 @@ FOLDER_ENTRY_MSG="dirname" NEW_FILE_LABEL="Creat a new file on the desktop:" FILE_ENTRY_MSG="filename" - ADD_ICON_LABEL="Add some desktop icons" ;; + ADD_ICON_LABEL="Add some desktop icons" + DESKTOP_DIALOG_LABEL="Session logout, system shutdown or reboot" ;; fr*) lang="fr" NEW_FOLDER_LABEL="Créer un nouveau dossier sur le bureau:" FOLDER_ENTRY_MSG="dossier" NEW_FILE_LABEL="Créer un nouveau fichier sur le bureau:" FILE_ENTRY_MSG="fichier" - ADD_ICON_LABEL="Ajouter des icons de bureau" ;; + ADD_ICON_LABEL="Ajouter des icons de bureau" + DESKTOP_DIALOG_LABEL="Déconnexion, arrêt ou redémarrage du système" ;; *) lang="" NEW_FOLDER_LABEL="Creat a new folder on the desktop:" FOLDER_ENTRY_MSG="dirname" NEW_FILE_LABEL="Creat a new file on the desktop:" FILE_ENTRY_MSG="filename" - ADD_ICON_LABEL="Add some desktop icons" ;; + ADD_ICON_LABEL="Add some desktop icons" + DESKTOP_DIALOG_LABEL="Session logout, system shutdown or reboot" ;; esac # Command line usage. @@ -43,7 +46,8 @@ \033[1mCommands: \033[0m\n new-folder Creat a new folder on the desktop with mkdir. new-file Creat a new empty file or SHell script on the desktop. - add-icons Add a system icon on the desktop.\n" + add-icons Add a system icon on the desktop. + logout Prompt for X session exit or system halt/reboot.\n" } # Box commands. @@ -169,9 +173,54 @@ - -' - export DESKTOP_DIALOG="${DESKTOP_DIALOG}${ACTIONS}" ;; +' + export DESKTOP_DIALOG=${DESKTOP_DIALOG}${ACTIONS} ;; + logout) + # X session/system logout. + # + DESKTOP_DIALOG=" + + + + /usr/share/icons/Tango/32x32/places/user-desktop.png + + + + + + " + # Logout for Openbox or JWM and system shutdown or reboot. + ACTIONS=' + + + + + + + + +' + export DESKTOP_DIALOG=${DESKTOP_DIALOG}${ACTIONS} ;; *) # Usage if executet from cmdline. #