From 93ca7a4258e83996c0075ff5976658a12ffb6e02 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 6 Jun 2013 17:35:45 +0200 Subject: i3: unify scripts into one --- .i3/scripts/new_workspace.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100755 .i3/scripts/new_workspace.py (limited to '.i3/scripts/new_workspace.py') 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)) -- cgit v1.2.3-70-g09d2