diff options
author | Florian Pritz <f-p@gmx.at> | 2009-03-12 16:31:19 +0100 |
---|---|---|
committer | Florian Pritz <f-p@gmx.at> | 2009-03-12 16:31:19 +0100 |
commit | 4288846de96725d4050cfd7641f30ef979916490 (patch) | |
tree | 11f3abe88c2ae8a4ceb9c2fe61eedcc2180f3e28 /set-background.sh | |
parent | 726df9003dd78bfab19967c3c72d057dd55dcaca (diff) | |
download | bin-4288846de96725d4050cfd7641f30ef979916490.tar.gz bin-4288846de96725d4050cfd7641f30ef979916490.tar.xz |
symlinks absolute path
Slim dies if it can't find the background image, but it won't find it if
the symlink is relative.
Diffstat (limited to 'set-background.sh')
-rwxr-xr-x | set-background.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/set-background.sh b/set-background.sh index 811157a..e21fbea 100755 --- a/set-background.sh +++ b/set-background.sh @@ -23,7 +23,10 @@ if [ "$1" = "" ] || [ "$1" = "-h" ]; then exit 1 fi -FILE=$1 +cd "$(dirname "$1")" + +FILE="$(pwd)/$(basename "$1")" + if [ -f $FILE ]; then echo "feh --bg-center ${FILE}" > "$HOME/.fehbg"; rm "$HOME/backgrounds/current_bg"; |