aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-16 22:35:06 +0100
committerMattias Andrée <m@maandree.se>2026-02-16 22:35:06 +0100
commitfa4d38f0401aa48acf01cec987569a96b1963728 (patch)
tree8da7891a21ae6529c0c54935f8b911785ce2de9f
parentAdd super+ctrl+p action to open youtube video (diff)
downloaddotfiles-fa4d38f0401aa48acf01cec987569a96b1963728.tar.gz
dotfiles-fa4d38f0401aa48acf01cec987569a96b1963728.tar.bz2
dotfiles-fa4d38f0401aa48acf01cec987569a96b1963728.tar.xz
Add wiktionary.en.lower-case and wiktionary.sv.lower-caseHEADmaster
Signed-off-by: Mattias Andrée <m@maandree.se>
-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";