From 34ef7016465f3a7388a3ae7c3a53a09e265b2c5d Mon Sep 17 00:00:00 2001 From: j Date: Mon, 20 Nov 2023 23:27:49 +0000 Subject: [PATCH] hide gnome overview on startup --- player/player.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/player/player.py b/player/player.py index 33c9a84..8402697 100755 --- a/player/player.py +++ b/player/player.py @@ -24,6 +24,14 @@ FONT_BORDER = 4 SUB_MARGIN = 2 * 36 + 6 +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)) @@ -277,4 +285,8 @@ def main(): if __name__ == "__main__": + try: + hide_gnome_overview() + except: + pass main()