aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2020-12-22 03:47:26 -0500
committertdro <tdro@users.noreply.github.com>2020-12-23 01:28:01 -0500
commitdd3764acf8be5e1c92a52bb6c381ef3bae6c9b07 (patch)
tree3b2d29b964937ac0e2f792d44d8e23531f809b6a /.local
parent0d5afea232d5ac174e0e9ced2f8a8802b43d55f8 (diff)
downloaddotfiles-dd3764acf8be5e1c92a52bb6c381ef3bae6c9b07.tar.gz
dotfiles-dd3764acf8be5e1c92a52bb6c381ef3bae6c9b07.tar.bz2
dotfiles-dd3764acf8be5e1c92a52bb6c381ef3bae6c9b07.zip
.local/bin/scripts/events-idle: Update dmenu run history
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/dmenu_run_history9
-rwxr-xr-x.local/bin/scripts/events-idle3
2 files changed, 8 insertions, 4 deletions
diff --git a/.local/bin/dmenu_run_history b/.local/bin/dmenu_run_history
index 735ba1f..0200924 100755
--- a/.local/bin/dmenu_run_history
+++ b/.local/bin/dmenu_run_history
@@ -14,11 +14,12 @@ else
historyfile=$HOME/.dmenu_history
fi
-IFS=:
-if stest -dqr -n "$cache" $PATH; then
- stest -flx $PATH | sort -u > "$cache"
+if [ "$1" = "update" ]; then
+ IFS=:
+ stest -dqr -n "$cache" $PATH && stest -flx $PATH | sort -u > "$cache";
+ unset IFS;
+ exit;
fi
-unset IFS
awk -v histfile=$historyfile '
BEGIN {
diff --git a/.local/bin/scripts/events-idle b/.local/bin/scripts/events-idle
index d9359da..1ec1e10 100755
--- a/.local/bin/scripts/events-idle
+++ b/.local/bin/scripts/events-idle
@@ -2,3 +2,6 @@
# update file search cache
"$HOME"/.local/bin/scripts/file-search update;
+
+# update dmenu_run_history
+"$HOME"/.local/bin/dmenu_run_history update;