This is a GNOME 3.2, 3.4 and 3.6 shell extension that let users have good old applet-like notification area on the top bar.
NOTE: this branch is patched from the original repository to work in 3.4 and 3.6 as well as the original 3.2. I patched the extension to work in GNOME 3.4 and 3.6 but didn't write the original extension, that was @brianhsu!
- Get the ZIP file from the Downloads page
- Unzip it in
~/.local/share/gnome-shell/extensions
- Enable the extension with
gnome-shell-extension-tool -e EvilStatusIconForever@bone.twbbs.org.tw
(if on GNOME 3.2, edit gsettings key 'org.gnome.shell.enabled-extensions') - Enable in gnome-tweak-tool.
NOTE: the version on extensions.gnome.org is the original version of this repository that I forked from: https://extensions.gnome.org/extension/99/evial-status-icon-forerver/
However that only works on 3.2. I have submitted a pull request to the original author to merge this repository into theirs.
After install and enable this extension, you should have a file under ~/.local/share/gnome-shell/extensions/EvilStatusIconForever@bone.twbbs.org.tw/extension.js
.
Open this file using your favorite text editor, you should have seen the following code section, just add the application into notification
array to make its notification show on top bar.
You may use removeStatusIcon
array to control which built-in icon should be hidden.
!! NOTE !!
You have to restart GNOME (Alt-F2 and enter r) to make it work after install and change settings!!
/*****************************************************
* Statuc Icon Settings
****************************************************/
//
// Add application you want it shows thier notification status
// icon on top bar to the following list.
//
// You may use top/htop to find out the name of application.
//
var notification = [
'deadbeef', // Deadbeef Music Player
'pidgin', // Pidgin IM Client
'gcin', // GCIN Chinese Input Method
'hime' // HIME Imput Method Editor
]
// Add which built-in status icon you want to remove in the
// following list.
//
var removeStatusIcon = [
'a11y', // Accessibility
// 'volume',
// 'battery',
// 'keyboard',
// 'bluetooth',
// 'network'
]
-
This may borken your GNOME, BE CAREFUL AND BACKUP FIRST!!!!
-
You need root premission to do this.
-
Edit
/usr/share/gnome-shell/js/ui/statusIconDispatcher.js
-
Move to line 48, you should see a function called
_onTrayIconAdded
which look like the following:_onTrayIconAdded: function(o, icon) { let wmClass = (icon.wm_class || 'unknown').toLowerCase(); let role = STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass]; if (role) this.emit('status-icon-added', icon, role); else this.emit('message-icon-added', icon); },
-
Add
global.log("wmClass[] = " + wmClass);
after the line oflet role = ...
, now this function should look like the following:_onTrayIconAdded: function(o, icon) { let wmClass = (icon.wm_class || 'unknown').toLowerCase(); let role = STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass]; global.log("wmClass[] = " + wmClass); if (role) this.emit('status-icon-added', icon, role); else this.emit('message-icon-added', icon); },
-
Restart GNOME 3 by press
Alt + F2
andr
and hit enter. -
Start GNOME console by press
Alt + F2
andlg
and hit enter. -
Switch to
Errors
tab, now you should see message like the following:wmClass[] = deadbeef wmClass[] = pidgin
-
The above is all tray icon you have now, pick up those tray icon you want it appears on top bar, and put thier name into
notification
array. -
Restart GNOME, now you should see them on top bar. Goold Luck! :)