Closed tghelere closed 1 year ago
Basically you need to hover cursor on the window you would like to change opacity, holding ALT and scroll mouse to change opacity. Please attached the logs if you can not see the opacity change. Here is the command to view the logs:
journalctl /usr/bin/gnome-shell -f
journalctl /usr/bin/gnome-shell -f -- Logs begin at Fri 2018-07-27 14:43:24 -03. -- ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:52:27 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:55:52 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:55:52 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:55:52 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:55:52 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition ago 02 17:55:52 tghelere-pc gnome-shell[1393]: Ignoring excess values in shadow definition
I didn't find useful info. The extension is located at ~/.local/share/gnome-shell/extensions/transparent-window@pbxqdown.github.com. Try open extension.js, use the log code currently commented out, rerun(alt+f2 -> r) the gnome shell and see what is logged.
Same here, no reaction with ALT+scroll, repeated lots of times in terminal and syslog: Aug 14 20:18:35 user gnome-shell[1611]: JS WARNING: [/home/user/.local/share/gnome-shell/extensions/glassygnome@emiapwil/extension.js 365]: Too many arguments to function GLib.timeout_add: expected 3, got 4
I'm not able to debug without log. Please provide your OS and GNOME version, uncomment the log statement, and see what is logged.
Thanks for the reply. I don't know how to open extension.js. This is Ubuntu 18.04.1 with gnome-shell 3.28, but in the meantime I'm back to Unity with Compiz since gs for me without transparency is hardly usable.
@lysist , I think your environment should be fine, I'm also in Ubuntu 18.04 with GNOME 3.28, and I recently moved from Unity to Gnome because it looks better ;) Developing a Gnome extension is not hard, I suggest reading this article: https://wiki.gnome.org/Projects/GnomeShell/Extensions/StepByStepTutorial extension.js can be modified using a text editor, just uncomment the log code.
@pbxqdown, thanks for the link, and yes Gnome is not bad. I've managed to open the .js file, that was easy, sorry that I hadn't a clue in the first place. There is actually nothing serious logged. Unfortunately it doesn't take the text file to upload so I need to post the lines from log viewer all here and I've marked the relevant line. Aug 16 09:45:19 gnome-shell[8892]: test Aug 16 09:45:19 gnome-shell[8892]: [glassy-gnome]: initialized Aug 16 09:45:19 gnome-shell[8892]: [glassy-gnome]: Successfully add key binding for toggle-glassy-global-key Aug 16 09:45:19 gnome-shell[8892]: [glassy-gnome]: Successfully add key binding for toggle-glassy-window-key Aug 16 09:45:19 gnome-shell[8892]: [glassy-gnome]: Successfully add key binding for inc-opacity-key Aug 16 09:45:19 gnome-shell[8892]: [glassy-gnome]: Successfully add key binding for dec-opacity-key Aug 16 09:45:19 gnome-shell[8892]: [glassy-gnome]: Successfully add key binding for reset-opacity-key Aug 16 09:45:19 gnome-shell[8892]: [glassy-gnome]: enabled Aug 16 09:45:19 gnome-shell[8892]: Some code accessed the property 'PanelTransparency' on the module 'transparency'. 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. Aug 16 09:45:19 gnome-shell[8892]: Some code accessed the property 'GlobalSignalsHandler' on the module 'utils'. 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. Aug 16 09:45:19 gnome-shell[8892]: JS WARNING: [/home/user/.local/share/gnome-shell/extensions/transparent-window@pbxqdown.github.com/extension.js 119]: unreachable code after return statement Aug 16 09:45:19 gnome-shell[8892]: Some code accessed the property 'ScrollablePopupMenu' on the module 'scrollablePopupMenu'. 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. Aug 16 09:45:19 gnome-shell[8892]: Some code accessed the property 'PopupExtensionItem' on the module 'popupExtensionItem'. 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. Aug 16 09:45:19 gnome-shell[8892]: loading default theme (Adwaita) Aug 16 09:45:19 gnome-shell[8892]: JS WARNING: [/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/appIcons.js 1027]: unreachable code after return statement Aug 16 09:45:19 gsd-media-keys[6128]: g_variant_get_va: assertion 'value != NULL' failed Aug 16 09:45:19 gsd-media-keys[6128]: g_variant_unref: assertion 'value != NULL' failed Aug 16 09:45:19 gnome-shell[8892]: JS WARNING: [/home/user/.local/share/gnome-shell/extensions/glassygnome@emiapwil/extension.js 365]: Too many arguments to function GLib.timeout_add: expected 3, got 4 Aug 16 09:45:20 gnome-shell[8892]: message repeated 5 times: [ JS WARNING: [/home/zookeeper/.local/share/gnome-shell/extensions/glassygnome@emiapwil/extension.js 365]: Too many arguments to function GLib.timeout_add: expected 3, got 4] Aug 16 09:45:20 org.gnome.Shell.desktop[5979]: Window manager warning: Overwriting existing binding of keysym ff09 with keysym ff09 (keycode 17). Aug 16 09:45:20 org.gnome.Shell.desktop[5979]: Window manager warning: Overwriting existing binding of keysym ff09 with keysym ff09 (keycode 17). Aug 16 09:45:21 gnome-shell[8892]: [AppIndicatorSupport-WARN] Failed to acquire org.kde.StatusNotifierWatcher Aug 16 09:45:21 gnome-shell[8892]: Error looking up permission: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.impl.portal.PermissionStore was not provided by any .service files Aug 16 09:45:22 gnome-shell[8892]: [AppIndicatorSupport-DEBUG] Using Brute-force mode for StatusNotifierItem :1.86/org/ayatana/NotificationItem/software_update_available Aug 16 09:45:22 gnome-shell[8892]: [AppIndicatorSupport-DEBUG] Registering StatusNotifierItem :1.86/org/ayatana/NotificationItem/software_update_available Aug 16 09:45:22 gnome-shell[8892]: JS WARNING: [/home/user/.local/share/gnome-shell/extensions/openweather-extension@jenslody.de/openweathermap_org.js 379]: reference to undefined property "deg" Aug 16 09:45:22 gnome-shell[8892]: JS WARNING: [/home/user/.local/share/gnome-shell/extensions/openweather-extension@jenslody.de/extension.js 1169]: reference to undefined property "NaN" Aug 16 09:45:23 org.gnome.Shell.desktop[5979]: Window manager warning: Overwriting existing binding of keysym ff09 with keysym ff09 (keycode 17). Aug 16 09:45:23 org.gnome.Shell.desktop[5979]: Window manager warning: Overwriting existing binding of keysym 6e with keysym 6e (keycode 39). Aug 16 09:45:23 org.gnome.Shell.desktop[5979]: Window manager warning: Overwriting existing binding of keysym 38 with keysym 38 (keycode 11). Aug 16 09:45:23 org.gnome.Shell.desktop[5979]: Window manager warning: Overwriting existing binding of keysym 30 with keysym 30 (keycode 13). Aug 16 09:45:23 org.gnome.Shell.desktop[5979]: Window manager warning: Overwriting existing binding of keysym ff09 with keysym ff09 (keycode 17). Aug 16 09:45:23 org.gnome.Shell.desktop[5979]: Window manager warning: Overwriting existing binding of keysym 39 with keysym 39 (keycode 12). Aug 16 09:45:24 gnome-shell[8892]: GNOME Shell started at Thu Aug 16 2018 09:45:19 GMT+0200 (CEST) Aug 16 09:46:00 gnome-shell[8892]: Hot key pressed Aug 16 09:46:00 gnome-shell[8892]: 24 Aug 16 09:46:02 gnome-shell[8892]: Hot key pressed Aug 16 09:46:02 gnome-shell[8892]: 16 Aug 16 09:51:09 gnome-shell[8892]: JS WARNING: [/home/user/.local/share/gnome-shell/extensions/glassygnome@emiapwil/extension.js 365]: Too many arguments to function GLib.timeout_add: expected 3, got 4 Aug 16 09:51:12 dbus-daemon[5842]: [session uid=1000 pid=5842] Activating service name='org.gnome.gedit' requested by ':1.142' (uid=1000 pid=8892 comm="gnome-shell -r " label="unconfined") Aug 16 09:51:12 dbus-daemon[5842]: [session uid=1000 pid=5842] Successfully activated service 'org.gnome.gedit' Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:27:35: Junk at end of value for background-color Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:40:48: Junk at end of value for background-color Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:48:46: Junk at end of value for background-color Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:59:58: Junk at end of value for background-color Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:66:28: The :prelight pseudo-class is deprecated. Use :hover instead. Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:70:46: Junk at end of value for background-color Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:77:35: The :prelight pseudo-class is deprecated. Use :hover instead. Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:81:58: Junk at end of value for background-color Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:123:31: The :insensitive pseudo-class is deprecated. Use :disabled instead. Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:124:24: The :insensitive pseudo-class is deprecated. Use :disabled instead. Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:156:27: The :insensitive pseudo-class is deprecated. Use :disabled instead. Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:157:29: The :insensitive pseudo-class is deprecated. Use :disabled instead. Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:177:34: The :insensitive pseudo-class is deprecated. Use :disabled instead. Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk.css:199:34: The :inconsistent pseudo-class is deprecated. Use :indeterminate instead. Aug 16 09:51:12 gedit[9155]: Theme parsing error: gtk-main.css:73:38: Failed to import: Fehler beim Öffnen der Datei »/usr/share/themes/Radiance/gtk-3.20/apps/gnome-builder.css«: Datei oder Verzeichnis nicht gefunden Aug 16 09:51:12 gedit[9155]: Error loading plugin '/usr/lib/x86_64-linux-gnu/gedit/plugins/dashboard.plugin': module name 'dashboard' has already been used Aug 16 09:51:12 gedit[9155]: Error loading plugin 'dashboard' Aug 16 09:51:12 gnome-shell[8892]: JS WARNING: [/home/user/.local/share/gnome-shell/extensions/glassygnome@emiapwil/extension.js 365]: Too many arguments to function GLib.timeout_add: expected 3, got 4 Aug 16 09:51:13 zeitgeist-daemon[6407]: #033[31m[07:51:13.008751 WARNING]#033[0m zeitgeist-daemon.vala:127: Unable to parse version info!
Thanks for the log, the useful part is this:
Aug 16 09:46:00 gnome-shell[8892]: Hot key pressed
Aug 16 09:46:00 gnome-shell[8892]: 24
Aug 16 09:46:02 gnome-shell[8892]: Hot key pressed
Aug 16 09:46:02 gnome-shell[8892]: 16
According to this link: https://lazka.github.io/pgi-docs/Gdk-3.0/flags.html#Gdk.ModifierType.SUPER_MASK There are 5 types of mod key in gdk. For US keyboard layout, pressing Alt key usually generates MOD1(which is 8) and releasing it generates 0. However, when you press Alt it generates 24(which is combination of MOD1 and MOD2), and release it generates 16(MOD2). I guess you are using another type of keyboard layout.
The quick fix would be change this line: https://github.com/pbxqdown/gnome-shell-extension-transparent-window/blob/master/extension.js#L109 to:
case 24:
which will activate the succeeding process. Please let me know if this can fix the issue. If it works I will consider adding a config dialog letting users choosing hotkey themselves.
PS: According to this link: https://wiki.archlinux.org/index.php/Xmodmap You can find your correct key modifier for Alt key using the following command:
xmodmap -pm
@pbxqdown
Wow, what a relief!
case 24:
worked and the mega clue is, it can be used for each window separately, awesome.
Kudos to you and thanks a lot.
btw. my keyboard layout is german.
Aug 20 18:31:37 gnome-shell[2351]: Hot key pressed Aug 20 18:31:37 gnome-shell[2351]: 24 Aug 20 18:31:37 gnome-shell[2351]: alt pressed, listening to scroll Aug 20 18:31:37 gnome-shell[2351]: overlay created Aug 20 18:31:37 gnome-shell[2351]: on scroll Aug 20 18:31:37 gnome-shell[2351]: 821,579 Aug 20 18:31:37 gnome-shell[2351]: 4 Aug 20 18:31:37 gnome-shell[2351]: on scroll Aug 20 18:31:37 gnome-shell[2351]: 821,579 Aug 20 18:31:37 gnome-shell[2351]: 1
Great, glad it works :-) I will add a config dialog so users will not have to hack...
@pbxqdown a dialog would upgrade the tool a lot and make more people happy who miss ccsm I guess. btw. I've switched from ALT-key to SHIFT-key, because somehow chromium wouldn't recognize ALT+arrow left or right anymore to go back and forth with websites, instead it logged me out on ALT+arrow left and switched to console on ALT+arrow right. Your script helped me to find out which key is SHIFT, so it is helpful in many ways :-)
I found that alt arrow bug too, seems like a existing bug: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1508146
@pbxqdown Thanks for the link, it's interesting and obviously tricky to research the cause. I've tried to repeat my case and switched the key again to ALT in your script in order to trigger the behaviour after restart of gnome-shell - but it didn't, everything works fine. Since I'm aware of this bug I'll leave the log code uncommented for a while, maybe it happens again and shows some useful output.
sw
How to change the keyboard shortcut
@moisestohias Try to set it in settings page by key press. If it doesn't work then you can manually set the number. Alt key has key code 8
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 15 days since being marked as stale.
I installed but I did not understand how to change the opacity. Nothing happens while trying ALT + scroll mouse.