Add history file to launch-menu
This commit is contained in:
parent
4ba91b1753
commit
1b9fff48b1
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
Video Script=cheatsheet.py ~/Documents/Jeenas-Hyprland-Setup.txt
|
||||
Emoji Picker=emoji-picker.py
|
||||
Shortcuts=cheatsheet.py ~/.config/hypr/shortcuts.txt
|
||||
Screenshot full=hyprshot -m output -m DP-1
|
||||
Screenshot window=hyprshot -m window
|
||||
Screenshot region=hyprshot -m region
|
||||
Color Picker=hyprpicker --autocopy
|
||||
Hypertension=xdg-open ~/Documents/Private-Documents/High-Blood-Preassure-test-results.ods
|
||||
Emoji Picker=~/.config/hypr/scripts/emoji-picker.py
|
||||
Shortcuts=~/.config/hypr/scripts/cheatsheet.py ~/.config/hypr/shortcuts.txt
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPTS="$HOME/.config/hypr/menu.list"
|
||||
HISTORY_FILE="$HOME/.cache/tofi/launch-menu.txt"
|
||||
|
||||
# Kill existing tofi instance if running
|
||||
pkill -x tofi || {
|
||||
chosen=$(cut -d'=' -f1 "$SCRIPTS" | tofi)
|
||||
chosen=$(cut -d'=' -f1 "$SCRIPTS" | tofi --history-file="$HISTORY_FILE" --history=true --require-match=true --fuzzy-match=true)
|
||||
if [ -n "$chosen" ]; then
|
||||
script=$(awk -F= -v sel="$chosen" '$1==sel {print $2}' "$SCRIPTS")
|
||||
[ -n "$script" ] && eval "$script" &
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue