From da466c98c521e9d40b970f4cd0987ee81268cb12 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 15 Jan 2024 10:53:03 +0100 Subject: [PATCH] hide overview --- cdoseaplay/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cdoseaplay/utils.py b/cdoseaplay/utils.py index eb08753..9ac54b6 100644 --- a/cdoseaplay/utils.py +++ b/cdoseaplay/utils.py @@ -18,6 +18,14 @@ logger = logging.getLogger('cdosea') STATIC_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'static') +def hide_gnome_overview(): + import dbus + bus = dbus.SessionBus() + shell = bus.get_object('org.gnome.Shell', '/org/gnome/Shell') + props = dbus.Interface(shell, 'org.freedesktop.DBus.Properties') + props.Set('org.gnome.Shell', 'OverviewActive', False) + + def mpv_log(loglevel, component, message): logger.info('[{}] {}: {}'.format(loglevel, component, message)) @@ -32,6 +40,7 @@ def get_player(fullscreen=True, font='Menlo', font_size=28): player.fullscreen = fullscreen player.loop = 'inf' player.loop_file = 'no' + hide_gnome_overview() return player