Bug 466054

Summary: Integrate input method panel into system tray
Product: [Plasma] plasmashell Reporter: Ryan Y <ryuichi.ya220>
Component: Kimpanel widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: nate, qydwhotmail, wengxt
Priority: NOR    
Version First Reported In: 5.27.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: fcitx5-unikey is in use

Description Ryan Y 2023-02-19 07:52:55 UTC
Created attachment 156477 [details]
fcitx5-unikey is in use

Currently the input method panel applet is separated from the system tray applet, and they use different spacing lengths between their icons.

As the result, the margin between icons in a panel is inconsistent as shown in the attachment.

I'm not sure if it's possible, but I would love to see them integrated in one applet and the icons aligned in a consistent manner.
Comment 1 Nate Graham 2023-02-22 02:10:30 UTC
It's possible; the applet just needs a metadata hint that tells the System Tray to include it.
Comment 2 Nate Graham 2023-05-18 18:26:54 UTC
It would basically be a matter of doing this in plasma-desktop:

diff --git applets/kimpanel/package/metadata.json applets/kimpanel/package/metadata.json
index ba4d6dce4..459dfa7f4 100644
--- applets/kimpanel/package/metadata.json
+++ applets/kimpanel/package/metadata.json
@@ -202,5 +202,7 @@
     "Keywords[zh_CN]": "Input;IM;输入法;输入;",
     "Keywords[zh_TW]": "Input;IM;",
     "X-Plasma-API": "declarativeappletscript",
-    "X-Plasma-MainScript": "ui/main.qml"
+    "X-Plasma-MainScript": "ui/main.qml",
+    "X-Plasma-NotificationArea": true,
+    "X-Plasma-NotificationAreaCategory": "SystemServices"
 }


But that would have the effect of loading it for everyone, so before doing this, we'd need to make some code changes to ensure that it:
- marks itself as disabled or passive when not set up
- shows a setup UI when activated before being set up that walks people through setting it up for the first time
- doesn't conflict with IBus when IBus is also running, and if it does, that it recognizes this and tells the user what to do about it
Comment 3 Fushan Wen 2023-05-24 13:06:41 UTC
Not sure if it's possible. An input method can have more than one icon.
Comment 4 Nate Graham 2023-05-24 13:13:45 UTC
This bug report is specifically about the Kimpanel widget. Does that still apply? (I don't use it, so I don't know)
Comment 5 Fushan Wen 2023-05-24 15:45:30 UTC
I don't think it possible since the tray icon only reserves space for one icon, and that's why kimpanel is not integrated with the system tray.
Comment 6 Nate Graham 2023-05-24 15:46:05 UTC
All right.
Comment 7 Ryan Y 2023-05-24 17:42:40 UTC
OK, thank you two for looking into this bug report.