diff options
-rwxr-xr-x | wpos.sh | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 }')" |