This repository has been archived by the owner on Nov 22, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
xinitrc
86 lines (75 loc) · 2.07 KB
/
xinitrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
############################################################
# File: xinitrc Xorg init config file #
# URL: https://github.com/pschmitt/xinit#config #
# Version: 1.3 #
# Author: Philipp Schmitt <philipp@schmitt.co> #
############################################################
# _ _ _
# __ _(_)_ __ (_) |_ _ __ ___
# \ \/ / | '_ \| | __| '__/ __|
# > <| | | | | | |_| | | (__
# /_/\_\_|_| |_|_|\__|_| \___|
#
# From /etc/skel/.xinitrc
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# Start a D-Bus session
# source /etc/X11/xinit/xinitrc.d/30-dbus
# Start GNOME Keyring
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)
# You probably need to do this too:
export SSH_AUTH_SOCK
export GPG_AGENT_INFO
export GNOME_KEYRING_CONTROL
export GNOME_KEYRING_PID
# Variables
XLOGFILE=/var/log/xinitrc.log
############
# WM #
############
[[ $1 == "awesome" || $1 == "dwm" || $1 == "wmii" ]] && SESSION=$1 || SESSION="xmonad"
#$SESSION &> XLOGFILE & wmpid=$!
$SESSION & wmpid=$!
############
# SYSTEM #
############
stalonetray &
spacefm -d &
(
urxvtd -q -o -f
# TODO: Use a systemd service instead
xrdb -merge $HOME/.config/Xresources/Xresources
urxvtc -name "tmux" -e $SHELL -c "tmux -2u attach"
) &
nitrogen --restore &
############
# IO #
############
xmodmap $HOME/.config/xmodmap/xmodmaprc &
xsetroot -cursor_name left_ptr &
sxhkd &
unclutter &
# enable mouse keys
# alternative: /etc/X11/xorg.conf.d/20-enable-pointerkeys.conf
# setxkbmap -option keypad:pointerkeys &
############
# SOUND #
############
start-pulseaudio-x11 &
volnoti &
############
# NETWORK #
############
${BROWSER}-fullscreenhack || $BROWSER &
#################
# HOST SPECIFIC #
#################
MYXINITRC="$HOME/.config/xinit/xinitrc_$(hostname)"
[[ -r $MYXINITRC ]] && . $MYXINITRC &
# wait for wm
wait $wmpid
# vim:ft=sh ff=unix et ts=4