tuberry / color-picker

Simple color picker for GNOME Shell.
GNU General Public License v3.0
150 stars 11 forks source link

Key shortcut does not work after system boot #2

Closed webmastak closed 4 years ago

webmastak commented 4 years ago

OS: Manjaro Linux GNOME-SHELL: 3.36.4

Key shortcut does not work after system boot. But after restarting the Gnome Shell (Alt+F2+r) everything works. On other extensions, everything works as it should.

How can this be fixed?

tuberry commented 4 years ago

Cannot reproduce on Arch / Gnome Shell 3.36.5. Does Manjaro do some magics(#1) on gnome shell? Maybe I should have a look into the 'other extensions'. Could tell me some about them?

webmastak commented 4 years ago

Here are some of them extensions:

TilixDropdown@ivkuzev@gmail.com
text-translator@pitcer.pl
gnome-shell-screenshot@ttll.de
drawOnYourScreen@abakkk.framagit.org
tuberry commented 4 years ago

I can see very little differences in the codes. Anyway, I update it. You can try it from Github to see if it works. :)

webmastak commented 4 years ago

All the same. 😟

It also starts working without restarting the Gnome Shell if: 1) open extension settings 2) off and on Shortcut

tuberry commented 4 years ago

It sounds like the shortcut is registered by others. Could you try to set it to another unused one(double click on the shortcut area to set)?

webmastak commented 4 years ago

The shortcut Control+Shift+1 is not used. I tried to change, the same.

tuberry commented 4 years ago

Emmm... Could you try the newest patch just updated? Also, you could try to disable other extension. I mean some extensions enabled after Color Picker may overwrite the shortcut.

webmastak commented 4 years ago
JS WARNING: [/home/andrew/.local/share/gnome-shell/extensions/color-picker@tuberry/extension.js 266]: reference to undefined property "PICKSHORTCUT"
JS ERROR: Extension color-picker@tuberry: Error: Expected type utf8 for Argument 'name' but got type 'undefined'
_toggleKeybindings@/home/andrew/.local/share/gnome-shell/extensions/color-picker@tuberry/extension.js:266:21
enable@/home/andrew/.local/share/gnome-shell/extensions/color-picker@tuberry/extension.js:327:39
tuberry commented 4 years ago

Please uninstall it then install it from Github :)

webmastak commented 4 years ago

All the same. 😂

I got tired of sorting out and made a hack ~/.config/autostart/shortcut-color-picker.desktop

[Desktop Entry]
Name=shortcut-color-picker
Comment=enable shortcut for color-picker
Icon=color-picker
Exec=bash -c "sleep 20 && dconf write /org/gnome/shell/extensions/color-picker/enable-shortcut false && dconf write /org/gnome/shell/extensions/color-picker/enable-shortcut true"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true
webmastak commented 4 years ago

Since I redid the extension a bit, I didn't immediately notice the error in the prefs.js file.

var Fields = {
    SHORTCUT:        'shortcut',
    ....

Replace to

var Fields = {
    ....
    PICKSHORTCUT:    'pick-shortcut',
    ....
};

Everything works with this code. 😀

tuberry commented 4 years ago

What exactly you did? I think I changed that in the latest commit. It's not recommended to paste all the code in comments. If it's OK with the version on Github, please close this.