mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 19:22:32 +00:00
Document ALL the keys
This commit is contained in:
parent
79d28db32a
commit
b712238491
123
rc.lua.template
123
rc.lua.template
|
@ -211,11 +211,12 @@ root.buttons(awful.util.table.join(
|
||||||
globalkeys = awful.util.table.join(
|
globalkeys = awful.util.table.join(
|
||||||
-- Take a screenshot
|
-- Take a screenshot
|
||||||
-- https://github.com/lcpz/dots/blob/master/bin/screenshot
|
-- https://github.com/lcpz/dots/blob/master/bin/screenshot
|
||||||
awful.key({ altkey }, "p", function() os.execute("screenshot") end),
|
awful.key({ altkey }, "p", function() os.execute("screenshot") end,
|
||||||
|
{description = "take a screenshot", group = "hotkeys"}),
|
||||||
|
|
||||||
-- Hotkeys
|
-- Hotkeys
|
||||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||||
{description="show help", group="awesome"}),
|
{description = "show help", group="awesome"}),
|
||||||
-- Tag browsing
|
-- Tag browsing
|
||||||
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
||||||
{description = "view previous", group = "tag"}),
|
{description = "view previous", group = "tag"}),
|
||||||
|
@ -249,22 +250,26 @@ globalkeys = awful.util.table.join(
|
||||||
function()
|
function()
|
||||||
awful.client.focus.bydirection("down")
|
awful.client.focus.bydirection("down")
|
||||||
if client.focus then client.focus:raise() end
|
if client.focus then client.focus:raise() end
|
||||||
end),
|
end,
|
||||||
|
{description = "focus down", group = "client"}),
|
||||||
awful.key({ modkey }, "k",
|
awful.key({ modkey }, "k",
|
||||||
function()
|
function()
|
||||||
awful.client.focus.bydirection("up")
|
awful.client.focus.bydirection("up")
|
||||||
if client.focus then client.focus:raise() end
|
if client.focus then client.focus:raise() end
|
||||||
end),
|
end,
|
||||||
|
{description = "focus up", group = "client"}),
|
||||||
awful.key({ modkey }, "h",
|
awful.key({ modkey }, "h",
|
||||||
function()
|
function()
|
||||||
awful.client.focus.bydirection("left")
|
awful.client.focus.bydirection("left")
|
||||||
if client.focus then client.focus:raise() end
|
if client.focus then client.focus:raise() end
|
||||||
end),
|
end,
|
||||||
|
{description = "focus left", group = "client"}),
|
||||||
awful.key({ modkey }, "l",
|
awful.key({ modkey }, "l",
|
||||||
function()
|
function()
|
||||||
awful.client.focus.bydirection("right")
|
awful.client.focus.bydirection("right")
|
||||||
if client.focus then client.focus:raise() end
|
if client.focus then client.focus:raise() end
|
||||||
end),
|
end,
|
||||||
|
{description = "focus right", group = "client"}),
|
||||||
awful.key({ modkey, }, "w", function () awful.util.mymainmenu:show() end,
|
awful.key({ modkey, }, "w", function () awful.util.mymainmenu:show() end,
|
||||||
{description = "show main menu", group = "awesome"}),
|
{description = "show main menu", group = "awesome"}),
|
||||||
|
|
||||||
|
@ -296,18 +301,26 @@ globalkeys = awful.util.table.join(
|
||||||
s.mybottomwibox.visible = not s.mybottomwibox.visible
|
s.mybottomwibox.visible = not s.mybottomwibox.visible
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
|
{description = "toggle wibox", group = "awesome"}),
|
||||||
|
|
||||||
-- On the fly useless gaps change
|
-- On the fly useless gaps change
|
||||||
awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end),
|
awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end,
|
||||||
awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end),
|
{description = "increment useless gaps", group = "tag"}),
|
||||||
|
awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end,
|
||||||
|
{description = "decrement useless gaps", group = "tag"}),
|
||||||
|
|
||||||
-- Dynamic tagging
|
-- Dynamic tagging
|
||||||
awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end),
|
awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end,
|
||||||
awful.key({ modkey, "Shift" }, "r", function () lain.util.rename_tag() end),
|
{description = "add new tag", group = "tag"}),
|
||||||
awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(-1) end), -- move to previous tag
|
awful.key({ modkey, "Shift" }, "r", function () lain.util.rename_tag() end,
|
||||||
awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(1) end), -- move to next tag
|
{description = "rename tag", group = "tag"}),
|
||||||
awful.key({ modkey, "Shift" }, "d", function () lain.util.delete_tag() end),
|
awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(-1) end,
|
||||||
|
{description = "move tag to the left", group = "tag"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(1) end,
|
||||||
|
{description = "move tag to the right", group = "tag"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "d", function () lain.util.delete_tag() end,
|
||||||
|
{description = "delete tag", group = "tag"}),
|
||||||
|
|
||||||
-- Standard program
|
-- Standard program
|
||||||
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
||||||
|
@ -346,65 +359,80 @@ globalkeys = awful.util.table.join(
|
||||||
{description = "restore minimized", group = "client"}),
|
{description = "restore minimized", group = "client"}),
|
||||||
|
|
||||||
-- Dropdown application
|
-- Dropdown application
|
||||||
awful.key({ modkey, }, "z", function () awful.screen.focused().quake:toggle() end),
|
awful.key({ modkey, }, "z", function () awful.screen.focused().quake:toggle() end,
|
||||||
|
{description = "dropdown application", group = "launcher"}),
|
||||||
|
|
||||||
-- Widgets popups
|
-- Widgets popups
|
||||||
awful.key({ altkey, }, "c", function () lain.widget.calendar.show(7) end),
|
awful.key({ altkey, }, "c", function () lain.widget.calendar.show(7) end,
|
||||||
awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end),
|
{description = "show calendar", group = "widgets"}),
|
||||||
awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end),
|
awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end,
|
||||||
|
{description = "show filesystem", group = "widgets"}),
|
||||||
|
awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end,
|
||||||
|
{description = "show weather", group = "widgets"}),
|
||||||
|
|
||||||
-- Brightness
|
-- Brightness
|
||||||
awful.key({ }, "XF86MonBrightnessUp", function () awful.util.spawn("xbacklight -inc 10") end),
|
awful.key({ }, "XF86MonBrightnessUp", function () awful.util.spawn("xbacklight -inc 10") end,
|
||||||
awful.key({ }, "XF86MonBrightnessDown", function () awful.util.spawn("xbacklight -dec 10") end),
|
{description = "+10%", group = "hotkeys"}),
|
||||||
|
awful.key({ }, "XF86MonBrightnessDown", function () awful.util.spawn("xbacklight -dec 10") end,
|
||||||
|
{description = "-10%", group = "hotkeys"}),
|
||||||
|
|
||||||
-- ALSA volume control
|
-- ALSA volume control
|
||||||
awful.key({ altkey }, "Up",
|
awful.key({ altkey }, "Up",
|
||||||
function ()
|
function ()
|
||||||
os.execute(string.format("amixer -q set %s 1%%+", beautiful.volume.channel))
|
os.execute(string.format("amixer -q set %s 1%%+", beautiful.volume.channel))
|
||||||
beautiful.volume.update()
|
beautiful.volume.update()
|
||||||
end),
|
end,
|
||||||
|
{description = "volume up", group = "hotkeys"}),
|
||||||
awful.key({ altkey }, "Down",
|
awful.key({ altkey }, "Down",
|
||||||
function ()
|
function ()
|
||||||
os.execute(string.format("amixer -q set %s 1%%-", beautiful.volume.channel))
|
os.execute(string.format("amixer -q set %s 1%%-", beautiful.volume.channel))
|
||||||
beautiful.volume.update()
|
beautiful.volume.update()
|
||||||
end),
|
end,
|
||||||
|
{description = "volume down", group = "hotkeys"}),
|
||||||
awful.key({ altkey }, "m",
|
awful.key({ altkey }, "m",
|
||||||
function ()
|
function ()
|
||||||
os.execute(string.format("amixer -q set %s toggle", beautiful.volume.togglechannel or beautiful.volume.channel))
|
os.execute(string.format("amixer -q set %s toggle", beautiful.volume.togglechannel or beautiful.volume.channel))
|
||||||
beautiful.volume.update()
|
beautiful.volume.update()
|
||||||
end),
|
end,
|
||||||
|
{description = "toggle mute", group = "hotkeys"}),
|
||||||
awful.key({ altkey, "Control" }, "m",
|
awful.key({ altkey, "Control" }, "m",
|
||||||
function ()
|
function ()
|
||||||
os.execute(string.format("amixer -q set %s 100%%", beautiful.volume.channel))
|
os.execute(string.format("amixer -q set %s 100%%", beautiful.volume.channel))
|
||||||
beautiful.volume.update()
|
beautiful.volume.update()
|
||||||
end),
|
end,
|
||||||
|
{description = "volume 100%", group = "hotkeys"}),
|
||||||
awful.key({ altkey, "Control" }, "0",
|
awful.key({ altkey, "Control" }, "0",
|
||||||
function ()
|
function ()
|
||||||
os.execute(string.format("amixer -q set %s 0%%", beautiful.volume.channel))
|
os.execute(string.format("amixer -q set %s 0%%", beautiful.volume.channel))
|
||||||
beautiful.volume.update()
|
beautiful.volume.update()
|
||||||
end),
|
end,
|
||||||
|
{description = "volume 0%", group = "hotkeys"}),
|
||||||
|
|
||||||
-- MPD control
|
-- MPD control
|
||||||
awful.key({ altkey, "Control" }, "Up",
|
awful.key({ altkey, "Control" }, "Up",
|
||||||
function ()
|
function ()
|
||||||
awful.spawn.with_shell("mpc toggle")
|
awful.spawn.with_shell("mpc toggle")
|
||||||
beautiful.mpd.update()
|
beautiful.mpd.update()
|
||||||
end),
|
end,
|
||||||
|
{description = "mpc toggle", group = "widgets"}),
|
||||||
awful.key({ altkey, "Control" }, "Down",
|
awful.key({ altkey, "Control" }, "Down",
|
||||||
function ()
|
function ()
|
||||||
awful.spawn.with_shell("mpc stop")
|
awful.spawn.with_shell("mpc stop")
|
||||||
beautiful.mpd.update()
|
beautiful.mpd.update()
|
||||||
end),
|
end,
|
||||||
|
{description = "mpc stop", group = "widgets"}),
|
||||||
awful.key({ altkey, "Control" }, "Left",
|
awful.key({ altkey, "Control" }, "Left",
|
||||||
function ()
|
function ()
|
||||||
awful.spawn.with_shell("mpc prev")
|
awful.spawn.with_shell("mpc prev")
|
||||||
beautiful.mpd.update()
|
beautiful.mpd.update()
|
||||||
end),
|
end,
|
||||||
|
{description = "mpc prev", group = "widgets"}),
|
||||||
awful.key({ altkey, "Control" }, "Right",
|
awful.key({ altkey, "Control" }, "Right",
|
||||||
function ()
|
function ()
|
||||||
awful.spawn.with_shell("mpc next")
|
awful.spawn.with_shell("mpc next")
|
||||||
beautiful.mpd.update()
|
beautiful.mpd.update()
|
||||||
end),
|
end,
|
||||||
|
{description = "mpc next", group = "widgets"}),
|
||||||
awful.key({ altkey }, "0",
|
awful.key({ altkey }, "0",
|
||||||
function ()
|
function ()
|
||||||
local common = { text = "MPD widget ", position = "top_middle", timeout = 2 }
|
local common = { text = "MPD widget ", position = "top_middle", timeout = 2 }
|
||||||
|
@ -416,16 +444,21 @@ globalkeys = awful.util.table.join(
|
||||||
common.text = common.text .. lain.util.markup.bold("ON")
|
common.text = common.text .. lain.util.markup.bold("ON")
|
||||||
end
|
end
|
||||||
naughty.notify(common)
|
naughty.notify(common)
|
||||||
end),
|
end,
|
||||||
|
{description = "mpc on/off", group = "widgets"}),
|
||||||
|
|
||||||
-- Copy primary to clipboard (terminals to gtk)
|
-- Copy primary to clipboard (terminals to gtk)
|
||||||
awful.key({ modkey }, "c", function () awful.spawn("xsel | xsel -i -b") end),
|
awful.key({ modkey }, "c", function () awful.spawn("xsel | xsel -i -b") end,
|
||||||
|
{description = "copy terminal to gtk", group = "hotkeys"}),
|
||||||
-- Copy clipboard to primary (gtk to terminals)
|
-- Copy clipboard to primary (gtk to terminals)
|
||||||
awful.key({ modkey }, "v", function () awful.spawn("xsel -b | xsel") end),
|
awful.key({ modkey }, "v", function () awful.spawn("xsel -b | xsel") end,
|
||||||
|
{description = "copy gtk to terminal", group = "hotkeys"}),
|
||||||
|
|
||||||
-- User programs
|
-- User programs
|
||||||
awful.key({ modkey }, "q", function () awful.spawn(browser) end),
|
awful.key({ modkey }, "q", function () awful.spawn(browser) end,
|
||||||
awful.key({ modkey }, "a", function () awful.spawn(guieditor) end),
|
{description = "run browser", group = "launcher"}),
|
||||||
|
awful.key({ modkey }, "a", function () awful.spawn(guieditor) end,
|
||||||
|
{description = "run gui editor", group = "launcher"}),
|
||||||
|
|
||||||
-- Default
|
-- Default
|
||||||
--[[ Menubar
|
--[[ Menubar
|
||||||
|
@ -436,7 +469,8 @@ globalkeys = awful.util.table.join(
|
||||||
awful.key({ modkey }, "x", function ()
|
awful.key({ modkey }, "x", function ()
|
||||||
awful.spawn(string.format("dmenu_run -i -fn 'Monospace' -nb '%s' -nf '%s' -sb '%s' -sf '%s'",
|
awful.spawn(string.format("dmenu_run -i -fn 'Monospace' -nb '%s' -nf '%s' -sb '%s' -sf '%s'",
|
||||||
beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus))
|
beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus))
|
||||||
end)
|
end,
|
||||||
|
{description = "show dmenu", group = "launcher"})
|
||||||
--]]
|
--]]
|
||||||
-- Prompt
|
-- Prompt
|
||||||
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
||||||
|
@ -456,7 +490,8 @@ globalkeys = awful.util.table.join(
|
||||||
)
|
)
|
||||||
|
|
||||||
clientkeys = awful.util.table.join(
|
clientkeys = awful.util.table.join(
|
||||||
awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client ),
|
awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client,
|
||||||
|
{description = "magnify client", group = "client"}),
|
||||||
awful.key({ modkey, }, "f",
|
awful.key({ modkey, }, "f",
|
||||||
function (c)
|
function (c)
|
||||||
c.fullscreen = not c.fullscreen
|
c.fullscreen = not c.fullscreen
|
||||||
|
@ -492,6 +527,14 @@ clientkeys = awful.util.table.join(
|
||||||
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
||||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
-- This should map on the top row of your keyboard, usually 1 to 9.
|
||||||
for i = 1, 9 do
|
for i = 1, 9 do
|
||||||
|
-- Hack to only show tags 1 and 9 in the shortcut window (mod+s)
|
||||||
|
local descr_view, descr_toggle, descr_move, descr_toggle_focus
|
||||||
|
if i == 1 or i == 9 then
|
||||||
|
descr_view = {description = "view tag #", group = "tag"}
|
||||||
|
descr_toggle = {description = "toggle tag #", group = "tag"}
|
||||||
|
descr_move = {description = "move focused client to tag #", group = "tag"}
|
||||||
|
descr_toggle_focus = {description = "toggle focused client on tag #", group = "tag"}
|
||||||
|
end
|
||||||
globalkeys = awful.util.table.join(globalkeys,
|
globalkeys = awful.util.table.join(globalkeys,
|
||||||
-- View tag only.
|
-- View tag only.
|
||||||
awful.key({ modkey }, "#" .. i + 9,
|
awful.key({ modkey }, "#" .. i + 9,
|
||||||
|
@ -502,7 +545,7 @@ for i = 1, 9 do
|
||||||
tag:view_only()
|
tag:view_only()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{description = "view tag #"..i, group = "tag"}),
|
descr_view),
|
||||||
-- Toggle tag display.
|
-- Toggle tag display.
|
||||||
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
|
@ -512,7 +555,7 @@ for i = 1, 9 do
|
||||||
awful.tag.viewtoggle(tag)
|
awful.tag.viewtoggle(tag)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{description = "toggle tag #" .. i, group = "tag"}),
|
descr_toggle),
|
||||||
-- Move client to tag.
|
-- Move client to tag.
|
||||||
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
|
@ -523,7 +566,7 @@ for i = 1, 9 do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{description = "move focused client to tag #"..i, group = "tag"}),
|
descr_move),
|
||||||
-- Toggle tag on focused client.
|
-- Toggle tag on focused client.
|
||||||
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
|
@ -534,7 +577,7 @@ for i = 1, 9 do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{description = "toggle focused client on tag #" .. i, group = "tag"})
|
descr_toggle_focus)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue