Ejemplo n.º 1
0
    def KeyPressEvent(self):
        cmd = Command.lookup(self._event_data['keycode'], self._event_data['modifiers'])

        if not cmd:
            return

        x = cmd.get_global_command()

        if x == 'quit':
            for tiler in state.iter_tilers():
                tiler.cmd_untile()

            self._stop = True
        elif x == 'debug':
            state.print_hierarchy(*state.get_active_wsid_and_mid())
        elif x == 'refresh_workarea':
            state.update_property('_NET_WORKAREA')
        elif x == 'reload_configuration':
            config.load_config_file()
            state.update_NET_DESKTOP_GEOMETRY(True)
            state.apply_config()
        else:
            Tile.dispatch(state.get_active_monitor(), cmd)