Giter Site home page Giter Site logo

gnome-shell-extension-icon-hider's Introduction

Icon Hider for Gnome Shell

Icon Hider is a Gnome Shell extension for managing status area items. This extension creates a special menu by which you can change visibility of the desired item.

If you don't want to see the extension's icon you always can hide it through the preferences dialog.

Installation

https://extensions.gnome.org/extension/351/icon-hider/

gnome-shell-extension-icon-hider's People

Contributors

ai avatar frnogueira avatar hydr8gon avatar ikalnytskyi avatar jonafato avatar jonnius avatar l300lvl avatar michaeltunnell avatar theychx avatar yasinuslu avatar zapashcanon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gnome-shell-extension-icon-hider's Issues

request: hide itself

forked intending to do this:

Add an "icon hider" toggle to the extension menu. allowing it to hide itself.

add an option "Icon hider" to the user menu that shows the extension, so the user can access from there, or show it again.

...but the code is larger than i though and i have zero experience with gnome extensions and that icon is not so big of a problem. so i may take a while to add that. So getting the word out in hopes someone want to do the work :)

Push v21 on GNOME extensions

Hello,

I see v21 was released 2 days ago, but unfortunately, it is not available on GNOME extensions, so I'm stuck with a broken v20. 😒

Not compatible with gjs >= 1.53.90

Trying to launch the extension preferences dialog gives the following:

