Bismuth-Forge / bismuth

KDE Plasma add-on, that tiles your windows automatically and lets you manage them via keyboard, similarly to i3, Sway or dwm.
https://bismuth-forge.github.io/bismuth/
Other
2.4k stars 94 forks source link

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

Open rew1nter opened 1 year ago

nikos-alexandris commented 1 year ago

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

I-Want-ToBelieve commented 1 year ago
    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 commented 1 year ago

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=";
            })
          ];
      }))
  ];
}