Создал(а) 'menu/wofi/menunote'
add wofi menu
This commit is contained in:
parent
dffce1d596
commit
7a758d26ae
20
menu/wofi/menunote
Normal file
20
menu/wofi/menunote
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
PN="$HOME/.note-store/"
|
||||
touch $PN/readme.md
|
||||
echo "# NotesMenu" > $PN/readme.md
|
||||
TR="kitty sh -c"
|
||||
ED="vim"
|
||||
|
||||
find $PN* -maxdepth 0 -type f ! -name *.md -delete
|
||||
QT=$(ls $PN | wc -l)
|
||||
|
||||
layout=$(setxkbmap -query | grep layout | rev | cut -c1-2 | rev)
|
||||
CHOISE=$(find "$PN" -iname '*.md' -type f | awk -F 'store/' '{print $NF;}' | wofi -d) || exit 1
|
||||
|
||||
if [[ "$CHOISE" != *.md ]]; then
|
||||
CHOISE="$CHOISE.md"
|
||||
fi
|
||||
CHOISE="$ED '$PN$CHOISE'"
|
||||
env TEMP=xterm-256color $TR "$CHOISE"
|
||||
|
||||
exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user