Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ jobs:
include:
- version: stable
mutter_pkg: libmutter-14-dev
panel_pkg: wingpanel-7
- version: unstable
mutter_pkg: libmutter-14-dev
panel_pkg: wingpanel-7
- version: development-target
mutter_pkg: libmutter-18-dev
panel_pkg: wingpanel-9

container:
image: ghcr.io/elementary/docker:${{ matrix.version }}

Expand All @@ -31,7 +35,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y gettext gsettings-desktop-schemas-dev libatk-bridge2.0-dev libclutter-1.0-dev libgee-0.8-dev libglib2.0-dev libgnome-desktop-4-dev libgnome-bg-4-dev libgranite-dev libgtk-3-dev libibus-1.0-dev ${{ matrix.mutter_pkg }} libsoup-3.0-dev libsqlite3-dev meson systemd-dev valac valadoc
apt install -y gettext gsettings-desktop-schemas-dev libatk-bridge2.0-dev libclutter-1.0-dev libgee-0.8-dev libglib2.0-dev libgnome-desktop-4-dev libgnome-bg-4-dev libgranite-dev libgtk-3-dev libibus-1.0-dev ${{ matrix.mutter_pkg }} libsoup-3.0-dev libsqlite3-dev ${{ matrix.panel_pkg }} meson systemd-dev valac valadoc
- name: Build
env:
DESTDIR: out
Expand Down
10 changes: 10 additions & 0 deletions data/gala.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<value nick="switch-to-workspace-previous" value="8" />
<value nick="switch-to-workspace-next" value="9" />
<value nick="switch-to-workspace-last" value="10" />
<value nick="open-notifications" value="11" />
</enum>

<enum id="SuperScrollAction">
Expand Down Expand Up @@ -72,6 +73,11 @@
<summary>Panel main menu action</summary>
<description>Sets the command to run when the panel-main-menu keybinding is pressed.</description>
</key>
<key type="s" name="panel-notifications-menu-action">
<default>'io.elementary.wingpanel --toggle-indicator=messages'</default>
<summary>Panel notifications menu action</summary>
<description>Sets the command to run when the panel-notifications-menu keybinding is pressed.</description>
</key>
<key type="s" name="toggle-recording-action">
<default>''</default>
<summary></summary>
Expand Down Expand Up @@ -156,6 +162,10 @@
<default><![CDATA[['<Alt>F2']]]></default>
<summary>Open the applications menu</summary>
</key>
<key type="as" name="panel-notifications-menu">
<default><![CDATA[['<Super>N']]]></default>
<summary>Open the notifications menu</summary>
</key>
<key name="screenshot" type="as">
<default><![CDATA[['Print']]]></default>
<summary>Take a screenshot</summary>
Expand Down
1 change: 1 addition & 0 deletions lib/CommonEnums.vala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Gala {
MAXIMIZE_CURRENT,
HIDE_CURRENT,
OPEN_LAUNCHER,
OPEN_NOTIFICATIONS,
CUSTOM_COMMAND,
WINDOW_OVERVIEW,
WINDOW_OVERVIEW_ALL,
Expand Down
1 change: 1 addition & 0 deletions lib/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace Gala {
public const string INTERACTIVE_SCREENSHOT_ACTION = "interactive-screenshot-action";
public const string OVERLAY_ACTION = "overlay-action";
public const string PANEL_MAIN_MENU_ACTION = "panel-main-menu-action";
public const string PANEL_NOTIFICATIONS_MENU_ACTION = "panel-notifications-menu-action";
public const string TOGGLE_RECORDING_ACTION = "toggle-recording-action";
}

Expand Down
11 changes: 11 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ endif

mutter_dep = []
libmutter_dep = []
wingpanel_dep = []

wingpanel7_dep = dependency('wingpanel-7', required: false)
if wingpanel7_dep.found()
wingpanel_dep = wingpanel7_dep
endif

wingpanel9_dep = dependency('wingpanel-9', required: false)
if wingpanel9_dep.found()
wingpanel_dep = wingpanel9_dep
endif

vala_flags = []

Expand Down
12 changes: 11 additions & 1 deletion src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ namespace Gala {
}

private const string OPEN_MULTITASKING_VIEW = "dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1";
private const string OPEN_APPLICATIONS_MENU = "io.elementary.wingpanel --toggle-indicator=app-launcher";
private const string OPEN_APPLICATIONS_MENU = "io.elementary.wingpanel --toggle-indicator=" + Wingpanel.Indicator.APP_LAUNCHER;
private const string OPEN_NOTIFICATIONS_MENU = "io.elementary.wingpanel --toggle-indicator=" + Wingpanel.Indicator.MESSAGES;

/**
* {@inheritDoc}
Expand Down Expand Up @@ -230,6 +231,7 @@ namespace Gala {
display.add_keybinding ("cycle-workspaces-next", keybinding_settings, NONE, handle_cycle_workspaces);
display.add_keybinding ("cycle-workspaces-previous", keybinding_settings, NONE, handle_cycle_workspaces);
display.add_keybinding ("panel-main-menu", keybinding_settings, IGNORE_AUTOREPEAT, handle_applications_menu);
display.add_keybinding ("panel-notifications-menu", keybinding_settings, IGNORE_AUTOREPEAT, handle_notifications_menu);

display.add_keybinding ("toggle-multitasking-view", keybinding_settings, IGNORE_AUTOREPEAT, layout_manager.multitasking_view.toggle);

Expand Down Expand Up @@ -431,6 +433,11 @@ namespace Gala {
launch_action (ActionKeys.PANEL_MAIN_MENU_ACTION);
}

private void handle_notifications_menu (Meta.Display display, Meta.Window? window,
Clutter.KeyEvent? event, Meta.KeyBinding binding) {
launch_action (ActionKeys.PANEL_NOTIFICATIONS_MENU_ACTION);
}

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -699,6 +706,9 @@ namespace Gala {
case ActionType.OPEN_LAUNCHER:
launch_action (ActionKeys.PANEL_MAIN_MENU_ACTION);
break;
case ActionType.OPEN_NOTIFICATIONS:
launch_action (ActionKeys.PANEL_NOTIFICATIONS_MENU_ACTION);
break;
case ActionType.WINDOW_OVERVIEW:
if (filter_action (WINDOW_OVERVIEW)) {
break;
Expand Down
2 changes: 1 addition & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ gala_bin = executable(
'gala',
gala_bin_sources,
config_header,
dependencies: [gala_dep, gala_base_dep, pantheon_desktop_shell_dep],
dependencies: [gala_dep, gala_base_dep, pantheon_desktop_shell_dep, wingpanel_dep],
install_rpath: mutter_typelib_dir,
install: true,
)
Loading