December 11, 2011

dot xsession for laptop with two external monitors

Hi,

Docked laptop configuration with two headed card need to:
- rearrange outputs using xrandr
- start power manager and screensaver
- set secondary kayboard and modify kaymap
- start windows manager

All this can be done from xsession configuration only iff `gdm3' deactivated on startup.



$ cat .xsession

xrandr --output LVDS1 --off
xrandr --output DVI1 --auto --rotate normal --pos 0x0 --output VGA1 --auto --rotate normal --left-of DVI1

#if [ -x /usr/bin/nm-applet ] ; then
#   nm-applet --sm-disable &
#fi

gnome-power-manager > /dev/null &

xrdb $HOME/.Xdefaults
xset -b
xhost +
xset r 130
xset r 103


xsetroot -solid midnightblue
xsetroot -cursor_name left_ptr

xscreensaver -no-splash &

setxkbmap -layout us,ru\(phonetic\) -option "grp:alt_shift_toggle,grp_led:scroll"

xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "keysym Caps_Lock = Control_L"
xmodmap -e "add Control = Control_L"


gnome-terminal &
#gnome-session
exec xmonad