noctalia: add local wvkbd osk bar plugin + ui tweaks
This commit is contained in:
+2
-5
@@ -331,7 +331,8 @@ in
|
||||
matches = [
|
||||
{ app-id = "dev.noctalia.Noctalia.Settings"; }
|
||||
];
|
||||
opacity = 0.85;
|
||||
opacity = 0.9;
|
||||
draw-border-with-background = false;
|
||||
open-floating = true;
|
||||
default-column-width = {
|
||||
proportion = 0.5;
|
||||
@@ -344,10 +345,6 @@ in
|
||||
y = 20;
|
||||
relative-to = "top";
|
||||
};
|
||||
background-effect = {
|
||||
blur = true;
|
||||
xray = true;
|
||||
};
|
||||
}
|
||||
|
||||
# Steam notifications
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
id = "local/osk"
|
||||
name = "wvkbd Toggle"
|
||||
version = "0.2.0"
|
||||
min_noctalia = "5.0.0"
|
||||
author = "local"
|
||||
description = "Bar button to toggle the wvkbd on-screen keyboard with style options."
|
||||
icon = "keyboard"
|
||||
|
||||
[[widget]]
|
||||
id = "toggle"
|
||||
entry = "toggle.luau"
|
||||
|
||||
# Geometry & alpha
|
||||
[[widget.setting]]
|
||||
key = "height"
|
||||
type = "int"
|
||||
label = "Landscape height (px)"
|
||||
default = 200
|
||||
|
||||
[[widget.setting]]
|
||||
key = "rounding"
|
||||
type = "int"
|
||||
label = "Corner rounding (px)"
|
||||
default = 10
|
||||
|
||||
[[widget.setting]]
|
||||
key = "alpha"
|
||||
type = "int"
|
||||
label = "Alpha (0-255)"
|
||||
default = 236
|
||||
min = 0
|
||||
max = 255
|
||||
|
||||
# Colors — raw wvkbd format: rrggbb or rrggbbaa (no leading #)
|
||||
[[widget.setting]]
|
||||
key = "bg"
|
||||
type = "string"
|
||||
label = "Background color (rrggbb|aa)"
|
||||
default = ""
|
||||
|
||||
[[widget.setting]]
|
||||
key = "fg"
|
||||
type = "string"
|
||||
label = "Key color (rrggbb|aa)"
|
||||
default = ""
|
||||
|
||||
[[widget.setting]]
|
||||
key = "press"
|
||||
type = "string"
|
||||
label = "Pressed key color (rrggbb|aa)"
|
||||
default = ""
|
||||
|
||||
[[widget.setting]]
|
||||
key = "text"
|
||||
type = "string"
|
||||
label = "Key text color (rrggbb|aa)"
|
||||
default = ""
|
||||
|
||||
# Layers & behavior
|
||||
[[widget.setting]]
|
||||
key = "layers"
|
||||
type = "string"
|
||||
label = "Layers (comma-separated, e.g. full,emoji)"
|
||||
default = ""
|
||||
|
||||
[[widget.setting]]
|
||||
key = "non_exclusive"
|
||||
type = "bool"
|
||||
label = "Non-exclusive (float over windows)"
|
||||
default = false
|
||||
@@ -0,0 +1,38 @@
|
||||
local BIN = "wvkbd-mobintl"
|
||||
|
||||
-- Build the wvkbd flag string from the widget's style settings.
|
||||
local function buildArgs()
|
||||
local args = {}
|
||||
|
||||
local function add(value, flag)
|
||||
if value ~= nil and value ~= "" then
|
||||
table.insert(args, flag .. " " .. tostring(value))
|
||||
end
|
||||
end
|
||||
|
||||
add(barWidget.getConfig("height"), "-L")
|
||||
add(barWidget.getConfig("rounding"), "-R")
|
||||
add(barWidget.getConfig("alpha"), "--alpha")
|
||||
add(barWidget.getConfig("bg"), "--bg")
|
||||
add(barWidget.getConfig("fg"), "--fg")
|
||||
add(barWidget.getConfig("press"), "--press")
|
||||
add(barWidget.getConfig("text"), "--text")
|
||||
add(barWidget.getConfig("layers"), "-l")
|
||||
|
||||
if barWidget.getConfig("non_exclusive") == true then
|
||||
table.insert(args, "--non-exclusive")
|
||||
end
|
||||
|
||||
return table.concat(args, " ")
|
||||
end
|
||||
|
||||
function update()
|
||||
noctalia.setUpdateInterval(60000)
|
||||
barWidget.setGlyph("keyboard")
|
||||
barWidget.setTooltip("Toggle wvkbd on-screen keyboard")
|
||||
end
|
||||
|
||||
function onClick()
|
||||
local launch = BIN .. " " .. buildArgs()
|
||||
noctalia.runAsync("pkill -x " .. BIN .. " || setsid " .. launch)
|
||||
end
|
||||
+11
-2
@@ -202,7 +202,7 @@ in
|
||||
transparency_mode = "glass"; # solid | soft | glass;
|
||||
|
||||
# open all panels attached to the bar, near the click position
|
||||
launcher_placement = "floating";
|
||||
launcher_placement = "center";
|
||||
clipboard_placement = "attached";
|
||||
control_center_placement = "attached";
|
||||
wallpaper_placement = "attached";
|
||||
@@ -259,8 +259,8 @@ in
|
||||
capsule_opacity = 1.0;
|
||||
|
||||
start = [
|
||||
"osk"
|
||||
"launcher"
|
||||
#Todo osd keyboard
|
||||
"spacer"
|
||||
"sysmon"
|
||||
"media"
|
||||
@@ -297,6 +297,13 @@ in
|
||||
title_scroll = "on_hover";
|
||||
hide_when_no_media = true;
|
||||
};
|
||||
osk = {
|
||||
type = "local/osk:toggle";
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
enabled = [ "local/osk" ];
|
||||
};
|
||||
|
||||
theme = {
|
||||
@@ -337,4 +344,6 @@ in
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
xdg.dataFile."noctalia/plugins/osk".source = ./noctalia-plugins/osk;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user