@@ -109,3 +109,5 @@ exists. | |||||
- Consider entr in dwm-start for watching files | - Consider entr in dwm-start for watching files | ||||
- make dmenu load time more like fzf? | - make dmenu load time more like fzf? | ||||
- change xdg text/plain opener to use vim and st if not in terminal | - change xdg text/plain opener to use vim and st if not in terminal | ||||
- finish editing text-opener | |||||
change prompt icon to nerd icon |
@@ -54,11 +54,11 @@ insert() { | |||||
file_path=$(realpath "$1") | file_path=$(realpath "$1") | ||||
if [ -e "$file_path" ]; then | if [ -e "$file_path" ]; then | ||||
# sed "0,\|.*\t.*\t$file_path|s|||" $XDG_CACHE_HOME/mru/$cache_name | # sed "0,\|.*\t.*\t$file_path|s|||" $XDG_CACHE_HOME/mru/$cache_name | ||||
sed -e "0,\|.*\t.*\t$file_path|s|||" -e "1s;^;$(date '+%Y-%m-%d%t%T')\t$file_path\n;" <$XDG_CACHE_HOME/mru/$cache_name \ | |||||
sed -e "0,\|.*\t.*\t$file_path|d" -e "1s;^;$(date '+%Y-%m-%d%t%T')\t$file_path\n;" <$XDG_CACHE_HOME/mru/$cache_name \ | |||||
>$XDG_CACHE_HOME/mru/$cache_name.insert$$ | >$XDG_CACHE_HOME/mru/$cache_name.insert$$ | ||||
mv $XDG_CACHE_HOME/mru/$cache_name.insert$$ $XDG_CACHE_HOME/mru/$cache_name | mv $XDG_CACHE_HOME/mru/$cache_name.insert$$ $XDG_CACHE_HOME/mru/$cache_name | ||||
else | else | ||||
sed "0,\|.*\t.*\t$file_path|s|||" <$XDG_CACHE_HOME/mru/$cache_name \ | |||||
sed "0,\|.*\t.*\t$file_path|d" <$XDG_CACHE_HOME/mru/$cache_name \ | |||||
>$XDG_CACHE_HOME/mru/$cache_name.insert$$ | >$XDG_CACHE_HOME/mru/$cache_name.insert$$ | ||||
mv $XDG_CACHE_HOME/mru/$cache_name.insert$$ $XDG_CACHE_HOME/mru/$cache_name | mv $XDG_CACHE_HOME/mru/$cache_name.insert$$ $XDG_CACHE_HOME/mru/$cache_name | ||||
@@ -18,7 +18,6 @@ launch() { | |||||
Hidden browser | Hidden browser | ||||
Page | Page | ||||
Define | |||||
Go page | Go page | ||||
Package info | Package info | ||||
Play clipboard | Play clipboard | ||||
@@ -44,7 +43,6 @@ launch() { | |||||
Email) $browser_cmd mail.protonmail.com/login;; | Email) $browser_cmd mail.protonmail.com/login;; | ||||
'Play clipboard') mpv "$(xclip -o -selection clipboard)";; | 'Play clipboard') mpv "$(xclip -o -selection clipboard)";; | ||||
'Play downloads') mpv "$HOME/Downloads/tmp/$(ls ~/Downloads/tmp/ | dmenu -i -l 10 -p 'play')";; | 'Play downloads') mpv "$HOME/Downloads/tmp/$(ls ~/Downloads/tmp/ | dmenu -i -l 10 -p 'play')";; | ||||
Define) word=$(printf '' | dmenu -p 'word'); if [ -z "$word" ]; then exit; fi; st -e sh -lc "dict \"$word\" | less";; | |||||
Processes) st -t "Processes" -e htop;; | Processes) st -t "Processes" -e htop;; | ||||
esac | esac | ||||
} | } | ||||
@@ -92,6 +90,7 @@ action() { | |||||
do_search() { | do_search() { | ||||
type=$(printf "Manual | type=$(printf "Manual | ||||
DDG | DDG | ||||
Definition | |||||
Godocs | Godocs | ||||
Mojeek | Mojeek | ||||
Package | Package | ||||
@@ -103,6 +102,7 @@ do_search() { | |||||
Godocs) godoc;; | Godocs) godoc;; | ||||
DDG) ddg;; | DDG) ddg;; | ||||
Package) package;; | Package) package;; | ||||
Definition) word=$(printf '' | dmenu -p 'word'); if [ -z "$word" ]; then exit; fi; st -e sh -lc "dict \"$word\" | less";; | |||||
esac | esac | ||||
} | } | ||||
@@ -131,7 +131,7 @@ editor() { | |||||
} | } | ||||
opener() { | opener() { | ||||
mru list | dmenu -i -l 20 -p 'open' | while read f; do mru insert "$f" &; xdg-open $f; done | |||||
mru list | dmenu -i -l 20 -p 'open' | while read f; do mru insert "$f" & xdg-open $f; done | |||||
} | } | ||||
screenshot() { | screenshot() { | ||||
@@ -0,0 +1,3 @@ | |||||
#!/bin/sh | |||||
#For downloading bookmarks in a directory |