From f51cdc3062444f11760bc25a7e8023864428d62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Sat, 21 Mar 2015 13:46:45 +0100 Subject: Provide better storage management for wpos --- wpos.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wpos.sh b/wpos.sh index 7770358..3099fa2 100755 --- a/wpos.sh +++ b/wpos.sh @@ -2,7 +2,13 @@ DEFAULT_PROFILE="auto" SAVEPATH="/tmp/wpos" -mkdir -p "$SAVEPATH" + +## Check and create main profile direcotry +if [ ! -d "$SAVEPATH" ]; then + mkdir -p "$SAVEPATH" + chmod 700 "$SAVEPATH" +fi + if [ "$1" = "save" ]; then wmctrl -lxG > "$SAVEPATH/$DEFAULT_PROFILE" -- cgit v1.2.3