Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Crashes when no workspaces/items exist due to CSS #215

Closed
rohrsben opened this issue Nov 25, 2024 · 6 comments
Closed

[BUG] Crashes when no workspaces/items exist due to CSS #215

rohrsben opened this issue Nov 25, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@rohrsben
Copy link

rohrsben commented Nov 25, 2024

Describe the bug ๐Ÿ›
If there are no workspaces already existing (typically on first run) dooit crashes due to a css error:

โ•ญโ”€ Error at /home/error/.cache/dooit/dooit.tcss:38:โ”€โ•ฎ
โ”‚    36 ModelTree {                                 โ”‚
โ”‚    37 โ”‚   background: $background1;               โ”‚
โ”‚ โฑ  38 โ”‚   background-tint: white 0%;              โ”‚
โ”‚    39 โ”‚   color: $foreground3;                    โ”‚
โ”‚    40 โ”‚   border: $border_type $background3;      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
   Invalid CSS property 'background-tint'. Did you   
   mean 'background'?

This does not occur if you have a workspace created; e.g., edit dooit.tcss and remove line 38, relaunch and create a workspace, then continue on. Interestingly, the app looks much better without the line present: more (and more cohesive) colors are getting applied. If you add the line back in and have a workspace present, the app looks worse (aka less cohesive) but at least launches.

The crash starts happening again if you delete all workspaces. Or something. Maybe if you have just one empty workspace that still crashes? This part has been a bit hard to figure out.

To Reproduce ๐Ÿฃ
Steps to reproduce the behavior:

  1. Freshly install dooit
  2. Try to run dooit
  3. See error

Expected behavior ๐Ÿค”
Dooit launches normally.

Screenshots ๐Ÿง

Desktop (please complete the following information): ๐Ÿค–

  • OS: NixOS
  • Version: Unstable

Additional context ๐Ÿ“
I have dooit installed via flake, and am running the most recent version. Notably I could not get the dooit-extras overlay working though, and do not have it installed.

@rohrsben rohrsben added the bug Something isn't working label Nov 25, 2024
@kraanzu
Copy link
Member

kraanzu commented Nov 26, 2024

Hi @rohrsben,

Ah shoot, looks like the underlying library has not been updated in the nixpkgs. I'll make a PR then
Also, about dooit-extras, can you share your flake so I can check it out?

@kraanzu
Copy link
Member

kraanzu commented Nov 26, 2024

OK so I found out that this is already in progress.
See here

Until then I guess you'll have to wait :(
It should be merged quickly though. I'll keep track of this

@rohrsben
Copy link
Author

Ok, no worries. As for the overlay, here's the relevant parts of my config:

# flake.nix
dooit.url = "github:dooit-org/dooit";
dooit-extras.url = "github:dooit-org/dooit-extras";
# dooit.nix, imported in hm
# *this does not work*
{ inputs, pkgs, ... }:

{
    imports = [
        inputs.dooit.homeManagerModules.default
    ];

    nixpkgs.overlays = [ inputs.dooit-extras.overlay ];

    programs.dooit = {
        enable = true;
        extraPackages = [
            pkgs.dooit-extras
        ];
    };
}

I simply commented out the nixpkgs and extrapackages parts, which did work.

@kraanzu
Copy link
Member

kraanzu commented Nov 26, 2024

OK I can also confirm that something is wrong with the overlay, I'll update you with a fix but you can use this alternatively:

extraPackages = [inputs.dooit-extras.packages.x86_64-linux.default];

@rohrsben
Copy link
Author

Marking this as closed seeing as the nixpkgs merge landed. As far as I can tell it's now fully usable, but dooit-extras is still having an issue. I'm not personally too concerned with themeing, but I'll make a new issue since nix is giving me an actual error now.

Copy link

Did we solve your problem?
Glad we could help!

Consider sponsoring my work through github sponsors ๐Ÿ˜„
โ€“ @kraanzu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants