summaryrefslogtreecommitdiffstats
path: root/wpos.sh
diff options
context:
space:
mode:
Diffstat (limited to 'wpos.sh')
-rwxr-xr-xwpos.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/wpos.sh b/wpos.sh
index 3099fa2..2695f15 100755
--- a/wpos.sh
+++ b/wpos.sh
@@ -9,13 +9,18 @@ if [ ! -d "$SAVEPATH" ]; then
chmod 700 "$SAVEPATH"
fi
+## Choose profile
+PROFILE="$DEFAULT_PROFILE"
+if [ -n "$2" ]; then
+ PROFILE="$2"
+fi
if [ "$1" = "save" ]; then
- wmctrl -lxG > "$SAVEPATH/$DEFAULT_PROFILE"
+ wmctrl -lxG > "$SAVEPATH/$PROFILE"
exit 0
elif [ "$1" = "restore" ]; then
- cat "$SAVEPATH/$DEFAULT_PROFILE" | while read LINE; do
+ cat "$SAVEPATH/$PROFILE" | while read LINE; do
## Parse records in savefile
ID="$(echo "$LINE" | awk '{ print $1 }')"
GRAVITY="$(echo "$LINE" | awk '{ print $2 }')"