This is a GNOME 3.2 shell extensions that let users have good old applet-like notification area on the top bar.
Thanks for mathematicalcoffee's help, there is a branch for gnome 3.6, you may check out it from https://github.com/mathematicalcoffee/EvilStatusIconForever or https://github.com/brianhsu/EvilStatusIconForever/tree/gnome3.6 if you have GNOME 3.6 installed.
After install and enable this extension, you should have a file under ~/.local/share/gnome-shell/extensions/[email protected]/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! :)