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:
@@ -26,3 +26,4 @@ MangoWC changes keymode; click it to show the current keymode in a notification.
|
||||
| --- | --- | --- | --- |
|
||||
| `show_text` | `bool` | `true` | Shows the current keymode beside the widget glyph. |
|
||||
| `notify_change` | `bool` | `true` | Sends a notification when the keymode changes. |
|
||||
| `hide_on_default` | `bool` | `false` | Hides the widget when default keymode is active. |
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
id = "gambled23/mangowm-keymode"
|
||||
name = "Mangowm Keymode"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
plugin_api = 3
|
||||
author = "gambled23"
|
||||
license = "MIT"
|
||||
@@ -14,6 +14,12 @@ tags = ["bar", "mangowc"]
|
||||
id = "mangowm-keymode"
|
||||
entry = "keymode.luau"
|
||||
|
||||
[[widget.setting]]
|
||||
key = "hide_on_default"
|
||||
type = "bool"
|
||||
label_key = "settings.hide_on_default.label"
|
||||
default = false
|
||||
|
||||
[[widget.setting]]
|
||||
key = "show_text"
|
||||
type = "bool"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"settings.show_text.label": "Show text on bar",
|
||||
"settings.notify_change.label": "Notify change"
|
||||
"settings.notify_change.label": "Notify change",
|
||||
"settings.hide_on_default.label": "Hide on default keymode"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user