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

How do you change the border color of active window? #474

Open
rew1nter opened this issue Feb 2, 2023 · 3 comments
Open

How do you change the border color of active window? #474

rew1nter opened this issue Feb 2, 2023 · 3 comments

Comments

@rew1nter
Copy link

rew1nter commented Feb 2, 2023

No description provided.

@nikos-alexandris
Copy link

I will look to pr an option to change the color but, as a temporary solution, you can

m_activeColor = QColor(_, _, _);

where the underscores are your desired rgb values

  • from the repo root run
make build
make install
make restart-kwin-x11

and you should see your color be set as the active window color 😄

@I-Want-ToBelieve
Copy link

    auto colorsConfig = KSharedConfig::openConfig("kdeglobals");
    auto group = colorsConfig->group("Colors:Window");
    m_activeColor = group.readEntry("DecorationFocus", QColor(255, 0, 0));
    m_inactiveColor = group.readEntry("BackgroundNormal", QColor(0, 0, 0));

activeColor:
image

inactiveColor:
image

@I-Want-ToBelieve
Copy link

I-Want-ToBelieve commented Mar 23, 2023

If you use nixos you can fork the repository and submit a commit that changes the border color, then apply an override to pkgs.libsForQt5.bismuth:

{pkgs, ...}: {
  home.packages = with pkgs; [
    # @see https://ryantm.github.io/nixpkgs/stdenv/stdenv/#:~:text=As%20described%20in%20the%20Nix%20manual%2C%20almost%20any,so%20that%20certain%20other%20setup%20can%20take%20place.
    # @see https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/desktops/plasma-5/3rdparty/addons/bismuth/default.nix#L43
    # @see https://ryantm.github.io/nixpkgs/using/overrides/#sec-pkg-overrideAttrs
    # @see https://github.com/Bismuth-Forge/bismuth/issues/474
    # @see https://github.com/Bismuth-Forge/bismuth/blob/ef69afe69f615149ab347e4402862ee900452a65/src/kdecoration/decoration.cpp#L63-L64
    # @see https://discourse.nixos.org/t/how-to-patch-in-an-overlay/3678
    # @see https://stackoverflow.com/a/28484585
    (libsForQt5.bismuth.overrideAttrs
      (finalAttrs: previousAttrs: {
        patches =
          (previousAttrs.patches or [])
          ++ [
            (fetchpatch {
              name = "bismuth-3.1-4-border-color.patch";
              url = "https://github.com/I-Want-ToBelieve/bismuth/commit/dac110934fe1ae0da9e4aca8c331f27987b033cf.patch";
              sha256 = "sha256-3fQs/A4hc/qeiu+792nZBTl4ujg8rQD25kuwNr03YUs=";
            })
          ];
      }))
  ];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants