#!/bin/sh # # ~/.xinitrc # # Executed by startx (run your window manager from here) # # Start window manager/desktop environment #WINMGR="twm" WINMGR="wmaker" WINMGR="startkde" WINMGR="icewm" WINMGR="blackbox" WINMGR="pekwm" WINMGR="openbox" WINMGR="fluxbox" WINMGR="aterm --title \"___FLUXBOX__DEVELOPMENT___\"" BERYL=0 # If running Beryl, don't change my "special" keys if [ "$BERYL" -eq 0 ]; then if [ -f ~/.Xmodmap ]; then xmodmap ~/.Xmodmap elif [ -f ~/.xmodmaprc ]; then xmodmap ~/.xmodmaprc fi fi # If we have a .Xdefaults file, merge it into our resources if [ -f ~/.Xdefaults ]; then xrdb -merge ~/.Xdefaults fi # If we have a .Xresources file, merge it into our resources # (isn't this done by default anyway - not sure) if [ -f ~/.Xresources ]; then xrdb -merge ~/.Xresources fi # USED FOR LAPTOP # # Remap mouse buttons for USB mouse # MOUSEDEV="`xinput list|grep XExtension|grep -i mouse|grep usb|cut -f 1`" # MOUSEDEV="`echo ${MOUSEDEV} | cut -d'"' -f 2`" # BUTTONMAP="1 2 3 4 5 9 8 6 7" # if [ -n "${MOUSEDEV}" ]; then # # Found mouse device # xinput set-button-map ${MOUSEDEV} ${BUTTONMAP} # fi # Generate flux background menu #mmaker -c -i -t Aterm FluxBox >~/.fluxbox/menu.generated flux-bgmenu-gen >~/.fluxbox/menu.backgrounds # Start window manager, setting wmpid to it's PID so that # we can wait for it to finish at the end of this file. ${WINMGR} & wmpid=$! # If running Beryl, don't impliment extra keyboard mappings # because Beryl, unlike fluxbox has a reasonable alt+tab etc if [ "$BERYL" -eq 0 ]; then # Start additional/alternate keyboard mappings bbkeys & fi # Start xautolock so that my display will lock after # 10 minutes. Additionally, if the mouse is placed in # the top left corner activate immediately, or if it's # in the bottom left corner NEVER activate it xautolock -corners +0-0 -locker "xlock -mode blank" & # Set DISPLAY to :0.1 which is our right-hand monitor # so that our dockapps start on that monitor instead export DISPLAY=:0.1 # If running Beryl, don't run our dockapps. Should find # "beryl" equivilents for these. if [ "$BERYL" -eq 0 ]; then # Start dockapps if [ -f ~/.dockapps_start ]; then ~/.dockapps_start fi fi # Set DISPLAY back to :0.0 which is our main monitor eexport DISPLAY=:0.0 # Start the composite manager for some wicked transparency # and shadows #xcompmgr -c -F & # Wait for window manager. Once it's finished, we should # finish up too. wait ${wmpid}