-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xinitrc
73 lines (61 loc) · 2.39 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
#!/bin/sh
#--------------------------------#
# ╻ ╻╻┏┓╻╻╺┳╸┏━┓┏━╸ #
# ┏╋┛┃┃┗┫┃ ┃ ┣┳┛┃ #
# ╹╹ ╹╹╹ ╹╹ ╹ ╹┗╸┗━╸ #
# by: K4L'EL #
# no login manager since forever #
#--------------------------------#
#xrandr --setprovideroutputsource modesetting NVIDIA-0
#xrandr --auto
##----------------------------------------------------------------------------##
## Launch dbus
##----------------------------------------------------------------------------##
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
##----------------------------------------------------------------------------##
## Mpd autostart
##----------------------------------------------------------------------------##
#[ ! -s ~/.config/mpd/pid ] && mpd
##----------------------------------------------------------------------------##
## Update Xresources
##----------------------------------------------------------------------------##
[[ -f ~/.Xresources ]] && xrdb -merge "${HOME}/.Xresources"
##----------------------------------------------------------------------------##
## My fonts
##----------------------------------------------------------------------------##
xset +fp ~/.fonts
xset +fp /home/whoami/.local/share/fonts
xset fp rehash
##----------------------------------------------------------------------------##
## General settings
##----------------------------------------------------------------------------##
compton -b
nitrogen --restore &
xsetroot -cursor_name left_ptr
unclutter &
##----------------------------------------------------------------------------##
## startx
##----------------------------------------------------------------------------##
_start_session() {
session=${1:-bspwm}
case $session in
awesome ) exec awesome;;
bspwm ) exec bspwm;;
xmonad ) exec xmonad;;
dwm ) exec dwm;;
bspwm ) exec bspwm;;
2bwm ) exec 2bwm ;;
i3|i3wm ) exec i3;;
mate ) exec mate-session;;
openbox ) exec openbox-session;;
xfce|xfce4 ) exec startxfce4;;
# No known session, try to run it as command
*) exec "$1";;
esac
}
_start_session "$@"