[modules/shortcut] quotes
This commit is contained in:
parent
95d9057973
commit
007b097077
1 changed files with 9 additions and 9 deletions
|
@ -9,7 +9,7 @@ a demiliter (; semicolon by default).
|
||||||
For example in order to create two shortcuts labeled A and B with commands
|
For example in order to create two shortcuts labeled A and B with commands
|
||||||
cmdA and cmdB you could do:
|
cmdA and cmdB you could do:
|
||||||
|
|
||||||
./bumblebee-status -m shortcut -p shortcut.cmd="ls;ps" shortcut.label="A;B"
|
./bumblebee-status -m shortcut -p shortcut.cmd='ls;ps' shortcut.label='A;B'
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
* shortcut.cmds : List of commands to execute
|
* shortcut.cmds : List of commands to execute
|
||||||
|
@ -22,8 +22,8 @@ import bumblebee.engine
|
||||||
import bumblebee.output
|
import bumblebee.output
|
||||||
import bumblebee.input
|
import bumblebee.input
|
||||||
|
|
||||||
LINK = "https://github.com/tobi-wan-kenobi/bumblebee-status/wiki"
|
LINK = 'https://github.com/tobi-wan-kenobi/bumblebee-status/wiki'
|
||||||
LABEL = "Click me"
|
LABEL = 'Click me'
|
||||||
|
|
||||||
class Module(bumblebee.engine.Module):
|
class Module(bumblebee.engine.Module):
|
||||||
""" Shortcut module."""
|
""" Shortcut module."""
|
||||||
|
@ -33,9 +33,9 @@ class Module(bumblebee.engine.Module):
|
||||||
self._engine = engine
|
self._engine = engine
|
||||||
super(Module, self).__init__(engine, config, widgets)
|
super(Module, self).__init__(engine, config, widgets)
|
||||||
|
|
||||||
self._labels = self.parameter("labels", "{}".format(LABEL))
|
self._labels = self.parameter('labels', '{}'.format(LABEL))
|
||||||
self._cmds = self.parameter("cmds", "firefox {}".format(LINK))
|
self._cmds = self.parameter('cmds', 'firefox {}'.format(LINK))
|
||||||
self._delim = self.parameter("delim", ";")
|
self._delim = self.parameter('delim', ';')
|
||||||
|
|
||||||
self.update_widgets(widgets)
|
self.update_widgets(widgets)
|
||||||
|
|
||||||
|
@ -50,9 +50,9 @@ class Module(bumblebee.engine.Module):
|
||||||
|
|
||||||
# report possible problem as a warning
|
# report possible problem as a warning
|
||||||
if len(cmds) is not len(labels):
|
if len(cmds) is not len(labels):
|
||||||
logging.warning("shortcut: the number of commands does not match "\
|
logging.warning('shortcut: the number of commands does not match '\
|
||||||
"the number of provided labels.")
|
'the number of provided labels.')
|
||||||
logging.warning("cmds : %s, labels : %s", cmds, labels)
|
logging.warning('cmds : %s, labels : %s', cmds, labels)
|
||||||
|
|
||||||
for idx in range(0, num_shortcuts):
|
for idx in range(0, num_shortcuts):
|
||||||
cmd = cmds[idx]
|
cmd = cmds[idx]
|
||||||
|
|
Loading…
Reference in a new issue