mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
43 stars 47 forks source link

media-keys: Add support for display switch OSD #250

Closed zhangxianwei8 closed 5 years ago

zhangxianwei8 commented 5 years ago

Some laptops like thinkpad have a display switch mode hotkey. This is bound by default to XF86Display. Add OSD to give people a visual feed back to switch display mode.

The hotkey is like this: img_4043

looking the OSD bellow: screenshot at 2018-11-21 06-25-04 screenshot at 2018-11-21 06-25-30

How to test: Press the F7 hotkey on thinkpad with connecting more than one screen. Or execute:

xdotool key XF86Display
lukefromdc commented 5 years ago

Do we have someone here with the appropriate hardware to test this? The code looks OK but I don't have hardware to test it on for function (the usual issue with a converted Chromebook as my only running laptop).

yetist commented 5 years ago

I found that the "Adwaita" icon theme has the follow icons:

$ ls /usr/share/icons/Adwaita/scalable/devices/
video-display-symbolic.svg          video-joined-displays-symbolic.svg  video-single-display-symbolic.svg   

But the "mate" icon theme only have video-display-symbolic.svg, I think if use video-single-display-symbolic.svg for one, and video-joined-displays-symbolic.svg for others will be better.

raveit65 commented 5 years ago

Should i add video-joined-displays-symbolic.svg video-single-display-symbolic.svg to mate-icon-theme?

zhangxianwei8 commented 5 years ago

Yes, you can add it, then I will update this PR. @raveit65 I agree with you that using two different icons. @yetist

zhangxianwei8 commented 5 years ago

I found that if use "Adwaita" icon, it looks not good, the osd is a bit dark: screenshot at 2018-11-23 11-15-06 screenshot at 2018-11-23 11-19-43

raveit65 commented 5 years ago

Looks like the icons are transparent? You can edit (changing color) svgs with pluma, it's just a text file.

zhangxianwei8 commented 5 years ago

Alreay updated the icons: https://github.com/mate-desktop/mate-icon-theme/pull/28 and this PR. @raveit65

zhangxianwei8 commented 5 years ago

Add test for display switch OSD icons. Execute fellow command which in build directory to test:

./plugins/media-keys/test-media-window