Code Monkey home page Code Monkey logo

opensuse / customize-ibus Goto Github PK

View Code? Open in Web Editor NEW
62.0 4.0 8.0 19.26 MB

Full customization of appearance, behavior, system tray and input source indicator for IBus. (深度定制 IBus 的外观、行为、系统托盘以及输入指示)

Home Page: https://extensions.gnome.org/extension/4112/customize-ibus/

License: GNU General Public License v3.0

Makefile 3.62% JavaScript 94.35% Shell 1.26% Scheme 0.77%
ibus theme gnome-shell-ibus hacktoberfest

customize-ibus's Issues

我的设计理念 My design concept

作为开源系统Linux在**普及的第一步,解决中文输入法的问题应该被放在首要的位置。我本人一直是Linux的粉丝,在日常开发中绝大部分是用Linux完成的。偶尔看到这样的言论:https://www.zhihu.com/question/286602824/answer/1148890621 ,我会感到十分的沮丧。为什么?为什么中文输入法成了**人使用Linux的一个障碍点?为什么?为什么大家都喜欢Windows的输入法?为什么?为什么大家都喜欢在Windows上使用搜狗输入法进行打字?基于这样的事实,我本人十分希望能为Linux中文输入法做一点微薄的贡献,来让**普通用户不再恐惧Linux,甚至爱上免费开源的Linux。

正好,我本人十分希望能够参加谷歌的编程之夏活动,然后看到了IBus项目正在openSUSE社区寻找学生做为IBus制作自定义皮肤功能。说到皮肤,我立刻联想到了搜狗拼音丰富多彩的皮肤,许多人在攻击Linux输入法时也会提到Linux输入法太单调丑陋。因而我很想挑战这一项目,让GNOME用户能够随心所欲地自定义IBus皮肤。在借助于编写GNOME扩展插件轻松实现了这一任务之后,我便萌生了另外编写一个全套的IBus自定义插件,让不同来源的用户同时找到使用Fcitx、非GNOME桌面使用IBus,以及Windows下使用搜狗输入法的感觉。

在编写过程中,我借鉴了一些 https://github.com/tuberry/ibus-tweaker 的功能,保留了其的自定义候选框方向、自定义字体、自动切换源、以及识别GNOME夜灯模式的功能,同时结合了其它各大输入法所长,独立地编写了这个添加了各种用户可能喜欢的自定义配置的插件。

对于自动切换源,我增加了一个选项,来使用户选择是否记住该程序的输入状态,来在切换窗口时切换输入源。因为有些用户确实希望能够记住上一次该程序的输入状态,但是还有一些用户则会说,自己平时大部分输入工作是使用中文或英文完成的,自己切换到另一个输入模式只是为了临时输入一些字符,每次切换窗口之后我不希望再返回时恢复到刚才的状态,而是我平时用的最多的那种输入状态,那么请不要记住输入状态,好吗?

在托盘标签处,用户可以查看IBus版本号,如果没安装IBus时则会提示。有一些新手Linux用户会表示,IBus和Fcitx傻傻分不清,你的这个插件怎么没用,在最后发现用的是Fcitx。加一个重启/启动IBus按钮还可以协助用户排查各种问题。

用户还可以为托盘处添加各种菜单选项,找回非GNOME桌面使用IBus的托盘图标感觉。同时,配置IBus可以直接在菜单处点了,不用每次麻烦点击GNOME设置里的选项,甚至打开终端运行ibus-setup命令。

KDE下的IBus菜单:

image

指示器部分则是完全根据用户的要求,模仿Fcitx的感觉做的。其实现的功能丰富程度甚至远远多于Fcitx,你可以设定仅切换输入源时指示,或者只在切换到英文时指示,还可以设定指示器的显示动画(不想要也没关系,直接关了就好),以及是否自动隐藏和隐藏时间,其主题自动跟随输入法的候选框。下一个版本中还将添加在指示器上点击鼠标右键时自动隐藏,方便用户看到被遮挡的文字。

