wrap around right for focus cycling
Dana Jansens danakj@orodu.net
1 files changed,
3 insertions(+),
2 deletions(-)
jump to
M
scripts/focus.py
→
scripts/focus.py
@@ -59,10 +59,11 @@ r.reverse()
for i in r: if found: target = i + found = 2 break elif screen.client(i).window() == client_win: found = 1 - if not found: # wraparound + if found == 1: # wraparound if forward: target = 0 else: target = count - 1@@ -80,7 +81,7 @@ if forward:
t += num if t >= count: t -= count else: - t -= 1 + t -= num if t < 0: t += count if t == target: return # nothing to focus