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.
2020-07-02 17:13:48 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
rf="$1" # history count record file
|
|
|
|
cf="$1" # all choices file
|
|
|
|
|
2022-12-13 14:12:29 -06:00
|
|
|
touch "$LAUNCHER_HISTORY_FILE"
|
2020-07-02 17:13:48 -05:00
|
|
|
app="$(
|
|
|
|
< "$rf" awk 'NF{NF--};1' | cat - "$cf" | \
|
|
|
|
sort | uniq -c | sort -nr | \
|
|
|
|
sd '^\s+' '' | \
|
|
|
|
cut -d' ' -f2- | \
|
2022-12-13 14:12:29 -06:00
|
|
|
sk
|
2020-07-02 17:13:48 -05:00
|
|
|
)"
|
|
|
|
echo "$app $(date +%s)" >> "$LAUNCHER_HISTORY_FILE"
|
|
|
|
echo "$app"
|