From bce12ae53b9efb8833a03d8585d02a567214b01f Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 28 Nov 2019 09:04:07 +0100 Subject: [PATCH] Add remwharead-rofi. --- scripts/remwharead-rofi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/remwharead-rofi diff --git a/scripts/remwharead-rofi b/scripts/remwharead-rofi new file mode 100755 index 0000000..47d1ac4 --- /dev/null +++ b/scripts/remwharead-rofi @@ -0,0 +1,15 @@ +#!/bin/sh +# Open the whole database in rofi. Searches in title, tags and URI. +# The selected entry will be opened with the default browser. + +if [ -n "${2}" ]; then + uri=$(echo "${*}" | sed -E 's|^.+>([^><]+)$|\1|') + xdg-open "${uri}" + exit 0 +fi + +if [ "${1}" = "runremwharead" ]; then + /home/tastytea/Projekte/remwharead/build/src/cli/remwharead -e rofi +else + rofi -show remwharead -modi remwharead:"${0} runremwharead" +fi