主题部分则是此项目的重头戏了,用户可以通过 https://github.com/HollowMan6/IBus-Theme 工具,借助于GNOME Shell丰富的主题生态进行混搭,只需一键即可生成可以用的IBus主题,然后进行导入。用户可以将CSS文件放在任意位置,而不是特定的几个位置。让我们多写一些功能,不要去麻烦用户,否则用户一定就会离开。

而关于背景和拖拽移动输入框,则是目前闭源的搜狗输入法早已实现的功能。全图背景则不再进行叙述,为什么许多普通的在Windows下使用搜狗输入法都对其皮肤的高度定制功能赞不绝口,甚至十分喜爱呢?拖拽移动输入框,可以临时性的看到下面被遮挡的文字,而且普通用户看到一个窗口,像普通的窗口一样,都会想着去拖拽来移动它,不能拖拽移动的窗口是十分反人类的设计。

搜狗输入法在Windows下的表现:

GIF 2021-5-21 16-28-48

而至于背景图片,用户使用CSS自己定制则更是十分的反人类。难道每个中文输入法Linux用户都必须学会如何使用CSS语言,然后才能自己定制吗?Linux的使用门槛并不是计算机专业人士,而是千千万万的使用计算机的普罗大众。

至于添加边框,在边框中使用图片,现在看来实现的样式并不完善,左边顶端的边框不知为何会显示不出来,大概率是GNOME的问题。目前贸然推出这种丑陋的设计必然会遭到用户的唾弃。

image

关于候选栏淡入淡出动画的需求:ibus/ibus#2279

欢迎提意见!与诸君共勉。

反馈:指示器行为

  1. 现有的指示器(扩展版本 75)会在聚焦点变化时立刻显示,在进行连续键盘打字或者在终端的命令行自动滚屏的情况下,这个指示器就会频繁跳出。

我的想法是,如果光标焦点一直存在于当前活动窗口内,在未切换输入法时就不要继续弹出指示器,或者设定一个弹出静默期。如果更细致的话,“当前活动窗口”的范围可以进一步缩小到“当前操作的输入框”。

  1. “仅当输入英文时指示”这个选项,我使用 zh 键盘布局(无输入法)打字时不会定义为英文输入,我想 CJK 的键盘布局在不使用输入法时输入的都是英文。而且限定在英文的选项用途不够广泛,可以的话把英文改成可选项,选项包含所有已经添加的输入法和布局。

  2. 指示器在 gedit 上的表现跟其他程序上的不同。如果输入法已经切换到中文(ibus-libpinyin)上,在其他程序上打字会一直弹出指示器,在 gedit 上打字就不会弹出。

New Feature: Input Source Indicator

Now you can have input source indicator settings at Indicator tab, default is to show indicator everytime you type, move caret or switch input source. You can set to show indicator only when switching input source. You can also set popup animation and auto hide timeout.

候选面板有时只显示部分面板,被屏幕截掉。

Describe the bug
全屏编辑文本文件,鼠标在不同的位置点击,输入中文时候选面板位置会相应变化。但在某些位置,特别是比较靠下的位置,候选面板会出现位置不对的情况,典型的情况是只能看到部分面板,另一部分在屏幕边缘下方看不到。

To Reproduce
Steps to reproduce the behavior:

  1. 打开一个文本文件
  2. 确保文本文件全屏
  3. 在相对靠下的位置点击鼠标插入字符,切换到中文,输入
  4. 候选面板只能显示一部分,无法完全显示,导致有些候选文字看不到。

Expected behavior
应该完全显示。

Screenshots
2

Version (please complete the following information):

  • GNOME : 3.38.6
  • IBus : 1.5.23
  • Customize IBus :“ 83

Additional context

系统: Debian stable.
输入法: rime.
如果扩展不使用Customize IBus ,而是使用ibus tweaker,则没有这个问题。
我回想了一下,在Customize IBus中做的与面板位置可能有关的设置,是字号,我把默认的自定义字体的字号改为20。有没有可能是它的原因?我测试过,如果Customize IBus中把字号设置为11,候选面板就始终是完整的,不会缺失一块儿。

