aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/plumber-dmenu
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2020-11-19 22:28:03 -0500
committertdro <tdro@users.noreply.github.com>2020-11-19 22:48:37 -0500
commit6050c129bc7a1d87de51dde1e3c44c4e5f01d159 (patch)
treeda7a5e49d8d71a3f7f45b89976b7944438585f08 /.local/bin/plumber-dmenu
parent48b5b89dbe0d0ae68fafb3b38e5a3f90ed3cab76 (diff)
downloaddotfiles-6050c129bc7a1d87de51dde1e3c44c4e5f01d159.tar.gz
dotfiles-6050c129bc7a1d87de51dde1e3c44c4e5f01d159.tar.bz2
dotfiles-6050c129bc7a1d87de51dde1e3c44c4e5f01d159.zip
.local/bin/plumber: Add crude text plumber
Diffstat (limited to '.local/bin/plumber-dmenu')
-rwxr-xr-x.local/bin/plumber-dmenu11
1 files changed, 11 insertions, 0 deletions
diff --git a/.local/bin/plumber-dmenu b/.local/bin/plumber-dmenu
new file mode 100755
index 0000000..431bbb7
--- /dev/null
+++ b/.local/bin/plumber-dmenu
@@ -0,0 +1,11 @@
+#!/bin/sh -eu
+options="First letter of each word in sentence
+Single line of text
+"
+printf "%s" "$options" \
+ | dmenu -i -b \
+ | while read -r option
+ do
+ text=$(plumber --option "$option" --text "$(xsel -o)")
+ notify-send "$text" && printf "%s" "$text" | xsel -ib
+ done