diff options
-rwxr-xr-x[-rw-r--r--] | reformat_fstab.pl | 0 | ||||
-rwxr-xr-x | set-background.sh | 13 |
2 files changed, 7 insertions, 6 deletions
diff --git a/reformat_fstab.pl b/reformat_fstab.pl index 9c81d8d..9c81d8d 100644..100755 --- a/reformat_fstab.pl +++ b/reformat_fstab.pl diff --git a/set-background.sh b/set-background.sh index 06d1fd7..3b2a234 100755 --- a/set-background.sh +++ b/set-background.sh @@ -22,8 +22,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. - -export DISPLAY=:0.0 +if [ "" = $DISPLAY ]; then + export DISPLAY=:0.0 +fi if [ "$1" = "" ] || [ "$1" = "-h" ]; then notify-send -t 10000 "Background" "Usage: set-background <file>"; @@ -31,11 +32,11 @@ if [ "$1" = "" ] || [ "$1" = "-h" ]; then fi FILE=$1 -if [ -f $FILE ] ; then - echo "feh --bg-center $FILE" > "/home/flo/.fehbg"; - ln -sf "$FILE" "/home/flo/backgrounds/current_bg"; +if [ -f $FILE ]; then + echo "feh --bg-center ${FILE}" > "/home/flo/.fehbg"; + ln -sf "${FILE}" "/home/flo/backgrounds/current_bg"; source /home/flo/.fehbg else - notify-send -t 10000 "Background" "Error: File \"$FILE\" doesn't exist"; + notify-send -t 10000 "Background" "Error: File \"${FILE}\" doesn't exist"; exit 1 fi |