Flake
This commit is contained in:
parent
d45b12a9f6
commit
3f3cd0c357
8 changed files with 161 additions and 124 deletions
20
src/bin/open-bookmark
Executable file
20
src/bin/open-bookmark
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage(){
|
||||
printf "Usage: %s: -s|f|r|d|h\n" $0
|
||||
}
|
||||
|
||||
bookmarks="${BOOKMARKS:-"$HOME/.config/qutebrowser/bookmarks/urls"}"
|
||||
while getopts sfrdh name; do
|
||||
case $name in
|
||||
f) menu="fzf";;
|
||||
r) menu="rofi -dmenu -i -p 'Bookmarks'";;
|
||||
s) menu="sk";;
|
||||
d) menu="${MENU}";;
|
||||
h) usage ;;
|
||||
*) usage
|
||||
exit 2;;
|
||||
esac
|
||||
done
|
||||
choice="$(sort $bookmarks | $menu )"
|
||||
[ -z "$choice" ] || xdg-open "$(echo "$choice" | awk '{print$1}')"
|
11
src/bin/se
Executable file
11
src/bin/se
Executable file
|
@ -0,0 +1,11 @@
|
|||
#! /bin/sh
|
||||
if [ $# -eq 1 ] ; then
|
||||
case $1 in
|
||||
--help) echo "Opens a script in vim either as an argument or from the ~/.local/bin directory using skim";;
|
||||
-h) echo "Opens a script in vim either as an argument or from the ~/.local/bin directory using skim";;
|
||||
*) $EDITOR $(which $1);;
|
||||
esac
|
||||
else
|
||||
script=$(find ~/.local/bin -type f | sk --preview 'cat {}')
|
||||
[ "$script" != "" ] && nvim $script || exit 0
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue