From fa4d38f0401aa48acf01cec987569a96b1963728 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 16 Feb 2026 22:35:06 +0100 Subject: Add wiktionary.en.lower-case and wiktionary.sv.lower-case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- dmenu/plumb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dmenu/plumb b/dmenu/plumb index ef7dee2..d7c45e1 100755 --- a/dmenu/plumb +++ b/dmenu/plumb @@ -13,6 +13,7 @@ fi sel="$(xclip -o)" url="$(printf '%s' "$sel" | tr -d '\n')" file="$(printf '%s' "$sel" | tr -d '\n')" +lower="$(printf '%s' "$sel" | tr A-Z a-z | sed 's/Å/å/g' | sed 's/Ä/ä/g' | sed 's/Ö/ö/g' | sed 's/Ü/ü/g' | sed 's/É/é/g' | sed 's/À/à/g')" if test -z "$sel"; then exit 0 @@ -73,11 +74,25 @@ if test -r "$file" && file "$file" | grep '\(PNG\|JPEG\) image' > /dev/null; the } fi +if test ! "$lower" = "$sel"; then + functions="$functions wiktionary.en.lower-case" + wiktionary.en.lower-case () { + exec $WEB_BROWSER "https://en.wiktionary.org/wiki/$lower"; + } +fi + functions="$functions wiktionary.en" wiktionary.en () { exec $WEB_BROWSER "https://en.wiktionary.org/wiki/$sel"; } +if test ! "$lower" = "$sel"; then + functions="$functions wiktionary.sv.lower-case" + wiktionary.sv.lower-case () { + exec $WEB_BROWSER "https://sv.wiktionary.org/wiki/$lower"; + } +fi + functions="$functions wiktionary.sv" wiktionary.sv () { exec $WEB_BROWSER "https://sv.wiktionary.org/wiki/$sel"; -- cgit v1.2.3-70-g09d2