diff options
Diffstat (limited to '.config/awesome/switcher.lua')
-rw-r--r-- | .config/awesome/switcher.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/.config/awesome/switcher.lua b/.config/awesome/switcher.lua index 6066879..c15f7ab 100644 --- a/.config/awesome/switcher.lua +++ b/.config/awesome/switcher.lua @@ -56,7 +56,7 @@ local function switcher_next(rel) if not cli then if rel > 0 then - state.switcher_idx = rel + state.switcher_idx = rel - 1 elseif rel < 0 then local i = 0 local c = awful.client.focus.history.get(capi.mouse.screen, 0) @@ -64,15 +64,19 @@ local function switcher_next(rel) i = i + 1 c = awful.client.focus.history.get(capi.mouse.screen, i) end - state.switcher_idx = i - rel + state.switcher_idx = i + rel end - cli = awful.client.focus.history.get(capi.mouse.screen, switcher_idx) + cli = awful.client.focus.history.get(capi.mouse.screen, state.switcher_idx) end cli:raise() - awful.client.mark(cli) + if awful.client.ismarked(cli) then + cli:emit_signal("marked") + else + awful.client.mark(cli) + end end local function switcher_end() |