SyntaxError: missing ( after for

Stack trace:
  _getExtensionPrefsModule@resource:///org/gnome/shell/extensionPrefs/main.js:76:13
  wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
  _selectExtension@resource:///org/gnome/shell/extensionPrefs/main.js:91:31
  wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
  _onCommandLine@resource:///org/gnome/shell/extensionPrefs/main.js:244:17
  wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
  main@resource:///org/gnome/shell/extensionPrefs/main.js:398:5
  @<main>:1:43

Newest commit broke 'icon' list

I previous posted here #5 about how the newest commit isn't working with 3.6, but now I tested it under 3.4 as well to try to find the difference and it's broken here as well.

The panel icon only shows the 'Settings' entry, and trying to add an entry manually in dconf-editor gave an error on 3.6, I can't try it on 3.4 right now but the prefs panel in 3.4 is the same, the first tab is empty.

It seems like a problem with the gschema settings somewhere...

Add Icon Hider switch or link to prefs panel in userMenu

I was thinking since now we have the ability to only show the Icon Hider in the prefs panel, that for quicker access it would be nice to either have a link to run "gnome-shell-extension-prefs [email protected]"

and/or also have a toggle switch on the user menu itself that shows/hides the Icon Hider.

And heres the changes from before for 3.6, I only made the smaller changes for adding to the panel and to make the icon work again: http://paste.opensuse.org/32739416

Add option to hide user name separately

Need reopened

This is not exactly the idea of this extension, but I think it would fit in hand in hand with hiding items from the panel.

I was trying to implement this with the last version but I haven't been able to create a toggle switch yet, so the following is more of a proof of concept as it can't be switched on or off, and it doesn't re-add the user name on disable.

So this creates the switch at the top of the _createMenu function, so it is properly added to the menu, but it needs a toggle function and then has to connect to that:

_createMenu: function() {

        //option to hide user name at beggining of menu
        let hideName = Main.panel.statusArea.userMenu._name.hide();
        let userName = new PopupMenu.PopupSwitchMenuItem(_("User Name"), hideName)
        this.menu.addMenuItem(userName)

    let hiddenItems = this._settings.get_strv(GSETTINGS_HIDE_KEY)

I think on disable the extension would just need to check if Main.panel.statusArea.userMenu._name is null or not, unless the extension can un-toggle everything itself somehow.

GNOME 3.36 support

@theychx thanks for your awesome extension

Unfortunately, latest Icon Hider doesn’t work in 3.35 and will not work in 3.36 (which will be released next week).

Here is an error:

JS ERROR: Extension [email protected]: Error: Extension point conflict: there is already a status indicator for role Icon Hider
addToStatusArea@resource:///org/gnome/shell/ui/panel.js:1108:19
enable@/home/ai/.local/share/gnome-shell/extensions/[email protected]/extension.js:156:24
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:160:32
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:311:26
callback@resource:///org/gnome/shell/ui/extensionDownloader.js:204:39
gotExtensionZipFile/<@resource:///org/gnome/shell/ui/extensionDownloader.js:97:13

Also, you have a few warnings:

Usage of object.actor is deprecated for ActivitiesButton
Usage of object.actor is deprecated for AppMenuButton
Usage of object.actor is deprecated for DateMenuButton
…

Latest commit error on enable/disable/enable

This happens when the extension is enabled, then disabled, and enabled again:

  JS LOG: Extension "[email protected]" had error: Error: Extension point conflict: there is already a status indicator for role Icon Hider
  JS LOG: *** TIMEOUT REACHED

I have not tested if it happened before the new commit or if it happened on 3.4. (To view errors on 3.6: cat ~/.cache/gdm/session.log)

Unable to show preference on Gnome Shell 40.9

The error shown in logs:

gjs[11053]: JS ERROR: Failed to open preferences: Error: No property margin on GtkGrid
  _init/Gtk.Widget.prototype._init@resource:///org/gnome/gjs/modules/core/overrides/Gtk.js:45:40
  _initUtilitiesTab@/home/foobar/.local/share/gnome-shell/extensions/[email protected]/prefs.js:94:20
  wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:83:27
  _init@/home/foobar/.local/share/gnome-shell/extensions/[email protected]/prefs.js:51:14
  wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:83:27
  buildPrefsWidget@/home/foobar/.local/share/gnome-shell/extensions/[email protected]/prefs.js:120:18
  _init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:219:40
  OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:128:33
  asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22
  run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:177:20
  main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
  run@resource:///org/gnome/gjs/modules/script/package.js:206:19
  start@resource:///org/gnome/gjs/modules/script/package.js:190:8
  @/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

The margin property is set also in the second place.

Once fixed another error arises:

JS ERROR: Failed to open preferences: TypeError: this.add is not a function
  _init@/home/foobar/.local/share/gnome-shell/extensions/[email protected]/prefs.js:52:14
  wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:83:27
  buildPrefsWidget@/home/foobar/.local/share/gnome-shell/extensions/[email protected]/prefs.js:120:18
  _init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:219:40
  OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:128:33
  asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22
  run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:177:20
  main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
  run@resource:///org/gnome/gjs/modules/script/package.js:206:19
  start@resource:///org/gnome/gjs/modules/script/package.js:190:8
  @/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

Tested with Gnome 40.9 and version 24.

Problem with dropbox app indicator and network

The list of Show/Hide icons is full of items like "appindicator-dropbox-client-xxxx"
There is also a problem with network indicator. Whenever I am disconnected, the network icon reappears and stays there until I manually turn on and off again.

Unable to scroll list

Some system tray icons reappear and for each time I start an application, which possesses a tray icon, they seem to have a different app-indicator ID. So every time I have to manually hide some apps via icon hider. But now the list of icons to hide is becoming too large and I can't even see the position where I could set the slider and I am not able to scroll this list. There is also no possibility to remove "old" app indicators from this list.

It would help to be able to scroll this list of icons, which I want to hide. Many thanks in advance!

Obsolete ID strings are kept indefinitely

Icons coming from the Ayatana layer seem to include a PID(?) in their ID string, like Software Update ('appindicator-:1.91/org/ayatana/NotificationItem/software_update_available'), Remmina (' appindicator-:1.211/org/ayatana/NotificationItem/remmina_icon', or the Remote Desktops ('appindicator-:1.92/org/ayatana/NotificationItem/vino_app_indicator').

Since those icons can change IDs (i.e. at reboots) but the old names are not removed, the icon list grows up indefinitely.

The conf values "hidden" and "known" should be checked for obsolete values, and nonexistant icons should be deleted.

Stops working after lock/unlock or going to overview

This is a confusing issue, under 3.6, but I would assume its a problem with the extension somehow. Basically what happens is you enable it, it works fine, and then you go into the overview a couple times or lock your screen and come back.

Lets use the screen lock as an example, you lock your screen, and when you come back type your password and hit enter, everything comes back as normal except in the panel you now see the standard icons including the keyboard icon. So now it seems the extension is not enabled, when it really is.

So then I can disable/enable the extension again or just restart shell and everything is back to normal, the extension works again.

But it seems the extension is causing this, as the icons that come back dont include all the icons you should see. For example, if I use transmission daemon indicator, that icon appears fine on the panel, but then after the lock/unlock, the normal icons are back but the custom extensions icons are hidden. So for some reason the extension is not restoring the correct settings maybe?

GNOME 3.10 support

GNOME 3.10 is released and some users start to using them from Ubuntu 13.10 and Fedora 20.

Your extension is awesome and I feel very badly without it on my GNOME 3.10 :).

Broken on GNOME 3.32

The extension does not work under 3.32 right now. There are a handful of issues regarding object inheritance and a severe one that occurs during disable causing the whole GNOME session to crash (this occurs most noticeably within _reloadSettings. Stack trace below:

Object St.Bin (0x42a6e90), has been already deallocated β€” impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x20be2e0 ==
#0        222b688 i   resource:///org/gnome/shell/ui/panel.js:1193 (7f5034f50e50 @ 39)
#1   7ffd4e44fc10 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f50354cb670 @ 386)
#2        222b600 i   resource:///org/gnome/shell/ui/popupMenu.js:872 (7f503511fca0 @ 153)
#3        222b560 i   resource:///org/gnome/shell/ui/popupMenu.js:738 (7f503511f8b0 @ 17)
#4        222b4d8 i   resource:///org/gnome/shell/ui/popupMenu.js:878 (7f503511fdc0 @ 63)
#5        222b450 i   resource:///org/gnome/shell/ui/panelMenu.js:192 (7f5035169c10 @ 53)
#6   7ffd4e451f50 b   self-hosted:977 (7f50351524c0 @ 413)
#7        222b388 i   /home/jonafato/.nix-profile/share/gnome-shell/extensions/[email protected]/extension.js:201 (7f5016e7a820 @ 621)
#8        222b308 i   /home/jonafato/.nix-profile/share/gnome-shell/extensions/[email protected]/extension.js:209 (7f5016e7a8b0 @ 17)
#9   7ffd4e454740 b   self-hosted:979 (7f50351524c0 @ 440)
#10        222b268 i   /home/jonafato/.nix-profile/share/gnome-shell/extensions/[email protected]/extension.js:133 (7f5016e7a670 @ 134)
#11        222b1e0 i   /home/jonafato/.nix-profile/share/gnome-shell/extensions/[email protected]/extension.js:86 (7f5016e7a4c0 @ 59)
#12   7ffd4e4577e0 b   self-hosted:979 (7f50351524c0 @ 440)
#13   7ffd4e4578d0 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f50354cb670 @ 386)
#14        222b150 i   resource:///org/gnome/shell/ui/popupMenu.js:354 (7f503511cee0 @ 56)
#15        222b0c8 i   resource:///org/gnome/shell/ui/popupMenu.js:340 (7f503511ce50 @ 42)
#16        222b040 i   resource:///org/gnome/shell/ui/popupMenu.js:118 (7f503511c1f0 @ 45)
#17   7ffd4e459580 b   self-hosted:979 (7f50351524c0 @ 440)
Object .Gjs_Indicator (0x42a64e0), has been already deallocated β€” impossible to get any property from it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Object .Gjs_Indicator (0x42a64e0), has been already deallocated β€” impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x20be2e0 ==
#0   7ffd4e457750 b   resource:///org/gnome/shell/ui/boxpointer.js:268 (7f5035114280 @ 611)
#1   7ffd4e4597a0 b   resource:///org/gnome/shell/ui/layout.js:978 (7f50351010d0 @ 149)
#2   7ffd4e459850 b   self-hosted:975 (7f50351524c0 @ 392)
== Stack trace for context 0x20be2e0 ==
#0   7ffd4e457680 b   resource:///org/gnome/shell/ui/boxpointer.js:482 (7f50351144c0 @ 179)
#1   7ffd4e457750 b   resource:///org/gnome/shell/ui/boxpointer.js:269 (7f5035114280 @ 634)
#2   7ffd4e4597a0 b   resource:///org/gnome/shell/ui/layout.js:978 (7f50351010d0 @ 149)
#3   7ffd4e459850 b   self-hosted:975 (7f50351524c0 @ 392)
segfault at fffffffffffffbb8 ip 00007f504dcd5f38 sp 00007ffd4e456e90 error 5 in libst-1.0.so[7f504dca8000+33000]
Apr 12 23:28:33 nixpad kernel: Code: 00 00 48 8d 3d 67 8c 00 00 e9 e4 2f fd ff 0f 1f 40 00 41 57 41 56 41 55 41 54 55 53 48 83 ec 28 48 63 1d fb 94 01 00 48 01 fb <48> 8b 6b 08 48 85 ed 74 17 48 83 c4 28 48 89 e8 5b 5d 41 5c 41 5d
Unregistered Authentication Agent for unix-session:24 (system bus name :1.1253, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
WARNING: Application 'org.gnome.Shell.desktop' killed by signal 11
WARNING: App 'org.gnome.Shell.desktop' respawning too quickly
WARNING: Application 'org.gnome.Shell.desktop' killed by signal 11
Unrecoverable failure in required component org.gnome.Shell.desktop

Add exceptions option to preferences panel

This is a feature request. With the newest commit it now seems it would be nice to see the exceptions list configurable in the preferences panel.

This way if there are extensions/icons we personally know don't work well or perhaps we don't ever want to be able to easily disable, we can just add them to the exceptions list and be done with it, without opening the extension.js

Some extensions reappear

If I log off, reboot or use the PC for some time, several extension icons that should be hidden reappear.

So I have to choose an extension from the list and then select to hide again. Or press 'Alt + F2', type 'R' and press 'Enter'.

captura de tela de 2018-04-18 01-07-50

captura de tela de 2018-04-18 01-04-22

Usage of object.actor is deprecated for ATIndicator with gnome-shell 3.34

After upgrade gnome-shell to 3.34 I observe the fallowing errors in the system log:

gnome-shell[4902]: Usage of object.actor is deprecated for ATIndicator
  get@resource:///org/gnome/shell/ui/environment.js:249:29
  disable@/home/foobar/.local/share/gnome-shell/extensions/[email protected]/extension.js:194:13
  _callExtensionDisable@resource:///org/gnome/shell/ui/extensionSystem.js:95:13
  _disableAllExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:515:17
  _disableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:514:13
  _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:532:13
  _emit@resource:///org/gnome/gjs/modules/signals.js:135:27
  _sync@resource:///org/gnome/shell/ui/sessionMode.js:205:9
  pushMode@resource:///org/gnome/shell/ui/sessionMode.js:167:9
  activate@resource:///org/gnome/shell/ui/screenShield.js:1272:17
  lock@resource:///org/gnome/shell/ui/screenShield.js:1321:9
  _onStatusChanged/this._lockTimeoutId<@resource:///org/gnome/shell/ui/screenShield.js:850:21

You cannot be sure with limited metadata available in Gnome shell extensions, but I should be the latest released version - "version": 23. I don't see any related fixes in master since then.

Respect auto hidden (context based) icons like "Lock Keys"

Extensions like Lock Keys and Apt Update Indicator have options to hide automatically when there is nothing relevant to show. This extension does not respect that behavior as it shows these icons regardless and if set to hide they never show up again even if the context arises (i.e. pressing the Caps Lock button for example). Is it possible to fix this? If you do not have the time I'd like to give it a shot myself, but I have no experience with Gnome Shell Extensions...

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.