slate (1233B)
1 #!/bin/sh 2 # slate: Window Maker with the dock apps and the NeXT look. startx slate, or pick it in a display manager. 3 # the first time, and when slate brings a new dock or menu, it puts its look, dock and menu in ~/GNUstep (what was 4 # there first goes to *.before); in between they are yours to change in WPrefs. SLATE_RESET=1 puts them back. 5 # ~/GNUstep names no path, so one home runs it from /usr and from /usr/local: "slate autostart", "web" and "exit" 6 s=${SLATE_SHARE:-$(dirname "$(dirname "$(readlink -f "$0")")")/share/slate} 7 v=4 8 case $1 in autostart|web|exit) f=$s/$1; shift; exec "$f" "$@";; esac 9 g=$HOME/GNUstep 10 export XDG_CURRENT_DESKTOP=WindowMaker XDG_SESSION_DESKTOP=WindowMaker 11 if [ "$(cat "$g/.slate" 2>/dev/null)" != $v ] || [ -n "$SLATE_RESET" ]; then 12 mkdir -p "$g/Defaults" "$g/Library/WindowMaker" 13 for f in WindowMaker WMState WMRootMenu WMWindowAttributes; do 14 [ -e "$g/Defaults/$f" ] && [ ! -e "$g/Defaults/$f.before" ] && mv "$g/Defaults/$f" "$g/Defaults/$f.before" 15 cp "$s/$f" "$g/Defaults/$f" 16 done 17 a=$g/Library/WindowMaker/autostart 18 [ -e "$a" ] && [ ! -e "$a.before" ] && mv "$a" "$a.before" 19 printf '#!/bin/sh\nexec slate autostart\n' > "$a" 20 chmod 755 "$a" 21 echo $v > "$g/.slate" 22 fi 23 exec wmaker "$@"