Skip to content
Permalink
Browse files

Add shortcut to start mate-control-center

Some laptops have a setting hotkey. This is bound by default to
XF86Tools. Add shortcut to start mate-control-center to support it.

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
  • Loading branch information...
zhangxianwei8 authored and lukefromdc committed Oct 12, 2018
1 parent 11f25cd commit 765208efe3772d5aebf1680c4c5fac87a9b33136
@@ -70,6 +70,11 @@
<summary>Launch email client</summary>
<description>Binding to launch the email client.</description>
</key>
<key name="control-center" type="s">
<default>'XF86Tools'</default>
<summary>Launch settings</summary>
<description>Binding to launch MATE settings.</description>
</key>
<key name="screensaver" type="s">
<default>'&lt;Control&gt;&lt;Alt&gt;l'</default>
<summary>Lock screen</summary>
@@ -39,6 +39,7 @@ enum {
CALCULATOR_KEY,
SEARCH_KEY,
EMAIL_KEY,
CONTROL_CENTER_KEY,
SCREENSAVER_KEY,
HELP_KEY,
WWW_KEY,
@@ -77,6 +78,7 @@ static struct {
{ CALCULATOR_KEY, "calculator", NULL, NULL },
{ SEARCH_KEY, "search", NULL, NULL },
{ EMAIL_KEY, "email", NULL, NULL },
{ CONTROL_CENTER_KEY, "control-center", NULL, NULL },
{ SCREENSAVER_KEY, "screensaver", NULL, NULL },
{ HELP_KEY, "help", NULL, NULL },
{ WWW_KEY, "www", NULL, NULL },
@@ -976,6 +976,12 @@ do_action (MsdMediaKeysManager *manager,
case EMAIL_KEY:
do_url_action (manager, "mailto");
break;
case CONTROL_CENTER_KEY:
if ((cmd = g_find_program_in_path ("mate-control-center")))
execute (manager, "mate-control-center", FALSE, FALSE);

g_free (cmd);
break;
case SCREENSAVER_KEY:
if ((cmd = g_find_program_in_path ("mate-screensaver-command"))) {
execute (manager, "mate-screensaver-command --lock", FALSE, FALSE);

0 comments on commit 765208e

Please sign in to comment.
You can’t perform that action at this time.