diff options
Diffstat (limited to 'modules/profile/xsession.dot.link')
-rwxr-xr-x[l---------] | modules/profile/xsession.dot.link | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/modules/profile/xsession.dot.link b/modules/profile/xsession.dot.link index d381138..98b5225 120000..100755 --- a/modules/profile/xsession.dot.link +++ b/modules/profile/xsession.dot.link @@ -1 +1,63 @@ -xprofile.dot.link
\ No newline at end of file +#!/bin/bash +# +# .xsession: set basic X11 environment +# + +# Background image +BACKGROUND="" + +# Session applications +PROGRAMS="" + +# OS Version +OSVERSION="`cut -d . -f 1 /etc/debian_version`" + +# Hostname +HOSTNAME="`cat /etc/hostname`" + +# Make sure to load the profile +. $HOME/.profile + +# Start xscreensaver +xscreensaver -no-splash & + +# Custom +if [ -e "$HOME/.custom/xsession" ]; then + . $HOME/.custom/xsession +fi + +# Set background +if [ ! -z "$BACKGROUND" ]; then + Esetroot -scale $HOME/.config/themes/backgrounds/$BACKGROUND +else + xsetroot -solid black +fi + +# Additional applications depending on the machine type +if laptop-detect; then + PROGRAMS="$PROGRAMS xwicd" +else + PROGRAMS="$PROGRAMS" +fi + +# Start session applications +for program in $PROGRAMS; do + $program & +done + +# Apply custom keyboard configuration +if [ -f "$HOME/.Xmodmaps/$HOSTNAME" ]; then + xmodmap $HOME/.Xmodmaps/$HOSTNAME +fi + +# Execute window manager +if [ "$OSVERSION" = "7" ]; then + # See https://bugzilla.redhat.com/show_bug.cgi?id=783568 + # https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/932177 + unset GNOME_KEYRING_PID + unset GNOME_KEYRING_CONTROL + #eval $(gnome-keyring-daemon --start) & + + # Start window manager + awesome +fi |