treewide: finish moving rest of styling to their respective hm modules

This commit is contained in:
Anthony Rodriguez 2025-01-19 20:41:14 +01:00
parent 57432a9655
commit 078334af48
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
12 changed files with 277 additions and 367 deletions

View file

@ -1,6 +1,18 @@
{
lib,
osConfig,
...
}: let
styleCfg = osConfig.local.style;
in {
imports = [
./programs
./services
];
home.pointerCursor = lib.mkIf styleCfg.enable {
inherit (styleCfg.cursorTheme) name package size;
x11.enable = true;
gtk.enable = true;
};
}

View file

@ -4,7 +4,10 @@
osConfig,
...
}: {
imports = [./zathura.nix];
imports = [
./tidal-hifi.nix
./zathura.nix
];
config = lib.mkIf osConfig.local.profiles.desktop.enable {
programs.mpv.enable = true;
@ -13,7 +16,6 @@
pkgs.gthumb
pkgs.spotify
pkgs.stremio
pkgs.tidal-hifi
pkgs.celluloid
];
};

View file

@ -1,14 +1,16 @@
{
lib,
config,
osConfig,
pkgs,
...
}: let
cfg = config.local.style;
styleCfg = osConfig.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
# based on https://github.com/rose-pine/tidal. adapted to work with base16 colors.
xdg.configFile."tidal-hifi/themes/base16.css".text = with cfg.scheme.palette; ''
config = lib.mkIf osConfig.local.profiles.desktop.enable {
home.packages = [pkgs.tidal-hifi];
# based on https://github.com/rose-pine/tidal. adapted to work with base16 colors.
xdg.configFile."tidal-hifi/themes/base16.css".text = with styleCfg.scheme.palette;
lib.mkIf styleCfg.enable ''
:root {
--glass-white-1: ${base05};
--glass-white-1-hover: ${base06};
@ -190,6 +192,5 @@ in {
stroke: var(--wave-color-solid-rainbow-purple-fill) !important;
}
'';
}
];
};
}

View file

@ -9,6 +9,20 @@
enableTransience = true;
settings = {
add_newline = true;
directory = {
style = "bold yellow";
};
character = {
format = "$symbol ";
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
vicmd_symbol = "[](bold green)";
};
cmd_duration = {
style = "yellow";
format = "[ $duration]($style)";
};
};
};
};

View file

