2006-08-20 22:43:09 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2009-02-09 12:14:13 +03:00
|
|
|
# $Id$
|
2006-08-20 22:43:09 +04:00
|
|
|
#
|
2009-01-23 18:04:08 +03:00
|
|
|
# Part of Equinox Desktop Environment (EDE).
|
2013-02-19 03:38:52 +04:00
|
|
|
# Copyright (c) 2007-2013 EDE Authors.
|
2009-01-23 18:04:08 +03:00
|
|
|
#
|
|
|
|
# This program is licensed under terms of the
|
|
|
|
# GNU General Public License version 2 or newer.
|
|
|
|
# See COPYING for details.
|
|
|
|
|
|
|
|
# Main script responsible for starting and setting needed environment parts.
|
|
|
|
# Details about XDG_XXX data and how they are set is at:
|
|
|
|
# http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
|
2006-08-20 22:43:09 +04:00
|
|
|
|
2009-01-27 18:22:45 +03:00
|
|
|
PREFIX="@prefix@"
|
2010-01-19 17:41:51 +03:00
|
|
|
SYSCONFDIR="@my_sysconfdir@"
|
2006-08-20 22:43:09 +04:00
|
|
|
|
2009-01-27 18:22:45 +03:00
|
|
|
if [ "x$XDG_DATA_HOME" = "x" ]; then
|
2009-01-23 18:04:08 +03:00
|
|
|
XDG_DATA_HOME="$HOME/.local/share"
|
|
|
|
fi
|
2006-08-20 22:43:09 +04:00
|
|
|
|
2009-01-27 18:22:45 +03:00
|
|
|
if [ "x$XDG_CONFIG_HOME" = "x" ]; then
|
2009-01-23 18:04:08 +03:00
|
|
|
XDG_CONFIG_HOME="$HOME/.config"
|
2006-08-20 22:43:09 +04:00
|
|
|
fi
|
|
|
|
|
2009-01-27 18:22:45 +03:00
|
|
|
if [ "x$XDG_CACHE_HOME" = "x" ]; then
|
2009-01-23 18:04:08 +03:00
|
|
|
XDG_CACHE_HOME="$HOME/.cache"
|
|
|
|
fi
|
|
|
|
|
2009-01-27 18:22:45 +03:00
|
|
|
if [ "x$XDG_DATA_DIRS" = "x" ]; then
|
2009-02-20 18:03:16 +03:00
|
|
|
XDG_DATA_DIRS="/usr/local/share:/usr/share:$PREFIX/share"
|
2009-01-23 18:04:08 +03:00
|
|
|
fi
|
|
|
|
|
2009-01-27 18:22:45 +03:00
|
|
|
if [ "x$XDG_CONFIG_DIRS" = "x" ]; then
|
2010-01-19 17:41:51 +03:00
|
|
|
XDG_CONFIG_DIRS="$SYSCONFDIR/xdg"
|
2006-08-20 22:43:09 +04:00
|
|
|
fi
|
|
|
|
|
2009-10-03 11:24:06 +04:00
|
|
|
# prefix for applications.menu
|
|
|
|
if [ "x$XDG_MENU_PREFIX" = "x" ]; then
|
|
|
|
XDG_MENU_PREFIX="ede-"
|
|
|
|
fi
|
|
|
|
|
2013-02-19 03:38:52 +04:00
|
|
|
XDG_CURRENT_DESKTOP="EDE"
|
|
|
|
|
2009-02-20 19:41:05 +03:00
|
|
|
[ -d $XDG_DATA_HOME ] || mkdir -p $XDG_DATA_HOME
|
|
|
|
[ -d $XDG_CONFIG_HOME ] || mkdir -p $XDG_CONFIG_HOME
|
|
|
|
[ -d $XDG_CACHE_HOME ] || mkdir -p $XDG_CACHE_HOME
|
2009-01-23 18:04:08 +03:00
|
|
|
|
|
|
|
export XDG_DATA_HOME
|
|
|
|
export XDG_CONFIG_HOME
|
|
|
|
export XDG_CACHE_HOME
|
|
|
|
export XDG_DATA_DIRS
|
|
|
|
export XDG_CONFIG_DIRS
|
2009-10-03 11:24:06 +04:00
|
|
|
export XDG_MENU_PREFIX
|
2013-02-19 03:38:52 +04:00
|
|
|
export XDG_CURRENT_DESKTOP
|
2009-01-23 18:04:08 +03:00
|
|
|
|
2006-08-20 22:43:09 +04:00
|
|
|
PATH=$PATH:$PREFIX:$PREFIX/bin
|
|
|
|
export PATH
|
|
|
|
|
2012-12-20 16:32:44 +04:00
|
|
|
# set the background color inside X
|
|
|
|
if command -v xsetroot > /dev/null 2>&1; then
|
|
|
|
xsetroot -solid black
|
2006-08-20 22:43:09 +04:00
|
|
|
fi
|
|
|
|
|
2009-03-06 15:12:27 +03:00
|
|
|
# remove leftovers if evoke crashed
|
|
|
|
rm -f /tmp/.evoke.lock
|
|
|
|
|
2009-02-20 18:41:11 +03:00
|
|
|
# start the session
|
2009-05-15 17:30:40 +04:00
|
|
|
evoke --startup
|