Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Nov 25, 2018
Merged

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

merged 2 commits into from Nov 25, 2018

Conversation

zhangxianwei8
Copy link
Contributor

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 lukefromdc requested a review from a team November 23, 2018 02:12
@lukefromdc
Copy link
Member

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
Copy link
Member

yetist commented Nov 23, 2018

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
Copy link
Member

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

@zhangxianwei8
Copy link
Contributor Author

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

@zhangxianwei8
Copy link
Contributor Author

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
Copy link
Member

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

zhangxianwei8 added a commit to zhangxianwei8/mate-icon-theme that referenced this pull request Nov 24, 2018
Refer to mate-desktop/mate-settings-daemon#250

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
Some laptops have a display switch mode hotkey. This is bound by
default to XF86Display. Add OSD to give people a visual feed back.

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
@zhangxianwei8
Copy link
Contributor Author

Alreay updated the icons:
mate-desktop/mate-icon-theme#28
and this PR.
@raveit65

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
@zhangxianwei8
Copy link
Contributor Author

zhangxianwei8 commented Nov 24, 2018

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

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

Copy link
Member

@raveit65 raveit65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works fine with new icons in mate-icon-theme.

@raveit65 raveit65 merged commit 4a54f68 into mate-desktop:master Nov 25, 2018
raveit65 pushed a commit to mate-desktop/mate-icon-theme that referenced this pull request Dec 20, 2018
Refer to mate-desktop/mate-settings-daemon#250

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants