This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/launch

16 lines
350 B
Bash
Executable file

#!/usr/bin/env bash
LAUNCHER_HISTORY_FILE="$ENV_PATH/launch.log"
touch "$LAUNCHER_HISTORY_FILE"
app="$(
< "$LAUNCHER_HISTORY_FILE" \
awk 'NF{NF--};1' | \
cat - <(dmenu_path) | \
sort | uniq -c | sort -nr | \
sd -fm '^\s+' '' | \
cut -d' ' -f2- | \
grep "\S" | \
fzf
)"
echo "$app $(date +%s)" >> "$LAUNCHER_HISTORY_FILE"
echo "$app"