feat: shortcut for recording / add padding to maximized window
This commit is contained in:
parent
48b8031d97
commit
93dad5a043
|
@ -531,8 +531,8 @@ local globalkeys = gears.table.join(
|
||||||
{ description = "restore minimized", group = "client" }),
|
{ description = "restore minimized", group = "client" }),
|
||||||
|
|
||||||
-- Prompt
|
-- Prompt
|
||||||
awful.key({ modkey }, "r", function() awful.screen.focused().mypromptbox:run() end,
|
-- awful.key({ modkey }, "r", function() awful.screen.focused().mypromptbox:run() end,
|
||||||
{ description = "run prompt", group = "launcher" }),
|
-- { description = "run prompt", group = "launcher" }),
|
||||||
|
|
||||||
awful.key({ modkey }, "x",
|
awful.key({ modkey }, "x",
|
||||||
function()
|
function()
|
||||||
|
@ -554,6 +554,14 @@ local globalkeys = gears.table.join(
|
||||||
awful.key({ modkey }, "b", function() awful.spawn.with_shell('BOOKMARK_SEARCHER="rofi -dmenu -p bookmark" bm') end,
|
awful.key({ modkey }, "b", function() awful.spawn.with_shell('BOOKMARK_SEARCHER="rofi -dmenu -p bookmark" bm') end,
|
||||||
{ description = "bookmark", group = "launcher" }),
|
{ description = "bookmark", group = "launcher" }),
|
||||||
|
|
||||||
|
-- Recording
|
||||||
|
awful.key({ modkey }, "w",
|
||||||
|
function() awful.spawn.with_shell('sc window 25') end,
|
||||||
|
{ description = "record window", group = "launcher" }),
|
||||||
|
awful.key({ modkey }, "e",
|
||||||
|
function() awful.spawn.with_shell('sc theend') end,
|
||||||
|
{ description = "end recording", group = "launcher" }),
|
||||||
|
|
||||||
-- Dict.sh
|
-- Dict.sh
|
||||||
awful.key({ modkey }, "t",
|
awful.key({ modkey }, "t",
|
||||||
function() awful.spawn.with_shell('D_SELECTOR="rofi -dmenu -p dict.sh" d "$(xsel -o)"') end,
|
function() awful.spawn.with_shell('D_SELECTOR="rofi -dmenu -p dict.sh" d "$(xsel -o)"') end,
|
||||||
|
@ -578,8 +586,8 @@ clientkeys = gears.table.join(
|
||||||
{ description = "move to master", group = "client" }),
|
{ description = "move to master", group = "client" }),
|
||||||
--awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
--awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
||||||
--{description = "move to screen", group = "client"}),
|
--{description = "move to screen", group = "client"}),
|
||||||
--awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
|
awful.key({ modkey, "Control" }, "t", function(c) c.ontop = not c.ontop end,
|
||||||
--{description = "toggle keep on top", group = "client"}),
|
{ description = "toggle keep on top", group = "client" }),
|
||||||
awful.key({ modkey, }, "n",
|
awful.key({ modkey, }, "n",
|
||||||
function(c)
|
function(c)
|
||||||
-- The client currently has the input focus, so it cannot be
|
-- The client currently has the input focus, so it cannot be
|
||||||
|
@ -589,6 +597,17 @@ clientkeys = gears.table.join(
|
||||||
{ description = "minimize", group = "client" }),
|
{ description = "minimize", group = "client" }),
|
||||||
awful.key({ modkey, }, "m",
|
awful.key({ modkey, }, "m",
|
||||||
function(c)
|
function(c)
|
||||||
|
if c.maximized then
|
||||||
|
awful.screen.focused().padding = { top = "0", bottom = "0", left = "0", right = "0" }
|
||||||
|
else
|
||||||
|
local gap = beautiful.useless_gap * 2
|
||||||
|
awful.screen.focused().padding = {
|
||||||
|
top = gap,
|
||||||
|
bottom = gap,
|
||||||
|
left = gap,
|
||||||
|
right = gap,
|
||||||
|
}
|
||||||
|
end
|
||||||
c.maximized = not c.maximized
|
c.maximized = not c.maximized
|
||||||
c:raise()
|
c:raise()
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user