diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-08 21:16:25 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-08 21:16:25 +0200 |
commit | 63c75cbb67228924d5dc1c7f45054f40cd2d395f (patch) | |
tree | fcc4dcf9c77afcfcf259cb6a27d14f15b4afc08a /examples/data/uzbl/scripts/session.sh | |
parent | 67b0fc24261282130bdb86b5f902ccf524d22b77 (diff) |
be more friendly to people who have no XDG variables set + bitter checking and such
Diffstat (limited to 'examples/data/uzbl/scripts/session.sh')
-rwxr-xr-x | examples/data/uzbl/scripts/session.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/data/uzbl/scripts/session.sh b/examples/data/uzbl/scripts/session.sh index e2642c7..4dbae55 100755 --- a/examples/data/uzbl/scripts/session.sh +++ b/examples/data/uzbl/scripts/session.sh @@ -8,9 +8,10 @@ # and doesn't need to be called manually at any point. # Add a line like 'bind quit = /path/to/session.sh endsession' to your config +[ -d ${XDG_DATA_HOME:-$HOME/.local/share}/uzbl ] || exit 1 scriptfile=$0 # this script -sessionfile=$XDG_DATA_HOME/uzbl/session # the file in which the "session" (i.e. urls) are stored -configfile=$XDG_DATA_HOME/uzbl/config # uzbl configuration file +sessionfile=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/session # the file in which the "session" (i.e. urls) are stored +configfile=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/config # uzbl configuration file UZBL="uzbl -c $configfile" # add custom flags and whatever here. fifodir=/tmp # remember to change this if you instructed uzbl to put its fifos elsewhere |