stylix icon indicating copy to clipboard operation
stylix copied to clipboard

stylix: allow choosing testbed desktop

Open mateusauler opened this issue 7 months ago • 8 comments

This adds stylix.testbed.ui.desktop which allows the testbed to pick what desktop environment/window manager will be ran inside the VM.

This PR is currently a PoC and I'm open to any suggestions. I'm actively working on it, so everything is subject to change.

Relevant: https://github.com/danth/stylix/pull/1192#discussion_r2069722780

Things done

Notify maintainers

@danth @trueNAHO @awwpotato @Flameopathic

Who else?

mateusauler avatar May 04 '25 15:05 mateusauler

This seems a bit overkill IMO. The standard configuration was meant as a default for when the target is an application rather than a DE/WM itself - with the plan that GNOME would eventually be replaced with something more minimal like cage. If testbeds are targeting a DE/WM, or an application which requires something more specific then they should include their own configuration from scratch.

By adding options like this, we risk duplicating a lot of the services.xserver.* options from NixOS as essentially aliases which just enable a couple of things.

danth avatar May 04 '25 21:05 danth

something more minimal like cage

imo cage is too minimal because it doesn't interact well with popups iirc. perhaps we use a minimal wm like river.

0xda157 avatar May 04 '25 21:05 0xda157

The reasoning is that:

a) Some applications might be desktop specific, like gnome-text-editor for example. So if we support multiple applications for the same desktop, we end up with a lot of duplicate code and potentially inconsistent setups. If a module needs a more specific setup on top of the desktop, it can handle that.

b) In the case of mako (#1192), for example, I had to replicate basically all of Hyprland's testbed code. Some other modules we already support that could have this problem are: dunst, hyprlock, hyprpaper, rofi, swaylock, waybar, wpaperd, xresources.

We could limit our selection to a couple desktops for their specific properties (Eg. X11/Wayland, doesn't include a bar, doesn't handle notifications). Right now, I added all desktops we have testbeds for.

mateusauler avatar May 04 '25 22:05 mateusauler

+1 wayprompt doesn't work in gnome environment for some reason, i tested it on sway and hyprland, works great on those wms

nukdokplex avatar May 11 '25 22:05 nukdokplex

+1 wayprompt doesn't work in gnome environment for some reason, i tested it on sway and hyprland, works great on those wms

Ah, the reason is that Wayprompt requires the compositor to support the layer shell protocol, and GNOME doesn’t.

panchoh avatar May 12 '25 09:05 panchoh

Ah, the reason is that Wayprompt requires the compositor to support the layer shell protocol, and GNOME doesn’t.

That must be the same reason notification daemons won't work on it

Flameopathic avatar May 12 '25 12:05 Flameopathic

I'm currently unhappy with:

  • Each graphical environment module has to check if it should be enabled. (See https://github.com/danth/stylix/pull/1222#discussion_r2083582710)
  • The code for autostarting applications in WMs that don't support it is duplicated (See hyprland and bspwm)
  • The choice of available environments is somewhat arbitrary (they're the environments we have testbeds for). I think (Gnome ^ Plasma6) & (Hyprland ^ Bspwm) should be enough. Maybe cage as well.

Despite that, I believe this PR is ready for a proper review. So, I'm marking this as ready.

mateusauler avatar May 14 '25 02:05 mateusauler

Consider adding the documentation from https://github.com/nix-community/stylix/pull/1383#issuecomment-2907850828 in this PR

Flameopathic avatar May 26 '25 13:05 Flameopathic

I'm setting this to draft as I'll not be able to finish the rebase today.

mateusauler avatar Jun 06 '25 23:06 mateusauler

Does this PR ensure that every environment has a true color default terminal (first mentioned in https://github.com/nix-community/stylix/pull/1110#discussion_r2051564208)?

Flameopathic avatar Jun 10 '25 14:06 Flameopathic

What is the status of this PR?

Flameopathic avatar Jun 30 '25 17:06 Flameopathic

What is the status of this PR?

Sorry about the delay, I've been traveling. And because the conflict isn't trivial, I haven't had time to fix it yet. But I'll do it this week if everything goes right.

mateusauler avatar Jul 01 '25 19:07 mateusauler

Does this PR ensure that every environment has a true color default terminal (first mentioned in #1110 (comment))?

Not really. Hyprland and Bspwm don't ship with a terminal by default. I could add one to their files.

mateusauler avatar Jul 06 '25 00:07 mateusauler

Once again, this PR is ready for review.

mateusauler avatar Jul 06 '25 00:07 mateusauler

It would be good to make sure that the existing stylix.testbed.ui.command.useTerminal feature works on all graphical environments.

Done.

mateusauler avatar Jul 08 '25 00:07 mateusauler

I don't know if there's anything special that you need to do to make a terminal the default one; if there isn't, this looks good.

Just realized it doesn't work. I'll fix it later today.

mateusauler avatar Jul 08 '25 14:07 mateusauler

Done. (A bit ugly, but couldn't make it work any other way)

mateusauler avatar Jul 09 '25 01:07 mateusauler

The bot still seems to claim that there is a merge conflict

Flameopathic avatar Jul 09 '25 19:07 Flameopathic

It's resolved, so maybe it'll update soon...

mateusauler avatar Jul 09 '25 19:07 mateusauler

It's resolved, so maybe it'll update soon...

It updates every time the base branch is updated

0xda157 avatar Jul 10 '25 03:07 0xda157

Backport failed for release-25.05, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-25.05
git worktree add -d .worktree/backport-1222-to-release-25.05 origin/release-25.05
cd .worktree/backport-1222-to-release-25.05
git switch --create backport-1222-to-release-25.05
git cherry-pick -x 8c854fe383fda20e8befefc31ecf248988a40bcc

stylix-automation[bot] avatar Jul 16 '25 13:07 stylix-automation[bot]