The script parses this file and generates the menu.
shortcut is the key binding that will immediately trigger the menu item.
exit | stay defines whether the menu closes after the option is actioned (sometimes you wanna keep the menu open)
label is what you see in the menu
command is… well, the command
One more thing, if your hostname is “my_machine”, and the menu file that you gave to my script is “my-layout.menu”, then the script will actually prefer to use “my-layout.my_machine.menu” if it exists. So you can share your config across multiple machines and have them pick the appropriate menus depending on where it is ran.
A menu example could be:
Layouts
l # stay # Rotate Layout # i3-msg toggle all
f # exit # Toggre Floating # i3-msg floating toggle
So to change i3 layouts, I type:
Super-l (opens menu)
l rotate layout (rows, cols, tabs, stack) and keep the menu open. If I keep hitting l it will keep rotating.
Esc to close the menu.
To toggle the window floating:
Super-l (opens menu)
f to toggle floating. The menu closes immediately after.
If you are interested, I can share the script with you :)
It’s actually quite neat. It is a three part archesta:
Super-lthat triggers a script of mine.rofi-menutakes a single argument, a text “menu file” that describes the menu. Say,my-layouts.menuThe script parses this file and generates the menu.
One more thing, if your hostname is “my_machine”, and the menu file that you gave to my script is “my-layout.menu”, then the script will actually prefer to use “my-layout.my_machine.menu” if it exists. So you can share your config across multiple machines and have them pick the appropriate menus depending on where it is ran.
A menu example could be:
So to change i3 layouts, I type:
Super-l(opens menu)lrotate layout (rows, cols, tabs, stack) and keep the menu open. If I keep hittinglit will keep rotating.Escto close the menu.To toggle the window floating:
Super-l(opens menu)fto toggle floating. The menu closes immediately after.If you are interested, I can share the script with you :)