Exemplo n.º 1
0
from locale import gettext as _
from optparse import OptionParser

log = logging.getLogger(__name__)

from guake.globals import NAME
from guake.globals import bindtextdomain
from guake.support import print_support
from guake.utils import restore_preferences
from guake.utils import save_preferences

# When we are in the document generation on readthedocs, we do not have paths.py generated
try:
    from guake.paths import LOCALE_DIR
    bindtextdomain(NAME, LOCALE_DIR)
except:  # pylint: disable=bare-except
    pass


def main():
    """Parses the command line parameters and decide if dbus methods
    should be called or not. If there is already a guake instance
    running it will be used and a True value will be returned,
    otherwise, false will be returned.
    """
    # Force to xterm-256 colors for compatibility with some old command line programs
    os.environ["TERM"] = "xterm-256color"

    # Force use X11 backend underwayland
    os.environ["GDK_BACKEND"] = "x11"
Exemplo n.º 2
0
Arquivo: main.py Projeto: Guake/guake
from locale import gettext as _
from optparse import OptionParser

log = logging.getLogger(__name__)

from guake.globals import NAME
from guake.globals import bindtextdomain
from guake.support import print_support
from guake.utils import restore_preferences
from guake.utils import save_preferences

# When we are in the document generation on readthedocs, we do not have paths.py generated
try:
    from guake.paths import LOCALE_DIR
    bindtextdomain(NAME, LOCALE_DIR)
except:  # pylint: disable=bare-except
    pass


def main():
    """Parses the command line parameters and decide if dbus methods
    should be called or not. If there is already a guake instance
    running it will be used and a True value will be returned,
    otherwise, false will be returned.
    """
    # Force to xterm-256 colors for compatibility with some old command line programs
    os.environ["TERM"] = "xterm-256color"

    # Force use X11 backend underwayland
    os.environ["GDK_BACKEND"] = "x11"