12345678910111213141516171819202122 |
- #!/bin/sh
- dmenu_font="monospace:size=10"
- col_black="#000000"
- col_pink="#ff00f0"
- col_violet="#8f00ff"
- col_gray4="#eeeeee"
- #in=$(cat $HOME/Documentos/data/bookmarks | cut -d ',' -f 2 | dmenu -m 0 -fn ${dmenu_font} -nb ${col_black} -nf ${col_pink} -sb ${col_violet} -sf ${col_gray4} -l 5 -p bookmarks:) # dmenu input
- if [ "$1" = "work" ]; then
- file=$HOME/Sync/bookmarks_teco
- else
- file=$HOME/Sync/bookmarks
- fi
- in=$(cat $file | dmenu -m 0 -fn ${dmenu_font} -nb ${col_black} -nf ${col_pink} -sb ${col_violet} -sf ${col_gray4} -l 10 -p bookmarks:) # dmenu input
- match=$(cat $file | grep $in | cut -d ',' -f 2) # check match with ~/.bookmarks file
- if [ "$match" != "" ]; then
- echo "$match" | xclip -selection clipboard
- elif [ -n "$in" ]; then
- echo -n "https://search.disroot.org/search?q=$in" | xclip -selection clipboard
- fi
|