Skip to content

Commit

Permalink
Style related whitespace updates
Browse files Browse the repository at this point in the history
  • Loading branch information
NickHastings committed May 2, 2024
1 parent ac1a0e8 commit 5b0631d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion riverwm_utils/riverwm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def handle_focused_tags(self, _, tags):
'''Handle Event'''
self.focused_tags = tags


class Seat:
'''Represtents a wayland seat'''
def __init__(self):
Expand Down Expand Up @@ -134,6 +135,7 @@ def registry_handle_global(registry, wid, interface, version):
SEAT = Seat()
SEAT.wl_seat = registry.bind(wid, WlSeat, version)


def check_direction(direction):
'''Check validity of direction argument'''
dir_char = direction[0].lower()
Expand All @@ -142,6 +144,7 @@ def check_direction(direction):

return dir_char


def check_n_tags(n_tags):
'''Check validity of direction argument'''
i_n_tags = int(n_tags)
Expand All @@ -150,6 +153,7 @@ def check_n_tags(n_tags):

return i_n_tags


def parse_command_line() -> argparse.Namespace:
'''Read commanline arguments'''
parser = argparse.ArgumentParser(
Expand All @@ -168,6 +172,7 @@ def parse_command_line() -> argparse.Namespace:
)
return parser.parse_args()


def cycle_focused_tags():
'''Shift to next or previous tags'''
args = parse_command_line()
Expand Down Expand Up @@ -200,7 +205,7 @@ def cycle_focused_tags():
display.roundtrip()
tags = SEAT.focused_output.focused_tags
new_tags = 0
last_tag = 1 << (args.n_tags-1)
last_tag = 1 << (args.n_tags - 1)
if args.direction == 'n':
# If last tag is set => unset it and set first bit on new_tags
if (tags & last_tag) != 0:
Expand Down

0 comments on commit 5b0631d

Please sign in to comment.