matugen and pywal stuff

This commit is contained in:
Senior Matt
2026-04-30 12:59:31 +05:00
parent 2d4810369a
commit 7fb8c7c3aa
9 changed files with 110 additions and 29 deletions
+5
View File
@@ -8,6 +8,11 @@
bashrcExtra = ''
PS1='\n\[\033[1;36m\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\$\[\033[0m\] '
'';
shellAliases = {
nrb = "sudo nixos-rebuild boot --flake ~/.nixos";
nrs = "sudo nixos-rebuild switch --flake ~/.nixos";
nrt = "sudo nixos-rebuild test --flake ~/.nixos";
};
};
}
];
+3 -3
View File
@@ -2,7 +2,7 @@
{
flake.nixosModules.kitty = { config, lib, ... }: {
options = {
kitty.pywal = {
kitty.wal = {
enable = lib.mkOption {
default = false;
type = lib.types.bool;
@@ -23,11 +23,11 @@
confirm_os_window_close = 0;
remember_window_size = "no";
};
extraConfig = lib.mkIf config.kitty.pywal.enable ''
extraConfig = lib.mkIf config.kitty.wal.enable ''
include ~/.cache/wal/colors-kitty.conf
background_opacity 0.85
'';
themeFile = lib.mkIf (!config.kitty.pywal.enable) "Catppuccin-Mocha";
themeFile = lib.mkIf (!config.kitty.wal.enable) "Catppuccin-Mocha";
};
}
];
+5 -2
View File
@@ -49,12 +49,15 @@
[templates.niri]
input_path = '${builtins.toString ./templates/niri-colors.kdl}'
output_path = '~/.config/niri/colors.kdl'
# post_hook = 'niri msg action load-config-file'
[templates.waybar]
input_path = '${builtins.toString ./templates/colors.css}'
output_path = '~/.config/waybar/colors.css'
[templates.dunst]
input_path = '${builtins.toString ./templates/dunstrc-colors}'
output_path = '~/.config/dunst/dunstrc.d/00-style.conf'
post_hook = 'dunstctl reload'
# post_hook = 'dunstctl reload'
'';
};
@@ -0,0 +1,7 @@
/*
* Css Colors
* Generated with Matugen
*/
<* for name, value in colors *>
@define-color {{name}} {{value.default.hex}};
<* endfor *>
@@ -0,0 +1,47 @@
* {
primary: {{colors.primary.default.hex}};
primary-fixed: {{colors.primary_fixed.default.hex}};
primary-fixed-dim: {{colors.primary_fixed_dim.default.hex}};
on-primary: {{colors.on_primary.default.hex}};
on-primary-fixed: {{colors.on_primary_fixed.default.hex}};
on-primary-fixed-variant: {{colors.on_primary_fixed_variant.default.hex}};
primary-container: {{colors.primary_container.default.hex}};
on-primary-container: {{colors.on_primary_container.default.hex}};
secondary: {{colors.secondary.default.hex}};
secondary-fixed: {{colors.secondary_fixed.default.hex}};
secondary-fixed-dim: {{colors.secondary_fixed_dim.default.hex}};
on-secondary: {{colors.on_secondary.default.hex}};
on-secondary-fixed: {{colors.on_secondary_fixed.default.hex}};
on-secondary-fixed-variant: {{colors.on_secondary_fixed_variant.default.hex}};
secondary-container: {{colors.secondary_container.default.hex}};
on-secondary-container: {{colors.on_secondary_container.default.hex}};
tertiary: {{colors.tertiary.default.hex}};
tertiary-fixed: {{colors.tertiary_fixed.default.hex}};
tertiary-fixed-dim: {{colors.tertiary_fixed_dim.default.hex}};
on-tertiary: {{colors.on_tertiary.default.hex}};
on-tertiary-fixed: {{colors.on_tertiary_fixed.default.hex}};
on-tertiary-fixed-variant: {{colors.on_tertiary_fixed_variant.default.hex}};
tertiary-container: {{colors.tertiary_container.default.hex}};
on-tertiary-container: {{colors.on_tertiary_container.default.hex}};
error: {{colors.error.default.hex}};
on-error: {{colors.on_error.default.hex}};
error-container: {{colors.error_container.default.hex}};
on-error-container: {{colors.on_error_container.default.hex}};
surface: {{colors.surface.default.hex}};
on-surface: {{colors.on_surface.default.hex}};
on-surface-variant: {{colors.on_surface_variant.default.hex}};
outline: {{colors.outline.default.hex}};
outline-variant: {{colors.outline_variant.default.hex}};
shadow: {{colors.shadow.default.hex}};
scrim: {{colors.scrim.default.hex}};
inverse-surface: {{colors.inverse_surface.default.hex}};
inverse-on-surface: {{colors.inverse_on_surface.default.hex}};
inverse-primary: {{colors.inverse_primary.default.hex}};
surface-dim: {{colors.surface_dim.default.hex}};
surface-bright: {{colors.surface_bright.default.hex}};
surface-container-lowest: {{colors.surface_container_lowest.default.hex}};
surface-container-low: {{colors.surface_container_low.default.hex}};
surface-container: {{colors.surface_container.default.hex}};
surface-container-high: {{colors.surface_container_high.default.hex}};
surface-container-highest: {{colors.surface_container_highest.default.hex}};
}
+27 -13
View File
@@ -18,7 +18,10 @@
settings = {
bar = {
height = 24;
# width = 24;
layer = "top";
spacing = 0;
position = "bottom";
modules-left = [ "niri/workspaces" "niri/language" ];
modules-center = [ "niri/window" ];
modules-right = [ "tray" "wireplumber" "network" "bluetooth" "backlight" "clock" "battery" "battery#bat2" "custom/power" ];
@@ -31,6 +34,9 @@
"tray" = {
"spacing" = 10;
};
"niri/language" = {
"format" = "{short}";
};
"clock" = {
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
};
@@ -47,8 +53,7 @@
};
"format" = "{icon} {capacity}%";
"format-full" = "{icon} {capacity}%";
"format-charging" = " {capacity}%";
"format-plugged" = " {capacity}%";
"format-charging" = " {capacity}%";
"format-icons" = ["" "" "" "" ""];
};
"battery#bat2" = {
@@ -94,7 +99,9 @@
};
style = /*css*/ ''
@import "/home/${self.user}/.cache/wal/colors-waybar.css";
/* @import "/home/${self.user}/.cache/wal/colors-waybar.css"; */
@import "/home/${self.user}/.config/waybar/colors.css";
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: ${self.font.propo}, JetBrainsMonoNerdFontPropo;
@@ -105,7 +112,7 @@
window#waybar {
background-color: @background;
color: @cursor;
color: @on_surface;
}
button {
@@ -119,22 +126,23 @@
}
#workspaces button {
padding: 0 5px;
/* padding: 5 0; */
padding: 0 5;
background-color: transparent;
}
#workspaces button:hover {
background: @color1;
background: @primary_container;
}
#workspaces button.focused, #workspaces button.active {
background-color: @color8;
background-color: @source_color;
color: @background;
/* box-shadow: inset 0 -3px @color3; */
}
#workspaces button.urgent {
background-color: @color4;
background-color: @secondary;
}
#language,
@@ -148,7 +156,8 @@
#custom-power {
margin: 2 2;
padding: 0 10;
color: @cursor;
/* padding: 10 0; */
color: @on_surface;
border-radius: ${self.border.small};
}
@@ -157,37 +166,42 @@
#wireplumber,
#custom-power,
#network {
background-color: @color4;
background-color: @primary_container;
color: @background;
}
/* top right bottom left */
#battery {
padding: 0 5 0 10;
/* padding: 5 0 10 0; */
border-radius: ${self.border.small} 0 0 ${self.border.small};
margin: 2 0 2 2;
/* margin: 2 2 0 2; */
}
#battery.bat2 {
padding: 0 10 0 5;
/* padding: 10 0 5 0; */
border-radius: 0 ${self.border.small} ${self.border.small} 0;
margin: 2 2 2 0;
/* margin: 0 2 2 2; */
}
#custom-power {
background-color: @color8;
background-color: @source_color;
}
#bluetooth:hover,
#wireplumber:hover,
#network:hover,
#custom-power:hover {
background-color: @color3;
background-color: @on_primary_container;
}
#window,
#workspaces {
margin: 0 4px;
margin: 0 4;
/* margin: 4 0; */
}
/* If workspaces is the leftmost module, omit left margin */
+9 -3
View File
@@ -113,12 +113,18 @@ output "eDP-1" {
// position x=1280 y=0
}
overview {
workspace-shadow {
off
}
}
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://yalter.github.io/niri/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
gaps 4
gaps 8
always-center-single-column
@@ -171,7 +177,7 @@ layout {
// off
// How many logical pixels the ring extends out from the windows.
width 1
width 2
// Colors can be set in a variety of ways:
// - CSS named colors: "red"
@@ -209,7 +215,7 @@ layout {
// If you enable the border, you probably want to disable the focus ring.
on
width 1
width 2
// active-color "#ffc87f"
// inactive-color "#505050"
+4 -5
View File
@@ -9,7 +9,7 @@
nixpkgs.overlays = [ inputs.niri-flake.overlays.niri ];
kitty.pywal.enable = true;
kitty.wal.enable = true;
programs.niri = {
enable = true;
@@ -47,6 +47,7 @@
mpv
nautilus
pywal
python314Packages.haishoku
swaybg
waybar
wl-clipboard
@@ -54,8 +55,7 @@
xwayland-satellite
];
home-manager.users.${self.user}.imports = [
{
home-manager.users.${self.user} = { config, ... }: {
home.activation = {
pywal = ''
${pkgs.pywal}/bin/wal --cols16 -i ${self.wallpaper}
@@ -179,7 +179,6 @@
};
};
};
}
];
};
};
}
+3 -3
View File
@@ -1,6 +1,6 @@
{ self, ... }:
let
wallpaper = "/home/${self.user}/Pictures/da-man.png";
wallpaper = "/home/${self.user}/Pictures/nevzeo.jpg";
font = {
mono = "JetBrainsMonoNerdFontMono";
@@ -10,8 +10,8 @@ let
};
border = {
main = "0";
small = "0";
main = "12";
small = "8";
};
in {
flake = {