Merge pull request #405 from grubersjoe/xkblayout
xkblayout module - format and uppercase settings
This commit is contained in:
commit
4476059aac
@ -16,8 +16,11 @@ class Xkblayout(IntervalModule):
|
|||||||
|
|
||||||
interval = 1
|
interval = 1
|
||||||
format = u"\u2328 {name}"
|
format = u"\u2328 {name}"
|
||||||
|
uppercase = True
|
||||||
settings = (
|
settings = (
|
||||||
|
("format", "Format string"),
|
||||||
("layouts", "List of layouts"),
|
("layouts", "List of layouts"),
|
||||||
|
("uppercase", "Flag for uppercase output"),
|
||||||
)
|
)
|
||||||
layouts = []
|
layouts = []
|
||||||
on_leftclick = "change_layout"
|
on_leftclick = "change_layout"
|
||||||
@ -25,8 +28,12 @@ class Xkblayout(IntervalModule):
|
|||||||
def run(self):
|
def run(self):
|
||||||
kblayout = self.kblayout()
|
kblayout = self.kblayout()
|
||||||
|
|
||||||
|
full_text = self.format.format(name=kblayout)
|
||||||
|
if self.uppercase:
|
||||||
|
full_text = full_text.upper()
|
||||||
|
|
||||||
self.output = {
|
self.output = {
|
||||||
"full_text": self.format.format(name=kblayout).upper(),
|
"full_text": full_text,
|
||||||
"color": "#ffffff"
|
"color": "#ffffff"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user