Added uppercase setting
This commit is contained in:
parent
f2adc64966
commit
1baaeb3ccc
@ -16,9 +16,11 @@ class Xkblayout(IntervalModule):
|
|||||||
|
|
||||||
interval = 1
|
interval = 1
|
||||||
format = u"\u2328 {name}"
|
format = u"\u2328 {name}"
|
||||||
|
uppercase = True
|
||||||
settings = (
|
settings = (
|
||||||
("format", "Format string"),
|
("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"
|
||||||
@ -26,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