Because 'tee' doesn't behave like I expect it to
This commit is contained in:
parent
b9cf6d786c
commit
3f2a0ae3cd
|
@ -1,15 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage(){ printf "Usage: %s -s|f|r|d|R|h\n" $(basename $0); }
|
||||
[ $# -eq 0 ] && usage && exit 2
|
||||
bookmarks="${BOOKMARKS:-"$HOME/.config/qutebrowser/bookmarks/urls"}"
|
||||
|
||||
usage(){ printf "Usage: %s -s|f|r|d|R|h\n" $(basename $0); }
|
||||
|
||||
copy(){
|
||||
shuf -n1 $bookmarks | awk '{print $1}' | xclip -sel clip
|
||||
xclip -o -sel clip
|
||||
}
|
||||
|
||||
[ $# -eq 0 ] && usage && exit 2
|
||||
while getopts sfrdRh name; do
|
||||
case $name in
|
||||
f) menu="fzf";;
|
||||
r) menu="rofi -dmenu -i -p 'Bookmarks'";;
|
||||
s) menu="sk";;
|
||||
d) menu="${MENU}";;
|
||||
R) shuf -n1 $bookmarks | awk '{print $1}' | xclip -sel clip;;
|
||||
R) copy ;;
|
||||
h) usage ;;
|
||||
*) usage
|
||||
exit 2;;
|
||||
|
|
Loading…
Reference in a new issue