Thursday, June 09, 2022

Re: fcitx: add usage with kitty & fix typo

On 22/06/08 04:22PM, Stuart Henderson wrote:
> On 2022/06/08 14:12, Yifei Zhan wrote:
> > On 22/06/08 12:28PM, Omar Polo wrote:
> > > Yifei Zhan <openbsd@zhan.science> wrote:
> > > > On 22/06/08 09:56AM, Omar Polo wrote:
> > > > > Yifei Zhan <openbsd@zhan.science> wrote:
> > > > > > [...]
> > > > > > +To use fcitx with kitty terminal, also add the following line:
> > > > > > +
> > > > > > +export GLFW_IM_MODULE=ibus
> > > > >
> > > > > I guess this is not needed only for kitty, but also for other
> > > > > applications using GLFW?
> > > >
> > > > I'm not sure, I can't validate as I'm not aware of any other
> > > > application requiring this variable despite some grepping in the ports
> > > > tree/searching on the web. However, if that's the case, I'm not
> > > > against changing it :)
> > >
> > > despite the name, it seems that only kitty uses that environment
> > > variable. (verified also with debian codesearch)
> > >
> > > https://github.com/kovidgoyal/kitty/issues/3206#issuecomment-753740868
> > >
> > > a bit sad that this is not even mentioned in the manpage.
> > >
> > > in theory the best place to document this would be the kitty port, but
> > > since we're already documenting the other toolkit-dependent env vars in
> > > the fcitx readme adding a note about kitty seems the easier and less
> > > intrusive option. (even thought patching kitty' manpage and upstreaming
> > > the diff is also an option.)
> >
> > Thanks for checking! I prefer to just put it as a sidenote on fcitx's
> > README now, because I don't use kitty often enough to maintain a
> > patch/upstreaming it, also I'm trying to maintain a single source of
> > truth for IME config as having those details spread across different
> > ports can be hard for me to keep track of.
> >
>
> Makes sense, though I note this information is on upstream's wiki
> https://www.fcitx-im.org/wiki/Setup_Fcitx_5 which might be worth referring
> to?
>

yeah, I think that can be useful, here is a new diff :)

diff --git a/inputmethods/fcitx/Makefile b/inputmethods/fcitx/Makefile
index c2d002c859e..cfc44dfaa45 100644
--- a/inputmethods/fcitx/Makefile
+++ b/inputmethods/fcitx/Makefile
@@ -2,7 +2,7 @@ COMMENT = flexible input method framework

DISTNAME = fcitx5-5.0.15
PKGNAME = ${DISTNAME:S/fcitx5/fcitx/}
-REVISION = 1
+REVISION = 2

SHARED_LIBS += Fcitx5Config 0.0 # 0.0
SHARED_LIBS += Fcitx5Core 0.0 # 0.0
diff --git a/inputmethods/fcitx/pkg/README b/inputmethods/fcitx/pkg/README
index 6100b132c7c..a997832d2d6 100644
--- a/inputmethods/fcitx/pkg/README
+++ b/inputmethods/fcitx/pkg/README
@@ -8,7 +8,7 @@ chosen languages and graphical environments (e.g. Qt, GTK+).

A basic installation of fcitx would be:

- # pkg_add fcitx fcitx-config-qt fcitx-gtk fcitx-qt
+ # pkg_add fcitx fcitx-configtool-qt fcitx-gtk fcitx-qt
# pkg_add $YOUR_PREFERRED_INPUT_METHOD

then configure fcitx to start with your DE/WM and setup your IM
@@ -54,6 +54,9 @@ export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
${TRUEPREFIX}/bin/fcitx5 &

+To use fcitx with kitty terminal, also add the following line:
+
+export GLFW_IM_MODULE=ibus

Setting up input engines
========================
@@ -63,6 +66,9 @@ then select and add your preferred input method from the Avaliable
Input Method panel. You might need to uncheck 'Only Show Current
Language' to find your preferred input method.

+For more information, please refer to Fcitx's wiki page:
+https://www.fcitx-im.org/wiki/Setup_Fcitx_5
+
Troubleshooting
===============

No comments:

Post a Comment