@ -3,7 +3,9 @@
inputs,
osConfig,
...
}: {
}: let
styleCfg = osConfig.local.style;
in {
imports = [
inputs.walker.homeManagerModules.default
];
@ -20,6 +22,153 @@
websearch.prefix = "?";
switcher.prefix = "/";
};
theme = with styleCfg.scheme.palette;
lib.mkIf styleCfg.enable {
style = ''
@define-color foreground ${base05};
@define-color background ${base00};
@define-color accent ${base0E};
#window,
#box,
#aiScroll,
#aiList,
#search,
#password,
#input,
#prompt,
#clear,
#typeahead,
#list,
child,
scrollbar,
slider,
#item,
#text,
#label,
#bar,
#sub,
#activationlabel {
all: unset;
}
#cfgerr {
background: rgba(255, 0, 0, 0.4);
margin-top: 20px;
padding: 8px;
font-size: 1.2em;
}
#window {
color: @foreground;
}
#box {
border-radius: 2px;
background: @background;
padding: 32px;
border: 1px solid ${base01};
box-shadow:
0 19px 38px rgba(0, 0, 0, 0.3),
0 15px 12px rgba(0, 0, 0, 0.22);
}
#search {
box-shadow:
0 1px 3px rgba(0, 0, 0, 0.1),
0 1px 2px rgba(0, 0, 0, 0.22);
background: ${base01};
padding: 8px;
}
#prompt {
margin-left: 4px;
margin-right: 12px;
color: @foreground;
opacity: 0.2;
}
#clear {
color: @foreground;
opacity: 0.8;
}
#password,
#input,
#typeahead {
border-radius: 2px;
}
#input {
background: none;
}
#spinner {
padding: 8px;
}
#typeahead {
color: @foreground;
opacity: 0.8;
}
#input placeholder {
opacity: 0.5;
}
child {
padding: 8px;
border-radius: 2px;
}
child:selected,
child:hover {
background: alpha(@accent, 0.4);
}
#icon {
margin-right: 8px;
}
#label {
font-weight: 500;
}
#sub {
opacity: 0.5;
font-size: 0.8em;
}
.aiItem {
padding: 10px;
border-radius: 2px;
color: @foreground;
background: @background;
}
.aiItem.assistant {
background: ${base02};
}
.aiItem:hover {
background: alpha(@accent, 0.2);
color: ${base00};
}
#activationlabel {
color: @accent;
font-weight: bold;
}
'';
layout = {
ui.window.box = {
v_align = "center";
orientation = "vertical";
};
};
};
};
systemd.user.services.walker = {

View file

@ -3,7 +3,10 @@
pkgs,
osConfig,
...
}: {
}: let
styleCfg = osConfig.local.style;
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
in {
config = lib.mkIf osConfig.local.modules.hyprland.enable {
programs.waybar = {
enable = true;
@ -176,6 +179,90 @@
};
};
};
style = with styleCfg.scheme.palette; ''
* {
font-family: "0xProto Nerd Font";
font-size: 16px;
border-radius: 0px;
border: none;
min-height: 0px;
}
window#waybar {
background: rgba(0,0,0,0);
}
#workspaces {
color: ${base00};
background: ${base01};
margin: 4px 4px;
padding: 5px 5px;
border-radius: 16px;
}
#workspaces button {
font-weight: bold;
padding: 0px 5px;
margin: 0px 3px;
border-radius: 16px;
color: ${base00};
background: linear-gradient(45deg, ${base08}, ${base0D});
opacity: 0.5;
transition: ${betterTransition};
}
#workspaces button.active {
font-weight: bold;
padding: 0px 5px;
margin: 0px 3px;
border-radius: 16px;
color: ${base00};
background: linear-gradient(45deg, ${base08}, ${base0D});
transition: ${betterTransition};
opacity: 1.0;
min-width: 40px;
}
#workspaces button:hover {
font-weight: bold;
border-radius: 16px;
color: ${base00};
background: linear-gradient(45deg, ${base08}, ${base0D});
opacity: 0.8;
transition: ${betterTransition};
}
tooltip {
background: ${base00};
border: 1px solid ${base0E};
border-radius: 12px;
}
tooltip label {
color: ${base0E};
}
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
font-weight: bold;
margin: 4px 0px;
margin-left: 7px;
padding: 0px 18px;
background: ${base00};
color: ${base05};
border-radius: 24px 10px 24px 10px;
}
#network, #battery,
#custom-swaync, #tray, #custom-power {
font-weight: bold;
background: ${base00};
color: ${base05};
margin: 4px 0px;
margin-right: 7px;
border-radius: 10px 24px 10px 24px;
padding: 0px 18px;
}
#clock {
font-weight: bold;
color: ${base00};
background: linear-gradient(90deg, ${base0E}, ${base0C});
margin: 0px;
padding: 0px 15px 0px 30px;
border-radius: 0px 0px 0px 40px;
}
'';
};
systemd.user.services.waybar = {

View file

@ -3,6 +3,5 @@
./core
./programs
./services
./style
];
}

View file

@ -1,29 +0,0 @@
{
inputs,
config,
lib,
...
}: let
inherit (lib) mkIf;
cfg = config.local.style;
in {
imports =
[
inputs.niri.nixosModules.niri
inputs.hyprland.nixosModules.default
]
++ lib.filesystem.listFilesRecursive ./modules;
config = mkIf cfg.enable {
home-manager.sharedModules = [
{
home.pointerCursor = {
inherit (cfg.cursorTheme) name package size;
x11.enable = true;
gtk.enable = true;
};
}
];
};
}

View file

@ -1,27 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
programs.starship.settings = {
directory = {
style = "bold yellow";
};
character = {
format = "$symbol ";
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
vicmd_symbol = "[](bold green)";
};
cmd_duration = {
style = "yellow";
format = "[ $duration]($style)";
};
};
}
];
}

View file

