diff options
author | Shubham Saini <shubham6405@gmail.com> | 2019-12-02 12:21:04 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@gmail.com> | 2019-12-02 12:21:04 +0000 |
commit | a42df546ce34429759a20bc2c4c240de045dbd0a (patch) | |
tree | 4e7153d41d6a1b710f8002f2eb7b64231889b6cf /x/.xinitrc |
using stow
Diffstat (limited to 'x/.xinitrc')
-rw-r--r-- | x/.xinitrc | 66 |
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 | |||
3 | userresources=$HOME/.Xresources | ||
4 | usermodmap=$HOME/.Xmodmap | ||
5 | sysresources=/etc/X11/xinit/.Xresources | ||
6 | sysmodmap=/etc/X11/xinit/.Xmodmap | ||
7 | |||
8 | # merge in defaults and keymaps | ||
9 | |||
10 | if [ -f $sysresources ]; then | ||
11 | |||
12 | xrdb -merge $sysresources | ||
13 | |||
14 | fi | ||
15 | |||
16 | if [ -f $sysmodmap ]; then | ||
17 | xmodmap $sysmodmap | ||
18 | fi | ||
19 | |||
20 | if [ -f "$userresources" ]; then | ||
21 | |||
22 | xrdb -merge "$userresources" | ||
23 | |||
24 | fi | ||
25 | |||
26 | if [ -f "$usermodmap" ]; then | ||
27 | xmodmap "$usermodmap" | ||
28 | fi | ||
29 | |||
30 | # start some nice programs | ||
31 | |||
32 | if [ -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 | ||
37 | fi | ||
38 | |||
39 | if [ -n "$DISPLAY" ]; then | ||
40 | xset b off | ||
41 | fi | ||
42 | |||
43 | # load additional configs | ||
44 | if [ "$2" = "nvidia" ]; then | ||
45 | XINIT_D="/etc/X11/nvidia/xinit/xinitrc.d" | ||
46 | else | ||
47 | XINIT_D="/etc/X11/xinit/xinitrc.d" | ||
48 | fi | ||
49 | |||
50 | if [ -d "$XINIT_D" ]; then | ||
51 | for f in "$XINIT_D/?*.sh" ; do | ||
52 | [ -x "$f" ] && . "$f" | ||
53 | done | ||
54 | unset f | ||
55 | fi | ||
56 | unset XINIT_D | ||
57 | |||
58 | # additional nvidia specific settings | ||
59 | if [ "$2" = "nvidia" ]; then | ||
60 | xrandr --setprovideroutputsource modesetting NVIDIA-0 | ||
61 | xrandr --auto | ||
62 | fi | ||
63 | |||
64 | |||
65 | xsetroot -cursor_name left_ptr & | ||
66 | exec ck-launch-session dbus-launch --sh-syntax --exit-with-x11 bspwm | ||