eww icon indicating copy to clipboard operation
eww copied to clipboard

[WIDGET] taskbar

Open godalming123 opened this issue 2 years ago • 8 comments

Description of the widget

A basic taskbar widget like that in windows or waybar.

Implementation proposal

This would use the box widget as well as smaller buttons with an image and label.

Example usage

(taskbar :format "icon name"
              :icon-size 15
              :tooltip-format ""
              :on-click "activate"
              :on-middle-click "close"
              :on-right-click "new-instance"
              :ignore "alacritty"
              :direction "h"

Additional context

No response

godalming123 avatar Mar 12 '22 08:03 godalming123

Given that that heavily depends on your display server, and is really hard to do in a way that is flexible enough to fit with the spirit of eww, I'll probably say a builtin Taskbar widget is largely out of scope for now. (not 100% sure on that, of course)

In the future there might be some sort of plugin system, or some other cleaner way to have external extensions to eww that can directly interact with gtk -- with those, such a widget might be a thing again.

Until then, do know that a Taskbar widget should already generally be achievable via some scripts, literal, etc - not super pretty, but possible

elkowar avatar Mar 12 '22 14:03 elkowar

Do you have any help in finding those scripts I had a polybar windows script on xorg but that doesnt work on wayland is there any tool/script that works for wayland?

godalming123 avatar Mar 13 '22 08:03 godalming123

You might want to search the issues, there has been some discussion about using stalonetray or trayer iirc.

VuiMuich avatar Mar 13 '22 10:03 VuiMuich

Do you have any help in finding those scripts I had a polybar windows script on xorg but that doesnt work on wayland is there any tool/script that works for wayland?

I don't know of any specific tools, no. On Wayland these things tend to be a lot more complex, as I understand it, as Wayland gives applications far less access to information about, well, anything (for security reasons). My assumption is that such scripts would have to be compositor dependant, unless there is some well supported extension protocol for that info - idk about that.

Should most definitely not be tooooo hard to do yourself, depending on your compositor, ofc

elkowar avatar Mar 13 '22 13:03 elkowar

To add to this from the Wayland side, something like what is proposed in this wlrctl issue would definitely help script a taskbar, but it doesn't seem to be a priority for now. I haven't been able to find a tool that can be molded into a functional taskbar yet besides wlrctl (if the feature proposed in the issue could be implemented), unfortunately.

Waybar and tools similar to wlrctl use the wlr-foreign-toplevel-management-unstable protocol extension to receive and communicate toplevel (window) events with the compositor. It seems most compositors currently actively developed support it (not sure about mutter and kwin, though). Waybar's "wlr/taskbar" module seems to maintain its own list of opened toplevels, handles compositor toplevel events, asks the compositor to minimize/maximize/close toplevels etc.

There are more tools that can list opened Wayland toplevels, such as Waylevel and lswt, though monitoring toplevel events seems out of scope for them.

Electrostasy avatar Mar 24 '22 08:03 Electrostasy

Описание виджета

Базовый виджет панели задач, такой как в окнах или путевой панели.

Предложение по реализации

Это будет использовать виджет коробки, а также меньшие кнопки с изображением и меткой.

Пример использования

(taskbar :format "icon name"
              :icon-size 15
              :tooltip-format ""
              :on-click "activate"
              :on-middle-click "close"
              :on-right-click "new-instance"
              :ignore "alacritty"
              :direction "h"

Дополнительный контекст

Good idea to have a built-in taskbar widget, I'm literally looking for ways to write myself a taskbar widget for my rice myself. I saw a rice on reddit not too long ago where a person replicated the win11 design and recreated literally everything with eww (and taskbar, start menu, gamebar and more), I can attach the link below for you. Hope this helps you in some way, as I can't figure out the colossal amount of scripts and how they work.

link - https://www.reddit.com/r/unixporn/comments/13zdhqd/hyprland_windows_rice_with_too_much_eww_with_blur/

Bavalionprolate avatar Aug 22 '23 10:08 Bavalionprolate

it'd be great if there were some initially supported compositors ( xorg's pretty easy ) and provide a magic variable ( which is a json arr of objects ) and each object has useful info about each window

example

image

siduck avatar Aug 28 '23 17:08 siduck