Add key for overlay key action

This commit is contained in:
Tom Beckmann 2012-07-25 16:26:01 +02:00
parent da14d033d7
commit 7ea4bcecd3
4 changed files with 14 additions and 1 deletions

View File

@ -21,6 +21,11 @@
<summary></summary>
<description></description>
</key>
<key type="s" name="overlay-action">
<default>''</default>
<summary></summary>
<description></description>
</key>
<key type="as" name="move-to-workspace-first">
<default><![CDATA[['<Super>Home']]]></default>
<summary>Shortcut to move to first workspace</summary>

View File

@ -71,6 +71,13 @@ namespace Gala
screen.get_workspace_by_index (screen.n_workspaces - 1).activate (screen.get_display ().get_current_time ());
});
screen.get_display ().overlay_key.connect (() => {
try {
Process.spawn_command_line_async (
BehaviorSettings.get_default ().overlay_action);
} catch (Error e) { warning (e.message); }
});
KeyBinding.set_custom_handler ("panel-main-menu", () => {
try {
Process.spawn_command_line_async (

View File

@ -22,6 +22,7 @@ namespace Gala
public bool edge_tiling { get; set; }
public string panel_main_menu_action { get; set; }
public string toggle_recording_action { get; set; }
public string overlay_action { get; set; }
public bool enable_manager_corner { get; set; }
static BehaviorSettings? instance = null;

View File

@ -110,7 +110,7 @@ namespace Gala
var current_actor = current_window.get_compositor_private () as Actor;
foreach (var clone in window_clones) {
if (current_actor == clone.source) {
clone.get_parent ().set_child_above_sibling (clone, null);
clone.get_parent ().set_child_below_sibling (clone, null);
clone.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 250, depth : 0.0f, opacity : 255);
} else {
clone.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 250, depth : -200.0f, opacity : 0);