@ -1,159 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
programs.walker = with cfg.scheme.palette; {
theme = {
style = ''
@define-color foreground ${base05};
@define-color background ${base00};
@define-color accent ${base0E};
#window,
#box,
#aiScroll,
#aiList,
#search,
#password,
#input,
#prompt,
#clear,
#typeahead,
#list,
child,
scrollbar,
slider,
#item,
#text,
#label,
#bar,
#sub,
#activationlabel {
all: unset;
}
#cfgerr {
background: rgba(255, 0, 0, 0.4);
margin-top: 20px;
padding: 8px;
font-size: 1.2em;
}
#window {
color: @foreground;
}
#box {
border-radius: 2px;
background: @background;
padding: 32px;
border: 1px solid ${cfg.scheme.palette.base01};
box-shadow:
0 19px 38px rgba(0, 0, 0, 0.3),
0 15px 12px rgba(0, 0, 0, 0.22);
}
#search {
box-shadow:
0 1px 3px rgba(0, 0, 0, 0.1),
0 1px 2px rgba(0, 0, 0, 0.22);
background: ${cfg.scheme.palette.base01};
padding: 8px;
}
#prompt {
margin-left: 4px;
margin-right: 12px;
color: @foreground;
opacity: 0.2;
}
#clear {
color: @foreground;
opacity: 0.8;
}
#password,
#input,
#typeahead {
border-radius: 2px;
}
#input {
background: none;
}
#spinner {
padding: 8px;
}
#typeahead {
color: @foreground;
opacity: 0.8;
}
#input placeholder {
opacity: 0.5;
}
child {
padding: 8px;
border-radius: 2px;
}
child:selected,
child:hover {
background: alpha(@accent, 0.4);
}
#icon {
margin-right: 8px;
}
#label {
font-weight: 500;
}
#sub {
opacity: 0.5;
font-size: 0.8em;
}
.aiItem {
padding: 10px;
border-radius: 2px;
color: @foreground;
background: @background;
}
.aiItem.assistant {
background: ${cfg.scheme.palette.base02};
}
.aiItem:hover {
background: alpha(@accent, 0.2);
color: ${cfg.scheme.palette.base00};
}
#activationlabel {
color: @accent;
font-weight: bold;
}
'';
layout = {
ui.window.box = {
v_align = "center";
orientation = "vertical";
};
};
};
};
}
];
}

View file

@ -1,96 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
programs.waybar.style = with cfg.scheme.palette; ''
* {
font-family: "0xProto Nerd Font";
font-size: 16px;
border-radius: 0px;
border: none;
min-height: 0px;
}
window#waybar {
background: rgba(0,0,0,0);
}
#workspaces {
color: ${base00};
background: ${base01};
margin: 4px 4px;
padding: 5px 5px;
border-radius: 16px;
}
#workspaces button {
font-weight: bold;
padding: 0px 5px;
margin: 0px 3px;
border-radius: 16px;
color: ${base00};
background: linear-gradient(45deg, ${base08}, ${base0D});
opacity: 0.5;
transition: ${betterTransition};
}
#workspaces button.active {
font-weight: bold;
padding: 0px 5px;
margin: 0px 3px;
border-radius: 16px;
color: ${base00};
background: linear-gradient(45deg, ${base08}, ${base0D});
transition: ${betterTransition};
opacity: 1.0;
min-width: 40px;
}
#workspaces button:hover {
font-weight: bold;
border-radius: 16px;
color: ${base00};
background: linear-gradient(45deg, ${base08}, ${base0D});
opacity: 0.8;
transition: ${betterTransition};
}
tooltip {
background: ${base00};
border: 1px solid ${base0E};
border-radius: 12px;
}
tooltip label {
color: ${base0E};
}
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
font-weight: bold;
margin: 4px 0px;
margin-left: 7px;
padding: 0px 18px;
background: ${base00};
color: ${base05};
border-radius: 24px 10px 24px 10px;
}
#network, #battery,
#custom-swaync, #tray, #custom-power {
font-weight: bold;
background: ${base00};
color: ${base05};
margin: 4px 0px;
margin-right: 7px;
border-radius: 10px 24px 10px 24px;
padding: 0px 18px;
}
#clock {
font-weight: bold;
color: ${base00};
background: linear-gradient(90deg, ${base0E}, ${base0C});
margin: 0px;
padding: 0px 15px 0px 30px;
border-radius: 0px 0px 0px 40px;
}
'';
}
];
}

View file

@ -1,43 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
inherit (cfg) scheme;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
programs.zathura.options = {
default-fg = scheme.palette.base01;
default-bg = scheme.palette.base00;
completion-bg = scheme.palette.base01;
completion-fg = scheme.palette.base0D;
completion-highlight-bg = scheme.palette.base0D;
completion-highlight-fg = scheme.palette.base07;
statusbar-fg = scheme.palette.base04;
statusbar-bg = scheme.palette.base02;
notification-bg = scheme.palette.base00;
notification-fg = scheme.palette.base07;
notification-error-bg = scheme.palette.base00;
notification-error-fg = scheme.palette.base08;
notification-warning-bg = scheme.palette.base00;
notification-warning-fg = scheme.palette.base0A;
inputbar-fg = scheme.palette.base07;
inputbar-bg = scheme.palette.base00;
recolor = false;
recolor-keephue = false;
recolor-lightcolor = scheme.palette.base00;
recolor-darkcolor = scheme.palette.base06;
highlight-color = scheme.palette.base0A;
highlight-active-color = scheme.palette.base0D;
};
}
];
}