Skip to content

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

License

Notifications You must be signed in to change notification settings

openSUSE/Customize-IBus

Repository files navigation

Customize IBus

last-commit release-date

GPL Licence Repo-Size

Welcome to contribute your translation on Weblate!

Translation Status

中文 Chinese

Full customization of appearance, behavior, system tray and input source indicator for IBus.

Customize IBus User Guide

demo

Installation

Since GNOME 45 has lost support for any older versions of GNOME Shell, getting it from GNOME Extensions Store is now the recommended installation method

Get it on GNOME Extensions

Linux

Manually:

git clone https://github.com/openSUSE/Customize-IBus.git
cd Customize-IBus && make install

If you use Arch Linux, you can also use AUR to install as a system extension:

yay -S gnome-shell-extension-customize-ibus

AUR

You can also use RPM Repository to install as a system extension under Fedora:

wget https://github.com/openSUSE/Customize-IBus/raw/package-repo/customize-ibus-rpm.repo
sudo mv customize-ibus-rpm.repo /etc/yum.repos.d/
sudo dnf update
sudo dnf install gnome-shell-extension-customize-ibus

You can also use RPM Repository to install as a system extension under OpenSUSE:

wget https://github.com/openSUSE/Customize-IBus/raw/package-repo/customize-ibus-rpm.repo
sudo mv customize-ibus-rpm.repo /etc/zypp/repos.d/
sudo zypper refresh
sudo zypper install gnome-shell-extension-customize-ibus

Or directly use ymp file to install.

You can also use Debian Repository to install as a system extension under Debian (Ubuntu):

echo "deb http://opensuse.github.io/Customize-IBus/deb/ /" | sudo tee -a /etc/apt/sources.list.d/customize-ibus-deb.list > /dev/null
wget -q -O - http://opensuse.github.io/Customize-IBus/hollowman.pgp | sudo apt-key add -
sudo apt update
sudo apt install gnome-shell-extension-customize-ibus

Ubuntu PPA

sudo add-apt-repository ppa:hollowman86/customize-ibus
sudo apt-get update

You can download the majority of your Linux distributions related packages through OpenSUSE OBS and then install.

For Gentoo, to install as a system extension:

git clone https://github.com/openSUSE/Customize-IBus.git
cd Customize-IBus && make emerge

For NixOS:

sudo nix-env -i gnomeExtensions.customize-ibus

For Guix:

guix install gnome-shell-extension-customize-ibus

FreeBSD

Manually:

git clone https://github.com/openSUSE/Customize-IBus.git
cd Customize-IBus && gmake install

You can also use Pkg Repository to install as a system extension under FreeBSD:

wget https://github.com/openSUSE/Customize-IBus/raw/package-repo/customize_ibus.conf
sudo mkdir -p /usr/local/etc/pkg/repos/
sudo mv customize_ibus.conf /usr/local/etc/pkg/repos/
sudo pkg update
sudo pkg install gnome-shell-extension-customize-ibus

Features

Support Customization of:

  • Candidate Box Orientation
  • Candidate Box Animation
  • Right-click Candidate Box to Switch the Input Mode or Open the Tray Menu
  • Scroll on Candidate Box to Switch among Pages or Candidates
  • Fix Candidate Box to Not Follow the Caret and Set Fixed Position
  • Candidate Box Font
  • Input Mode Remember and Auto-switch by APP
  • Change Candidate Box Opacity
  • Fix IME List Order
  • Drag Candidate Box to Reposition
  • Show or Hide Candidate Box Page Buttons
  • System Tray Menus and Interaction Settings
    • Show or Hide Tray Icon
    • Directly Click Tray Icon to Switch Input Mode
    • Add Additional Menu
  • Input Source Indicator Appearance and Interaction Settings
    • Enable Indicator
    • Only Indicate when Switching Input Mode
    • Only Indicate when Using ASCII Input Mode
    • Not Indicate when Using Single Mode IME
    • Right-click Indicator to Hide
    • Scroll on Indicator to Switch Input Mode
    • Indicator Animation
    • Customize Font
    • Left-click Indicator to Drag to Move Indicator or Switch Input Mode
    • Change Opacity
    • Enable Indicator Show Delay and Configure Showing Timeout
    • Enable Auto-hide Indicator and Configure Auto-hide Timeout
  • Theme (Stylesheet Provided or Extracted from GNOME Shell Themes, Refer to Help Instructions in Extension for More)
  • Candidate Box Background and its Displaying Style
  • Theme and Background Picture Follow GNOME Night Light Mode

