Dock and task manager are one module: titled window pills, pins, Super+1..9
CI / test (push) Failing after 30s
CI / test (push) Failing after 30s
The panel had a task list and, beside it, a dock showing the same running
apps again. They are now one module, the dock, in the task list's place:
- Pinned apps, then running ones; an app with windows is a pill with its
window's title (or name and window count) while there is room, an icon
when the panel is crowded ("Show window titles" in Dock settings).
- Its right-click menu has the task list's window commands (Minimize /
Restore, Maximize) for a single window, or the app's windows by title.
- It stretches like the task list did; new panels get it instead of
tasks. A saved panel's "tasks" becomes the dock (one dock, where the
task list was); pins are the dock's own setting, so they carry over.
- An empty dock shows a "+ Add apps" tile that opens the Applications
menu, where right-clicking an app offers Open and Pin to dock (adding a
dock to the panel if there is none).
- Super+1 .. Super+9 open the dock's first nine apps like a click
(shortcut "dock-apps", rebindable in Settings > Shortcuts).
- "New window" / "Open" only for apps the catalog can start.
The tasks component, lib/panel's pill geometry and the taskbar-widget
world are gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiPCFHRxaJQvwex6ry
This commit is contained in:
28 files changed
+801
-1131
No files matched your search
@@ -122,72 +122,6 @@ test "a module's own settings (module-config) are listed and set through wasmer"
|
||||
l.unload()
|
||||
}
|
||||
|
||||
///|
|
||||
test "task list module draws the host's windows and asks to focus one" {
|
||||
let p = load_module("tasks")
|
||||
assert_true(p.stretch)
|
||||
assert_true(p.imports().contains("windows") && p.imports().contains("theme"))
|
||||
let t = Table::new()
|
||||
t.int(7)
|
||||
t.str("Kate — notes")
|
||||
t.int(1)
|
||||
t.int(0)
|
||||
t.end_row()
|
||||
t.int(9)
|
||||
t.str("foot")
|
||||
t.int(0)
|
||||
t.int(1)
|
||||
t.end_row()
|
||||
publish(Windows, t)
|
||||
// Icons come from each window's app id (served by `windows.all`); without one, from the title.
|
||||
set_windows([{ id: 9UL, title: "foot", app_id: "org.chandra.term", focused: false }])
|
||||
let ops = p.render(400, 36, test_tokens())
|
||||
// each pill: the app icon's glyph, then the title
|
||||
assert_eq(texts_of(ops), ["K", "Kate — notes", "T", "foot"])
|
||||
set_windows([])
|
||||
assert_true(p.on_event(false, PointerDown(146 + 10, 10)) || true)
|
||||
assert_eq(drain(), [FocusWindow(9)])
|
||||
p.unload()
|
||||
}
|
||||
|
||||
///|
|
||||
test "task list draws the host's icon for an app it has one for, the letter tile otherwise" {
|
||||
let p = load_module("tasks")
|
||||
assert_true(p.imports().contains("icons"))
|
||||
let t = Table::new()
|
||||
for w in [(3, "Firefox"), (4, "foot")] {
|
||||
t.int(w.0)
|
||||
t.str(w.1)
|
||||
t.int(0)
|
||||
t.int(0)
|
||||
t.end_row()
|
||||
}
|
||||
publish(Windows, t)
|
||||
set_windows([
|
||||
{ id: 3UL, title: "Firefox", app_id: "firefox", focused: false },
|
||||
{ id: 4UL, title: "foot", app_id: "foot", focused: false },
|
||||
])
|
||||
let icons = Table::new()
|
||||
icons.str("firefox")
|
||||
icons.int(42)
|
||||
icons.end_row()
|
||||
publish(Icons, icons)
|
||||
let ops = p.render(400, 36, test_tokens())
|
||||
let images = ops.filter_map(op => match op {
|
||||
Image(i) => Some(i)
|
||||
_ => None
|
||||
})
|
||||
// Firefox: the icon (handle 42, a 22px square centred in the bar), no glyph; foot: the tile.
|
||||
assert_eq(images.length(), 1)
|
||||
assert_eq(images[0].image, 42U)
|
||||
assert_eq((images[0].rect.w, images[0].rect.h), (22U, 22U))
|
||||
assert_eq(images[0].rect.y, 7)
|
||||
assert_eq(texts_of(ops), ["Firefox", "F", "foot"])
|
||||
publish(Icons, Table::new())
|
||||
set_windows([])
|
||||
p.unload()
|
||||
}
|
||||
|
||||
///|
|
||||
test "layout module is a tile/float toggle" {
|
||||
let p = load_module("layout")
|
||||
|
||||
Reference in new issue
Block a user