added folds

This commit is contained in:
Tomas Baca 2018-08-30 04:10:31 +02:00
parent 3d9890a271
commit b415e90773

View File

@ -56,6 +56,8 @@ mkdir -p $LAYOUT_PATH > /dev/null 2>&1
# logs
LOG_FILE=/tmp/i3_layout_manager.txt
# #{ asking for the action
# if operating using dmenu
if [ -z $1 ]; then
@ -85,11 +87,15 @@ if [ -z "$LAYOUT_NAME" ]; then
exit
fi
# #}
LAYOUT_FILE=$LAYOUT_PATH/layout-"$LAYOUT_NAME".json
# get current workspace ID
WORKSPACE_ID=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num' | cut -d"\"" -f2)
# #{ LOADING
if [[ "$ACTION" = "LOAD LAYOUT" ]]; then
# updating the workspace to the new layout is tricky
@ -136,6 +142,10 @@ if [[ "$ACTION" = "LOAD LAYOUT" ]]; then
fi
# #}
# #{ SAVING
if [[ "$ACTION" = "SAVE LAYOUT" ]]; then
ACTION=$(echo "DEFAULT (INSTANCE)
@ -322,6 +332,12 @@ MATCH ANY" | rofi -i -dmenu -p "How to identify windows? (xprop style)")
fi
# #}
# #{ DELETING
if [[ "$ACTION" = "DELETE LAYOUT" ]]; then
rm "$LAYOUT_FILE"
fi
# #}