Input Source Indicator

Animation

With Slide enabled:

Drag to Reposition

Fix IME List Order

When switching input methods, the order of indicator displaying is fixed instead of cycling from the middle.

Before:

After:

Imported from Fixed IME List, more reasons for this feature can be found here: https://github.com/AlynxZhou/gnome-shell-extension-fixed-ime-list#why

Realization of Customizing IBus with User Theme

This function has been separated, generating IBus theme stylesheet has been moved to IBus-Theme-Tools.

Now this extension supports importing stylesheet generated by this tool. In addition it also supports the IBus theme stylesheets provided by IBus-Theme-Hub.

When light theme and dark theme are turned on at the same time, the extension will automatically follow GNOME Night Light mode, use light theme when off, and use dark theme when on.

When only the light theme or dark theme is turned on, the extension will always use the theme that is turned on.

Note: If your IBus style sheet has changed after application, please close and reopen the corresponding custom IME theme to make it effective. Starting from v69, now this extension support stylesheets hot reload, CSS changes will reflect in real-time.

Themes in IBus Tweaker

Themes in IBus Tweaker have been converted by me as IBus theme stylesheets collection 仿微软 Microsoft, you are welcomed to use it!

NOTE:

  1. For users who don't use GNOME but other desktop environments like KDE, XFCE, etc., please use another project IBus-Theme-Tools to use a different GTK theme for IBus.
  2. If not for debugging, please DO NOT add any classes that's not started with .candidate-* into IBus stylesheet to prevent from disturbing system themes.

Realization of Modifying IBus Background Picture

During fixing Unity8-Wood theme and add support for IBus Background, if adding the following style for class .candidate-popup-content

background: url("assets/bg.png");
background-repeat: no-repeat;
background-size: cover;

you can modify the background picture.

Further combining ibus-font-setting and background-logo, referring to GNOME-Shell's source code, there exists the corresponding widget for class candidate-popup-content, and modified the style to realize modifying IBus background picture without restarting GNOME-Shell.

Support setting background picture displaying mode as Centered, Repeated and Zoom, and also repeat mode.

When light background and dark background are turned on at the same time, the extension will automatically follow GNOME Night Light mode, use light background when off, and use dark background when on.

When only the light background or dark background is turned on, the extension will always use the background that is turned on.

Note: Please make sure your background picture can always be visited. If your pictures are stored in the removable device and the system doesn't mount it by default, please close and reopen the corresponding Use custom background to make it effective after manually mounting.

