Update README

This commit is contained in:
Emmanuel Lepage Vallee 2014-09-08 00:05:16 -04:00
parent da9b0a2693
commit a5da434c5d
3 changed files with 32 additions and 2 deletions

View File

@ -58,3 +58,31 @@ while the `Control` key is used to max out the effect.
| `Mod4` | `Mod1 (Alt)` | | Resize a client relative to the bottom right corner |
| `Mod4` | `Mod1 (Alt)` | `Shift` | Resize a client relative to the top left corner |
| `Control` | `Mod1 (Alt)` | | Move to the next/previous tag
# Using different keys
Due to the large ammount of keyboard shortcut Collision create, they are
auto-generated automatically. While this make installation simpler, it also
make Collision somewhat hard-coded magic. Some alternative keymaps can also
be ackward to use because of the reliance on mod keys such as `Alt` and `Control`.
That being said, Collision allow some basic remapping. Instead of:
```lua
require("collision")()
```
This can be used:
```lua
require("collision") {
-- Normal Xephyr Vim G510
up = { "Up" , "&" , "k" , "F15" },
down = { "Down" , "KP_Enter" , "j" , "F14" },
left = { "Left" , "#" , "h" , "F13" },
right = { "Right" , "\"" , "l" , "F17" },
}
```
Of course, if the `Vim` keys are used, any other shortcut binded to them have to
be removed from rc.lua.

View File

@ -142,7 +142,8 @@ local function bydirection(dir, c, swap,max)
capi.client.focus = cltbl[((not cltbl[target] and #cltbl == 1) and 1 or target)]
capi.client.focus:raise()
else
c:swap(cltbl[target])
--BUG swap doesn't work if the screen is not the same
c:swap(cltbl[((not cltbl[target] and #cltbl == 1) and 1 or target)])
end
display_wiboxes(cltbl,geomtbl,float,swap,c)
end

View File

@ -113,7 +113,8 @@ function module.tag(direction,c,max)
end
local function new(k)
local k = k or keys
-- Replace the keys array. The new one has to have a valid mapping
keys = k or keys
local aw = {}
for k,v in pairs(keys) do