#!/bin/bash . ~/.shenv . ~/.shrc export FIREFOX_PROFILE="amcnabb" cd if hostname |grep -q prodigy then if xrandr |grep -q DVI2 then xrandr --output DVI2 --right-of DVI1 else xrandr --output HDMI-2 --right-of HDMI-1 fi fi #urxvtd & # XTERMSHELL will be used by xbindkeys when it starts a terminal if [[ -x /bin/zsh ]] then # use zsh even if it's not our configured shell XTERMSHELL="/bin/zsh -l" else XTERMSHELL="$SHELL -l" fi export XTERMSHELL #if [[ `hostname -s` == maggie ]] #then # (sleep 10; xmodmap -e 'keycode 37 = Pointer_Button2') & # xmodmap -e 'remove control = Pointer_Button2' # # make the menu key be an actual right mouse button: # xmodmap -e 'keycode 135 = Pointer_Button3' #fi xbindkeys killall -9 scenery.py $HOME/bin/scenery.py -r 600 & ############################################################################## # Firefox # Note: we need to find a better way to change firefox settings. #profiles=$(ls -d $HOME/.mozilla/firefox/*.$FIREFOX_PROFILE 2>/dev/null) #if [[ ! $profiles ]] #then # firefox -no-remote -CreateProfile "$FIREFOX_PROFILE" # profiles=$(ls -d $HOME/.mozilla/firefox/*.$FIREFOX_PROFILE 2>/dev/null) #fi #for profile in ${profiles[@]} #do # prefs="$profile/prefs.js" # sed -i ' # /^user_pref("browser\.fixup\.alternate\.enabled",/d # /^user_pref("general\.smoothScroll",/d # /^user_pref("general\.smoothScroll",/d # /^user_pref("network\.http\.pipelining",/d # /^user_pref("network\.http\.pipelining\.maxrequests",/d # /^user_pref("network\.http\.max-connections",/d # ' "$prefs" # echo 'user_pref("browser.fixup.alternate.enabled", false);' >>"$prefs" # echo 'user_pref("general.smoothScroll", false);' >>"$prefs" # echo 'user_pref("network.http.pipelining", true);' >>"$prefs" # echo 'user_pref("network.http.pipelining.maxrequests", 4);' >>"$prefs" # echo 'user_pref("network.http.max-connections", 16);' >>"$prefs" #done ############################################################################## # Start Session if [[ -x /usr/bin/startxfce4 ]]; then # XFCE4 $HOME/.xsession-xfconf # Set keyboard layout asdf /usr/bin/startxfce4 else # GNOME # Load gconf settings ($HOME/.xsession-gconf) & disable_autostart() { SYSDIR="/etc/xdg/autostart" LOCALDIR="$HOME/.config/autostart" mkdir -p "$LOCALDIR" cp "$SYSDIR/$1.desktop" "$LOCALDIR" echo "X-GNOME-Autostart-enabled=false" >>"$LOCALDIR/$1.desktop" } # By the way, there's no need to disable services if the desktop file has an # AutostartCondition line. # Bluetooth (re-enable if and when I ever need it): disable_autostart bluetooth-applet # Silly backup tool: disable_autostart deja-dup-monitor # GNOME personal file sharing: disable_autostart gnome-user-share # PackageKit Applet: disable_autostart gpk-update-icon # SELinux restorecond: disable_autostart restorecond # SELinux troubleshooter: disable_autostart sealertauto # Silly home directory mangler: disable_autostart user-dirs-update-gtk # XScreenSaver (I use GNOME ScreenSaver): disable_autostart xscreensaver-autostart ########################################################################## # Window/Session Manager # which window manager (metacity or compiz) gconftool-2 --type string --set /apps/gnome-session/rh/window_manager metacity gnome-session fi # Get rid of any straggler children kill %1 %2 %3 %4 %5 %6 %7 %8