diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2013-06-06 17:35:45 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2013-06-06 17:35:45 +0200 |
commit | 93ca7a4258e83996c0075ff5976658a12ffb6e02 (patch) | |
tree | 393833395c7c3237cd162fbbbad48c8cf5b5bc49 /.i3/scripts/new_workspace.py | |
parent | 346139a617b044329efcc0a17fdbdf11cf31971e (diff) | |
download | dotfiles-93ca7a4258e83996c0075ff5976658a12ffb6e02.tar.gz dotfiles-93ca7a4258e83996c0075ff5976658a12ffb6e02.tar.bz2 dotfiles-93ca7a4258e83996c0075ff5976658a12ffb6e02.zip |
i3: unify scripts into one
Diffstat (limited to '')
-rwxr-xr-x | .i3/scripts/new_workspace.py | 23 |
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)) |