Coder Social home page Coder Social logo

evilstatusiconforever's Introduction

Evil Status Icon Forever

This is a GNOME 3.2 shell extensions that let users have good old applet-like notification area on the top bar.

How to Install

  1. Enable it at https://extensions.gnome.org/extension/99/evial-status-icon-forerver/

How to Use

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'
]

How to Find Application Name

  1. This may borken your GNOME, BE CAREFUL AND BACKUP FIRST!!!!

  2. You need root premission to do this.

  3. Edit /usr/share/gnome-shell/js/ui/statusIconDispatcher.js

  4. 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); },

  5. Add global.log("wmClass[] = " + wmClass); after the line of let 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); },

  6. Restart GNOME 3 by press Alt + F2 and r and hit enter.

  7. Start GNOME console by press Alt + F2 and lg and hit enter.

  8. Switch to Errors tab, now you should see message like the following:

    wmClass[] = deadbeef wmClass[] = pidgin

  9. 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.

  10. Restart GNOME, now you should see them on top bar. Goold Luck! :)

evilstatusiconforever's People

Contributors

brianhsu avatar fcapano avatar

Watchers

 avatar  avatar

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.