bismuth
bismuth copied to clipboard
How do you change the border color of active window?
I will look to pr an option to change the color but, as a temporary solution, you can
- clone the repo
- make sure you have the build dependencies installed https://github.com/Bismuth-Forge/bismuth/blob/master/CONTRIBUTING.md
- from the repo root run
make setup-dev-env
- open the file src/kdecoration/decoration.cpp
- comment out line 63 and replace it with
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 :smile:
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:
inactiveColor:
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=";
})
];
}))
];
}