mirror of
https://github.com/klaxalk/i3-layout-manager.git
synced 2025-06-21 12:31:22 +02:00
added folds
This commit is contained in:
parent
3d9890a271
commit
b415e90773
@ -56,6 +56,8 @@ mkdir -p $LAYOUT_PATH > /dev/null 2>&1
|
|||||||
# logs
|
# logs
|
||||||
LOG_FILE=/tmp/i3_layout_manager.txt
|
LOG_FILE=/tmp/i3_layout_manager.txt
|
||||||
|
|
||||||
|
# #{ asking for the action
|
||||||
|
|
||||||
# if operating using dmenu
|
# if operating using dmenu
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
|
|
||||||
@ -85,11 +87,15 @@ if [ -z "$LAYOUT_NAME" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# #}
|
||||||
|
|
||||||
LAYOUT_FILE=$LAYOUT_PATH/layout-"$LAYOUT_NAME".json
|
LAYOUT_FILE=$LAYOUT_PATH/layout-"$LAYOUT_NAME".json
|
||||||
|
|
||||||
# get current workspace ID
|
# get current workspace ID
|
||||||
WORKSPACE_ID=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num' | cut -d"\"" -f2)
|
WORKSPACE_ID=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num' | cut -d"\"" -f2)
|
||||||
|
|
||||||
|
# #{ LOADING
|
||||||
|
|
||||||
if [[ "$ACTION" = "LOAD LAYOUT" ]]; then
|
if [[ "$ACTION" = "LOAD LAYOUT" ]]; then
|
||||||
|
|
||||||
# updating the workspace to the new layout is tricky
|
# updating the workspace to the new layout is tricky
|
||||||
@ -136,6 +142,10 @@ if [[ "$ACTION" = "LOAD LAYOUT" ]]; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# #}
|
||||||
|
|
||||||
|
# #{ SAVING
|
||||||
|
|
||||||
if [[ "$ACTION" = "SAVE LAYOUT" ]]; then
|
if [[ "$ACTION" = "SAVE LAYOUT" ]]; then
|
||||||
|
|
||||||
ACTION=$(echo "DEFAULT (INSTANCE)
|
ACTION=$(echo "DEFAULT (INSTANCE)
|
||||||
@ -322,6 +332,12 @@ MATCH ANY" | rofi -i -dmenu -p "How to identify windows? (xprop style)")
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# #}
|
||||||
|
|
||||||
|
# #{ DELETING
|
||||||
|
|
||||||
if [[ "$ACTION" = "DELETE LAYOUT" ]]; then
|
if [[ "$ACTION" = "DELETE LAYOUT" ]]; then
|
||||||
rm "$LAYOUT_FILE"
|
rm "$LAYOUT_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# #}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user