rofi-snippets: remove the subshell and just use a pipe

i expect that this is faster, particularly because bash should stand up each section of the pipeline in parallel, right?
This commit is contained in:
Colin 2024-05-28 03:23:04 +00:00
parent d2c3bec98e
commit ab7c4d7410

View File

@ -4,7 +4,7 @@
# "bookmarking"/snippets inspired by Luke Smith:
# - <https://www.youtube.com/watch?v=d_11QaTlf1I>
snippet=$(cat ~/.config/rofi-snippets/public.txt ~/.config/rofi-snippets/private.txt | \
cat ~/.config/rofi-snippets/public.txt ~/.config/rofi-snippets/private.txt | \
rofi -dmenu | \
sed 's/ #.*$//')
wtype "$snippet"
sed -z -e 's/ *#.*$//' -e 's/\n$//' | \
wtype -