This commit is contained in:
parent
a588f08743
commit
19347f0997
64
README.md
64
README.md
|
@ -1,3 +1,34 @@
|
||||||
|
### why?
|
||||||
|
|
||||||
|
Layout-machi is great, however it requires you to use its built-in switcher to manage your open windows. If you are shuffling, swapping, and move things around a lot, this could become counter productive.
|
||||||
|
|
||||||
|
`Machina` is built on top of layout-machi, and allows you to bind frequently used actions to your keys and gives you additional user friendly features.
|
||||||
|
|
||||||
|
In other words, combination of `layout-machi` and `awesomewm-machina` will give you a similar (if not better) experience than the fancyzones on windows.
|
||||||
|
|
||||||
|
### what?
|
||||||
|
|
||||||
|
These are the features I added:
|
||||||
|
|
||||||
|
- Quick Expand
|
||||||
|
Added feature, expands the focused client to left, right, or vertically.
|
||||||
|
|
||||||
|
- Directional Swapping
|
||||||
|
Added feature, swaps clients between regions.
|
||||||
|
|
||||||
|
- Directional Shifting
|
||||||
|
Relocate clients like Elv13's collision module
|
||||||
|
|
||||||
|
- Rotational Shifting
|
||||||
|
Relocate clients clock wise or counter clock wise.
|
||||||
|
|
||||||
|
- Auto-Hide Floating Windows
|
||||||
|
Often times, the floating windows pollutes your background if you are using `useless-gaps`. Machina will hide those for you, but they can still be accessed through your window-switcher such as Rofi.
|
||||||
|
|
||||||
|
- Floating and Tiled
|
||||||
|
|
||||||
|
All keybindings work seamlessy on both tiled and floating clients. So, if you need to push that terminal to a corner, you can easily do so without changing it to tiling mode.
|
||||||
|
|
||||||
### install
|
### install
|
||||||
|
|
||||||
switch to your awesome config folder, typically at:
|
switch to your awesome config folder, typically at:
|
||||||
|
@ -9,32 +40,37 @@ cd ~/.config/awesome
|
||||||
clone this repository:
|
clone this repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
https://github.com/basaran/awesomewm-machina
|
git clone https://github.com/basaran/awesomewm-machina
|
||||||
```
|
```
|
||||||
|
|
||||||
and call it from your `rc.lua`
|
and call it from your `rc.lua`
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
local machina = require('awesomewm-machina')
|
local machina = require('awesomewm-machina')()
|
||||||
```
|
```
|
||||||
|
|
||||||
append to your keybindings, typically in your `rc.lua`
|
some of the default shortcuts are:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
root.keys(gears.table.join(config.globalkeys, machina.keys))
|
modkey + [ : prev client within region
|
||||||
```
|
modkey + ] : next client within region
|
||||||
|
|
||||||
default shortcuts are:
|
modkey + shift + [ : move client to region (counter clock wise)
|
||||||
|
modkey + shift + ] : move client to region (clock wise)
|
||||||
|
|
||||||
```lua
|
modkey + ; : move client to region on left (with bump)
|
||||||
modkey + [ : prev in region
|
modkey + ' : move client to region on right (with bump)
|
||||||
modkey + ] : next in region
|
|
||||||
|
|
||||||
modkey + insert : move top left
|
modkey + shift + ; : swap with client on left if any
|
||||||
modkey + delete : move bottom left
|
modkey + shift + ' : swap with client on right if any
|
||||||
modkey + home : center as float
|
|
||||||
modkey + pageup : move top right
|
modkey + insert : quick expand to left side (toggle)
|
||||||
modkey + pagedown : move bottom right
|
modkey + pageup : quick expand to right side (toggle)
|
||||||
|
|
||||||
|
modkey + home : center (float or tiled)
|
||||||
|
modkey + end : toggle float
|
||||||
|
|
||||||
|
modkey + delete : expand client vertically
|
||||||
|
|
||||||
modkey + j : stack friendly left
|
modkey + j : stack friendly left
|
||||||
modkey + k : stack friendly down
|
modkey + k : stack friendly down
|
||||||
|
|
35
init.lua
35
init.lua
|
@ -26,17 +26,17 @@ local bindings = {
|
||||||
----------------╮
|
----------------╮
|
||||||
--│ SHUFFLE ◊◊
|
--│ SHUFFLE ◊◊
|
||||||
----------------╯
|
----------------╯
|
||||||
awful.key({modkey}, ";", shift_by_direction("left")),
|
awful.key({modkey, "Shift"}, "j", shift_by_direction("left")),
|
||||||
--+ standard shift client logic
|
--+ move client to left
|
||||||
|
|
||||||
awful.key({modkey}, "'", shift_by_direction("right")),
|
awful.key({modkey, "Shift"}, "l", shift_by_direction("right")),
|
||||||
--+ standard shift client logic
|
--+ move client to right
|
||||||
|
|
||||||
awful.key({modkey, "Shift"}, ";", shift_by_direction("left", true)),
|
awful.key({modkey}, ";", shift_by_direction("left", true)),
|
||||||
--+ standard shift swap left
|
--+ swap left
|
||||||
|
|
||||||
awful.key({modkey, "Shift"}, "'", shift_by_direction("right", true)),
|
awful.key({modkey}, "'", shift_by_direction("right", true)),
|
||||||
--+ standard shift swap right
|
--+ swap right
|
||||||
|
|
||||||
awful.key({modkey, "Shift"}, "[", my_shifter("backward")),
|
awful.key({modkey, "Shift"}, "[", my_shifter("backward")),
|
||||||
--+ custom shift client logic
|
--+ custom shift client logic
|
||||||
|
@ -45,10 +45,10 @@ local bindings = {
|
||||||
--+ custom shift client logic
|
--+ custom shift client logic
|
||||||
|
|
||||||
awful.key({modkey}, "[", shuffle("backward")),
|
awful.key({modkey}, "[", shuffle("backward")),
|
||||||
--+ shuffle back
|
--+ shuffle region backward
|
||||||
|
|
||||||
awful.key({modkey}, "]", shuffle("forward")),
|
awful.key({modkey}, "]", shuffle("forward")),
|
||||||
--+ shuffle forward
|
--+ shuffle regions forward
|
||||||
|
|
||||||
----------------╮
|
----------------╮
|
||||||
--│ PLACEMENT ◊◊
|
--│ PLACEMENT ◊◊
|
||||||
|
@ -76,28 +76,21 @@ local bindings = {
|
||||||
--│ FOCUS ◊◊
|
--│ FOCUS ◊◊
|
||||||
----------------╯
|
----------------╯
|
||||||
awful.key({modkey}, "Left", focus_by_direction("left")),
|
awful.key({modkey}, "Left", focus_by_direction("left")),
|
||||||
--+ stack friendly focus left
|
|
||||||
|
|
||||||
awful.key({modkey}, "j", focus_by_direction("left")),
|
awful.key({modkey}, "j", focus_by_direction("left")),
|
||||||
--+ stack friendly focus left
|
--+ stack friendly focus left
|
||||||
|
|
||||||
awful.key({modkey}, "Down", focus_by_direction("down")),
|
awful.key({modkey}, "Down", focus_by_direction("down")),
|
||||||
--+ stack friendly focus down
|
|
||||||
|
|
||||||
awful.key({modkey}, "k", focus_by_direction("down")),
|
awful.key({modkey}, "k", focus_by_direction("down")),
|
||||||
--+ stack friendly focus down
|
--+ stack friendly focus down
|
||||||
|
|
||||||
awful.key({modkey}, "Right", focus_by_direction("right")),
|
|
||||||
--+ stack friendly focus right
|
|
||||||
|
|
||||||
|
awful.key({modkey}, "Right", focus_by_direction("right")),
|
||||||
awful.key({modkey}, "l", focus_by_direction("right")),
|
awful.key({modkey}, "l", focus_by_direction("right")),
|
||||||
--+ stack friendly focus right
|
--+ stack friendly focus right
|
||||||
|
|
||||||
awful.key({modkey}, "Up", focus_by_direction("up")),
|
awful.key({modkey}, "Up", focus_by_direction("up")),
|
||||||
--+ stack friendly focus up
|
|
||||||
|
|
||||||
awful.key({modkey}, "i", focus_by_direction("up"))
|
awful.key({modkey}, "i", focus_by_direction("up"))
|
||||||
--+ stack friendly focus up
|
--+ stack friendly focus up
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--------------------------------------------------------------- signals -- ;
|
--------------------------------------------------------------- signals -- ;
|
||||||
|
@ -134,8 +127,8 @@ end) ----| hide all floating windows when the user switches to a
|
||||||
--------------------------------------------------------------- exports -- ;
|
--------------------------------------------------------------- exports -- ;
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
bindings = bindings,
|
bindings = bindings
|
||||||
'';}
|
}
|
||||||
|
|
||||||
local function new(arg)
|
local function new(arg)
|
||||||
capi.root.keys(awful.util.table.join(capi.root.keys(), table.unpack(bindings)))
|
capi.root.keys(awful.util.table.join(capi.root.keys(), table.unpack(bindings)))
|
||||||
|
|
Loading…
Reference in New Issue