65 lines
1.3 KiB
Bash
65 lines
1.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# ~/.xinitrc
|
|
#
|
|
# Executed by startx (run your window manager from here)
|
|
|
|
# GENERIC #
|
|
|
|
# Set the default curson used by xmonad
|
|
xsetroot -cursor_name left_ptr
|
|
|
|
# Setup monitors
|
|
xrandr --output DVI-I-1 --auto --output DVI-I-2 --auto --left-of DVI-I-1
|
|
|
|
# Start xscreensaver
|
|
xscreensaver -no-splash &
|
|
|
|
# Set a desktop background
|
|
nitrogen --restore &
|
|
|
|
# Have mouse pointer hide after 5 seconds
|
|
unclutter &
|
|
|
|
# Setup system tray
|
|
trayer --monitor 1 --edge top --align right --expand true --width 4 --height 2 --transparent true --tint 0x000000 &
|
|
|
|
# Use xbindkeys to bind media keys etc..
|
|
xbindkeys &
|
|
|
|
# Start pulseaudio
|
|
#start-pulseaudio-x11 &
|
|
|
|
# Start-up applications
|
|
parcellite &
|
|
emacs --daemon &
|
|
urxvtd --quiet &
|
|
xcompmgr &
|
|
|
|
# Create variable GENERAL_SCREEN which is the pid of a screen called "general"
|
|
export GENERAL_SCREEN=`screen -ls | grep general | cut -f1 -d'.' | sed 's/\W//g'`
|
|
|
|
# Check to see if a general screen is already running
|
|
if [ "x$GENERAL_SCREEN" == "x" ]; then
|
|
screen -dmS general &
|
|
fi
|
|
|
|
# Set the default session to xmonad
|
|
DEFAULT_SESSION=xmonad
|
|
|
|
# Check the given parameter from slim to determine the session being requested by slim/the user
|
|
case $1 in
|
|
xmonad)
|
|
exec xmonad
|
|
;;
|
|
openbox)
|
|
exec ck-launch-session openbox
|
|
;;
|
|
stumpwm)
|
|
exec stumpwm
|
|
;;
|
|
*)
|
|
exec $DEFAULT_SESSION
|
|
;;
|
|
esac
|