tulir / gomuks

A Matrix client written in Go.
https://maunium.net/go/gomuks
GNU Affero General Public License v3.0
1.37k stars 122 forks source link

support RTL languages #93

Closed bjesus closed 1 day ago

bjesus commented 5 years ago

Hi! Since gomuks runs in the terminal, everything is printed left-to-right. This makes it very hard to use with languages typed from right to left, like Arabic, Farsi or Hebrew. Luckily, there are tools that can take a string, detect the languages in it and reverse the string (or parts of it) if necessary.

For example, if I pipe the string "שלום" to the CLI tool fribidi I'll get back "םולש". displayed on terminal, that looks perfect.

What I was thinking is that it would be great if gomuks would support using external tools to format its messages. Then, RTL users could use it for RTL, and other people could potentially use it to parse Markdown, HTML or whatever, while keeping gomuks simple.

bjesus commented 4 years ago

Would it perhaps be possible to allow /open for text messages? Then, one could tunnel a RTL message to wherever they want and have it displayed correctly there. For example, I was thinking about sending it through notify-send and then I'd get a notification with the proper text direction.

Or, maybe, could we set a pipe processor for the plaintext mode? So that all text will be sent through X (eg. fribidi) before being displayed?