aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiotr <nwg.piotr@gmail.com>2022-10-25 01:38:45 +0200
committerpiotr <nwg.piotr@gmail.com>2022-10-25 01:38:45 +0200
commitb08468fd8877f86828e54e019a110714758796d3 (patch)
tree5262a62f07962f0a1e61fd6280cbf213aef6a547
parente6d5195023d3d4944560711791e5c879303de8b0 (diff)
downloadautotiling-b08468fd8877f86828e54e019a110714758796d3.tar.gz
clean workspaces tmp file if none specified
-rw-r--r--autotiling/main.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/autotiling/main.py b/autotiling/main.py
index 51ef1d0..50868ee 100644
--- a/autotiling/main.py
+++ b/autotiling/main.py
@@ -118,8 +118,12 @@ def main():
print("autotiling is only active on workspaces:", ','.join(args.workspaces))
# For use w/ nwg-panel
+ ws_file = os.path.join(temp_dir(), "autotiling")
if args.workspaces:
- save_string(','.join(args.workspaces), os.path.join(temp_dir(), "autotiling"))
+ save_string(','.join(args.workspaces), ws_file)
+ else:
+ if os.path.isfile(ws_file):
+ os.remove(ws_file)
if not args.events:
print("No events specified", file=sys.stderr)