diff options
author | Robin Obůrka <r.oburka@gmail.com> | 2015-03-21 13:46:45 +0100 |
---|---|---|
committer | Robin Obůrka <r.oburka@gmail.com> | 2015-03-21 13:46:45 +0100 |
commit | f51cdc3062444f11760bc25a7e8023864428d62a (patch) | |
tree | 3cd4b619341d0ea185bbdc4f411b2d8564627fea | |
parent | Add command, that returns hash of current profile (diff) | |
download | display_autoset-f51cdc3062444f11760bc25a7e8023864428d62a.tar.xz |
Provide better storage management for wpos
-rwxr-xr-x | wpos.sh | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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" |