Update gambled23/mangowm-keymode to 1.0.2 --- Hide on default keymode setting (#40)
* feat(keymode): Setting to hide on default keymode * docs(keymode): Updated thumbnail with new tags * docs(readme): added new setting
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
local showText = noctalia.getConfig("show_text")
|
||||
local notifyChange = noctalia.getConfig("notify_change")
|
||||
local hideOnDefault = noctalia.getConfig("hide_on_default")
|
||||
|
||||
local currentKeymode = "default"
|
||||
|
||||
@@ -17,11 +18,16 @@ end)
|
||||
|
||||
function update()
|
||||
noctalia.setUpdateInterval(1000)
|
||||
barWidget.setGlyph("keyboard")
|
||||
if showText then
|
||||
barWidget.setText(currentKeymode)
|
||||
if hideOnDefault and currentKeymode == "default" then
|
||||
barWidget.setVisible(false)
|
||||
else
|
||||
barWidget.setText("")
|
||||
barWidget.setVisible(true)
|
||||
barWidget.setGlyph("keyboard")
|
||||
if showText then
|
||||
barWidget.setText(currentKeymode)
|
||||
else
|
||||
barWidget.setText("")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user