Changelog

  • Import from ibus-tweaker and remove features unrelated to IBus.
  • Read from user themes and apply only for IBus.
  • Merge functions related together.
  • V4: Update from GTK3 to GTK4 to adapt for GNOME40.
  • V8: Add functionality to modify IBus Background picture.
  • V13: Strip the current function of extracting IBus style from Gnome shell theme, implement using CSS parser libraries in Python instead of regular expression. Additional IBus style sheets are generated for users to modify and test.
  • V13: Modify this extension to accept IBus style sheets provided by users for style application.
  • V16: Modify theme load logic so that now we don't need to reload GNOME-Shell to change IBus themes.
  • V18: Add theme and background picture follow GNOME Night Light Mode.
  • V18: Refactor code.
  • V20: Change UI;Add Help page.
  • V22: Re-design UI.
  • V24: Add background picture displaying mode configure.
  • V26: Add background picture displaying repeat mode configure.
  • V28: Add extension prefs menu entry into IBus Input Source Indicate Panel.
  • V30: Add Remember Input State options.
  • V32: Change extension logo and UI.
  • V36: Add tray menu entries modifications and start/restart IBus button.
  • V38: Add IBus version displaying and input source indicator.
  • V40: Fix input source indicator BUGS, add more configs. Add IBus Input Popup Box animation customization feature.
  • V42: Add drag to move function.
  • V44: Refactor dragging to move feature to make it more robust.
  • V46: Fix several BUGs. Add right click to close source indicator.
  • V48: Add right click candidate box to switch input source. Support show or hide tray icon, directly click tray icon to switch input source.
  • V50: Add open menu for candidate right click, and click Input Source Indicator to switch source.
  • V52: Add feature for fixing candidate box.
  • V54: Fix support for ibus-rime of candidate box right click and indicator.
  • V55: Merge 3.38 into 40, make some changes for UI.
  • V56: UI changes. Add restoring default settings option. Clean codebase.
  • V57: Add feature for exporting and restoring settings from file.
  • V58: Add icons for opening files directly from Prefs. Change _.dconf into _.ini for configurations files.
  • V59: Add fix IME list order function and buttons to start official customization settings.
  • V60: Add customize font for indicator. Add show or hide candidate box page buttons. Improve on showing background.
  • V61: Add scroll on candidates box to switch among pages or candidates, scroll on indicator to switch input source.
  • V62: Fix settings sync problem with ibus-setup (preference).
  • V63: Fix to avoid tainting the GNOME Shell environment.
  • V64: Fix typos and indicator scroll settings control.
  • V65: Move project under openSUSE.
  • V66: Add support for openSUSE Leap 15.3.
  • V67: Further fix support for openSUSE Leap 15.3.
  • V68: Add functionality to modify opacity.
  • V69: Add support for theme style sheets hot reload.
  • V70: Fix and optimise for GSoC 2021 final submission.
  • V72: Add support for GNOME 41. Enable to reset to follow system themes and backgrounds.
  • V75: Fix support for wayland and reposition bug; Rearrange UI.
  • V76: Support hide input source indicator when using single mode IME. Add a show delay for input source indicator.
  • V77: Support instantly show indicator when switch window or IME even showing delay is enabled.
  • V78: Clean up and fix several Bugs.
  • V80: Relief from libnotify dependency. Fix IBus theme also get changed when using User Themes to change system themes.
  • V82: Initial support for GNOME 42.
  • V83: Support for GNOME 43.
  • V84: Fix to make lock screen theme get unaffected.
  • V85: Fix loading theme after unlocking the screen.
  • V86: Add support for GNOME 44.
  • V88: Have support for GNOME 45 (No support for any previous GNOME version now).
  • V89: Have support for GNOME 46 (No support for GNOME version 45 now).

Tested on Fedora, OpenSUSE, Manjaro, Ubuntu and FreeBSD, GNOME-shell 3.38(v3, v5, v9, v11, v14, v15, v17, v19, v21, v23, v25, v27, v29, v31, v35, v37, v39, v41, v43, v45, v47, v49, v51, v53(merged into main in later version)), 40.0(v4, v8, v10, v12, v13, v16, v18, v20, v22, v24, v26, v28, v30, v32, v36, v38, v40, v42, v44, v46, v48, v50, v52, v54), 3.38 and 40(v55, v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66), 3.34, 3.36, 3.38 and 40(v67, v68, v69, v70), 41(v72, v75, v76, v77, v78, v80), 42(v82), 43(v83, v84, v85), 44(v86), 45(v88), 46(v89).

Acknowledgements

  1. ibus-font-setting
  2. ibus-tweaker
  3. fixed-ime-list

This project was part of the achievement of @HollowMan6 partipating the Google Summer of Code 2021 at OpenSUSE.