summaryrefslogtreecommitdiffstats
path: root/wpos.sh
diff options
context:
space:
mode:
Diffstat (limited to 'wpos.sh')
-rwxr-xr-xwpos.sh8
1 files changed, 7 insertions, 1 deletions
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"