From 1cdb11df02f15de29078b24d02362b9a835148db Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Wed, 20 Jan 2016 12:28:26 -0600 Subject: [PATCH] initial commit --- .xinitrc | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .xinitrc diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..a3bdf18 --- /dev/null +++ b/.xinitrc @@ -0,0 +1,95 @@ +#!/bin/sh + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + + + + + + + + xrdb -merge $sysresources + +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + + + + + + + + xrdb -merge "$userresources" + +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# start some nice programs + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + + +eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) +export SSH_AUTH_SOCK + +# Automatically lock after 30 minutes using slock +xautolock -time 30 -locker slock & + +if [[ "$HOSTNAME" == "dtarch" ]]; then + # Set VGA1 to be right of HDMI1 + xrandr --output VGA1 --auto --right-of HDMI1 + xrandr --output HDMI1 --primary + + # Set the bell to be different from Matt's + xset b 75 750 50 +fi +session=${1:-i3} + +case $session in + awesome ) exec awesome;; + bspwm ) exec bspwm;; + catwm ) exec catwm;; + cinnamon ) exec cinnamon-session;; + dwm ) exec dwm;; + enlightenment ) exec enlightenment_start;; + ede ) exec startede;; + fluxbox ) exec startfluxbox;; + gnome ) exec gnome-session;; + gnome-classic ) exec gnome-session --session=gnome-classic;; + i3|i3wm ) exec i3 -c ~/.config/i3/$HOSTNAME.config;; + icewm ) exec icewm-session;; + jwm ) exec jwm;; + kde ) exec startkde;; + mate ) exec mate-session;; + monster|monsterwm ) exec monsterwm;; + notion ) exec notion;; + openbox ) exec openbox-session;; + unity ) exec unity;; + xfce|xfce4 ) exec startxfce4;; + xmonad ) exec xmonad;; + # No known session, try to run it as command + *) exec $1;; +esac + + +