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
|
27
src/manpages/irs.1.scd
Normal file
27
src/manpages/irs.1.scd
Normal file
|
@ -0,0 +1,27 @@
|
|||
se(1)
|
||||
|
||||
# NAME
|
||||
|
||||
*irs* - because -- and I quote: "Random collection of scripts. The IRS collects
|
||||
taxes. You send a wrong amount of taxes, they randomly send you to jail."
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
This package has a few scripts that I used to keep in my '*~/.local/bin*'
|
||||
directory, but that didn't work well with the Nix ethos and it got rather
|
||||
annoying to move them between systems. Here's a badly put together solution to
|
||||
both problems.
|
||||
|
||||
# SCRIPTS
|
||||
|
||||
*se*
|
||||
short for 'script edit'; when not given any arguments opens '*~/.local/bin*'
|
||||
in *sk(1)* and allows you to make a seletion of what item in there using
|
||||
*$EDITOR*
|
||||
|
||||
*open-bookmark*
|
||||
opens a bookmark in *xdg-open(1)*, see its own manpage for more information
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
*open-bookmark(1)*, *xdg-open(1)*
|
29
src/manpages/open-bookmark.1.scd
Normal file
29
src/manpages/open-bookmark.1.scd
Normal file
|
@ -0,0 +1,29 @@
|
|||
open-bookmark(1)
|
||||
|
||||
# NAME
|
||||
|
||||
*open-bookmark* - opens a *qutebrowser(1)* bookmark using *xdg-open(1)*
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
*open-bookmark -s|f|r|d|h*
|
||||
|
||||
# OPTIONS
|
||||
|
||||
*-s*
|
||||
use *sk(1)* to open *qutebrowser(1)* bookmarks file
|
||||
|
||||
*-f*
|
||||
use *fzf(1)* to open *qutebrowser(1)* bookmarks file
|
||||
|
||||
*-r*
|
||||
use *rofi(1)* to open *qutebrowser(1)* bookmarks file
|
||||
|
||||
*-d*
|
||||
use *$MENU* to open *qutebrowser(1)* bookmarks file
|
||||
|
||||
*-h*
|
||||
print usage and exit
|
||||
|
||||
# SEE ALSO
|
||||
*fzf(1)*, *sk(1)*, *rofi(1)*, *qutebrowser(1)*
|
Loading…
Add table
Add a link
Reference in a new issue