|
local bind = require("modules.utils.bind") |
|
local tags = require("modules.utils.tags") |
|
local clients = require("modules.utils.clients") |
|
local exec = require("modules.utils.exec") |
|
local hotkeys_popup = require("awful.hotkeys_popup").widget |
|
|
|
-- Main |
|
bind.set("root", "Super+Control+r", awesome.restart, "Awesome: reload awesome") |
|
bind.set("root", "Super+Control+q", awesome.quit, "Awesome: quit awesome") |
|
bind.set("root", "Super+Return", exec(config.terminal, true), "Awesome: open a terminal") |
|
bind.set("root", "Super+s", hotkeys_popup.show_help, "Awesome: show help") |
|
-- bind.set("root", "Super+w", toggleMainMenu, "awesome: show main menu") |
|
|
|
-- Screens |
|
local screens = require("modules.utils.screens") |
|
bind.set("root", "Super+Control+j", screens.focus_next_screen, "Screen: focus the next screen") |
|
bind.set("root", "Super+Control+k", screens.focus_prev_screen, "Screen: focus the previous screen") |
|
|
|
-- Layouts |
|
local layouts = require("modules.utils.layouts") |
|
bind.set("root", "Super+l", layouts.inc_master_width, "Layout: increase master width factor") |
|
bind.set("root", "Super+h", layouts.dec_master_width, "Layout: decrease master width factor") |
|
bind.set("root", "Super+Shift+h", layouts.inc_master_ammount, "Layout: increase the number of master clients") |
|
bind.set("root", "Super+Shift+l", layouts.dec_master_ammount, "Layout: decrease the number of master clients") |
|
bind.set("root", "Super+Control+h", layouts.inc_columns, "Layout: increase the number of columns") |
|
bind.set("root", "Super+Control+l", layouts.dec_columns, "Layout: decrease the number of columns") |
|
bind.set("root", "Super+space", layouts.next_layout, "Layouts: select next") |
|
bind.set("root", "Super+Shift+space", layouts.prev_layout, "Layouts: select previous") |
|
|
|
-- Clients |
|
local clients = require("modules.utils.clients") |
|
local awful = require("awful") |
|
bind.set("root", "Super+Tab", clients.focus_last_client, "Clients: go back") |
|
bind.set("root", "Super+j", clients.focus_next_client, "Clients: focus next client") |
|
bind.set("root", "Super+k", clients.focus_prev_client, "Clients: focus prev client") |
|
bind.set("root", "Super+Shift+j", clients.swap_prev_client, "Clients: swap with next client by index") |
|
bind.set("root", "Super+Shift+k", clients.swap_next_client, "Clients: swap with previous client by index") |
|
bind.set("root", "Super+u", awful.client.urgent.jumpto, "Clients: jump to urgent client") |
|
bind.set("root", "Super+Control+n", clients.restore_minimized, "Client: restore minimized") |
|
bind.set("client", "Mod4+f", clients.toggle_fullscreen, "Client: toggle fullscreen") |
|
bind.set("client", "Mod4+Shift+c", clients.kill, "Client: close") |
|
bind.set("client", "Mod4+Control+space", awful.client.floating.toggle, "Client: toggle floating") |
|
bind.set("client", "Mod4+Control+Return", clients.move_to_master, "Client: move to master") |
|
bind.set("client", "Mod4+o", clients.move_to_screen, "Client: move to screen") |
|
bind.set("client", "Super+t", clients.toggle_ontop, "Client: toggle keep on top") |
|
bind.set("client", "Mod4+n", clients.toggle_minimize, "Client: minimize") |
|
bind.set("client", "Mod4+m", clients.toggle_maximize, "Client: (un)maximize") |
|
bind.set("client", "Super+Control+m", clients.toggle_maximize_vertical, "Client: (un)maximize vertically") |
|
bind.set("client", "Mod4+Shift+m", clients.toggle_maximize_horizontal, "Client: (un)maximize horizontally") |
|
bind.set("client", "LMB", clients.raise_through, "Client: raise client") |
|
bind.set("client", "Super+LMB", clients.mouse_move_client, "Client: move client") |
|
bind.set("client", "Super+RMB", clients.mouse_resize_client, "Client: resize client") |
|
bind.set("client_icon", "LMB", clients.raise_through) |
|
bind.set("client_icon", "RMB", clients.client_menu, "Client: (on titlebar icon) client menu") |
|
bind.set("client_titlebar", "LMB", clients.mouse_move_client, "Client: (on titlebar) move client") |
|
bind.set("client_titlebar", "RMB", clients.mouse_resize_client, "Client: (on titlebar) resize client") |
|
|
|
-- Machi |
|
local machi = require("modules.layout-machi") |
|
bind.set("root", "Super+;", machi.default_editor.start_interactive, "Layout: machi interactive configuration") |
|
bind.set("root", "Super+:", function() machi.switcher.start(client.focus) end, "Layout: machi interactive clients management") |
|
|
|
-- Tags |
|
local awful = require("awful") |
|
bind.set("root", "MWU", awful.tag.viewnext, "Tag: next tag") |
|
bind.set("root", "MWD", awful.tag.viewprev, "Tag: previous tag ") |
|
bind.set("root", "Super+Left", awful.tag.viewprev, "Tag: view previous") |
|
bind.set("root", "Super+Right", awful.tag.viewnext, "Tag: view next") |
|
bind.set("root", "Super+Escape", awful.tag.history.restore, "Tag: go back") |
|
for i = 1, 9 do |
|
bind.set("root", "Super+#"..i+9, bind.bind(tags.view_tag, i), "Tag: view tag #"..i) |
|
bind.set("root", "Super+Control+#"..i+9, bind.bind(tags.toggle_tag, i), "Tag: toggle tag #"..i) |
|
bind.set("root", "Super+Shift+#"..i+9, bind.bind(tags.move_focused_client_to, i), "Tag: move focused client to tag #"..i) |
|
bind.set("root", "Super+Control+Shift+#"..i+9, bind.bind(tags.toggle_focused_client_on, i), "Tag: toggle focused client on tag #"..i) |
|
end |
|
|
|
root.keys(bind.get("root", "key")) |
|
root.buttons(bind.get("root", "button")) |
Great work!