source: trunk/debathena/debathena/dotfiles/revert-to-sawfish.sh @ 22258

Revision 22258, 1.1 KB checked in by ghudson, 19 years ago (diff)
Fix bash-isms.
Line 
1#!/bin/sh
2
3if [ "${ATHENA_ENVIRONMENT_WINDOW_MANAGER+set}" = set ]; then
4  zenity --error --text="This tool cannot be used if you set the WINDOW_MANAGER environment variable in your ~/.environment file.  Change your window manager by editing your ~/.environment file."
5  exit
6fi
7
8if [ -r $HOME/.athena-sawfish ]; then
9
10  # User already has Sawfish preference; ask about reverting it.
11  if zenity --question --text="Your account is currently configured to use the Sawfish window manager.  Do you wish to revert this preference and use the default window manager (Metacity) for future logins?"; then
12    rm -f $HOME/.athena-sawfish
13    zenity --info --text="Your account is now configured to use the default windowmanager (Metacity).  This change will take effect at your next login session."
14  fi
15
16else
17
18  # Ask about installing Sawfish preference.
19  if zenity --question --text="Would you like to configure your account to use the Sawfish window manager for future logins?"; then
20    touch $HOME/.athena-sawfish
21    zenity --info --text="Your account is now configured to use the Sawfish windowmanager.  This change will take effect at your next login session."
22  fi
23
24fi
Note: See TracBrowser for help on using the repository browser.