UI suggestion - add country flag emoji as language indicator in taskbar

Is your feature request related to a problem? Please describe.
I have many Gnome integration in the taskbar and it is difficult to see what keyboard I am using since it's indicated as just text. With a flag emoji it would be easier to understand.

Describe the solution you'd like
Add the option to switch from country codes to the relative country flag emoji, if available.

Additional context
Add the option to customize manually the flag to country correspondence, if necessary.

在GNOME42.1/Pop OS 22.04下,No Auto-Switch ASCII无效

在Pop 22.04的GNOME 42.1下,无法关闭Auto Switch ASCII。我查了一下dconf,不过没找到相关设置。

$ dpkg -l 'ibus*' | grep ii 
ii  ibus                     1.5.26-4                                            amd64        Intelligent Input Bus - core
ii  ibus-chewing             1.6.1-2                                             amd64        Chewing engine for IBus
ii  ibus-data                1.5.26-4                                            all          Intelligent Input Bus - data files
ii  ibus-gtk:amd64           1.5.26-4                                            amd64        Intelligent Input Bus - GTK2 support
ii  ibus-gtk3:amd64          1.5.26-4                                            amd64        Intelligent Input Bus - GTK3 support
ii  ibus-gtk4:amd64          1.5.26-4                                            amd64        Intelligent Input Bus - GTK4 support
ii  ibus-libpinyin           1.12.1-2ubuntu2                                     amd64        Intelligent Pinyin engine based on libpinyin for IBus
ii  ibus-mozc                2.26.4220.100+dfsg-5.1pop0~1648583412~22.04~b3f04a2 amd64        Mozc engine for IBus - Client of the Mozc input method
ii  ibus-table               1.16.7-1                                            all          table engine for IBus
ii  ibus-table-cangjie3      1.8.2-3                                             all          ibus-table input method: CangJie3
ii  ibus-table-cangjie5      1.8.2-3                                             all          ibus-table input method: CangJie5
ii  ibus-table-emoji         1.3.11-2                                            all          ibus-table input method: Emoji
ii  ibus-table-quick-classic 1.8.2-3                                             all          ibus-table input method: Quick Classic
ii  ibus-table-wubi          1.8.2-3                                             all          ibus-table input method: Wubi

一些建议

我试了下最近版本的效果,很不错,基本上达到了设想中的设计效果,可以算是提前通过了。不过还是有进一步改进的余地。

比如原生主题是设计有翻页按钮,但是自定义主题就没有,而且模仿对象微软输入法也是有翻页按钮,我建议在以后的改进中可以加入这个功能。

还有就是向下兼容,这套扩展在旧版 gnome-shell 上工作不是太稳定。长效支持的发行版,诸如 openSUSE Leap, Debian stable 以及 Centos 等,这些长效支持的发行版都不会提供最新的 gnome ,所以也应该考虑下在这类发行版的支持。这类发行版的用户其实是相当多的。

能自带几个预设主题更好。

加载字体列表特别卡。

我使用"Input Method Panel"让我的fcitx5在wayland ibus中运行

Input Method Panel
Customize IBus输出:GSettings schema org.freedesktop.ibus.panel not found

The settings of extension [email protected] had an error:

Error: GSettings schema org.freedesktop.ibus.panel not found

Stack trace:

_init@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:556:23
_bulidWidget@/home/cdm/.local/share/gnome-shell/extensions/[email protected]/prefs.js:68:28
_init@/home/cdm/.local/share/gnome-shell/extensions/[email protected]/prefs.js:59:12
CustomizeIBus@/home/cdm/.local/share/gnome-shell/extensions/[email protected]/prefs.js:47:3
buildPrefsWidget@/home/cdm/.local/share/gnome-shell/extensions/[email protected]/prefs.js:29:10
_init@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:32:44
ExtensionPrefsDialog@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:10:4
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:129:33
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:186:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:22:13
run@resource:///org/gnome/gjs/modules/script/package.js:206:19
start@resource:///org/gnome/gjs/modules/script/package.js:190:8
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

