mirror of
https://github.com/klaxalk/i3-layout-manager.git
synced 2025-08-20 01:48:20 +02:00
fixed broken new-lines
This commit is contained in:
@@ -269,8 +269,7 @@ MATCH ANY" | rofi -i -dmenu -p "How to identify windows? (xprop style)")
|
|||||||
# all-tree file we can find the workspace part.
|
# all-tree file we can find the workspace part.
|
||||||
|
|
||||||
# remove the floating window part, that would screw up out matching
|
# remove the floating window part, that would screw up out matching
|
||||||
$VIM_BIN $HEADLESS -nEs -c '%g/"floating_con"/norm ?{
|
$VIM_BIN $HEADLESS -nEs -c '%g/"floating_con"/norm ?{
|
||||||
nd%' -c "wqa" -- "$LAYOUT_FILE"
|
|
||||||
nd%' -c "wqa" -- "$LAYOUT_FILE"
|
nd%' -c "wqa" -- "$LAYOUT_FILE"
|
||||||
|
|
||||||
# remove comments
|
# remove comments
|
||||||
@@ -342,8 +341,7 @@ nd%' -c "wqa" -- "$LAYOUT_FILE"
|
|||||||
# this part is mostly according to the i3 manual, except we actually put there
|
# this part is mostly according to the i3 manual, except we actually put there
|
||||||
# the information about the split type
|
# the information about the split type
|
||||||
cat $ALL_WS_FILE | cat - $LAYOUT_FILE > /tmp/tmp.txt && mv /tmp/tmp.txt $LAYOUT_FILE
|
cat $ALL_WS_FILE | cat - $LAYOUT_FILE > /tmp/tmp.txt && mv /tmp/tmp.txt $LAYOUT_FILE
|
||||||
$VIM_BIN $HEADLESS -nEs -c 'normal Go]
|
# add closing bracked at the end
|
||||||
}' -c "wqa" -- "$LAYOUT_FILE"
|
|
||||||
$VIM_BIN $HEADLESS -nEs -c 'normal Go]
|
$VIM_BIN $HEADLESS -nEs -c 'normal Go]
|
||||||
}' -c "wqa" -- "$LAYOUT_FILE"
|
}' -c "wqa" -- "$LAYOUT_FILE"
|
||||||
|
|
||||||
@@ -396,23 +394,19 @@ nd%' -c "wqa" -- "$LAYOUT_FILE"
|
|||||||
|
|
||||||
# delete all comments
|
# delete all comments
|
||||||
$VIM_BIN $HEADLESS -nEs -c '%g/\/\//norm dd' -c "wqa" -- "$LAYOUT_FILE"
|
$VIM_BIN $HEADLESS -nEs -c '%g/\/\//norm dd' -c "wqa" -- "$LAYOUT_FILE"
|
||||||
$VIM_BIN $HEADLESS -nEs -c '%g/swallows/norm j^%k:s/,$//g
|
|
||||||
' -c "wqa" -- "$LAYOUT_FILE"
|
|
||||||
# add a missing comma to the last element of array we just deleted
|
# add a missing comma to the last element of array we just deleted
|
||||||
$VIM_BIN $HEADLESS -nEs -c '%g/swallows/norm j^%k:s/,$//g
|
$VIM_BIN $HEADLESS -nEs -c '%g/swallows/norm j^%k:s/,$//g
|
||||||
' -c "wqa" -- "$LAYOUT_FILE"
|
' -c "wqa" -- "$LAYOUT_FILE"
|
||||||
|
|
||||||
# delete all empty lines
|
# delete all empty lines
|
||||||
$VIM_BIN $HEADLESS -nEs -c '%g/floating_con/norm ?{
|
$VIM_BIN $HEADLESS -nEs -c '%g/^$/norm dd' -c "wqa" -- "$LAYOUT_FILE"
|
||||||
nd%GA
|
|
||||||
p' -c "wqa" -- "$LAYOUT_FILE"
|
|
||||||
|
|
||||||
# pick up floating containers and move them out of the root container
|
# pick up floating containers and move them out of the root container
|
||||||
$VIM_BIN $HEADLESS -nEs -c '%g/floating_con/norm ?{
|
$VIM_BIN $HEADLESS -nEs -c '%g/floating_con/norm ?{
|
||||||
nd%GA
|
nd%GA
|
||||||
p' -c "wqa" -- "$LAYOUT_FILE"
|
p' -c "wqa" -- "$LAYOUT_FILE"
|
||||||
$VIM_BIN $HEADLESS -nEs -c '%s/}\n{/},
|
|
||||||
{/g' -c "wqa" -- "$LAYOUT_FILE"
|
|
||||||
# delete all empty lines
|
# delete all empty lines
|
||||||
$VIM_BIN $HEADLESS -nEs -c '%g/^$/norm dd' -c "wqa" -- "$LAYOUT_FILE"
|
$VIM_BIN $HEADLESS -nEs -c '%g/^$/norm dd' -c "wqa" -- "$LAYOUT_FILE"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user