mirror of
https://github.com/klaxalk/i3-layout-manager.git
synced 2025-06-21 03:57:42 +02:00
minor changes
This commit is contained in:
parent
200cd96763
commit
c09ab18dc8
@ -70,8 +70,8 @@ DELETE LAYOUT" | rofi -i -dmenu -no-custom -p "Select action")
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# get me layout names based on existing file names in the LAYOUT_PATH
|
# get me layout names based on existing file names in the LAYOUT_PATH
|
||||||
LAYOUT_NAMES=$(ls -a $LAYOUT_PATH | grep "layout.*json" | sed -nr 's/layout-(.*)\.json/\1/p' | sed 's/\s/\n/g') # layout names
|
LAYOUT_NAMES=$(ls -a $LAYOUT_PATH | grep "layout.*json" | sed -nr 's/layout-(.*)\.json/\1/p' | sed 's/\s/\n/g' | sed 's/_/ /g') # layout names
|
||||||
LAYOUT_NAME=$(echo "$LAYOUT_NAMES" | rofi -i -dmenu -p "Select layout (you may type new name when creating)") # ask for selection
|
LAYOUT_NAME=$(echo "$LAYOUT_NAMES" | rofi -i -dmenu -p "Select layout (you may type new name when creating)" | sed 's/\s/_/g') # ask for selection
|
||||||
LAYOUT_NAME=${LAYOUT_NAME^^} # upper case
|
LAYOUT_NAME=${LAYOUT_NAME^^} # upper case
|
||||||
|
|
||||||
# getting argument from command line
|
# getting argument from command line
|
||||||
@ -278,7 +278,6 @@ MATCH ANY" | rofi -i -dmenu -p "How to identify windows? (xprop style)")
|
|||||||
if [[ "$CRITERION" = "default" ]]; then
|
if [[ "$CRITERION" = "default" ]]; then
|
||||||
$VIM_BIN $HEADLESS -nEs -c "%g/instance/norm ^dW" -c "wqa" -- "$LAYOUT_FILE"
|
$VIM_BIN $HEADLESS -nEs -c "%g/instance/norm ^dW" -c "wqa" -- "$LAYOUT_FILE"
|
||||||
elif [[ "$CRITERION" = "any" ]]; then
|
elif [[ "$CRITERION" = "any" ]]; then
|
||||||
echo any
|
|
||||||
$VIM_BIN $HEADLESS -nEs -c '%g/instance/norm ^dW3f"di"' -c "wqa" -- "$LAYOUT_FILE"
|
$VIM_BIN $HEADLESS -nEs -c '%g/instance/norm ^dW3f"di"' -c "wqa" -- "$LAYOUT_FILE"
|
||||||
elif [[ "$CRITERION" = "specific" ]]; then
|
elif [[ "$CRITERION" = "specific" ]]; then
|
||||||
|
|
||||||
@ -330,6 +329,8 @@ MATCH ANY" | rofi -i -dmenu -p "How to identify windows? (xprop style)")
|
|||||||
# autoformat the file
|
# autoformat the file
|
||||||
$VIM_BIN $HEADLESS -nEs -c 'normal gg=G' -c "wqa" -- "$LAYOUT_FILE"
|
$VIM_BIN $HEADLESS -nEs -c 'normal gg=G' -c "wqa" -- "$LAYOUT_FILE"
|
||||||
|
|
||||||
|
rm "$ALL_WS_FILE"
|
||||||
|
|
||||||
notify-send -u low -t 2000 "Layout saved" -h string:x-canonical-private-synchronous:anything
|
notify-send -u low -t 2000 "Layout saved" -h string:x-canonical-private-synchronous:anything
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user