style: shortcut button and modifier on same line
This commit is contained in:
parent
c3b9f6e625
commit
ed4e76f691
@ -80,15 +80,13 @@ mytextclock = wibox.widget.textclock()
|
|||||||
-- Create a wibox for each screen and add it
|
-- Create a wibox for each screen and add it
|
||||||
local taglist_buttons = gears.table.join(
|
local taglist_buttons = gears.table.join(
|
||||||
awful.button(
|
awful.button(
|
||||||
{},
|
{}, 1,
|
||||||
1,
|
|
||||||
function(t)
|
function(t)
|
||||||
t:view_only()
|
t:view_only()
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
awful.button(
|
awful.button(
|
||||||
{modkey},
|
{modkey}, 1,
|
||||||
1,
|
|
||||||
function(t)
|
function(t)
|
||||||
if client.focus then
|
if client.focus then
|
||||||
client.focus:move_to_tag(t)
|
client.focus:move_to_tag(t)
|
||||||
@ -99,16 +97,14 @@ local taglist_buttons = gears.table.join(
|
|||||||
|
|
||||||
local tasklist_buttons = gears.table.join(
|
local tasklist_buttons = gears.table.join(
|
||||||
awful.button(
|
awful.button(
|
||||||
{},
|
{}, 1,
|
||||||
1,
|
|
||||||
function(c)
|
function(c)
|
||||||
c.minimized = false
|
c.minimized = false
|
||||||
c:emit_signal("request::activate", "tasklist", {raise = true})
|
c:emit_signal("request::activate", "tasklist", {raise = true})
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
awful.button(
|
awful.button(
|
||||||
{},
|
{}, 3,
|
||||||
3,
|
|
||||||
function()
|
function()
|
||||||
awful.menu.client_list({theme = {width = 250}})
|
awful.menu.client_list({theme = {width = 250}})
|
||||||
end
|
end
|
||||||
@ -181,22 +177,19 @@ awful.screen.connect_for_each_screen(
|
|||||||
-- {{{ Key bindings
|
-- {{{ Key bindings
|
||||||
globalkeys = gears.table.join(
|
globalkeys = gears.table.join(
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "s",
|
||||||
"s",
|
|
||||||
hotkeys_popup.show_help,
|
hotkeys_popup.show_help,
|
||||||
{description = "show help", group = "awesome"}
|
{description = "show help", group = "awesome"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "j",
|
||||||
"j",
|
|
||||||
function()
|
function()
|
||||||
awful.client.focus.byidx(1)
|
awful.client.focus.byidx(1)
|
||||||
end,
|
end,
|
||||||
{description = "focus next by index", group = "client"}
|
{description = "focus next by index", group = "client"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "k",
|
||||||
"k",
|
|
||||||
function()
|
function()
|
||||||
awful.client.focus.byidx(-1)
|
awful.client.focus.byidx(-1)
|
||||||
end,
|
end,
|
||||||
@ -204,99 +197,86 @@ globalkeys = gears.table.join(
|
|||||||
),
|
),
|
||||||
-- Layout manipulation
|
-- Layout manipulation
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Shift"},
|
{modkey, "Shift"}, "j",
|
||||||
"j",
|
|
||||||
function()
|
function()
|
||||||
awful.client.swap.byidx(1)
|
awful.client.swap.byidx(1)
|
||||||
end,
|
end,
|
||||||
{description = "swap with next client by index", group = "client"}
|
{description = "swap with next client by index", group = "client"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Shift"},
|
{modkey, "Shift"}, "k",
|
||||||
"k",
|
|
||||||
function()
|
function()
|
||||||
awful.client.swap.byidx(-1)
|
awful.client.swap.byidx(-1)
|
||||||
end,
|
end,
|
||||||
{description = "swap with previous client by index", group = "client"}
|
{description = "swap with previous client by index", group = "client"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Control"},
|
{modkey, "Control"}, "j",
|
||||||
"j",
|
|
||||||
function()
|
function()
|
||||||
awful.screen.focus_relative(1)
|
awful.screen.focus_relative(1)
|
||||||
end,
|
end,
|
||||||
{description = "focus the next screen", group = "screen"}
|
{description = "focus the next screen", group = "screen"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Control"},
|
{modkey, "Control"}, "k",
|
||||||
"k",
|
|
||||||
function()
|
function()
|
||||||
awful.screen.focus_relative(-1)
|
awful.screen.focus_relative(-1)
|
||||||
end,
|
end,
|
||||||
{description = "focus the previous screen", group = "screen"}
|
{description = "focus the previous screen", group = "screen"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "u",
|
||||||
"u",
|
|
||||||
awful.client.urgent.jumpto,
|
awful.client.urgent.jumpto,
|
||||||
{description = "jump to urgent client", group = "client"}
|
{description = "jump to urgent client", group = "client"}
|
||||||
),
|
),
|
||||||
-- Standard program
|
-- Standard program
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "Return",
|
||||||
"Return",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn(terminal, {tag = mouse.screen.selected_tag})
|
awful.spawn(terminal, {tag = mouse.screen.selected_tag})
|
||||||
end,
|
end,
|
||||||
{description = "open a terminal", group = "launcher"}
|
{description = "open a terminal", group = "launcher"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "e",
|
||||||
"e",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn(files, {tag = mouse.screen.selected_tag})
|
awful.spawn(files, {tag = mouse.screen.selected_tag})
|
||||||
end,
|
end,
|
||||||
{description = "open file manager", group = "launcher"}
|
{description = "open file manager", group = "launcher"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "b",
|
||||||
"b",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn(browser, {tag = mouse.screen.selected_tag})
|
awful.spawn(browser, {tag = mouse.screen.selected_tag})
|
||||||
end,
|
end,
|
||||||
{description = "open browser", group = "launcher"}
|
{description = "open browser", group = "launcher"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "l",
|
||||||
"l",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn(lock)
|
awful.spawn(lock)
|
||||||
end,
|
end,
|
||||||
{description = "lock screen", group = "awesome"}
|
{description = "lock screen", group = "awesome"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Shift"},
|
{modkey, "Shift"}, "r",
|
||||||
"r",
|
|
||||||
awesome.restart,
|
awesome.restart,
|
||||||
{description = "reload awesome", group = "awesome"}
|
{description = "reload awesome", group = "awesome"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Shift"},
|
{modkey, "Shift"}, "q",
|
||||||
"q",
|
|
||||||
awesome.quit,
|
awesome.quit,
|
||||||
{description = "quit awesome", group = "awesome"}
|
{description = "quit awesome", group = "awesome"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "t",
|
||||||
"t",
|
|
||||||
function()
|
function()
|
||||||
awful.layout.set(awful.layout.layouts[1])
|
awful.layout.set(awful.layout.layouts[1])
|
||||||
end,
|
end,
|
||||||
{description = "set tiling layout", group = "layout"}
|
{description = "set tiling layout", group = "layout"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "m",
|
||||||
"m",
|
|
||||||
function()
|
function()
|
||||||
awful.layout.set(awful.layout.layouts[2])
|
awful.layout.set(awful.layout.layouts[2])
|
||||||
end,
|
end,
|
||||||
@ -304,8 +284,7 @@ globalkeys = gears.table.join(
|
|||||||
),
|
),
|
||||||
-- Menubar
|
-- Menubar
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "r",
|
||||||
"r",
|
|
||||||
function()
|
function()
|
||||||
menubar.show()
|
menubar.show()
|
||||||
end,
|
end,
|
||||||
@ -313,88 +292,77 @@ globalkeys = gears.table.join(
|
|||||||
),
|
),
|
||||||
-- Shortcuts
|
-- Shortcuts
|
||||||
awful.key(
|
awful.key(
|
||||||
{},
|
{}, "XF86AudioRaiseVolume",
|
||||||
"XF86AudioRaiseVolume",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("set-vol +5")
|
awful.spawn("set-vol +5")
|
||||||
end,
|
end,
|
||||||
{description = "raise volume", group = "shortcut"}
|
{description = "raise volume", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{},
|
{}, "XF86AudioLowerVolume",
|
||||||
"XF86AudioLowerVolume",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("set-vol -5")
|
awful.spawn("set-vol -5")
|
||||||
end,
|
end,
|
||||||
{description = "lower volume", group = "shortcut"}
|
{description = "lower volume", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{},
|
{}, "XF86AudioMute",
|
||||||
"XF86AudioMute",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")
|
awful.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")
|
||||||
end,
|
end,
|
||||||
{description = "mute volume", group = "shortcut"}
|
{description = "mute volume", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{"Control"},
|
{"Control"}, "XF86AudioMute",
|
||||||
"XF86AudioMute",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("pactl set-source-mute @DEFAULT_SOURCE@ toggle")
|
awful.spawn("pactl set-source-mute @DEFAULT_SOURCE@ toggle")
|
||||||
end,
|
end,
|
||||||
{description = "mute volume", group = "shortcut"}
|
{description = "mute volume", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{},
|
{}, "XF86AudioPlay",
|
||||||
"XF86AudioPlay",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("playerctl play-pause")
|
awful.spawn("playerctl play-pause")
|
||||||
end,
|
end,
|
||||||
{description = "play/pause media", group = "shortcut"}
|
{description = "play/pause media", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{},
|
{}, "XF86AudioPrev",
|
||||||
"XF86AudioPrev",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("playerctl previous")
|
awful.spawn("playerctl previous")
|
||||||
end,
|
end,
|
||||||
{description = "previous media", group = "shortcut"}
|
{description = "previous media", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{},
|
{}, "XF86AudioNext",
|
||||||
"XF86AudioNext",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("playerctl next")
|
awful.spawn("playerctl next")
|
||||||
end,
|
end,
|
||||||
{description = "next media", group = "shortcut"}
|
{description = "next media", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{},
|
{}, "XF86MonBrightnessUp",
|
||||||
"XF86MonBrightnessUp",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("set-light +10")
|
awful.spawn("set-light +10")
|
||||||
end,
|
end,
|
||||||
{description = "raise brightness", group = "shortcut"}
|
{description = "raise brightness", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{},
|
{}, "XF86MonBrightnessDown",
|
||||||
"XF86MonBrightnessDown",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("set-light -10")
|
awful.spawn("set-light -10")
|
||||||
end,
|
end,
|
||||||
{description = "lower brightness", group = "shortcut"}
|
{description = "lower brightness", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{},
|
{}, "Print",
|
||||||
"Print",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("flameshot full -c")
|
awful.spawn("flameshot full -c")
|
||||||
end,
|
end,
|
||||||
{description = "take a screenshot", group = "shortcut"}
|
{description = "take a screenshot", group = "shortcut"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{"Shift"},
|
{"Shift"}, "Print",
|
||||||
"Print",
|
|
||||||
function()
|
function()
|
||||||
awful.spawn("flameshot gui")
|
awful.spawn("flameshot gui")
|
||||||
end,
|
end,
|
||||||
@ -406,8 +374,7 @@ globalkeys = gears.table.join(
|
|||||||
clientkeys =
|
clientkeys =
|
||||||
gears.table.join(
|
gears.table.join(
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "f",
|
||||||
"f",
|
|
||||||
function(c)
|
function(c)
|
||||||
c.fullscreen = not c.fullscreen
|
c.fullscreen = not c.fullscreen
|
||||||
c:raise()
|
c:raise()
|
||||||
@ -415,22 +382,19 @@ clientkeys =
|
|||||||
{description = "toggle fullscreen", group = "client"}
|
{description = "toggle fullscreen", group = "client"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Shift"},
|
{modkey, "Shift"}, "c",
|
||||||
"c",
|
|
||||||
function(c)
|
function(c)
|
||||||
c:kill()
|
c:kill()
|
||||||
end,
|
end,
|
||||||
{description = "close", group = "client"}
|
{description = "close", group = "client"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "space",
|
||||||
"space",
|
|
||||||
awful.client.floating.toggle,
|
awful.client.floating.toggle,
|
||||||
{description = "toggle floating", group = "client"}
|
{description = "toggle floating", group = "client"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "o",
|
||||||
"o",
|
|
||||||
function(c)
|
function(c)
|
||||||
c:move_to_screen()
|
c:move_to_screen()
|
||||||
end,
|
end,
|
||||||
@ -446,8 +410,7 @@ for i = 1, 9 do
|
|||||||
globalkeys,
|
globalkeys,
|
||||||
-- View tag only.
|
-- View tag only.
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey},
|
{modkey}, "#" .. i + 9,
|
||||||
"#" .. i + 9,
|
|
||||||
function()
|
function()
|
||||||
local screen = awful.screen.focused()
|
local screen = awful.screen.focused()
|
||||||
local tag = screen.tags[i]
|
local tag = screen.tags[i]
|
||||||
@ -459,8 +422,7 @@ for i = 1, 9 do
|
|||||||
),
|
),
|
||||||
-- Move client to tag.
|
-- Move client to tag.
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Shift"},
|
{modkey, "Shift"}, "#" .. i + 9,
|
||||||
"#" .. i + 9,
|
|
||||||
function()
|
function()
|
||||||
if client.focus then
|
if client.focus then
|
||||||
local tag = client.focus.screen.tags[i]
|
local tag = client.focus.screen.tags[i]
|
||||||
@ -476,23 +438,20 @@ end
|
|||||||
|
|
||||||
clientbuttons = gears.table.join(
|
clientbuttons = gears.table.join(
|
||||||
awful.button(
|
awful.button(
|
||||||
{},
|
{}, 1,
|
||||||
1,
|
|
||||||
function(c)
|
function(c)
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
awful.button(
|
awful.button(
|
||||||
{modkey},
|
{modkey}, 1,
|
||||||
1,
|
|
||||||
function(c)
|
function(c)
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||||
awful.mouse.client.move(c)
|
awful.mouse.client.move(c)
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
awful.button(
|
awful.button(
|
||||||
{modkey},
|
{modkey}, 3,
|
||||||
3,
|
|
||||||
function(c)
|
function(c)
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||||
awful.mouse.client.resize(c)
|
awful.mouse.client.resize(c)
|
||||||
@ -595,16 +554,14 @@ client.connect_signal(
|
|||||||
local buttons =
|
local buttons =
|
||||||
gears.table.join(
|
gears.table.join(
|
||||||
awful.button(
|
awful.button(
|
||||||
{},
|
{}, 1,
|
||||||
1,
|
|
||||||
function()
|
function()
|
||||||
c:emit_signal("request::activate", "titlebar", {raise = true})
|
c:emit_signal("request::activate", "titlebar", {raise = true})
|
||||||
awful.mouse.client.move(c)
|
awful.mouse.client.move(c)
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
awful.button(
|
awful.button(
|
||||||
{},
|
{}, 3,
|
||||||
3,
|
|
||||||
function()
|
function()
|
||||||
c:emit_signal("request::activate", "titlebar", {raise = true})
|
c:emit_signal("request::activate", "titlebar", {raise = true})
|
||||||
awful.mouse.client.resize(c)
|
awful.mouse.client.resize(c)
|
||||||
|
Loading…
Reference in New Issue
Block a user