mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
quickSettings: Add background apps menu
Sandboxed apps that run without a window are detected by the new background monitoring service, introduced by xdg-desktop-portal. We have an opportunity to improve the predictability of the desktop and ensure that application state in transparently reported to users by showing these apps, and allowing them to closed. Add a new background apps menu to the quick settings, that is always added at the bottom of the popover, and has a slightly custom, flat style applied to it. Show background-running apps in this menu, and allow closing them by first attempting to execute the 'quit' action through D-Bus, and if that fails, sending SIGKILL to the process. See https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/191 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2624>
This commit is contained in:
parent
055694de9d
commit
7604dd1103
9 changed files with 324 additions and 0 deletions
64
data/dbus-interfaces/org.freedesktop.background.Monitor.xml
Normal file
64
data/dbus-interfaces/org.freedesktop.background.Monitor.xml
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Copyright (C) 2022 Endless OS Foundation, LLC
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Georges Basile Stavracas Neto <georges@endlessos.org>
|
||||
-->
|
||||
|
||||
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||
<!--
|
||||
org.freedesktop.background.Monitor:
|
||||
@short_description: Background applications monitor
|
||||
|
||||
This interface provides APIs related to applications
|
||||
that are running in the background.
|
||||
|
||||
This documentation describes version 1 of this interface.
|
||||
-->
|
||||
<interface name="org.freedesktop.background.Monitor">
|
||||
|
||||
<!--
|
||||
BackgroundApps:
|
||||
|
||||
The list of applications that are considered to be running in
|
||||
background. The following keys are supported:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>app_id s</term>
|
||||
<listitem><para>
|
||||
App id of the application.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>instance s</term>
|
||||
<listitem><para>
|
||||
The Flatpak instance of the application.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>message s</term>
|
||||
<listitem><para>
|
||||
Status message reported by the application. Optional.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
-->
|
||||
<property name="BackgroundApps" type="aa{sv}" access="read"/>
|
||||
|
||||
<property name="version" type="u" access="read"/>
|
||||
</interface>
|
||||
</node>
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
<file preprocess="xml-stripblanks">net.reactivated.Fprint.Device.xml</file>
|
||||
<file preprocess="xml-stripblanks">net.reactivated.Fprint.Manager.xml</file>
|
||||
<file preprocess="xml-stripblanks">org.freedesktop.Application.xml</file>
|
||||
<file preprocess="xml-stripblanks">org.freedesktop.background.Monitor.xml</file>
|
||||
<file preprocess="xml-stripblanks">org.freedesktop.bolt1.Device.xml</file>
|
||||
<file preprocess="xml-stripblanks">org.freedesktop.bolt1.Manager.xml</file>
|
||||
<file preprocess="xml-stripblanks">org.freedesktop.DBus.xml</file>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
<file>scalable/actions/screenshot-ui-show-pointer-symbolic.svg</file>
|
||||
<file>scalable/actions/screenshot-ui-window-symbolic.svg</file>
|
||||
<file>scalable/actions/screenshot-recorded-symbolic.svg</file>
|
||||
<file>scalable/status/background-app-ghost-symbolic.svg</file>
|
||||
<file>scalable/status/keyboard-caps-lock-symbolic.svg</file>
|
||||
<file>scalable/status/keyboard-enter-symbolic.svg</file>
|
||||
<file>scalable/status/keyboard-hide-symbolic.svg</file>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 7.992188 1 c -3.867188 0.003906 -6.996094 3.140625 -6.992188 7.007812 v 5.988282 c 0 0.554687 0.449219 1.003906 1.003906 1.003906 c 0.550782 -0.003906 1 -0.453125 0.996094 -1.003906 v -0.992188 c 0 -0.554687 0.449219 -1.003906 1.003906 -1.003906 c 0.550782 0.003906 1 0.453125 0.996094 1.003906 v 0.992188 c 0 0.554687 0.449219 1.003906 1.003906 1.003906 c 0.550782 -0.003906 1 -0.453125 0.996094 -1.003906 v -0.992188 c 0 -0.554687 0.449219 -1.003906 1.003906 -1.003906 c 0.550782 0.003906 1 0.453125 0.996094 1.003906 v 0.992188 c 0 0.554687 0.449219 1.003906 1.003906 1.003906 c 0.550782 -0.003906 1 -0.453125 0.996094 -1.003906 v -0.992188 c 0 -0.554687 0.449219 -1.003906 1.003906 -1.003906 c 0.550782 0.003906 1 0.453125 0.996094 1.003906 v 0.992188 c 0 0.554687 0.449219 1.003906 1.003906 1.003906 c 0.550782 -0.003906 1 -0.453125 0.996094 -1.003906 v -5.988282 c 0 -3.871093 -3.136719 -7.007812 -7.007812 -7.007812 z m -1.992188 4 c 0.554688 0 1 0.445312 1 1 v 1 c 0 0.554688 -0.445312 1 -1 1 s -1 -0.445312 -1 -1 v -1 c 0 -0.554688 0.445312 -1 1 -1 z m 4 0 c 0.554688 0 1 0.445312 1 1 v 1 c 0 0.554688 -0.445312 1 -1 1 s -1 -0.445312 -1 -1 v -1 c 0 -0.554688 0.445312 -1 1 -1 z m 0 0" fill="#222222"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -149,3 +149,27 @@
|
|||
}
|
||||
|
||||
.device-subtitle { color: transparentize($fg_color, 0.5); }
|
||||
|
||||
// background apps
|
||||
|
||||
.background-apps-quick-toggle {
|
||||
min-height: 40px;
|
||||
background-color: transparent;
|
||||
|
||||
& StIcon { icon-size: $base_icon_size !important; }
|
||||
}
|
||||
|
||||
.background-app-item {
|
||||
& .title { @extend %heading; }
|
||||
& .subtitle { @extend %caption; }
|
||||
& .popup-menu-icon {
|
||||
icon-size: $large_icon_size !important;
|
||||
-st-icon-style: regular !important;
|
||||
}
|
||||
& .close-button {
|
||||
@extend .icon-button;
|
||||
padding: $base_padding;
|
||||
}
|
||||
|
||||
&.popup-inactive-menu-item { color: $fg_color; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue