aboutsummaryrefslogtreecommitdiffstats
path: root/dmenu
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xdmenu/plumb15
1 files changed, 15 insertions, 0 deletions
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";