Giter Site home page Giter Site logo

shihira / gnome-extension-quicktoggler Goto Github PK

View Code? Open in Web Editor NEW
40.0 40.0 9.0 183 KB

DEPRECATED: Switched to KDE, so goodbye friends. Toggling services, launching apps in one click.

Home Page: https://extensions.gnome.org/extension/1077/quick-toggler/

JavaScript 90.90% CSS 0.37% Makefile 2.08% Shell 6.64%

gnome-extension-quicktoggler's People

Contributors

dipunm avatar jonnius avatar shihira 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gnome-extension-quicktoggler's Issues

GNOME 3.36 compatibility

Quick Toggler does not work on GNOME 3.36. The icon appears in the top bar but nothing happens if you click on it.

Journalctl prints this error message for /usr/bin/gnome-shell:

Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code accessed the property 'LOG_FILE' on the module 'prefs'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code accessed the property 'NOTIFICATION_COND' on the module 'prefs'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code accessed the property 'INDICATOR_ICON' on the module 'prefs'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Usage of object.actor is deprecated for TogglerIndicator
                                                      get@resource:///org/gnome/shell/ui/environment.js:285:29
                                                      get_layout@/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/extension.js:206:13
                                                      wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:82:27
                                                      _loadIcon@/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/extension.js:251:18
                                                      wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:82:27
                                                      _loadSettings@/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/extension.js:215:14
                                                      wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:82:27
                                                      _init@/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/extension.js:198:14
                                                      wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:82:27
                                                      enable@/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/extension.js:450:17
                                                      _callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:160:32
                                                      _onEnabledExtensionsChanged/<@resource:///org/gnome/shell/ui/extensionSystem.js:446:18
                                                      _onEnabledExtensionsChanged@resource:///org/gnome/shell/ui/extensionSystem.js:445:11
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code accessed the property 'INDICATOR_TEXT' on the module 'prefs'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code accessed the property 'ENTRIES_FILE' on the module 'prefs'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code accessed the property 'ConfigLoader' on the module 'core'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code accessed the property 'SHOW_FILTER' on the module 'prefs'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code accessed the property 'DETECTION_INTERVAL' on the module 'prefs'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code accessed the property 'MENU_SHORTCUT' on the module 'prefs'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: JS WARNING: [/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/extension.js 370]: reference to undefined property "MESSAGE_TRAY"
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to explicitly call ByteArray.toString(array).
                                                      (Note that array.toString() may have been called implicitly.)
                                                      0 realPipeOpen/wait_cb/<() ["/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/core.js":117:29]
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to explicitly call ByteArray.toString(array).
                                                      (Note that array.toString() may have been called implicitly.)
                                                      0 realPipeOpen/wait_cb/</<() ["/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/core.js":121:33]
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: JS WARNING: [/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/core.js 254]: reference to undefined property "item"
Mar 12 15:35:36 dolwup-XPS-13-9370 gnome-shell[1400]: JS ERROR: TypeError: this.item is undefined
                                                      _loadState@/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/core.js:254:13
                                                      wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:82:27
                                                      pulse/<@/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/core.js:262:18
                                                      _detect/<@/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/core.js:226:13
                                                      realPipeOpen/wait_cb/</<@/home/dolwup/.local/share/gnome-shell/extensions/[email protected]/core.js:124:17

Edit: I also found that this only happens if you have a toggler in your entries.json
Edit: Updated the log I included to show more than just the repeating part

Not available on Gnome 3.20

Please add compatibility to Fedora 24 (Gnome 3.20).

I just added 3.20 in metadata.json and it's working normally.

Compatibility metadata outdated

I was wondering whether you could release an update which updated the shell-versions array in metadata.json, since the extension works fine with the latest shell versions. The fact that his extension only claims to be compatible with versions on gnome-shell up to 3.20 makes updating my extensions via gnome-shell-extension-installer quite annoying.

encourage people to share their menu entries

Hi there,

I think making a quick link from README.md --> create a new issue to share entries is a good idea. It will help provide people with more useful menu entries, generated by the community.

The url syntax (to pre-populate issue fields) is explained here:

https://eric.blog/2016/01/08/prefilling-github-issues/

Something like this:

https://github.com/Shihira/gnome-extension-quicktoggler/issues/new?labels[]=examples&title=New%20Example:%20&body=This%20is%20a%20user%20contributed%20example%20menu%20entry%20paste%20your%20code%20below

Support for systemd user services

There does not seem to be any support for systemd user services. There should be an option for this. For example, redshift service has to be started using:

systemctl --user start redshift.service

Which also doesn't require the user's password since it's not a system service. There can be an option in entries.json that specifies if it is a system or a user service.

{
    "type": "systemd",
    "title: "Redshift",
    "unit": "redshift",
    "user": true
}

"wrong" detection of service status

I configured three different systemd entries in my config file. The detection of service status does not work for two of them (postgresql and oracle-xe).

I suppose that the problem is that the word "running" is not in the output of the systemctl status command although the service is running.

My entries.json file:

{
  "entries": [
    {
      "type": "systemd",
      "title": "Apache Httpd 2.4",
      "unit": "apache2"
    }, {
      "type": "systemd",
      "title": "Postgre SQL 9.1",
      "unit": "postgresql"
    }, {
      "type": "systemd",
      "title": "Oracle 11.2 XE",
      "unit": "oracle-xe"
    }
  ]
}

The output of service httpd status ; service postgresql status ; service oracle-xe status when all the services are running.

apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: active (running) since Fri 2016-05-06 08:40:02 CEST; 6h ago
 Main PID: 2036 (httpd2-prefork)
   Status: "Total requests: 8; Current requests/sec: 0; Current traffic:   0 B/sec"
[ snip snip ]

postgresql.service - LSB: Start the PostgreSQL master daemon
   Loaded: loaded (/etc/init.d/postgresql)
   Active: active (exited) since Fri 2016-05-06 08:40:07 CEST; 6h ago
  Process: 2044 ExecStart=/etc/init.d/postgresql start (code=exited, status=0/SUCCESS)
[ snip snip ]

oracle-xe.service - LSB: Oracle Database 11g Express Edition
   Loaded: loaded (/etc/init.d/oracle-xe)
   Active: active (exited) since Fri 2016-05-06 15:07:37 CEST; 13min ago
  Process: 5653 ExecStop=/etc/init.d/oracle-xe stop (code=exited, status=0/SUCCESS)
  Process: 7113 ExecStart=/etc/init.d/oracle-xe start (code=exited, status=0/SUCCESS)
[ snip snip ]

I'm using OpenSuSE 13.2 and gnome-shell 3.14 and, yes, I changed the metadata.json file.

react on returncode instead of "space" on toggler

I think it would be a more effective way to react on returncodes for "detector" instead of listening to the output.

If the output consists of whitespaces or is empty, the detection result is false. Otherwise it is true. The switch will then be switch on or off automatically.

For example if the returncode is 0 the detection result ist true otherwise (if the returncode != 0 ) the detection result is false.

In my case i wrote a script to activate/deactivate some shortcuts for using windows in virtual box. Of course i am writing some output to the shell if i start the script:

christian@hugo:~$ win_keys.sh start
Parameter is start. Going to disable the defined windows keys.
christian@hugo:~$ win_keys.sh status
Windows keys are disabled in gnome (rc 0)
christian@hugo:~$ win_keys.sh stop
Parameter is stop. Going to enable the defined windows keys.
christian@hugo:~$ win_keys.sh status
Windows keys are enabled in gnome (rc 1)

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.