鎖定畫面被修改

hi, 感謝你的努力與付出, 非常喜歡這個插件
我克隆了Theme Hub並使用了nord主題,
但是此主題會修改鎖定畫面主題, 直到我關掉ibus客製化主題

Version (please complete the following information):

  • Ubuntu 22.10
  • GNOME 43
  • IBus 1.5.27-2
  • Customize IBus 83

使用仿微軟也有同相的情況

GUI port to Adw (libadwaita) for GNOME 42

Is your feature request related to a problem? Please describe.
Adw (libadwaita) is the GUI library for modern GNOME applications in GNOME 42. Customize IBus preference panel on GNOME 42 still uses GTK widgets ScrolledWindow, which now faces scrolling issues as well as header bar issues, causes great distraction.

Describe the solution you'd like
GUI port to Adw (libadwaita) for GNOME 42, and also consider backward compatibility for legacy GTK which doesn't have Adw (In short, two GUIs, one for GNOME 42 and above).

Describe alternatives you've considered
Or changes so that the GTK.notebook can scroll up and down properly when mouse hovers. As well as fix the header bars on GNOME 42 to make it just look like those less than GNOME 42.

image

Additional context
Hope someone can help with this issue, as the maintainer is currently busy with their graduation dissertation and doesn't have any time for this issue.

指示样式

2021-05-08 19-04-41 的屏幕截图
2021-05-08 19-06-16 的屏幕截图
以前的palm webos 输入法是这样指示的,alt按下时是绿点,alt锁定时是黑点,shift按下时是绿上向上箭头,shfit锁定时是黑色向上箭头.

使用一个小点提示能减少对文字的遮盖,所以webos上只要锁定了就一直有指示图标,不会超时隐藏,我觉得这体验非常好,至今仍无超越.

在电脑上,可以用来提示大小写锁定状态.数字键锁定状态.

关于输入法分指示,我认为是中文输入法就不要指示了,没有指示就是中文输入法.如果中文输入法也指示的话就和输入法本来的候选有点冲突.

中文输入法从不指示,英文输入法一直指示,我认为这是最好的.当需要临时隐藏指示时就通过切换到中文输入法来隐藏.

错误报告:
当前我多切换了几次后,切换到英文后指示的文字也是中文的.

Support for GNOME 45

GNOME 45 breaks the compatibility for any extensions that target older GNOME versions.

https://blogs.gnome.org/shell-dev/2023/09/02/extensions-in-gnome-45/

The GNOME Shell's move from GJS’ own custom imports system to standard JavaScript modules (ESM) itself may not be a big issue, however, for the preference UI, the only choice now is Adw, which means this is also blocked by #17 and that's the worst problem.

This basically means we will have to rewrite the whole plugin and it can take a huge amount of time, while currently I don't have much free time working on this.

候选面板有时只显示部分面板,被屏幕截掉。

Describe the bug
全屏编辑文本文件,鼠标在不同的位置点击,输入中文时候选面板位置会相应变化。但在某些位置,特别是比较靠下的位置,候选面板会出现位置不对的情况,典型的情况是只能看到部分面板,另一部分在屏幕边缘下方看不到。

To Reproduce
Steps to reproduce the behavior:

  1. 打开一个文本文件
  2. 确保文本文件全屏
  3. 在相对靠下的位置点击鼠标插入字符,切换到中文,输入
  4. 候选面板只能显示一部分,无法完全显示,导致有些候选文字看不到。

Expected behavior
应该完全显示。

Screenshots
2

Version (please complete the following information):

  • GNOME : 3.38.6
  • IBus : 1.5.23
  • Customize IBus :“ 83

Additional context

系统: Debian stable.
输入法: rime.
如果扩展不使用Customize IBus ,而是使用ibus tweaker,则没有这个问题。
我回想了一下,在Customize IBus中做的与面板位置可能有关的设置,是字号,我把默认的自定义字体的字号改为20。有没有可能是它的原因?我测试过,如果Customize IBus中把字号设置为11,候选面板就始终是完整的,不会缺失一块儿。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.