Skip to content

Commit

Permalink
feat(config: keys): add mod+Ctrl+Home to reset layout of secondary cl…
Browse files Browse the repository at this point in the history
…ients
  • Loading branch information
actionless committed Sep 19, 2024
1 parent a3848eb commit c6a74f5
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions config/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -958,14 +958,17 @@ function keys.init(awesome_context)
awful.tag.incmwfact(-0.05)
elseif direction == "right" then
awful.tag.incmwfact( 0.05)
elseif direction == "reset_clients" then
local s = c.screen
local t = s.selected_tag
t.windowfact = {}
awful.layout.arrange(s)
elseif direction == "reset" then
local s = c.screen
local t = s.selected_tag
if t then
t.master_width_factor = 0.5
t.windowfact = {}
awful.layout.arrange(s)
end
t.master_width_factor = 0.5
t.windowfact = {}
awful.layout.arrange(s)
end
end
end
Expand Down Expand Up @@ -1077,6 +1080,10 @@ function keys.init(awesome_context)
get_resize_function("up"),
"column size+", LAYOUT_MANIPULATION
),
bind_key({ modkey, "Control" }, "Home",
get_resize_function("reset_clients"),
"reset layout", LAYOUT_MANIPULATION
),
bind_key({ modkey, "Control" }, "End",
get_resize_function("reset"),
"reset layout", LAYOUT_MANIPULATION
Expand Down

0 comments on commit c6a74f5

Please sign in to comment.