glassy-gnome icon indicating copy to clipboard operation
glassy-gnome copied to clipboard

Change transparency by Alt+scroll

Open seriyps opened this issue 6 years ago • 8 comments

Hi,

Compiz have a plugin "Opacity, Brightness and Saturation" with the similar functionality as your extension but it uses keybinding scheme that I find as a very convinient: Alt + scroll-up to make window less transparent and Alt + scroll-down to make it more transparent https://askubuntu.com/a/133295

Would it be possible to add such a keybindings to your extension?

seriyps avatar Apr 08 '18 13:04 seriyps

Interesting key binding. I think it is possible and will take a look. Thanks for the info :)

emiapwil avatar Apr 11 '18 18:04 emiapwil

Hi @seriyps ,

After some experiment, I think you can do it with the following commands (in a terminal).

gsettings --schemadir ~/.local/share/gnome-shell/extensions/glassygnome@emiapwil/schemas \ 
          set org.gnome.shell.extensions.glassy-gnome inc-opacity-key "['<Alt>UP']"

gsettings --schemadir ~/.local/share/gnome-shell/extensions/glassygnome@emiapwil/schemas \ 
          set org.gnome.shell.extensions.glassy-gnome dec-opacity-key "['<Alt>DOWN']"

Please let me know if that works.

emiapwil avatar Apr 11 '18 18:04 emiapwil

@emiapwil hi, and thanks

I tried your suggested keybinding, but it uses UP and DOWN keyboard arrows, but I was talking about mouse whell (or touchpad) SCROLL-UP and SCROLL-DOWN. So yep, you hold Alt and scroll mouse wheel and this changes current window opacity.

seriyps avatar Apr 11 '18 19:04 seriyps

My mistake. Will check that later.

emiapwil avatar Apr 12 '18 04:04 emiapwil

One possible solution is to map the scroll up/down to a given keycode and use the keycode in the settings.

But I have not figured out how to do the mapping yet.

How GNOME identifies keycode

emiapwil avatar Apr 12 '18 05:04 emiapwil

I am also keen to see this implemented (I remember doing this with <Super> + scroll up). I don't think mapping should be necessary but I'm not sure how else it could be implemented.

jcuenod avatar Jun 28 '18 20:06 jcuenod

@jcuenod Do you still know how super + scroll-up works? Can I take a look?

emiapwil avatar Jul 29 '18 02:07 emiapwil

Well it was in the old compiz days. Looking at xev I'm seeing buttonpress/release events with the button value 4/5 for scrolling up and down. I don't know how to track these things in GJS though. The little I've done with GJS I found it to be total nightmare.

jcuenod avatar Jul 29 '18 14:07 jcuenod