aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/xprofile
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-13 15:49:12 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-13 15:49:12 -0200
commita86446df9ba5ffb86d99c511217d704736803f3f (patch)
tree165a4ebbe08c3d1519f13696ab659e8af4814939 /modules/profile/xprofile
downloaddotfiles-a86446df9ba5ffb86d99c511217d704736803f3f.tar.gz
dotfiles-a86446df9ba5ffb86d99c511217d704736803f3f.tar.bz2
Initial import
Diffstat (limited to 'modules/profile/xprofile')
-rwxr-xr-xmodules/profile/xprofile40
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/profile/xprofile b/modules/profile/xprofile
new file mode 100755
index 0000000..bfafe46
--- /dev/null
+++ b/modules/profile/xprofile
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# .xprofile: set basic X11 environment
+#
+
+# Background image
+BACKGROUND=""
+
+# Session applications
+PROGRAMS=""
+
+# Make sure to load the profile
+source $HOME/.profile
+
+# Start xscreensaver
+xscreensaver -no-splash &
+
+# Custom
+if [ -e "$HOME/.custom/xprofile" ]; then
+ source $HOME/.custom/xprofile
+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 wicd-client"
+else
+ PROGRAMS="$PROGRAMS"
+fi
+
+# Start session applications
+for program in $PROGRAMS; do
+ $program &
+done