diff options
author | Ivan Vilata i Balaguer <ivan@selidor.net> | 2016-09-21 11:19:20 +0200 |
---|---|---|
committer | 宋文武 <iyzsong@gmail.com> | 2016-10-01 10:56:11 +0800 |
commit | 37356e0bf8ef930fc0db7167bb2149858f0c754f (patch) | |
tree | 53f1a2d725f3a3675aad28e6b73ebdec891fb2cf /gnu/packages/patches | |
parent | c165591d471ab92f63d7e3f01ca616dff7624482 (diff) | |
download | guix-37356e0bf8ef930fc0db7167bb2149858f0c754f.tar.gz |
gnu: Add quickswitch-i3.
* gnu/packages/wm.scm (quickswitch-i3): New variable. * gnu/packages/patches/quickswitch-fix-dmenu-check.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Signed-off-by: 宋文武 <iyzsong@gmail.com>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/quickswitch-fix-dmenu-check.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/patches/quickswitch-fix-dmenu-check.patch b/gnu/packages/patches/quickswitch-fix-dmenu-check.patch new file mode 100644 index 0000000000..9c6cca47c6 --- /dev/null +++ b/gnu/packages/patches/quickswitch-fix-dmenu-check.patch @@ -0,0 +1,32 @@ +Fix check for dmenu (open file mode, dependency on which). + +See <https://github.com/proxypoke/quickswitch-for-i3/pull/24>. + +--- quickswitch-i3-2.2/quickswitch.py 2016-09-18 19:59:10.257765542 +0200 ++++ quickswitch-i3-2.2/quickswitch.py 2016-09-21 10:43:01.277577819 +0200 +@@ -24,9 +24,10 @@ + + import argparse + import subprocess +-import os + import re + ++from distutils.spawn import find_executable ++ + try: + import i3 + except ImportError: +@@ -37,11 +38,8 @@ + + def check_dmenu(): + '''Check if dmenu is available.''' +- devnull = open(os.devnull) +- retcode = subprocess.call(["which", "dmenu"], +- stdout=devnull, +- stderr=devnull) +- return True if retcode == 0 else False ++ executable = find_executable("dmenu") ++ return executable != None + + + def dmenu(options, dmenu): |