This commit is contained in:
commit
95a533c876
451 changed files with 18255 additions and 0 deletions
55
modules/home/stylix/targets/bemenu.nix
Normal file
55
modules/home/stylix/targets/bemenu.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.stylix;
|
||||
target = cfg.targets.bemenu';
|
||||
|
||||
colors = config.lib.stylix.colors.withHashtag;
|
||||
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
options.stylix.targets.bemenu' = {
|
||||
enable = mkEnableOption "bemenu' target for Stylix.";
|
||||
radius = mkOption {
|
||||
type = types.int;
|
||||
default = cfg.targets.hyprland.radius;
|
||||
description = "Window corner radius in pixels.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && target.enable) {
|
||||
stylix.targets.bemenu.enable = false;
|
||||
|
||||
programs.bemenu = mkIf (cfg.enable && target.enable) {
|
||||
settings = {
|
||||
border-radius = target.radius;
|
||||
|
||||
bdr = colors.blue; # Border
|
||||
tb = colors.base00; # Title background
|
||||
tf = colors.green; # Title foreground
|
||||
fb = colors.base00; # Filter background
|
||||
ff = colors.base05; # Filter foreground
|
||||
cb = colors.base00; # Cursor background
|
||||
cf = colors.base02; # Cursor foreground
|
||||
nb = colors.base00; # Normal background
|
||||
nf = colors.base05; # Normal foreground
|
||||
hb = colors.base01; # Highlighted background
|
||||
hf = colors.blue; # Highlighted foreground
|
||||
fbb = colors.base00; # Feedback background
|
||||
fbf = colors.base05; # Feedback foreground
|
||||
sb = colors.base01; # Selected background
|
||||
sf = colors.base05; # Selected foreground
|
||||
ab = colors.base00; # Alternating background
|
||||
af = colors.base05; # Alternating foreground
|
||||
scb = colors.base00; # Scrollbar background
|
||||
scf = colors.blue; # Scrollbar foreground
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
8
modules/home/stylix/targets/default.nix
Normal file
8
modules/home/stylix/targets/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./bemenu.nix
|
||||
./hyprland.nix
|
||||
./nixvim.nix
|
||||
./waybar.nix
|
||||
];
|
||||
}
|
||||
40
modules/home/stylix/targets/hyprland.nix
Normal file
40
modules/home/stylix/targets/hyprland.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.stylix;
|
||||
target = cfg.targets.hyprland;
|
||||
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
options.stylix.targets.hyprland = {
|
||||
gaps = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = "Window gaps in pixels.";
|
||||
};
|
||||
radius = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = "Window corner radius in pixels.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && target.enable) {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
general = {
|
||||
gaps_in = target.gaps / 2;
|
||||
gaps_out = target.gaps;
|
||||
};
|
||||
decoration = {
|
||||
rounding = target.radius;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/stylix/targets/nixvim.nix
Normal file
14
modules/home/stylix/targets/nixvim.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.stylix;
|
||||
target = cfg.targets.nixvim;
|
||||
|
||||
inherit (lib) mkIf;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
stylix.targets.nixvim.enable = false;
|
||||
programs.nixvim.colorschemes."${cfg.scheme}".enable = !target.enable;
|
||||
};
|
||||
}
|
||||
130
modules/home/stylix/targets/waybar.nix
Normal file
130
modules/home/stylix/targets/waybar.nix
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.stylix;
|
||||
target = cfg.targets.waybar';
|
||||
|
||||
colors = config.lib.stylix.colors.withHashtag;
|
||||
gaps = toString (4 + target.gaps);
|
||||
halfgaps = toString (2 + target.gaps / 2);
|
||||
radius = toString target.radius;
|
||||
|
||||
bar = {
|
||||
margin = "0 ${gaps} 0 ${gaps}";
|
||||
tray = {
|
||||
spacing = target.gaps;
|
||||
};
|
||||
|
||||
# calendar has no css
|
||||
clock.calendar.format = {
|
||||
months = "<span color='${colors.blue}'><b>{}</b></span>";
|
||||
weeks = "<span color='${colors.magenta}'><b>W{}</b></span>";
|
||||
weekdays = "<span color='${colors.green}'><b>{}</b></span>";
|
||||
today = "<span color='${colors.red}'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
options.stylix.targets.waybar' = {
|
||||
enable = mkEnableOption "waybar' target for Stylix.";
|
||||
gaps = mkOption {
|
||||
type = types.int;
|
||||
default = cfg.targets.hyprland.gaps;
|
||||
description = "Widget gaps in pixels.";
|
||||
};
|
||||
radius = mkOption {
|
||||
type = types.int;
|
||||
default = cfg.targets.hyprland.radius;
|
||||
description = "Widget corner radius in pixels.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && target.enable) {
|
||||
stylix.targets.waybar.enable = false;
|
||||
|
||||
programs.waybar = {
|
||||
settings = {
|
||||
mainBar = bar;
|
||||
otherBar = bar;
|
||||
};
|
||||
|
||||
style = ''
|
||||
* {
|
||||
border-radius: ${radius}px;
|
||||
border: none;
|
||||
font-family: monospace;
|
||||
font-size: 15px;
|
||||
min-height: 5px;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
color: ${colors.base05};
|
||||
background: ${colors.base00};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: ${halfgaps}px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: ${colors.blue};
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: ${colors.orange};
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: ${colors.base00};
|
||||
background: ${colors.base02};
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding: ${gaps}px;
|
||||
}
|
||||
|
||||
#cpu, #memory, #network, #battery, #keyboard-state, #disk, #bluetooth, #wireplumber, #pulseaudio, #language, #custom-newsboat, #custom-timer, #tray {
|
||||
margin-left: ${gaps}px;
|
||||
padding: ${gaps}px;
|
||||
}
|
||||
|
||||
#keyboard-state label.locked {
|
||||
background-color: ${colors.base00};
|
||||
color: ${colors.blue};
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
background-color: ${colors.green};
|
||||
color: ${colors.base00};
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
background-color: ${colors.yellow};
|
||||
color: ${colors.base00};
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: ${colors.red};
|
||||
color: ${colors.base00};
|
||||
}
|
||||
|
||||
#bluetooth.discovering {
|
||||
background-color: ${colors.blue};
|
||||
color: ${colors.base00};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue