From 360077aa38e7fa8c9a68b27643003f0990c9591c Mon Sep 17 00:00:00 2001 From: Christoph Anton Mitterer Date: Fri, 19 Sep 2025 19:03:33 +0200 Subject: [PATCH] add setting for determining the shutdown dialog default action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An enum cannot be used here, as it should be possible to give a list of values which are tried in order until one of the actions can actually be used (all but `cancel` may not be available). The chosen default value leaves the current behaviour of defaulting to `shutdown` and apart from that orders as follows: • `cancel`, because it’s always available and safe (nothing happens). • `suspend` and `hibernate`, because they’re both safe (mostly nothing should get lost, unless one does things like downloading or burning an optical medium). `suspend` before `hibernate` as the former is faster and `hibernate` might be less likely available (it needs a sufficiently large swap active). • `restart`, because – just like `shutdown` – it may lead to loosing data. Signed-off-by: Christoph Anton Mitterer --- data/org.cinnamon.SessionManager.gschema.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/org.cinnamon.SessionManager.gschema.xml b/data/org.cinnamon.SessionManager.gschema.xml index cef0255..0d4e513 100644 --- a/data/org.cinnamon.SessionManager.gschema.xml +++ b/data/org.cinnamon.SessionManager.gschema.xml @@ -53,5 +53,10 @@ The system is suspended and put into hibernation after being suspended for a certain time. (Defaults to 2h, see systemd-sleep.conf) Whether or not to attempt to use suspend-then-hibernate. If it is unsupported, normal suspend will be used instead + + ['shutdown', 'cancel', 'suspend', 'hibernate', 'restart'] + Determines the default action of the shutdown dialog. + A list of actions ('cancel', 'shutdown', 'restart', 'suspend' and 'hibernate') that determines the default action of the shutdown dialog. The first action that is actually usable is selected. +