DankMaterialShell icon indicating copy to clipboard operation
DankMaterialShell copied to clipboard

fht-compositor support

Open nferhat opened this issue 2 months ago • 7 comments

Feature Description

Add support for fht-compositor. Creating this issue just to keep this in the backburner while I figure out how does DMS works. Willing to write the necessary support code to achieve this!

nferhat avatar Nov 03 '25 17:11 nferhat

The patterns to follow would either be:

I'm not familiar with fht, if it exposes some pub/sub json socket like niri - or maybe if it implements ext-workspaces or something that would probably be enough.

There's other little bits like:

  • monitor power on/off (don't implement any protocols just rely on niri/hypr dispatch/swaymsg/mmsg commands)
  • logout (also just rely on CLI IPC commands)
  • retrieving display scales (not critical, but helps fractional scaling in some cases)
  • keyboard layout widget (not currently implemented for dwl or Sway)
  • Little UI bits like launcher logo and about page community links.

The main work is the workspace widget, though. If it supports ext-workspace-v1 I would prefer that implementation, just since it's more universal across compositors generally)

bbedward avatar Nov 03 '25 22:11 bbedward

I'm not familiar with fht, if it exposes some pub/sub json socket like niri - or maybe if it implements ext-workspaces or something that would probably be enough.

It's actually very similar to niri, with most compositor data available for you to fetch/use. https://github.com/nferhat/fht-compositor/blob/main/fht-compositor-ipc/src/lib.rs

I'd guess the pattern would be to connect to the DankSocket, update state, and then plug everything into CompositorService.

There's other little bits like: ...

This should cover your cases. https://github.com/nferhat/fht-compositor/blob/ff3d9f3b6549b38e99755d022f5343fda3d6a971/fht-compositor-ipc/src/lib.rs#L412. Though there's a way to control output power state and fetch keyboard layout. If you can add custom widgets per compositor (in this instance a layout type widget), this would be pretty interesting

If it supports ext-workspace-v1 I would prefer that implementation

Not supported for now, but this shouldn't be something too hard to add on my part.

nferhat avatar Nov 04 '25 06:11 nferhat

I think all of the IPC over the socket should be sufficient then, if you want to tackle it - you can reference the recent sway addition c87fa0de5e19e780c28b3dfff9c20f4a4a13187a for whats needed for the basic integration. The difference with sway, would be you'd need an FHService (that is more similar to NiriService since that uses a socket for IPC)

bbedward avatar Nov 04 '25 20:11 bbedward

I actually have a (not pushed yet, still testing) ext-workspace implementation .

So basically if compositor is not (niri, hyprland, sway, dwl) and ext-workspace is available it just uses that.

The other remaining compositor specific items would he minor stuff

  • Fractional scaling values (don't have a generic way to get this via a protocol atm), that is to scale the interface properly based on compositor reported scaling
  • keyboard layout (also not working on dwl or sway)
  • some little options have to be disabled or done (same for sway and dwl), basically the top level sorting and "running apps on current workspace only"
  • logo and social links (also optional but it shows compositor logos and website/discord/matrix stuff in settings, and lets you make it a launcher button logo)

bbedward avatar Nov 11 '25 20:11 bbedward

I actually have a (not pushed yet, still testing) ext-workspace implementation .

Could you just push it into a wip branch? I am working on adding ext-workspace to fhtc and I wanna try it out here

nferhat avatar Nov 15 '25 17:11 nferhat

I actually have a (not pushed yet, still testing) ext-workspace implementation .

Could you just push it into a wip branch? I am working on adding ext-workspace to fhtc and I wanna try it out here

It's actually already on dms and it will just use it, if available and the compositor isn't one of the known ones.

bbedward avatar Nov 15 '25 17:11 bbedward

https://github.com/user-attachments/assets/6707f847-0ec8-48aa-81a3-d00be8c7d177

Some progress, for now I gotta see why its identifying multiple outputs and not binding them to the correct names

nferhat avatar Nov 17 '25 00:11 nferhat