From dff2b3147b5a17902672f5a37d79ad2bcab1c377 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Sun, 18 Feb 2018 15:02:50 +0100 Subject: [PATCH] Add default timeout to notify-send on Linux Add default timeout of 10 seconds to notify-send on Linux to not depend on default notification timeout on Linux notify daemon, because on some system the default can be never hide unless timeout is set. See also: #549 Signed-off-by: Tomas Slusny --- .../src/main/java/net/runelite/client/Notifier.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/Notifier.java b/runelite-client/src/main/java/net/runelite/client/Notifier.java index c878bfda4d..99bf326298 100644 --- a/runelite-client/src/main/java/net/runelite/client/Notifier.java +++ b/runelite-client/src/main/java/net/runelite/client/Notifier.java @@ -39,8 +39,10 @@ public class Notifier private enum OSType { Windows, MacOS, Linux, Other - }; + } + // Default timeout of notification in milliseconds + private static final int DEFAULT_TIMEOUT = 10000; private static final String DOUBLE_QUOTE = "\""; private static final Escaper SHELL_ESCAPE; private static final OSType DETECTED_OS; @@ -141,6 +143,8 @@ public class Notifier commands.add(message); commands.add("-u"); commands.add(toUrgency(type)); + commands.add("-t"); + commands.add(String.valueOf(DEFAULT_TIMEOUT)); sendCommand(commands); }