forked from denlab/stumpwm-config
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.xinitrc
executable file
·39 lines (29 loc) · 1.31 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
#!/usr/bin/env zsh
export GTK_IM_MODULE=xim
# Not supposed to be triggered in NixOS environment (already dealt with)
if [ ! -f /etc/NIXOS ]; then
[ -e $HOME/.Xmodmap] && xmodmap $HOME/.Xmodmap
# Display layout which can be different depending on host
LAYOUT_FILE_PER_HOST="$HOME/.layouts/$(hostname).sh"
# before starting xmonad, we want a correct X db and a running urxvt daemon
xrdb -merge ~/.Xresources
# fix graphical libraries (awt, swt, etc...) in stumpwm/xmonad (exotic wm)
export _JAVA_AWT_WM_NONREPARENTING=1
wmname "LG3D"
export AWT_TOOLKIT=MToolkit
/usr/lib/notification-daemon/notification-daemon&
start-if-cmd-exists () {
which $1 && ~/bin/service/service.sh restart $* &
}
# start default user service
systemctl --user start xscreensaver.service
systemctl --user start offlineimap.timer
systemctl --user start offlineimap.service
# systemctl --user start emacs.service
# start-if-cmd-exists emacs --daemon
start-if-cmd-exists trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 15 --height 12 --transparent true --tint 0x000000
start-if-cmd-exists nm-applet
# Layout per host divergence possible
[ -f $LAYOUT_FILE_PER_HOST ] && zsh $LAYOUT_FILE_PER_HOST
exec xmonad
fi