This repository has been archived on 2022-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
dot-files/.xinitrc

102 lines
2.5 KiB
Plaintext
Raw Normal View History

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
# GENERIC #
# Usage: .xinitrc [window-manager] [session-type]
# where: window-manager is one of '(xmonad openbox stumpwm awesome pekwm)
# session-type is either "" or "remote"
# Set the default curson used by all WM's
xsetroot -cursor_name left_ptr
Made several minor changes/tweaks as follows: .conkerorrc: * changed pdf application to zathura * added a bunch of webjumps (see source) * made duckduckgo default search engine .emacs: * switched to emacs24 from bzr * enabled flyspell-mode * depreciated emacs-color-theme (use built-in theming in emacs24) * added magit init code with the intent of playing with magit someday instead of using cl * setup auto-complete extension * added keybinding C-x 4 s which opens up a elisp scratch buffer * added keybinding C-x 4 e which opens up a eshell buffer * added a eshell clear function * added .conkerorrc, .xmobarrc, .screenrc, and .stumpwmrc to auto-mode-alist .xbindkeysrc: * modified all audio controls to utilize cmus-remote instead of mpc .xinitrc: * using nouveau instead of nvidia driver so naturually switched from twinview to xrandr * disabled pulseaudio from starting because it is automatically started by settings in /etc/pulse/client.conf * modified trayers parameters due to the new xrandr setup .xmobarrc: * added foreword comments * removed volume script from bar (only supported alsa) .xmonad/xmonad.hs: * added emacs scratchpad (keybinding Mod-Control-Escape) * added mc scratchpad (keybinding Mod-Control-3) * added transmission scratchpad (replacing deluge) with keybinding Mod-Control-4 * imported XMonad.Layout.ToggleLayouts in hopes to find a nice fullscreen solution; disabled (but not uncommented) keybinding Mod-Control-Space. *TODO* Signed-off-by: Collin Doering <rekahsoft@gmail.com>
2012-01-12 09:19:15 +00:00
# Initialize a local desktop session (run generic helper applications)
function init_local_session() {
# 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 *DISABLED* :: whats the point of a systray if no apps use it?
#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 wm to xmonad
DEFAULT_WM=xmonad
}
# Initialize a remote desktop session (run generic helper applications)
function init_remote_session() {
# Set desktop background
feh --bg-scale ~/.wallback/Cocaine_Wallpaper_II_by_mdornfeld.png &
# Set the default wm to xmonad
DEFAULT_WM=stumpwm
}
# Check the second cl parameter which denotes the session-type (E.g. remote, local)
case $2 in
# Remote session
remote)
init_remote_session
break
;;
# Local session or unspecified
*)
init_local_session
;;
esac
# Check the first cl parameter which denotes the window-manager to use
# Notice: in each case expression below "exec app" hands over execution to some app thus
# ceasing execution in this script so no "break" is required
case $1 in
xmonad)
exec xmonad
;;
openbox)
exec ck-launch-session openbox
;;
stumpwm)
exec stumpwm
;;
awesome)
exec awesome
;;
pekwm)
exec pekwm
;;
*)
exec $DEFAULT_WM
;;
esac