Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 00d314411d | |||
| ab48a14ec0 | |||
| 91e3ccb85b |
@@ -0,0 +1,26 @@
|
|||||||
|
# Catppuccin Mocha palette. Raw 6-digit hex (no leading "#"); consumers add a
|
||||||
|
# "#" where their format needs it. Shared by the Sway desktop theming
|
||||||
|
# (home/sway.nix) and the ReGreet greeter (swaywm.nix) so the two stay in sync.
|
||||||
|
{
|
||||||
|
base = "1e1e2e";
|
||||||
|
mantle = "181825";
|
||||||
|
crust = "11111b";
|
||||||
|
surface0 = "313244";
|
||||||
|
surface1 = "45475a";
|
||||||
|
surface2 = "585b70";
|
||||||
|
overlay0 = "6c7086";
|
||||||
|
subtext0 = "a6adc8";
|
||||||
|
subtext1 = "bac2de";
|
||||||
|
text = "cdd6f4";
|
||||||
|
rosewater = "f5e0dc";
|
||||||
|
red = "f38ba8";
|
||||||
|
maroon = "eba0ac";
|
||||||
|
peach = "fab387";
|
||||||
|
yellow = "f9e2af";
|
||||||
|
green = "a6e3a1";
|
||||||
|
teal = "94e2d5";
|
||||||
|
sapphire = "74c7ec";
|
||||||
|
blue = "89b4fa";
|
||||||
|
mauve = "cba6f7";
|
||||||
|
pink = "f5c2e7";
|
||||||
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
# Graphical desktop layer: GUI apps, Wayland session env, cursor theme, and the
|
# Graphical desktop layer: GUI apps, Wayland session env, and cursor theme.
|
||||||
# tty1 Sway autostart. Imported only on hosts that run Sway (MBP, X1); never
|
# Imported only on hosts that run Sway (MBP, T400, Mac Pro); never pulled onto
|
||||||
# pulled onto the headless WSL host.
|
# the headless WSL host. Login (and the Sway session launch) is handled by the
|
||||||
{ pkgs, lib, ... }:
|
# greetd/ReGreet greeter -- see ../swaywm.nix -- so there is no tty1 autostart.
|
||||||
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./sway.nix
|
./sway.nix
|
||||||
@@ -29,11 +30,4 @@
|
|||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
size = 24;
|
size = 24;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Start Sway automatically on the first virtual terminal.
|
|
||||||
programs.zsh.initContent = lib.mkOrder 1500 ''
|
|
||||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
|
||||||
exec sway
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|||||||
+162
-5
@@ -14,6 +14,12 @@
|
|||||||
portable ? true,
|
portable ? true,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
# Catppuccin Mocha (shared with the ReGreet greeter). Raw hex; prefix "#"
|
||||||
|
# where a consumer needs it -- Sway/i3status/dunst want "#", foot/swaylock do
|
||||||
|
# not.
|
||||||
|
ctp = import ../catppuccin-mocha.nix;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -34,6 +40,38 @@
|
|||||||
xkb_variant = "dvorak";
|
xkb_variant = "dvorak";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Window borders -- Catppuccin Mocha (blue accent on the focused window).
|
||||||
|
colors = {
|
||||||
|
focused = {
|
||||||
|
border = "#${ctp.blue}";
|
||||||
|
background = "#${ctp.base}";
|
||||||
|
text = "#${ctp.text}";
|
||||||
|
indicator = "#${ctp.blue}";
|
||||||
|
childBorder = "#${ctp.blue}";
|
||||||
|
};
|
||||||
|
focusedInactive = {
|
||||||
|
border = "#${ctp.surface0}";
|
||||||
|
background = "#${ctp.base}";
|
||||||
|
text = "#${ctp.subtext0}";
|
||||||
|
indicator = "#${ctp.surface0}";
|
||||||
|
childBorder = "#${ctp.surface0}";
|
||||||
|
};
|
||||||
|
unfocused = {
|
||||||
|
border = "#${ctp.surface0}";
|
||||||
|
background = "#${ctp.base}";
|
||||||
|
text = "#${ctp.subtext0}";
|
||||||
|
indicator = "#${ctp.surface0}";
|
||||||
|
childBorder = "#${ctp.surface0}";
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
|
border = "#${ctp.red}";
|
||||||
|
background = "#${ctp.base}";
|
||||||
|
text = "#${ctp.text}";
|
||||||
|
indicator = "#${ctp.red}";
|
||||||
|
childBorder = "#${ctp.red}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
window.commands = [
|
window.commands = [
|
||||||
{
|
{
|
||||||
criteria.app_id = "launcher";
|
criteria.app_id = "launcher";
|
||||||
@@ -52,6 +90,33 @@
|
|||||||
];
|
];
|
||||||
size = 11.0;
|
size = 11.0;
|
||||||
};
|
};
|
||||||
|
# Bar background + workspace buttons -- Catppuccin Mocha. The mantle
|
||||||
|
# background matches i3status-rust's idle_bg below for a uniform strip.
|
||||||
|
colors = {
|
||||||
|
background = "#${ctp.mantle}";
|
||||||
|
statusline = "#${ctp.text}";
|
||||||
|
separator = "#${ctp.surface0}";
|
||||||
|
focusedWorkspace = {
|
||||||
|
border = "#${ctp.blue}";
|
||||||
|
background = "#${ctp.blue}";
|
||||||
|
text = "#${ctp.base}";
|
||||||
|
};
|
||||||
|
activeWorkspace = {
|
||||||
|
border = "#${ctp.surface0}";
|
||||||
|
background = "#${ctp.surface0}";
|
||||||
|
text = "#${ctp.text}";
|
||||||
|
};
|
||||||
|
inactiveWorkspace = {
|
||||||
|
border = "#${ctp.mantle}";
|
||||||
|
background = "#${ctp.mantle}";
|
||||||
|
text = "#${ctp.subtext0}";
|
||||||
|
};
|
||||||
|
urgentWorkspace = {
|
||||||
|
border = "#${ctp.red}";
|
||||||
|
background = "#${ctp.red}";
|
||||||
|
text = "#${ctp.base}";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -79,13 +144,70 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.swaylock = {
|
# Terminal: Catppuccin Mocha. foot reads ~/.config/foot/foot.ini; the Sway
|
||||||
|
# `terminal` above still launches the same binary, now themed.
|
||||||
|
programs.foot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
color = "1e1e2e";
|
colors = {
|
||||||
|
background = ctp.base;
|
||||||
|
foreground = ctp.text;
|
||||||
|
regular0 = ctp.surface1;
|
||||||
|
regular1 = ctp.red;
|
||||||
|
regular2 = ctp.green;
|
||||||
|
regular3 = ctp.yellow;
|
||||||
|
regular4 = ctp.blue;
|
||||||
|
regular5 = ctp.pink;
|
||||||
|
regular6 = ctp.teal;
|
||||||
|
regular7 = ctp.subtext1;
|
||||||
|
bright0 = ctp.surface2;
|
||||||
|
bright1 = ctp.red;
|
||||||
|
bright2 = ctp.green;
|
||||||
|
bright3 = ctp.yellow;
|
||||||
|
bright4 = ctp.blue;
|
||||||
|
bright5 = ctp.pink;
|
||||||
|
bright6 = ctp.teal;
|
||||||
|
bright7 = ctp.subtext0;
|
||||||
|
"selection-foreground" = ctp.base;
|
||||||
|
"selection-background" = ctp.rosewater;
|
||||||
|
};
|
||||||
|
cursor.color = "${ctp.base} ${ctp.rosewater}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.swaylock = {
|
||||||
|
enable = true;
|
||||||
|
# Catppuccin Mocha (swaylock colours are hex without "#").
|
||||||
|
settings = {
|
||||||
|
color = ctp.base;
|
||||||
indicator-radius = 100;
|
indicator-radius = 100;
|
||||||
indicator-thickness = 7;
|
indicator-thickness = 7;
|
||||||
show-failed-attempts = true;
|
show-failed-attempts = true;
|
||||||
|
font = "Noto Sans";
|
||||||
|
|
||||||
|
inside-color = ctp.base;
|
||||||
|
inside-clear-color = ctp.base;
|
||||||
|
inside-ver-color = ctp.base;
|
||||||
|
inside-wrong-color = ctp.base;
|
||||||
|
|
||||||
|
ring-color = ctp.surface1;
|
||||||
|
ring-clear-color = ctp.yellow;
|
||||||
|
ring-ver-color = ctp.blue;
|
||||||
|
ring-wrong-color = ctp.red;
|
||||||
|
|
||||||
|
key-hl-color = ctp.blue;
|
||||||
|
bs-hl-color = ctp.red;
|
||||||
|
|
||||||
|
line-color = ctp.base;
|
||||||
|
line-clear-color = ctp.base;
|
||||||
|
line-ver-color = ctp.base;
|
||||||
|
line-wrong-color = ctp.base;
|
||||||
|
separator-color = "00000000";
|
||||||
|
|
||||||
|
text-color = ctp.text;
|
||||||
|
text-clear-color = ctp.text;
|
||||||
|
text-ver-color = ctp.text;
|
||||||
|
text-wrong-color = ctp.text;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -111,16 +233,30 @@
|
|||||||
|
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# Catppuccin Mocha notifications (dunst colours need a leading "#").
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
global = {
|
||||||
font = "Noto Sans 11";
|
font = "Noto Sans 11";
|
||||||
frame_color = "#89b4fa";
|
frame_color = "#${ctp.blue}";
|
||||||
|
frame_width = 2;
|
||||||
separator_color = "frame";
|
separator_color = "frame";
|
||||||
offset = "10x10";
|
offset = "10x10";
|
||||||
corner_radius = 5;
|
corner_radius = 5;
|
||||||
};
|
};
|
||||||
|
urgency_low = {
|
||||||
|
background = "#${ctp.base}";
|
||||||
|
foreground = "#${ctp.text}";
|
||||||
|
frame_color = "#${ctp.surface1}";
|
||||||
|
};
|
||||||
|
urgency_normal = {
|
||||||
|
background = "#${ctp.base}";
|
||||||
|
foreground = "#${ctp.text}";
|
||||||
|
frame_color = "#${ctp.blue}";
|
||||||
|
};
|
||||||
urgency_critical = {
|
urgency_critical = {
|
||||||
frame_color = "#fab387";
|
background = "#${ctp.base}";
|
||||||
|
foreground = "#${ctp.text}";
|
||||||
|
frame_color = "#${ctp.peach}";
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -129,8 +265,29 @@
|
|||||||
programs.i3status-rust = {
|
programs.i3status-rust = {
|
||||||
enable = true;
|
enable = true;
|
||||||
bars.default = {
|
bars.default = {
|
||||||
theme = "gruvbox-dark";
|
# Catppuccin Mocha: a flat "plain" base recoloured via overrides. Idle
|
||||||
|
# blocks sit on mantle (matching the Sway bar background) with light text;
|
||||||
|
# only warning/critical states get a loud tinted background. The `theme`
|
||||||
|
# bar option is shallow-merged away by `settings.theme`, so set the base
|
||||||
|
# theme and its overrides together here.
|
||||||
icons = "awesome6";
|
icons = "awesome6";
|
||||||
|
settings.theme = {
|
||||||
|
theme = "plain";
|
||||||
|
overrides = {
|
||||||
|
idle_bg = "#${ctp.mantle}";
|
||||||
|
idle_fg = "#${ctp.text}";
|
||||||
|
info_bg = "#${ctp.mantle}";
|
||||||
|
info_fg = "#${ctp.blue}";
|
||||||
|
good_bg = "#${ctp.mantle}";
|
||||||
|
good_fg = "#${ctp.green}";
|
||||||
|
warning_bg = "#${ctp.peach}";
|
||||||
|
warning_fg = "#${ctp.base}";
|
||||||
|
critical_bg = "#${ctp.red}";
|
||||||
|
critical_fg = "#${ctp.base}";
|
||||||
|
separator_bg = "#${ctp.mantle}";
|
||||||
|
separator_fg = "#${ctp.surface1}";
|
||||||
|
};
|
||||||
|
};
|
||||||
blocks = [
|
blocks = [
|
||||||
{
|
{
|
||||||
block = "disk_space";
|
block = "disk_space";
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.features.swayDesktop;
|
cfg = config.features.swayDesktop;
|
||||||
|
# Catppuccin Mocha (shared with the Sway desktop, see lyrathorpe/home/sway.nix).
|
||||||
|
ctp = import ./catppuccin-mocha.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
@@ -51,6 +53,66 @@ in
|
|||||||
# services.displayManager.sessionPackages. Hosts that turn off
|
# services.displayManager.sessionPackages. Hosts that turn off
|
||||||
# features.swayDesktop (e.g. EDaaS) keep plain TTY login.
|
# features.swayDesktop (e.g. EDaaS) keep plain TTY login.
|
||||||
programs.regreet.enable = true;
|
programs.regreet.enable = true;
|
||||||
|
# Theme the greeter to match the Sway desktop (Catppuccin Mocha). ReGreet is
|
||||||
|
# GTK; recolour via CSS (covering both libadwaita named colours and plain
|
||||||
|
# GTK node selectors) and use the same Noto Sans as the bar/notifications.
|
||||||
|
programs.regreet.font = {
|
||||||
|
name = "Noto Sans";
|
||||||
|
package = pkgs.noto-fonts;
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
programs.regreet.extraCss = ''
|
||||||
|
@define-color window_bg_color #${ctp.base};
|
||||||
|
@define-color window_fg_color #${ctp.text};
|
||||||
|
@define-color view_bg_color #${ctp.mantle};
|
||||||
|
@define-color view_fg_color #${ctp.text};
|
||||||
|
@define-color card_bg_color #${ctp.surface0};
|
||||||
|
@define-color card_fg_color #${ctp.text};
|
||||||
|
@define-color accent_bg_color #${ctp.blue};
|
||||||
|
@define-color accent_fg_color #${ctp.base};
|
||||||
|
@define-color accent_color #${ctp.blue};
|
||||||
|
@define-color destructive_bg_color #${ctp.red};
|
||||||
|
@define-color destructive_fg_color #${ctp.base};
|
||||||
|
@define-color error_color #${ctp.red};
|
||||||
|
@define-color warning_color #${ctp.peach};
|
||||||
|
@define-color success_color #${ctp.green};
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: #${ctp.base};
|
||||||
|
color: #${ctp.text};
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
color: #${ctp.text};
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
background-color: #${ctp.surface0};
|
||||||
|
color: #${ctp.text};
|
||||||
|
border: 1px solid #${ctp.surface1};
|
||||||
|
}
|
||||||
|
|
||||||
|
entry:focus-within {
|
||||||
|
border-color: #${ctp.blue};
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
combobox button {
|
||||||
|
background-color: #${ctp.surface0};
|
||||||
|
color: #${ctp.text};
|
||||||
|
border: 1px solid #${ctp.surface1};
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: #${ctp.surface1};
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active,
|
||||||
|
button:checked {
|
||||||
|
background-color: #${ctp.blue};
|
||||||
|
color: #${ctp.base};
|
||||||
|
}
|
||||||
|
'';
|
||||||
# cage reads the XKB_* environment at startup, so force the greeter onto the
|
# cage reads the XKB_* environment at startup, so force the greeter onto the
|
||||||
# same Dvorak layout as the Sway session (home/sway.nix) -- otherwise the
|
# same Dvorak layout as the Sway session (home/sway.nix) -- otherwise the
|
||||||
# password field would be QWERTY. Dvorak is the "us" layout's variant, NOT a
|
# password field would be QWERTY. Dvorak is the "us" layout's variant, NOT a
|
||||||
|
|||||||
Reference in New Issue
Block a user