[PR #1189] feat(launcher): live previews #5432

Open
opened 2026-05-23 00:57:12 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/1189
Author: @JakeStanger
Created: 10/6/2025
Status: 🔄 Open

Base: masterHead: feat/launcher-previews


📝 Commits (1)

  • befcd9f feat(launcher): live previews

📊 Changes

20 files changed (+1199 additions, -59 deletions)

View changed files

📝 Cargo.lock (+258 -1)
📝 Cargo.toml (+12 -3)
📝 docs/modules/Launcher.md (+5 -1)
src/clients/wayland/dmabuf.rs (+111 -0)
src/clients/wayland/ext_image_copy_capture/frame.rs (+1 -0)
src/clients/wayland/ext_image_copy_capture/manager.rs (+1 -0)
src/clients/wayland/ext_image_copy_capture/mod.rs (+3 -0)
src/clients/wayland/ext_image_copy_capture/session.rs (+1 -0)
src/clients/wayland/hyprland_toplevel_export/frame.rs (+128 -0)
src/clients/wayland/hyprland_toplevel_export/manager.rs (+86 -0)
src/clients/wayland/hyprland_toplevel_export/mod.rs (+220 -0)
📝 src/clients/wayland/macros.rs (+31 -0)
📝 src/clients/wayland/mod.rs (+110 -17)
📝 src/clients/wayland/wlr_foreign_toplevel/mod.rs (+6 -1)
📝 src/gtk_helpers.rs (+19 -2)
📝 src/image/provider.rs (+8 -12)
📝 src/logging.rs (+4 -4)
📝 src/modules/focused.rs (+1 -0)
📝 src/modules/launcher/item.rs (+15 -3)
📝 src/modules/launcher/mod.rs (+179 -15)

📄 Description

Hovering an icon will display a live window preview image.

image

Resolves #157


This is an EXPERIMENTAL new feature. It works fine (I think) on my machine, but has not been tested anywhere else. As this deals with a fair amount of unsafe code, FFI, and the GPU, it is slightly more prone to going wrong than most features. I've fixed all the crashes I've discovered and Ironbar no longer takes up enough vram to start locking up other processes, but you have been warned...

Currently this relies on hyprland-toplevel-export-v1, which means currently only Hyprland is supported. Prior to merge, support for ext-image-copy-capture-v1 will be added, which is currently supported by Sway, COSMIC, Jay, and Treeland. Other compositors (Including Hyprland) should follow behind.

This also relies on DMA-BUF being available, which allows for offloading all the image work straight to the GPU. Any modern GPU driver should work with this, but older ones may not be supported, and I've no idea about Nouveau.

This raises the minimum required GTK version to 4.14. As a result, CI is failing due to some deprecated GTK functions. It's also failing because I need to fix the feature flags (I'd recommend building with all features if you want to try this). Everything does build and run okay though.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/1189 **Author:** [@JakeStanger](https://github.com/JakeStanger) **Created:** 10/6/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `feat/launcher-previews` --- ### 📝 Commits (1) - [`befcd9f`](https://github.com/JakeStanger/ironbar/commit/befcd9f6fd5aaa9b06fbc635cd793972e25511e4) feat(launcher): live previews ### 📊 Changes **20 files changed** (+1199 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+258 -1) 📝 `Cargo.toml` (+12 -3) 📝 `docs/modules/Launcher.md` (+5 -1) ➕ `src/clients/wayland/dmabuf.rs` (+111 -0) ➕ `src/clients/wayland/ext_image_copy_capture/frame.rs` (+1 -0) ➕ `src/clients/wayland/ext_image_copy_capture/manager.rs` (+1 -0) ➕ `src/clients/wayland/ext_image_copy_capture/mod.rs` (+3 -0) ➕ `src/clients/wayland/ext_image_copy_capture/session.rs` (+1 -0) ➕ `src/clients/wayland/hyprland_toplevel_export/frame.rs` (+128 -0) ➕ `src/clients/wayland/hyprland_toplevel_export/manager.rs` (+86 -0) ➕ `src/clients/wayland/hyprland_toplevel_export/mod.rs` (+220 -0) 📝 `src/clients/wayland/macros.rs` (+31 -0) 📝 `src/clients/wayland/mod.rs` (+110 -17) 📝 `src/clients/wayland/wlr_foreign_toplevel/mod.rs` (+6 -1) 📝 `src/gtk_helpers.rs` (+19 -2) 📝 `src/image/provider.rs` (+8 -12) 📝 `src/logging.rs` (+4 -4) 📝 `src/modules/focused.rs` (+1 -0) 📝 `src/modules/launcher/item.rs` (+15 -3) 📝 `src/modules/launcher/mod.rs` (+179 -15) </details> ### 📄 Description Hovering an icon will display a live window preview image. <img width="734" height="406" alt="image" src="https://github.com/user-attachments/assets/76dd828b-937d-462c-ac7f-4b312f254025" /> Resolves #157 --- This is an EXPERIMENTAL new feature. It works fine (I think) on my machine, but has not been tested anywhere else. As this deals with a fair amount of unsafe code, FFI, and the GPU, it is slightly more prone to going wrong than most features. I've fixed all the crashes I've discovered and Ironbar no longer takes up enough vram to start locking up other processes, but you have been warned... Currently this relies on `hyprland-toplevel-export-v1`, which means **currently only Hyprland is supported**. Prior to merge, support for `ext-image-copy-capture-v1` will be added, which is currently supported by Sway, COSMIC, Jay, and Treeland. Other compositors (Including Hyprland) should follow behind. This also relies on DMA-BUF being available, which allows for offloading all the image work straight to the GPU. Any modern GPU driver should work with this, but older ones may not be supported, and I've no idea about Nouveau. This raises the minimum required GTK version to 4.14. As a result, CI is failing due to some deprecated GTK functions. It's also failing because I need to fix the feature flags (I'd recommend building with all features if you want to try this). Everything does build and run okay though. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#5432
No description provided.