Skip to content

Commit

Permalink
feat(config: keys: get_resize_function): make exception for tileleft …
Browse files Browse the repository at this point in the history
…and tilebottom and swap/rotate hotkeys "orientation"
  • Loading branch information
actionless committed Oct 31, 2024
1 parent fa1977a commit 5055582
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions config/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -950,21 +950,38 @@ function keys.init(awesome_context)
end
c:geometry(g)
else
if direction == "down" then
local s = c.screen
local layout = awful.layout.getname(awful.layout.get(s))
--nlog(layout)
local sign = 1
local new_direction = direction
if layout == "tileleft" then
sign = -1
elseif layout == "tilebottom" then
if direction == "down" then
new_direction = "right"
elseif direction == "up" then
new_direction = "left"
elseif direction == "left" then
new_direction = "up"
elseif direction == "right" then
new_direction = "down"
end
end
--nlog(new_direction)
if new_direction == "down" then
awful.client.incwfact(-0.05)
elseif direction == "up" then
elseif new_direction == "up" then
awful.client.incwfact( 0.05)
elseif direction == "left" then
awful.tag.incmwfact(-0.05)
elseif direction == "right" then
awful.tag.incmwfact( 0.05)
elseif direction == "reset_clients" then
local s = c.screen
elseif new_direction == "left" then
awful.tag.incmwfact(-0.05 * sign)
elseif new_direction == "right" then
awful.tag.incmwfact( 0.05 * sign)
elseif new_direction == "reset_clients" then
local t = s.selected_tag
t.windowfact = {}
awful.layout.arrange(s)
elseif direction == "reset" then
local s = c.screen
elseif new_direction == "reset" then
local t = s.selected_tag
t.master_width_factor = 0.5
t.windowfact = {}
Expand Down

0 comments on commit 5055582

Please sign in to comment.