summaryrefslogtreecommitdiff
path: root/x/.xinitrc
diff options
context:
space:
mode:
Diffstat (limited to 'x/.xinitrc')
-rw-r--r--x/.xinitrc66
1 files changed, 66 insertions, 0 deletions
diff --git a/x/.xinitrc b/x/.xinitrc
new file mode 100644
index 0000000..93bb186
--- /dev/null
+++ b/x/.xinitrc
@@ -0,0 +1,66 @@
1#!/bin/sh
2
3userresources=$HOME/.Xresources
4usermodmap=$HOME/.Xmodmap
5sysresources=/etc/X11/xinit/.Xresources
6sysmodmap=/etc/X11/xinit/.Xmodmap
7
8# merge in defaults and keymaps
9
10if [ -f $sysresources ]; then
11
12 xrdb -merge $sysresources
13
14fi
15
16if [ -f $sysmodmap ]; then
17 xmodmap $sysmodmap
18fi
19
20if [ -f "$userresources" ]; then
21
22 xrdb -merge "$userresources"
23
24fi
25
26if [ -f "$usermodmap" ]; then
27 xmodmap "$usermodmap"
28fi
29
30# start some nice programs
31
32if [ -d /etc/X11/xinit/xinitrc.d ] ; then
33 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
34 [ -x "$f" ] && . "$f"
35 done
36 unset f
37fi
38
39if [ -n "$DISPLAY" ]; then
40 xset b off
41fi
42
43# load additional configs
44if [ "$2" = "nvidia" ]; then
45 XINIT_D="/etc/X11/nvidia/xinit/xinitrc.d"
46else
47 XINIT_D="/etc/X11/xinit/xinitrc.d"
48fi
49
50if [ -d "$XINIT_D" ]; then
51 for f in "$XINIT_D/?*.sh" ; do
52 [ -x "$f" ] && . "$f"
53 done
54 unset f
55fi
56unset XINIT_D
57
58# additional nvidia specific settings
59if [ "$2" = "nvidia" ]; then
60 xrandr --setprovideroutputsource modesetting NVIDIA-0
61 xrandr --auto
62fi
63
64
65xsetroot -cursor_name left_ptr &
66exec ck-launch-session dbus-launch --sh-syntax --exit-with-x11 bspwm