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
@@ -1,5 +1,6 @@
|
||||
///| Implementation of `chandra:desktop/plasmoid` for the dock: pinned apps, then running ones,
|
||||
/// with their theme icons and a dot per open window. A click starts the app or brings its windows
|
||||
///| Implementation of `chandra:desktop/plasmoid` for the dock, the panel's task manager: pinned
|
||||
/// apps, then running ones, with their theme icons, a dot per open window and (room allowing)
|
||||
/// their window titles. A click starts the app or brings its windows
|
||||
/// forward. Layout, hit-testing and drawing live in lib/dock (the shell uses the same code for the
|
||||
/// hover label and the per-app right-click menu); this adapts host capabilities.
|
||||
|
||||
@@ -12,9 +13,22 @@ let width : Ref[Int] = Ref::new(200)
|
||||
///|
|
||||
let height : Ref[Int] = Ref::new(34)
|
||||
|
||||
///| The windows as the dock sees them.
|
||||
///| The windows as the dock sees them: `all` has the app ids, `list-windows` (by the low 32 bits
|
||||
/// of the id) which are minimized.
|
||||
fn dock_windows() -> Array[@logic.DockWindow] {
|
||||
@windows.all().map(d => { id: d.id, app_id: d.app_id, focused: d.focused })
|
||||
let mini : Map[UInt, Bool] = Map([])
|
||||
for w in @windows.list_windows() {
|
||||
if w.minimized != 0U {
|
||||
mini.set(w.id, true)
|
||||
}
|
||||
}
|
||||
@windows.all().map(d => {
|
||||
id: d.id,
|
||||
app_id: d.app_id,
|
||||
focused: d.focused,
|
||||
title: d.title,
|
||||
minimized: mini.contains((d.id & 0xFFFFFFFFUL).to_uint()),
|
||||
})
|
||||
}
|
||||
|
||||
///| The window with keyboard focus, if any.
|
||||
@@ -40,7 +54,8 @@ pub fn info() -> PlasmoidInfo {
|
||||
// The shell works out the real width from the items as they change.
|
||||
preferred: { w: @logic.preferred_width(current_items(), @logic.config, 34).reinterpret_as_uint(), h: 34U },
|
||||
min_width: 60,
|
||||
stretch: false,
|
||||
// The panel's task list: it takes the free room, and what follows packs right.
|
||||
stretch: true,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user