From 878aa4625eb2c86498c22ed84cbc60970d709251 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Wed, 20 Mar 2024 22:12:19 +0100 Subject: [PATCH] Add clauncher-update --- clauncher | 2 +- clauncher-update | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 clauncher-update diff --git a/clauncher b/clauncher index 6725add..fbc64c7 100755 --- a/clauncher +++ b/clauncher @@ -7,7 +7,7 @@ cache="$cacheDir/launcher_opts" historyFile="$cacheDir/launcher_opts_history" if ! [ -f "$cache" ]; then - "$configDir"/capture.zsh 'open -a' | sed -e 's/.*-a//' -e "s/\\\//g" -e "s/\r//g" | grep -v -f "$configDir"/.open_ignore | (cat "$configDir"/.open_add; cat -) | sort -u > "$cache" + source $configDir/clauncher-update fi gawk -v histfile=$historyFile ' diff --git a/clauncher-update b/clauncher-update new file mode 100755 index 0000000..01ae3df --- /dev/null +++ b/clauncher-update @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +cacheDir=${XDG_CACHE_HOME:-"$HOME/.cache"} +configDir=${XDG_CONFIG_HOME:-"$HOME/.config"}/clauncher + +cache="$cacheDir/launcher_opts" + +"$configDir"/capture.zsh 'open -a' | sed -e 's/.*-a//' -e "s/\\\//g" -e "s/\r//g" | grep -v -f "$configDir"/.open_ignore | (cat "$configDir"/.open_add; cat -) | sort -u > "$cache" +