hide overview

This commit is contained in:
j 2024-01-15 10:53:03 +01:00
parent 2782bb920d
commit da466c98c5

View file

@ -18,6 +18,14 @@ logger = logging.getLogger('cdosea')
STATIC_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'static') 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): def mpv_log(loglevel, component, message):
logger.info('[{}] {}: {}'.format(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.fullscreen = fullscreen
player.loop = 'inf' player.loop = 'inf'
player.loop_file = 'no' player.loop_file = 'no'
hide_gnome_overview()
return player return player