danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
902 stars 105 forks source link

Stylix breaking Plasma 6's shortcuts and Spectacle #412

Closed matkijahenkilo closed 2 weeks ago

matkijahenkilo commented 3 weeks ago

hewwo, I'm using Stylix with home-manager on Arch with Plasma 6 X11 session. Shortcuts and Spectacle gets broken when using it.

Before setting up Stylix, my system look like this:

2024-06-04_13-52-15

After setting up Stylix, logging out and in the session, it becomes like this:

Screenshot_2024-06-04_14-07-47

When running Spectacle on the terminal, it prints out this: Qt: Session management error: Authentication Rejected, reason : MIT-MAGIC-COOKIE-1 authentication rejected

I screenshotted the second print using xfce4-screenshooter in which it also has some problems after setting up Stylix, like not saving the print in a folder, so I had to workaround to make xfce4-screenshooter open in Krita so that I could export the print into a folder. Executing xfce4-screenshooter also warned me about an Ibus error: (xfce4-screenshooter:70063): IBUS-WARNING **: 03:40:26.594: Unable to connect to ibus: The given address is empty.


Steps to reproduce:

  1. Set up Stylix in home-manager
  2. Remove files that will conflict with home-manager (mainly ~/.gtkrc-2.0.backup since I'm using -b backup params in home-manager)
  3. Run home-manager switch -b backup --flake /path/to/flake/#<user>
  4. Log out and log in Plasma 6 X11 session
  5. Go to Plasma's System Settings > Color & Themes > Icons, change it to any other icon theme

And stuff will get weird

Steps to fix the issue:

  1. Remove or comment Stylix in home-manager
  2. Run home-manager switch -b backup --flake /path/to/flake/#<user>
  3. Log out and log in Plasma 6 X11 session
  4. Go to Plasma's System Settings > Color & Themes > Icons, change it to any other icon theme. If it doesn't work, keep changing it until it fixes itself or go back to step 3.

And everything will get back to normal


My Stylix configuration:

{ pkgs, ... }: {
  stylix = {
    autoEnable = true;
    base16Scheme = "${pkgs.base16-schemes}/share/themes/pop.yaml";
    image = ./../../assets/bg;
    polarity = "dark";

    cursor = {
      package = pkgs.banana-cursor;
      name = "Banana";
    };

    fonts = {
      sizes = {
        applications = 10;
        terminal = 12;
        desktop = 10;
        popups = 9;
      };

      serif = {
        package = pkgs.dejavu_fonts;
        name = "DejaVu Serif";
      };

      monospace = {
        package = pkgs.nerdfonts;
        name = "Fira Code nerd Font Mono";
      };

      sansSerif = {
        package = pkgs.dejavu_fonts;
        name = "DejaVu Sans";
      };

      emoji = {
        package = pkgs.noto-fonts-emoji;
        name = "Noto Color Emoji";
      };
    };

    opacity = {
      applications = 1.0;
      terminal = 1.0;
      desktop = 1.0;
      popups = 1.0;
    };
  };
}

I don't see anything wrong that I am doing, is there any fix or mitigation for this problem? ;w;

Yeshey commented 2 weeks ago

@matkijahenkilo maybe you need to add stylix.enable = true?

Yeshey commented 2 weeks ago

well, looks like stylix.enable = true was added today actually, so that's probably not it

danth commented 2 weeks ago

Please could you check the value of the environment variable $XDG_CONFIG_DIRS before and after applying Stylix?

matkijahenkilo commented 2 weeks ago

Please could you check the value of the environment variable $XDG_CONFIG_DIRS before and after applying Stylix?

before settings up Stylix:

~> $XDG_CONFIG_DIRS
fish: Unknown command: /home/marisa/.config/kdedefaults:/etc/xdg

after setting up Stylix:

~> $XDG_CONFIG_DIRS
fish: Unknown command: /home/marisa/.config/kdedefaults:/nix/store/ryg6irnnwc6fgmygnwdrya0kjj51nkxd-stylix-kde-config
matkijahenkilo commented 2 weeks ago

I also edited the issue and pasted both Spectacle and xfce4-screenshooter outputs, if it is of any relevance óuò

danth commented 2 weeks ago

Looks like Home Manager removed /etc/xdg from the list.

As a workaround, try setting this in your Home Manager config:

xdg.systemDirs.config = [ "/etc/xdg" ];
matkijahenkilo commented 2 weeks ago

Looks like Home Manager removed /etc/xdg from the list.

As a workaround, try setting this in your Home Manager config:

xdg.systemDirs.config = [ "/etc/xdg" ];

Thank you!, this fixed the issues and the new value of XDG_CONFIG_DIRS seems corrected with the addition of :/etc/xdg at the end (・∀・)

~> $XDG_CONFIG_DIRS
fish: Unknown command: /home/marisa/.config/kdedefaults:/nix/store/ryg6irnnwc6fgmygnwdrya0kjj51nkxd-stylix-kde-config:/etc/xdg
trueNAHO commented 2 weeks ago

Looks like Home Manager removed /etc/xdg from the list.

As a workaround, try setting this in your Home Manager config:

xdg.systemDirs.config = [ "/etc/xdg" ];

I do not use Plasma, but should Stylix support this, or should this be patched upstream to Home Manager, or is this a user configuration issue?

Thank you!, this fixed the issues and the new value of XDG_CONFIG_DIRS seems corrected with the addition of :/etc/xdg at the end (・∀・)

Feel free to close this issue.

danth commented 2 weeks ago

Seems most likely to be an issue with Home Manager when it's used on a non-NixOS distro