Marty Oehme
8681d34946
Since we now use dotter we can simplify the dir structure for qutebrowser a lot. Everything dot-filed earlier can now reside in simple directories called config (for ~/.config/qutebrowser), data (for ~/.local/share/qutebrowser), and scripts (for ~/.local/bin) files.
27 lines
720 B
Bash
Executable file
27 lines
720 B
Bash
Executable file
#! /usr/bin/env bash
|
|
#
|
|
# Send current page/link to a shaarli instance.
|
|
#
|
|
# Can be used for sending the current page via:
|
|
# :spawn --userscript shaarli_add.sh
|
|
# for sending an arbitrary page passed as argument:
|
|
# :spawn --userscript shaarli_add.sh https://myinterestingpage.com
|
|
# or for sending a hinted link:
|
|
# :hint links userscript shaarli_add.sh
|
|
#
|
|
# Configure your shaarli instance with this:
|
|
SHAARLI_INSTANCE="https://links.martyoeh.me"
|
|
|
|
# send page to shaarli instance and open the 'post' page to edit it
|
|
if [ "$#" -gt 0 ]; then
|
|
BM="$SHAARLI_INSTANCE/?post=$*"
|
|
else
|
|
BM="$SHAARLI_INSTANCE/?post=$QUTE_URL"
|
|
fi
|
|
|
|
if [ -n "$QUTE_FIFO" ]; then
|
|
echo "open -t -r $BM" >>"$QUTE_FIFO"
|
|
else
|
|
xdg-open "$BM"
|
|
fi
|
|
|