aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules')
-rw-r--r--desktop/modules/deckit/DeckItDashboardPage.qml2
-rw-r--r--desktop/modules/deckit/DeckItModule.qml6
-rw-r--r--desktop/modules/deckit/DeckItWindowsModule.qml5
-rw-r--r--desktop/modules/deckit/DeckItWindowsPage.qml3
-rw-r--r--desktop/modules/deckit/README.md7
-rw-r--r--desktop/modules/perf/Perf.js11
-rw-r--r--desktop/modules/perf/test_perf.js6
7 files changed, 27 insertions, 13 deletions
diff --git a/desktop/modules/deckit/DeckItDashboardPage.qml b/desktop/modules/deckit/DeckItDashboardPage.qml
index 0ab032f..060df7e 100644
--- a/desktop/modules/deckit/DeckItDashboardPage.qml
+++ b/desktop/modules/deckit/DeckItDashboardPage.qml
@@ -33,7 +33,7 @@ Column {
Small { visible: DeckIt.defaultsError !== ""; color: Theme.red; text: DeckIt.defaultsError }
Heading { objectName: "modules/"; text: "Dashboard parts" }
- Small { text: "What the Dashboard shows. The OBS and K1C tabs, on the General page, also feed its running row." }
+ Small { text: "What the Dashboard shows. The OBS and K1C tabs, on the Server page, also feed its running row." }
Repeater {
model: Modules.parts(Object.keys(col.def("modules") ?? {}))
BoolSetting {
diff --git a/desktop/modules/deckit/DeckItModule.qml b/desktop/modules/deckit/DeckItModule.qml
index 623bdc8..f3986e9 100644
--- a/desktop/modules/deckit/DeckItModule.qml
+++ b/desktop/modules/deckit/DeckItModule.qml
@@ -14,12 +14,12 @@ import QtQuick
import "../.."
import "../qtmaildir"
-// deck-it, the tablet dashboard: General, the first of its four pages, with
+// deck-it, the tablet dashboard: Server, the first of its four pages, with
// its state and Restart in the header. See README.md.
Module {
id: mod
name: "deckit"
- label: "deck-it"
+ label: "Server"
// nf-md-tablet, present in Inconsolata Nerd Font.
icon: "󰓶"
settings: true
@@ -39,7 +39,7 @@ Module {
page: Component {
Page {
- title: "deck-it"
+ title: "Server"
// Its state in the header, as the Wallpaper engine page does:
// `deck-it status`, polled while the page is open (DeckIt.watchers).
// One draft behind all four deck-it pages: Save writes them all.
diff --git a/desktop/modules/deckit/DeckItWindowsModule.qml b/desktop/modules/deckit/DeckItWindowsModule.qml
index 3c75c28..3271644 100644
--- a/desktop/modules/deckit/DeckItWindowsModule.qml
+++ b/desktop/modules/deckit/DeckItWindowsModule.qml
@@ -21,9 +21,10 @@ Module {
settings: true
group: "deck-it"
dirty: DeckIt.store.dirty
- keywords: ["deck-it", "tablet", "windows", "launcher", "launchers", "apps", "gtk-launch", "workspaces"]
+ keywords: ["deck-it", "tablet", "windows", "launcher", "launchers", "apps", "gtk-launch", "workspaces", "peek", "new window"]
readonly property var fields: [
- ["launch", "apps", "Launchers"], ["windows", "workspaces", "Workspaces"]]
+ ["launch", "apps", "Launchers"], ["windows", "workspaces", "Workspaces"],
+ ["windows", "peek", "Show on new window"]]
searchItems: fields.map(f => ({ text: f[2], key: f[0] + "/" + f[1] }))
function refresh() { DeckIt.reload(); }
diff --git a/desktop/modules/deckit/DeckItWindowsPage.qml b/desktop/modules/deckit/DeckItWindowsPage.qml
index c7cd11c..0f27ccf 100644
--- a/desktop/modules/deckit/DeckItWindowsPage.qml
+++ b/desktop/modules/deckit/DeckItWindowsPage.qml
@@ -148,4 +148,7 @@ Column {
Setting { store: col.st; section: "windows"; key: "workspaces"; label: "Workspaces"
placeholder: col.st.placeholder("windows", "workspaces")
hint: "Numbers on the Windows tab, separated by spaces, shown even when empty." }
+ Setting { store: col.st; section: "windows"; key: "peek"; label: "Show on new window"; kind: "int"; min: 0; max: 60
+ placeholder: col.st.placeholder("windows", "peek")
+ hint: "Seconds the tablet shows the Windows tab when a window opens, then goes back unless touched. 0 turns it off." }
}
diff --git a/desktop/modules/deckit/README.md b/desktop/modules/deckit/README.md
index ba4f4db..427f753 100644
--- a/desktop/modules/deckit/README.md
+++ b/desktop/modules/deckit/README.md
@@ -4,7 +4,7 @@ Four settings pages, in their own deck-it sidebar group, for deck-it (the
tablet dashboard, its own repo): whether it starts at login, and its
`~/.config/deck-it/config.toml`.
-- General (`DeckItModule`, `DeckItGeneralPage`): the config path, Start
+- Server (`DeckItModule`, `DeckItGeneralPage`): the config path, Start
(start at login, Wi-Fi address), Display, Tabs (the tablet's tabs) and
Advanced (ports, Hyprland config, fallback icon theme). Its header carries deck-it's state and
Restart.
@@ -14,7 +14,8 @@ tablet dashboard, its own repo): whether it starts at login, and its
gives each a readable name; a module it does not list lands with the
Dashboard parts.
- Windows (`DeckItWindowsModule`, `DeckItWindowsPage`): the launchers and the
- workspaces the Windows tab shows.
+ workspaces the Windows tab shows, and how long a new window brings that tab
+ forward.
- Services (`DeckItServicesModule`, `DeckItServicesPage`): OBS, the LLM
dashboard URL, the K1C's Moonraker and the build VM host.
@@ -44,7 +45,7 @@ the list; the order is the button order on the tablet.
deck-it reads its config once at start, so a save applies on Restart
deck-it, which runs `deck-it stop` and then the login command.
-While the General page is open it polls `deck-it status` (JSON: server, display,
+While the Server page is open it polls `deck-it status` (JSON: server, display,
waiting, tablet, extend) every 2s and shows one line in that page's header,
beside Restart and Save, as the Wallpaper engine page does: green when the
server runs with a tablet tunnelled (and the display streams, if enabled),
diff --git a/desktop/modules/perf/Perf.js b/desktop/modules/perf/Perf.js
index d067d3b..eb0dbd7 100644
--- a/desktop/modules/perf/Perf.js
+++ b/desktop/modules/perf/Perf.js
@@ -186,16 +186,21 @@ function procs(text) {
// One {key, name, rx, tx} per TCP socket in `ss -tinpH` output: a line
// naming the owner in users:((...)), then the -i line under it with the
// byte counters. Sockets ss names no owner for (other users', without root)
-// are skipped. The key is both endpoints and the pid, so a reused port in
-// another process is a new socket.
+// are skipped, except NFS: the kernel's client owns that socket, so a file
+// manager copying to or from a share shows nothing of its own, and the
+// traffic is listed as "NFS <server>" instead. The key is both endpoints and
+// the pid, so a reused port in another process is a new socket.
function sockets(text) {
const out = [];
let cur = null;
for (const line of text.split("\n")) {
- const u = /^\S+\s+\d+\s+\d+\s+(\S+)\s+(\S+)\s+users:\(\("([^"]*)",pid=(\d+)/.exec(line);
+ let u = /^\S+\s+\d+\s+\d+\s+(\S+)\s+(\S+)\s+users:\(\("([^"]*)",pid=(\d+)/.exec(line);
if (u) {
cur = { key: u[1] + " " + u[2] + " " + u[4], name: u[3], rx: 0, tx: 0 };
out.push(cur);
+ } else if ((u = /^\S+\s+\d+\s+\d+\s+(\S+)\s+(\S+):2049\s*$/.exec(line))) {
+ cur = { key: u[1] + " " + u[2] + ":2049", name: "NFS " + u[2], rx: 0, tx: 0 };
+ out.push(cur);
} else if (cur && /^\s/.test(line)) {
cur.rx = Number((/bytes_received:(\d+)/.exec(line) || [0, 0])[1]);
cur.tx = Number((/bytes_sent:(\d+)/.exec(line) || [0, 0])[1]);
diff --git a/desktop/modules/perf/test_perf.js b/desktop/modules/perf/test_perf.js
index 7c108a8..d5856e8 100644
--- a/desktop/modules/perf/test_perf.js
+++ b/desktop/modules/perf/test_perf.js
@@ -153,7 +153,8 @@ assert.deepStrictEqual(P.procs(frame), [
]);
assert.deepStrictEqual(P.procs(""), []);
-// sockets: owned sockets with their -i counters; ownerless ones skipped.
+// sockets: owned sockets with their -i counters; ownerless ones skipped
+// unless they are the kernel's NFS client.
const ss = [
"ESTAB 0 0 10.0.0.5:35806 192.0.2.1:443 users:((\"firefox\",pid=12,fd=53))",
"\t cubic rto:340 bytes_sent:100 bytes_acked:101 bytes_received:5000 segs_out:2",
@@ -161,11 +162,14 @@ const ss = [
"\t cubic bytes_sent:999 bytes_received:999",
"SYN-SENT 0 1 10.0.0.5:49916 192.0.2.2:65081 users:((\"ktorrent\",pid=7,fd=67))",
"\t cubic rto:1000 segs_out:3",
+ "ESTAB 0 0 10.0.0.5:678 192.0.2.4:2049",
+ "\t cubic bytes_sent:7 bytes_received:8000",
].join("\n");
const socks = P.sockets(ss);
assert.deepStrictEqual(socks, [
{ key: "10.0.0.5:35806 192.0.2.1:443 12", name: "firefox", rx: 5000, tx: 100 },
{ key: "10.0.0.5:49916 192.0.2.2:65081 7", name: "ktorrent", rx: 0, tx: 0 },
+ { key: "10.0.0.5:678 192.0.2.4:2049", name: "NFS 192.0.2.4", rx: 8000, tx: 7 },
]);
// netProcs: deltas over the interval summed by name; a new socket counts