summaryrefslogtreecommitdiff
path: root/dmenu
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-11 09:18:59 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-11 09:18:59 +0900
commiteabad9edacc6577f6369e2fbff060eaf410cc36c (patch)
tree8574dc522839ba1036984aefa1f953dcc2700403 /dmenu
parentc69bf6f4f16ef760f5e3dbfc63b5ac09d4684aa1 (diff)
modified dmenu/dmenu_run, modified dwm/config.def.h
Diffstat (limited to 'dmenu')
-rwxr-xr-xdmenu/dmenu_run32
1 files changed, 1 insertions, 31 deletions
diff --git a/dmenu/dmenu_run b/dmenu/dmenu_run
index c22468b..834ede5 100755
--- a/dmenu/dmenu_run
+++ b/dmenu/dmenu_run
@@ -1,32 +1,2 @@
#!/bin/sh
-# end a command with ; to run in a terminal
-
-term="${TERMINAL:-st} -e"
-cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
-cache="$cachedir/dmenu_recent"
-
-touch "$cache"
-
-# cleaning
-sort -u "$cache" | while read cmd; do
- command -v "${cmd%;}" >/dev/null 2>&1 || sed -i "/$cmd/d" "$cache"
-done
-
-most_used=$(sort "$cache" | uniq -c | sort -rh | sed 's/\s*//' | cut -d' ' -f2-)
-run=$( (
- echo "$most_used"
- dmenu_path | grep -vxF "$most_used"
-) | dmenu -i "$@")
-
-[ -z "$run" ] && exit 1
-
-(
- echo "$run"
- head -n 99 "$cache"
-) >"$cache.$$"
-mv "$cache.$$" "$cache"
-
-case "$run" in
-*\;) exec $(echo $term ${run%;}) ;;
-*) exec "$run" ;;
-esac
+dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} &