2012-06-15 16:54:02 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-10-13 11:51:37 +02:00
|
|
|
## WARNING: If started from TTY on a multi-seat, the user must run 'startx &
|
|
|
|
## vlock' to ensure the X locker cannot be bypassed.
|
|
|
|
|
2016-06-22 11:16:48 +02:00
|
|
|
## Run site init scripts. Usually not necessary.
|
|
|
|
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
|
|
|
|
|
2013-05-24 17:27:56 +02:00
|
|
|
## Source environment config.
|
|
|
|
[ -f ~/.xprofile ] && . ~/.xprofile
|
2013-04-27 16:35:45 +02:00
|
|
|
|
2012-06-15 16:54:02 +02:00
|
|
|
## Launch session
|
2014-04-21 19:59:45 +02:00
|
|
|
if [ $# -eq 1 ] && command -v $1 >/dev/null 2>&1; then
|
2016-06-22 11:16:48 +02:00
|
|
|
exec $1
|
2013-10-12 16:01:11 +02:00
|
|
|
else
|
2017-08-16 00:13:13 +02:00
|
|
|
conky | dzen2 -p -dock -ta l -fn "Mono" &
|
2017-07-27 14:45:30 +02:00
|
|
|
## `exwm-enable' has to be called before the frame is spawned.
|
|
|
|
emacs --daemon -f exwm-enable
|
|
|
|
exec emacsclient -c
|
2013-10-12 16:01:11 +02:00
|
|
|
fi
|
2012-07-04 13:21:01 +02:00
|
|
|
|
2016-06-22 11:16:48 +02:00
|
|
|
## TODO: When the session is terminated, some forked processes must be closed
|
|
|
|
## manually. This can automated by setting a shell 'trap' in .profile when
|
|
|
|
## logged from a TTY. The trick does not work from an X login manager. This file
|
|
|
|
## could be the place where to clean everything, but it will not be parsed by
|
|
|
|
## some login managers. Beside, systemd sessions may sigkill all user apps on
|
|
|
|
## logoff, preventing a clean termination.
|
2017-06-29 17:13:36 +02:00
|
|
|
# ssh-agent -k
|
|
|
|
## See if exec'ing "ssh-agent <WM>" is a better idea.
|