Example #1
0
def get_save_button_section():
    section = Section("")
    section.add_widget(
        "button", "hard_refresh_menu", {
            "description":
            _("Save settings"),
            "tooltip":
            _("Most settings are not automatically saved when modified.\nPress this button for the settings to take effect."
              )
        })
    return section
# -*- coding: utf-8 -*-
import argparse
import cgi
import os
import sys

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
modules_dir = os.path.join(XLET_DIR)
sys.path.append(modules_dir)

from python_modules.xlets_settings import MainApplication
from python_modules.xlets_settings import _


INFO_LABELS = [
    "<b>%s</b>" % cgi.escape(_("Language legends")),
    "<b>(D)</b>: %s" % cgi.escape(_("Language supported by DarkSky.")),
    "<b>(O)</b>: %s" % cgi.escape(_("Language supported by OpenWeatherMap.")),
    "<b>(W)</b>: %s" % cgi.escape(_("Language supported by WeatherBit.")),
]

COLUMNS = [{
    "id": "locationName",
    "title": _("Location name"),
    "type": "string"
}, {
    "id": "locationID",
    "title": _("Location ID"),
    "type": "string"
},
    {
Example #3
0
    msg = r' WrongPythonVersion: Minimum Python version supported: 3.7 '
    raise SystemExit(msg)

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

win_def = WindowDefinition()
general_page = win_def.add_page(_("General"))
general_section = general_page.add_section(_("General settings"))
general_section.add_widget(
    "switch", "auto_hide", {
        "description":
        _("Auto-hide"),
        "tooltip":
        _("With this option enabled, applets will be hidden automatically. Otherwise, applets will be hidden when interacting with the drawer."
          )
    })
general_section.add_widget(
    "spinbutton", "hide_delay", {
        "description": _("Auto-hide delay"),
        "dependency": "auto_hide",
        "min": 0.25,
        "max": 10.0,
Example #4
0
    msg = r' WrongPythonVersion: Minimum Python version supported: 3.7 '
    raise SystemExit(msg)

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

win_def = WindowDefinition()
applet_page = win_def.add_page(_("Applet"))
applet_section = applet_page.add_section(_("Applet settings"))
applet_section.add_widget("iconfilechooser", "applet_icon", {
    "description": _("Icon"),
    "tooltip": _("Select an icon to show in the panel.")
})
applet_section.add_widget(
    "entry", "applet_label", {
        "description": _("Label"),
        "tooltip": _("Enter custom text to show in the panel.")
    })
applet_section.add_widget(
    "entry", "applet_tooltip", {
        "description": _("Tooltip"),
        "tooltip": _("Enter custom text to show as the applet tooltip.")
    })
Example #5
0
# -*- coding: utf-8 -*-
import argparse
import cgi
import os
import sys

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
modules_dir = os.path.join(XLET_DIR)
sys.path.append(modules_dir)

from python_modules.xlets_settings import MainApplication
from python_modules.xlets_settings import _

INFO_LABELS = [
    "<b>%s</b>: %s" % (
        cgi.escape(_("Acromatopsia (rod monochromatism)")),
        cgi.escape(_("Total or almost total color blindness."))
    ),
    "<b>%s</b>: %s" % (
        cgi.escape(_("Acromatopsia (blue-cone monochromatism)")),
        cgi.escape(_("Total or almost total color blindness."))
    ),
    "<b>%s</b>: %s" % (
        cgi.escape(_("Deuteranopia")),
        cgi.escape(_("Green color deficiency."))
    ),
    "<b>%s</b>: %s" % (
        cgi.escape(_("Protanopia")),
        cgi.escape(_("Red color deficiency."))
    ),
    "<b>%s</b>: %s" % (
Example #6
0
from html import escape

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

EFFECTS_LIST_INFO_LABELS = [
    "<b>%s</b>: %s" % (
        escape(_("Acromatopia (rod monochromatism)")),
        escape(_("Total or almost total color blindness."))
    ),
    "<b>%s</b>: %s" % (
        escape(_("Acromatopia (blue-cone monochromatism)")),
        escape(_("Total or almost total color blindness."))
    ),
    "<b>%s</b>: %s" % (
        escape(_("Deuteranopia")),
        escape(_("Green color deficiency."))
    ),
    "<b>%s</b>: %s" % (
        escape(_("Protanopia")),
        escape(_("Red color deficiency."))
    ),
    "<b>%s</b>: %s" % (
Example #7
0
    msg = r' WrongPythonVersion: Minimum Python version supported: 3.7 '
    raise SystemExit(msg)

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

win_def = WindowDefinition()
applet_page = win_def.add_page(_("Applet"))
applet_section = applet_page.add_section(_("Applet settings"))
applet_section.add_widget("iconfilechooser", "applet_icon", {
    "description": _("Icon"),
    "tooltip": _("Select an icon to show in the panel.")
})
applet_section.add_widget(
    "entry", "applet_label", {
        "description": _("Label"),
        "tooltip": _("Enter custom text to show in the panel.")
    })
applet_section.add_widget(
    "switch", "show_script_name", {
        "description":
        _("Show script name on applet"),
        "tooltip":
Example #8
0
from html import escape

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

LANGUAGES_LIST = {
    "auto": _("Detect language"),
    "af": _("Afrikaans"),
    "am": _("Amharic"),
    "ar": _("Arabic"),
    "az": _("Azerbaijani"),
    "be": _("Belarusian"),
    "bg": _("Bulgarian"),
    "bn": _("Bengali"),
    "bs": _("Bosnian (Y)"),
    "ca": _("Catalan"),
    "ceb": _("Chichewa"),
    "co": _("Corsican"),
    "cs": _("Czech"),
    "cy": _("Welsh"),
    "da": _("Danish"),
    "de": _("German"),
Example #9
0
from html import escape

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

IDS_COLUMN = [{
    "id": "enabled",
    "title": _("Enabled"),
    "type": "boolean"
}, {
    "id": "smooth",
    "title": _("Smooth"),
    "type": "boolean"
}, {
    "id": "id",
    "title": _("Graphs"),
    "type": "string",
    "options": {
        "cpu": _("CPU"),
        "mem": _("Memory"),
        "swap": _("Swap"),
        "net": _("Network"),
        "load": _("Load average"),
Example #10
0
XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import ASTERISK_END
from python_modules.xlets_settings.builder import CINN_RESTART
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

COMBOBOX_OPTIONS_SCROLL_CLICK = {
    "expo": _("Expo"),
    "overview": _("Overview"),
    "appswitcher": _("Launch App Switcher"),
    "desktop": _("Toggle Show desktop"),
    "cc1": _("Run 1st Custom Command"),
    "cc2": _("Run 2nd Custom Command"),
    "cc3": _("Run 3rd Custom Command"),
    "cc4": _("Run 4rd Custom Command"),
    "none": _("None"),
}

COMBOBOX_OPTIONS_HOVER = {
    "expo": _("Expo"),
    "overview": _("Overview"),
    "appswitcher": _("Launch App Switcher"),
    "desktop": _("Toggle Show desktop"),
Example #11
0
def get_save_button_section():
    section = Section("")
    section.add_widget(
        "button", "hard_refresh_menu", {
            "description":
            _("Save settings"),
            "tooltip":
            _("Most settings are not automatically saved when modified.\nPress this button for the settings to take effect."
              )
        })
    return section


LAUNCHERS_COLUMNS = [{
    "id": "enabled",
    "title": _("Enabled"),
    "default": True,
    "type": "boolean"
}, {
    "id": "icon",
    "title": "%s (*)" % _("Icon"),
    "type": "icon"
}, {
    "id": "title",
    "title": "%s (*)" % _("Title"),
    "type": "string"
}, {
    "id": "command",
    "title": "%s (*)" % _("Command"),
    "type": "string"
}, {
Example #12
0
def get_save_keybindings_section():
    section = Section("")
    section.add_widget("button", "save_keybindings",
                       {"description": _("Save keybindings")})
    return section
Example #13
0
    raise SystemExit(msg)

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import Section
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

FILE_FORMAT_TT = _(
    "Format for the generated file name. Possible placeholders are:\n\n%Y = year\n%M = month\n%D = day\n%H = hours\n%I = minutes\n%S = seconds\n%m = milliseconds\n%TYPE = area, window, etc. (for screenshots only)."
)


def get_save_keybindings_section():
    section = Section("")
    section.add_widget("button", "save_keybindings",
                       {"description": _("Save keybindings")})
    return section


win_def = WindowDefinition()
general_page = win_def.add_page(_("General"))
general_section = general_page.add_section(_("General"))
general_section.add_widget(
    "iconfilechooser", "applet_icon", {
# -*- coding: utf-8 -*-
import argparse
import os
import sys

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
modules_dir = os.path.join(XLET_DIR)
sys.path.append(modules_dir)

from python_modules.xlets_settings import MainApplication
from python_modules.xlets_settings import _


COLUMNS = [{
    "id": "enabled",
    "title": _("Enabled"),
    "type": "boolean"
}, {
    "id": "icon",
    "title": "%s (*)" % _("Icon"),
    "type": "icon"
}, {
    "id": "title",
    "title": "%s (*)" % _("Title"),
    "type": "string"
}, {
    "id": "command",
    "title": "%s (*)" % _("Command"),
    "type": "string"
}, {
    "id": "description",
Example #15
0
import argparse
import cgi
import os
import sys

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
modules_dir = os.path.join(XLET_DIR)
sys.path.append(modules_dir)

from python_modules.xlets_settings import MainApplication
from python_modules.xlets_settings import _


INFO_LABELS = [
    "<b>%s:</b> %s" % (
        cgi.escape(_("Triggers")),
        cgi.escape(
            _("Keyboard shortcuts that will apply an effect to the entire screen or to specific windows."))
    )
]

SHADERS_INFO_LABELS = [
    "<b>%s</b>" % cgi.escape(_("Signals connections")),
    "<b>'new-frame':</b> %s" % cgi.escape(_("When set to a value grater than zero, the `height`, `width`, `mouseX` and `mouseY` uniform values defined on a shader file will be updated every X milliseconds. X being the value set in this option.")),
    "<b>'size-changed':</b> %s" % cgi.escape(_("When enabled, the `height` and `width` uniform values defined on a shader file will be updated every time an actor (a window or the screen) changes its size."))
]

DESATURATION_INFO_LABELS = [
    "<b>%s:</b> %s" % (cgi.escape(_("Desaturation levels")),
                       cgi.escape(_("The desaturation factor, with 0.0 being 'do not desaturate' and 1.0 being 'fully desaturate.")))
]
Example #16
0
XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import ASTERISK_END
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

COLUMNS = [{
    "id": "enabled",
    "title": _("Enabled"),
    "default": True,
    "type": "boolean"
}, {
    "id": "notify",
    "title": _("Notify"),
    "default": True,
    "type": "boolean"
}, {
    "id": "show_read_items",
    "title": _("Show read"),
    "type": "boolean"
}, {
    "id": "interval",
    "title": _("Interval"),
    "type": "integer",
Example #17
0
XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import ASTERISK_END
from python_modules.xlets_settings.builder import CINN_RESTART_MIGHT
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

LOCATIONS_STORAGE_INFO_LABELS = [
    "<b>%s</b>" % escape(_("Language legends")),
    "<b>(O)</b>: %s" % escape(_("Language supported by OpenWeatherMap.")),
    "<b>(W)</b>: %s" % escape(_("Language supported by WeatherBit.")),
]

COLUMNS = [{
    "id": "locationName",
    "title": _("Location name"),
    "type": "string"
}, {
    "id": "locationID",
    "title": _("Location ID"),
    "type": "string"
}, {
    "id": "languageID",
    "title": _("Language"),
Example #18
0
from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import ASTERISK_END
from python_modules.xlets_settings.builder import CINN_RESTART
from python_modules.xlets_settings.builder import CIRCLE
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

WIN_DECORATIONS_SECTION_INFO = "\n".join([
    "%s %s" %
    (CIRCLE,
     escape(
         _("This tweak settings are purposely NOT applied in real time. Click the »Apply windows decorations settings« button to save settings."
           ))),
    "%s %s" %
    (CIRCLE,
     escape(
         _("Client side decorated windows and WINE applications aren't affected by this tweak."
           ))),
    "%s %s" %
    (CIRCLE,
     escape(
         _("Close all windows that belongs to an application that is going to be added to the applications list and before applying the settings of this tweak."
           ))),
    "%s %s" %
    (CIRCLE,
     escape(
         _("Read this extension help for more detailed instructions, list of dependencies and known issues."
           )))
Example #19
0
from html import escape

XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

LISTS_BASIC_INFO_LABELS = [
    "<b>%s:</b> %s" % (
        escape(_("Triggers")),
        escape(
            _("Keyboard shortcuts that will apply an effect to the entire screen or to specific windows."))
    )
]

SHADERS_INFO_LABELS = [
    "<b>%s</b>" % escape(_("Signals connections")),
    "<b>'new-frame':</b> %s" % escape(
        _("When set to a value grater than zero, the `height`, `width`, `mouseX` and `mouseY` uniform values defined on a shader file will be updated every X milliseconds. X being the value set in this option.")),
    "<b>'size-changed':</b> %s" % escape(
        _("When enabled, the `height` and `width` uniform values defined on a shader file will be updated every time an actor (a window or the screen) changes its size."))
]

DESATURATION_INFO_LABELS = [
    "<b>%s:</b> %s" % (escape(_("Desaturation levels")),
Example #20
0
XLET_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, XLET_DIR)

from python_modules.xlets_settings import _
from python_modules.xlets_settings import cli
from python_modules.xlets_settings.builder import ASTERISK_END
from python_modules.xlets_settings.builder import ASTERISK_START
from python_modules.xlets_settings.builder import WindowDefinition
from python_modules.xlets_settings.builder import get_debugging_section

XLET_UUID = os.path.basename(XLET_DIR)
XLET_TYPE = os.path.basename(os.path.dirname(XLET_DIR))[:-1]

ENTRY_WIDTH_TT = _(
    "Cinnamon menus automatically change their size to accommodate the elements that they contain. Setting a fixed size for those elements will avoid the constant resizing of the menu when opening/closing sub menus."
)

INFO_LABEL = [
    "<b>%s</b> %s" % (ASTERISK_START, escape(_("Mandatory fields"))),
    escape(
        _("For colors to take effect, native entry theming may need to be removed. See options on »Appearance« section."
          ))
]

COLUMNS = [{
    "id": "enabled",
    "title": _("Enabled"),
    "default": True,
    "type": "boolean"
}, {