mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 05:53:56 -05:00
theme: simplify css with stylix
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
This commit is contained in:
parent
006aca4ef2
commit
659d26148a
|
@ -5,55 +5,20 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.ar.home.theme;
|
cfg = config.ar.home.theme;
|
||||||
|
|
||||||
gtk = {
|
|
||||||
extraCss =
|
|
||||||
lib.strings.optionalString
|
|
||||||
cfg.gtk.hideTitleBar
|
|
||||||
''
|
|
||||||
/* No (default) title bar on wayland */
|
|
||||||
headerbar.default-decoration {
|
|
||||||
/* You may need to tweak these values depending on your GTK theme */
|
|
||||||
margin-bottom: 50px;
|
|
||||||
margin-top: -100px;
|
|
||||||
|
|
||||||
background: transparent;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
min-height: 0;
|
|
||||||
font-size: 0;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* rm -rf window shadows */
|
|
||||||
window.csd, /* gtk4? */
|
|
||||||
window.csd decoration { /* gtk3 */
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home = {
|
home.packages = [
|
||||||
packages = [
|
pkgs.gnome.adwaita-icon-theme
|
||||||
pkgs.adwaita-qt
|
pkgs.liberation_ttf
|
||||||
pkgs.gnome.adwaita-icon-theme
|
];
|
||||||
pkgs.liberation_ttf
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk = {
|
gtk.iconTheme = {
|
||||||
iconTheme = {
|
name =
|
||||||
name =
|
if config.stylix.polarity == "dark"
|
||||||
if config.stylix.polarity == "dark"
|
then "Papirus-Dark"
|
||||||
then "Papirus-Dark"
|
else "Papirus";
|
||||||
else "Papirus";
|
|
||||||
|
|
||||||
package = pkgs.papirus-icon-theme.override {color = "adwaita";};
|
package = pkgs.papirus-icon-theme.override {color = "adwaita";};
|
||||||
};
|
|
||||||
|
|
||||||
gtk3 = {inherit (gtk) extraCss;};
|
|
||||||
gtk4 = {inherit (gtk) extraCss;};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
qt = {
|
qt = {
|
||||||
|
@ -69,5 +34,36 @@ in {
|
||||||
package = pkgs.adwaita-qt6;
|
package = pkgs.adwaita-qt6;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
stylix.targets.gtk.extraCss = ''
|
||||||
|
// Control rounded corners
|
||||||
|
window.background { border-radius: ${toString cfg.borderRadius}; }
|
||||||
|
|
||||||
|
${
|
||||||
|
lib.strings.optionalString
|
||||||
|
cfg.gtk.hideTitleBar
|
||||||
|
''
|
||||||
|
/* No (default) title bar on wayland */
|
||||||
|
headerbar.default-decoration {
|
||||||
|
/* You may need to tweak these values depending on your GTK theme */
|
||||||
|
margin-bottom: 50px;
|
||||||
|
margin-top: -100px;
|
||||||
|
|
||||||
|
background: transparent;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
min-height: 0;
|
||||||
|
font-size: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* rm -rf window shadows */
|
||||||
|
window.csd, /* gtk4? */
|
||||||
|
window.csd decoration { /* gtk3 */
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
''
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue