~emersion/public-inbox

2 2

wl-ime-type: accept stdin to autotype sensitive data

Details
Message ID
<CLYE3BU1JNTZ.2JEKJPBTIMNO1@neptune>
DKIM signature
pass
Download raw message
Hello Simon,

I'm trying to integrate wl-ime-type in my project to autotype sensitive
data, like passwords, on wlroots compositors like sway. However, it
looks like wl-ime-type doesn't accept stdin. I tried

printf "%s" "password" | wl-ime-type

and using a here string in bash

var="password"
wl-ime-type <<< "$var"

but both of these operations fail with the wl-ime-type help message.

I'd have sent a patch but I'm not familar with C. It'd be helpful if you
could improve wl-ime-type to accept stdin.

Thanks,
Ayush Agarwal
Details
Message ID
<ZwcGUIaAFbjFjWep9sNAcK1QLPdXCM3udrI499j0Gt9We-dl6_pJol1rmNvAvpY9b9j8BceTvFs1Pq-lPmAW8iHd6qiMzLnrLj4mQWluEJY=@emersion.fr>
In-Reply-To
<CLYE3BU1JNTZ.2JEKJPBTIMNO1@neptune> (view parent)
DKIM signature
pass
Download raw message
On Friday, August 5th, 2022 at 22:49, Ayush Agarwal <ayushnix@fastmail.com> wrote:

> but both of these operations fail with the wl-ime-type help message.

Yes, wl-ime-type doesn't support reading from stdin, yet. I assume you
want to use stdin to avoid having the sensitive arguments show up in
e.g. top?

> I'd have sent a patch but I'm not familar with C. It'd be helpful if you
> could improve wl-ime-type to accept stdin.

I don't have plans to add this feature, but I'd accept patches. Feel
free to come discuss on IRC if you'd be interested in writing a patch.
Details
Message ID
<CLYES6HM215S.23H1H29H7PIK5@neptune>
In-Reply-To
<ZwcGUIaAFbjFjWep9sNAcK1QLPdXCM3udrI499j0Gt9We-dl6_pJol1rmNvAvpY9b9j8BceTvFs1Pq-lPmAW8iHd6qiMzLnrLj4mQWluEJY=@emersion.fr> (view parent)
DKIM signature
pass
Download raw message
On Sat Aug 6, 2022 at 2:24 AM IST, Simon Ser wrote:

> Yes, wl-ime-type doesn't support reading from stdin, yet. I assume you
> want to use stdin to avoid having the sensitive arguments show up in
> e.g. top?

Yes, that's right.

> I don't have plans to add this feature, but I'd accept patches. Feel
> free to come discuss on IRC if you'd be interested in writing a patch.

I doubt I'll be able to come up with a patch soon but I'll reach out on
IRC if I do.
Reply to thread Export thread (mbox)