Input selection to a command

52 Views Asked by At

In this case I want flite (speech synthesizer) to read my selected text when I press a hotkey. The command is flite -t "text i want to read" How?

1

There are 1 best solutions below

0
Uli Schlachter On

Does running flite -t "$(xclip -o)" do what you want it to do? If so, you could bind a key to running that:

    awful.key({ modkey,           }, "r",
        function ()
            awful.spawn.with_shell('flite -t "$(xclip -o)"')
        end,
    ),