Skip to content

Commit

Permalink
add -v for debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Nama committed Jan 17, 2024
1 parent 4f23d4d commit 1e66b9d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions swayrst/swayrst.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@


parser = argparse.ArgumentParser(description='Restore workspaces in sway to displays and move applications to saved workspaces ')
parser.add_argument('command', choices=['save', 'load'])
parser.add_argument('profile')
parser.add_argument('-v', action='store_true')

try:
Expand Down Expand Up @@ -118,11 +120,11 @@ def get_app(tree, app):

def main():
try:
command = sys.argv[1]
command = parser.parse_args().command
except IndexError:
command = None
try:
profile = sys.argv[2]
profile = parser.parse_args().profile
except IndexError:
profile = None

Expand All @@ -142,7 +144,6 @@ def main():
tree_file = open(f'{PATH}{profile}_tree.json', 'w')
json.dump(tree.ipc_data, tree_file, indent=4)
# save workspaces
profile = sys.argv[2]
workspaces = i3.get_workspaces()
outputs = i3.get_outputs()
for i, ws in enumerate(workspaces):
Expand Down

0 comments on commit 1e66b9d

Please sign in to comment.