except dbus.DBusException as e: logger.debug( "Error when trying to check if media keys could be grabbed.", exc_info=e) pass # Register the custom actions NEXT_TRACK = "mediaplayer-next-track" PREV_TRACK = "mediaplayer-previous-track" PLAY_TRACK = "mediaplayer-play-track" STOP_TRACK = "mediaplayer-stop-track" # Register the action with all supported models g15devices.g15_action_keys[NEXT_TRACK] = g15actions.ActionBinding( NEXT_TRACK, [g15driver.G_KEY_NEXT], g15driver.KEY_STATE_UP) g15devices.z10_action_keys[NEXT_TRACK] = g15actions.ActionBinding( NEXT_TRACK, [g15driver.G_KEY_NEXT], g15driver.KEY_STATE_UP) g15devices.g19_action_keys[NEXT_TRACK] = g15actions.ActionBinding( NEXT_TRACK, [g15driver.G_KEY_NEXT], g15driver.KEY_STATE_UP) g15devices.g15_action_keys[PREV_TRACK] = g15actions.ActionBinding( PREV_TRACK, [g15driver.G_KEY_PREV], g15driver.KEY_STATE_UP) g15devices.z10_action_keys[PREV_TRACK] = g15actions.ActionBinding( PREV_TRACK, [g15driver.G_KEY_PREV], g15driver.KEY_STATE_UP) g15devices.g19_action_keys[PREV_TRACK] = g15actions.ActionBinding( PREV_TRACK, [g15driver.G_KEY_PREV], g15driver.KEY_STATE_UP) g15devices.g15_action_keys[STOP_TRACK] = g15actions.ActionBinding( STOP_TRACK, [g15driver.G_KEY_STOP], g15driver.KEY_STATE_UP) g15devices.z10_action_keys[STOP_TRACK] = g15actions.ActionBinding( STOP_TRACK, [g15driver.G_KEY_STOP], g15driver.KEY_STATE_UP) g15devices.g19_action_keys[STOP_TRACK] = g15actions.ActionBinding(
import gnome15.g15locale as g15locale import gnome15.g15driver as g15driver import gnome15.g15theme as g15theme import gnome15.g15plugin as g15plugin import gnome15.g15actions as g15actions import gnome15.g15devices as g15devices import gnome15.g15profile as g15profile logger = logging.getLogger(__name__) _ = g15locale.get_translation("keyhelp", modfile=__file__).ugettext # Actions SHOW_KEY_HELP = 'key-help' # Register the action with all supported models g15devices.g15_action_keys[SHOW_KEY_HELP] = g15actions.ActionBinding( SHOW_KEY_HELP, [g15driver.G_KEY_M1], g15driver.KEY_STATE_HELD) g15devices.z10_action_keys[SHOW_KEY_HELP] = g15actions.ActionBinding( SHOW_KEY_HELP, [g15driver.G_KEY_L1], g15driver.KEY_STATE_HELD) g15devices.g19_action_keys[SHOW_KEY_HELP] = g15actions.ActionBinding( SHOW_KEY_HELP, [g15driver.G_KEY_M1], g15driver.KEY_STATE_HELD) # Plugin details - All of these must be provided id = "keyhelp" name = _("Key Help Screen") description = _("Displays key bindings on the current screen showing what\n\ actions are available for a particular plugin.") author = "Brett Smith <*****@*****.**>" copyright = _("Copyright (C)2012 Brett Smith") site = "http://www.russo79.com/gnome15" has_preferences = False unsupported_models = [
import gnome15.util.g15gconf as g15gconf import gnome15.util.g15os as g15os import gnome15.util.g15cairo as g15cairo import subprocess import shutil from threading import Thread # Logging import logging logger = logging.getLogger(__name__) # Custom actions SCREENSHOT = "screenshot" # Register the action with all supported models g15devices.g15_action_keys[SCREENSHOT] = g15actions.ActionBinding( SCREENSHOT, [g15driver.G_KEY_MR], g15driver.KEY_STATE_HELD) g15devices.g19_action_keys[SCREENSHOT] = g15actions.ActionBinding( SCREENSHOT, [g15driver.G_KEY_MR], g15driver.KEY_STATE_HELD) # Plugin details - All of these must be provided id = "lcdshot" name = _("LCD Screenshot") description = _("Takes either a still screenshot or a video of the LCD\n\ and places it in the configured directory.") author = "Brett Smith <*****@*****.**>" copyright = _("Copyright (C)2010 Brett Smith") site = "http://www.russo79.com/gnome15" has_preferences = True unsupported_models = [ g15driver.MODEL_G110, g15driver.MODEL_G11, g15driver.MODEL_MX5500, g15driver.MODEL_G930, g15driver.MODEL_G35, g15driver.MODEL_Z10
from gnome15 import g15theme from gnome15 import g15plugin from gnome15.util import g15cairo from gnome15.util import g15icontools from gnome15 import g15devices from gnome15 import g15actions from gnome15.util.g15pythonlang import find import os import logging logger = logging.getLogger(__name__) # Custom actions SELECT_PROFILE = "select-profile" # Register the action with all supported models g15devices.g15_action_keys[SELECT_PROFILE] = g15actions.ActionBinding( SELECT_PROFILE, [g15driver.G_KEY_L1], g15driver.KEY_STATE_HELD) g15devices.g19_action_keys[SELECT_PROFILE] = g15actions.ActionBinding( SELECT_PROFILE, [g15driver.G_KEY_BACK], g15driver.KEY_STATE_HELD) # Plugin details - All of these must be provided id = "profiles" name = _("Profile Selector") description = _( "Allows selection of the currently active profile. You may also \n\ lock a profile to the device it is running on, preventing\n\ changes triggered by active window changes and other\n\ automatic profile selection methods.\n\n\ You may also use this plugin to set the window title that\n\ activates the current profile by making the required\n\ window foreground, and the pressing the key bound to\n\ 'Select current window as activator' (see below).")
import sys import time import logging logger = logging.getLogger(__name__) from Xlib import X, XK, display from Xlib.ext import record from Xlib.protocol import rq from threading import Thread # Custom actions RECORD = "record" # Register the action with all supported models g15devices.g15_action_keys[RECORD] = g15actions.ActionBinding(RECORD, [ g15driver.G_KEY_MR ], g15driver.KEY_STATE_UP) g15devices.g19_action_keys[RECORD] = g15actions.ActionBinding(RECORD, [ g15driver.G_KEY_MR ], g15driver.KEY_STATE_UP) g15devices.g110_action_keys[RECORD] = g15actions.ActionBinding(RECORD, [ g15driver.G_KEY_MR ], g15driver.KEY_STATE_UP) # Plugin details - All of these must be provided id="macro-recorder" name=_("Macro Recorder") description=_("Allows recording of macros. All feedback is provided via the LCD (when available), \ as well as blinking of memory bank lights when recording. \ You may also delete macros by assigning an empty macro to a key. \ The macro will be recorded on the currently selected profile and memory bank.") author="Brett Smith <*****@*****.**>" copyright=_("Copyright (C)2010 Brett Smith") site="http://www.russo79.com/gnome15" has_preferences=False default_enabled=True
import alsaaudio import select import os import gtk import logging logger = logging.getLogger(__name__) from threading import Thread # Custom actions VOLUME_UP = "volume-up" VOLUME_DOWN = "volume-down" MUTE = "mute" # Register the action with all supported models g15devices.g15_action_keys[VOLUME_UP] = g15actions.ActionBinding( VOLUME_UP, [g15driver.G_KEY_VOL_UP], g15driver.KEY_STATE_UP) g15devices.g19_action_keys[VOLUME_UP] = g15actions.ActionBinding( VOLUME_UP, [g15driver.G_KEY_VOL_UP], g15driver.KEY_STATE_UP) g15devices.g15_action_keys[VOLUME_DOWN] = g15actions.ActionBinding( VOLUME_DOWN, [g15driver.G_KEY_VOL_DOWN], g15driver.KEY_STATE_UP) g15devices.g19_action_keys[VOLUME_DOWN] = g15actions.ActionBinding( VOLUME_DOWN, [g15driver.G_KEY_VOL_DOWN], g15driver.KEY_STATE_UP) g15devices.g15_action_keys[MUTE] = g15actions.ActionBinding( MUTE, [g15driver.G_KEY_MUTE], g15driver.KEY_STATE_UP) g15devices.g19_action_keys[MUTE] = g15actions.ActionBinding( MUTE, [g15driver.G_KEY_MUTE], g15driver.KEY_STATE_UP) # Plugin details - All of these must be provided id = "volume" name = _("Volume Monitor") description = _("Uses the M-Key lights as a volume meter. If your model has \