summaryrefslogtreecommitdiff
path: root/.i3/scripts/new_workspace.py
diff options
context:
space:
mode:
Diffstat (limited to '.i3/scripts/new_workspace.py')
-rwxr-xr-x.i3/scripts/new_workspace.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/.i3/scripts/new_workspace.py b/.i3/scripts/new_workspace.py
deleted file mode 100755
index cfb73d1..0000000
--- a/.i3/scripts/new_workspace.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/python
-
-#
-# Switch to a new workspace, which gets the first free numbe >= 0
-#
-
-import sys
-from os.path import realpath, dirname
-
-cwd = realpath(dirname(__file__))
-sys.path.insert(1, cwd)
-
-import i3
-
-nums = (w["num"] for w in i3.get_workspaces())
-nums = filter(lambda n: n is not None and n >= 0, nums)
-
-for i,n in enumerate(sorted(nums)):
- if i != n:
- i3.workspace(str(i))
- break
-else:
- i3.workspace(str(i+1))