"""WizardKit: Screensaver functions""" # vim: sts=2 sw=2 ts=2 import logging from subprocess import PIPE from wk.exe import run_program from wk.tmux import zoom_pane as tmux_zoom_pane # STATIC VARIABLES LOG = logging.getLogger(__name__) # Functions def screensaver(name) -> None: """Show screensaver""" LOG.info('Screensaver (%s)', name) if name == 'matrix': cmd = ['cmatrix', '-abs'] elif name == 'pipes': cmd = [ 'pipes.sh', '-t', '0', '-t', '1', '-t', '2', '-t', '3', '-t', '5', '-R', '-r', '4000', ] # Switch pane to fullscreen and start screensaver tmux_zoom_pane() run_program(cmd, check=False, pipe=False, stderr=PIPE) tmux_zoom_pane() if __name__ == '__main__': print("This file is not meant to be called directly.")