aboutsummaryrefslogtreecommitdiff
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):
ch?id=8d653c08b750c5f28a2faa5d57187a2d2a46dca5'>gnu: LLVM, Clang, LLD: Update to 14.0.4....* gnu/packages/llvm.scm (%llvm-monorepo-hashes): Adjust for 14.0.4. (%llvm-patches): Likewise. (llvm-14, clang-14, lld-14): Update to 14.0.4. * gnu/packages/patches/clang-14.0-libc-search-path.patch: Adjust for upstream changes. Marius Bakke 2022-04-07gnu: LLVM, Clang: Add 14.0.0....* gnu/packages/llvm.scm (%llvm-monorepo-hashes, %llvm-patches, llvm-monorepo): New variables. (clang-runtime-from-llvm): Make HASH optional; use monorepo when not present. (clang-from-llvm): Likewise. (llvm-14, clang-runtime-14, clang-14, clang-toolchain-14, lld-14): New variables. (llvm-13): Inherit from LLVM-14. (lld-13): Inherit from LLD-14. (lld): Turn into alias for LLD-14. * gnu/packages/patches/clang-14.0-libc-search-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/zig.scm (zig): Change from LLD to LLD-13. Marius Bakke