added jump to home after deleting a layout
This commit is contained in:
parent
a3a0bd1764
commit
5ddf6c4d42
1 changed files with 7 additions and 5 deletions
|
@ -9,7 +9,7 @@
|
||||||
# - xrandr : getting info of current monitor
|
# - xrandr : getting info of current monitor
|
||||||
# - i3-msg : i3 tui
|
# - i3-msg : i3 tui
|
||||||
# - awk+sed+cat ...
|
# - awk+sed+cat ...
|
||||||
#
|
#
|
||||||
# vim: set foldmarker=#\ #{,#\ #}
|
# vim: set foldmarker=#\ #{,#\ #}
|
||||||
|
|
||||||
# #{ CHECK DEPENDENCIES
|
# #{ CHECK DEPENDENCIES
|
||||||
|
@ -56,7 +56,7 @@ 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
|
# #{ ASK FOR THE ACTION
|
||||||
|
|
||||||
# if operating using dmenu
|
# if operating using dmenu
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
|
@ -94,7 +94,7 @@ 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
|
# #{ LOAD
|
||||||
|
|
||||||
if [[ "$ACTION" = "LOAD LAYOUT" ]]; then
|
if [[ "$ACTION" = "LOAD LAYOUT" ]]; then
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ fi
|
||||||
|
|
||||||
# #}
|
# #}
|
||||||
|
|
||||||
# #{ SAVING
|
# #{ SAVE
|
||||||
|
|
||||||
if [[ "$ACTION" = "SAVE LAYOUT" ]]; then
|
if [[ "$ACTION" = "SAVE LAYOUT" ]]; then
|
||||||
|
|
||||||
|
@ -336,10 +336,12 @@ fi
|
||||||
|
|
||||||
# #}
|
# #}
|
||||||
|
|
||||||
# #{ DELETING
|
# #{ DELETE
|
||||||
|
|
||||||
if [[ "$ACTION" = "DELETE LAYOUT" ]]; then
|
if [[ "$ACTION" = "DELETE LAYOUT" ]]; then
|
||||||
rm "$LAYOUT_FILE"
|
rm "$LAYOUT_FILE"
|
||||||
|
notify-send -u low -t 2000 "Layout deleted" -h string:x-canonical-private-synchronous:anything
|
||||||
|
exec ./"$0" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# #}
|
# #}
|
||||||
|
|
Loading…
Add table
Reference in a new issue