#!/bin/csh
# file: initworkspaces = start my standard 12 desktops at login
# last: Apr 26 2014  Rob Rutten  Goettingen
# note: added to auto startup via starry icon in the Gnome panel 
#       the sleep values were set experimentally


# take both panels off the screen using autohide to make border room 
## Apr 26 2014 Goettingen: needed to add -0 for some reason
sleep 1
dconf write /org/gnome/gnome-panel/layout/toplevels/bottom-panel-0/auto-hide true
sleep 2
dconf write /org/gnome/gnome-panel/layout/toplevels/top-panel-0/auto-hide true
sleep 2

# permit slow Skype startup
sleep 5

# put two terminals on ach workspace
foreach iws (0 1 2 3 4 5 6 7 8 9 10 11 )
  xdotool set_desktop $iws
  gnome-terminal --geometry 80x24+0-0 --title terminal &
  sleep 1
  gnome-terminal --geometry 80x24+0+200 --title terminal &
  sleep 1
end

# 12th workspace: open browser
xdotool set_desktop 11
## firefox &
google-chrome &
sleep 2

# 1st workspace: 2 terminals + todo, journal, work notes emacs windows
xdotool set_desktop 0
scrrjr  ## alias that opens to-do, journal, work notes in colored terminals
sleep 1

# 11th workspace: add mail windows; stay there
xdotool set_desktop 10
scrmail   ## alias that opens two large blue mail windows for mutt

# undo panels autohide  ## I then hide each manually on the right
## Apr 26 2014: needed to add -0 for some reason
dconf write /org/gnome/gnome-panel/layout/toplevels/bottom-panel-0/auto-hide false
dconf write /org/gnome/gnome-panel/layout/toplevels/top-panel-0/auto-hide false
