some changes

This commit is contained in:
zack 2025-04-27 11:11:51 -04:00
parent 2d25c605b7
commit 825f05c50a
No known key found for this signature in database
GPG key ID: EE8A2B709E2401D1
45 changed files with 1826 additions and 1586 deletions

View file

@ -48,7 +48,43 @@ in {
programs.ags = {
enable = true;
configDir = ./cfg;
# Generate _colors.scss with our theme colors
configDir = pkgs.runCommand "ags-config" {} ''
cp -r ${./cfg} $out
chmod -R +w $out
cat > $out/scss/_colors.scss << EOF
/* Generated from lib/theme/default.nix */
$rosewater: ${colors.rosewater.hex};
$flamingo: ${colors.flamingo.hex};
$pink: ${colors.pink.hex};
$mauve: ${colors.mauve.hex};
$red: ${colors.red.hex};
$maroon: ${colors.maroon.hex};
$peach: ${colors.peach.hex};
$yellow: ${colors.yellow.hex};
$green: ${colors.green.hex};
$teal: ${colors.teal.hex};
$sky: ${colors.sky.hex};
$sapphire: ${colors.sapphire.hex};
$blue: ${colors.blue.hex};
$lavender: ${colors.lavender.hex};
$text: ${colors.text.hex};
$subtext1: ${colors.subtext1.hex};
$subtext0: ${colors.subtext0.hex};
$overlay2: ${colors.overlay2.hex};
$overlay1: ${colors.overlay1.hex};
$overlay0: ${colors.overlay0.hex};
$surface2: ${colors.surface2.hex};
$surface1: ${colors.surface1.hex};
$surface0: ${colors.surface0.hex};
$base: ${colors.base.hex};
$mantle: ${colors.mantle.hex};
$crust: ${colors.crust.hex};
/* Default accent color */
$accent: ${colors.sapphire.hex};
EOF
'';
extraPackages = dependencies;
};

View file

@ -14,100 +14,102 @@ in {
enable = mkBoolOpt false "Enable Anyrun";
};
config = mkIf cfg.enable {
programs.anyrun = {
enable = true;
config = {
plugins = [
inputs.anyrun.packages.${pkgs.system}.applications
inputs.anyrun.packages.${pkgs.system}.shell
inputs.anyrun.packages.${pkgs.system}.websearch
inputs.anyrun.packages.${pkgs.system}.rink
inputs.anyrun.packages.${pkgs.system}.stdin
];
x = {fraction = 0.5;};
y = {absolute = 0;};
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;
showResultsImmediately = false;
maxEntries = null;
};
extraCss = ''
*{
all: unset;
color: #cdd6f4;
font-family: "JetBrainsMono Nerd Font";
font-weight: bold;
}
#window{
background-color: transparent;
}
#entry{
background-color: #1e1e2e;
border-radius: 15px;
border: 3px solid #11111b;
font-size: 16px;
margin-top: 10px;
padding: 1px 15px;
}
#match {
margin-bottom: 2px;
margin-top: 2px;
padding: 1px 15px;
}
#match-desc{
color: #bac2de;
font-size: 12px;
font-weight: normal;
}
#match:selected {
background: #313244;
border-radius: 15px;
}
#plugin{
background-color: #1e1e2e;
border-radius: 15px;
border: 3px solid #11111b;
margin-top:10px;
padding: 10px 1px;
}
#plugin > *{
all:unset;
}
'';
extraConfigFiles."applications.ron".text = ''
Config(
desktop_actions: false,
max_entries: 5,
terminal: Some("Kitty"),
)
'';
extraConfigFiles."shell.ron".text = ''
Config(
prefix: ">",
)
'';
extraConfigFiles."websearch.ron".text = ''
Config(
prefix: "",
// Options: Google, Ecosia, Bing, DuckDuckGo, Custom
//
// Custom engines can be defined as such:
// Custom(
// name: "Searx",
// url: "searx.be/?q={}",
// )
//
// NOTE: `{}` is replaced by the search query and `https://` is automatically added in front.
engines: [DuckDuckGo]
)
'';
config =
mkIf cfg.enable {
};
};
# programs.anyrun = {
# enable = true;
# config = {
# plugins = [
# inputs.anyrun.packages.${pkgs.system}.applications
# inputs.anyrun.packages.${pkgs.system}.shell
# inputs.anyrun.packages.${pkgs.system}.websearch
# inputs.anyrun.packages.${pkgs.system}.rink
# inputs.anyrun.packages.${pkgs.system}.stdin
# ];
# x = {fraction = 0.5;};
# y = {absolute = 0;};
# hideIcons = false;
# ignoreExclusiveZones = false;
# layer = "overlay";
# hidePluginInfo = true;
# closeOnClick = true;
# showResultsImmediately = false;
# maxEntries = null;
# };
# extraCss = ''
# *{
# all: unset;
# color: #cdd6f4;
# font-family: "JetBrainsMono Nerd Font";
# font-weight: bold;
# }
# #window{
# background-color: transparent;
# }
# #entry{
# background-color: #1e1e2e;
# border-radius: 15px;
# border: 3px solid #11111b;
# font-size: 16px;
# margin-top: 10px;
# padding: 1px 15px;
# }
# #match {
# margin-bottom: 2px;
# margin-top: 2px;
# padding: 1px 15px;
# }
# #match-desc{
# color: #bac2de;
# font-size: 12px;
# font-weight: normal;
# }
# #match:selected {
# background: #313244;
# border-radius: 15px;
# }
# #plugin{
# background-color: #1e1e2e;
# border-radius: 15px;
# border: 3px solid #11111b;
# margin-top:10px;
# padding: 10px 1px;
# }
# #plugin > *{
# all:unset;
# }
# '';
#
# extraConfigFiles."applications.ron".text = ''
# Config(
# desktop_actions: false,
# max_entries: 5,
# terminal: Some("Kitty"),
# )
# '';
#
# extraConfigFiles."shell.ron".text = ''
# Config(
# prefix: ">",
# )
# '';
#
# extraConfigFiles."websearch.ron".text = ''
# Config(
# prefix: "",
# // Options: Google, Ecosia, Bing, DuckDuckGo, Custom
# //
# // Custom engines can be defined as such:
# // Custom(
# // name: "Searx",
# // url: "searx.be/?q={}",
# // )
# //
# // NOTE: `{}` is replaced by the search query and `https://` is automatically added in front.
# engines: [DuckDuckGo]
# )
# '';
# };
# };
}

View file

@ -1,80 +0,0 @@
{
options,
config,
lib,
inputs,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.helpers.snc;
in {
options.apps.helpers.snc = with types; {
enable = mkBoolOpt false "Enable Sway Notification Center";
};
config = mkIf cfg.enable {
home = {
packages = with pkgs; [swaynotificationcenter];
# Copy the theme file to the correct location
file.".config/swaync/style.css".source = ./theme/ctp.css;
# Create default config file
file.".config/swaync/config.json".text = builtins.toJSON {
"$schema" = "/etc/xdg/swaync/configSchema.json";
"positionX" = "right";
"positionY" = "top";
"layer" = "overlay";
"control-center-margin-top" = 0;
"control-center-margin-bottom" = 0;
"control-center-margin-right" = 0;
"control-center-margin-left" = 0;
"notification-icon-size" = 64;
"notification-body-image-height" = 100;
"notification-body-image-width" = 200;
"timeout" = 10;
"timeout-low" = 5;
"timeout-critical" = 0;
"fit-to-screen" = true;
"control-center-width" = 500;
"notification-window-width" = 500;
"keyboard-shortcuts" = true;
"image-visibility" = "when-available";
"transition-time" = 200;
"hide-on-clear" = false;
"hide-on-action" = true;
"script-fail-notify" = true;
"scripts" = {};
"notification-visibility" = {};
"widgets" = [
"title"
"dnd"
"notifications"
];
};
};
# Add systemd user service
systemd.user.services.swaync = {
Unit = {
Description = "Sway Notification Center";
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync";
ExecReload = "${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config";
Restart = "always";
RestartSec = 3;
};
Install = {
WantedBy = ["graphical-session.target"];
};
};
};
}

View file

@ -1,451 +0,0 @@
* {
all: unset;
font-size: 14px;
font-family: "Iosevka";
transition: 200ms;
}
trough highlight {
background: #cdd6f4;
}
scale trough {
margin: 0rem 1rem;
background-color: #313244;
min-height: 8px;
min-width: 70px;
}
slider {
background-color: #89b4fa;
}
.floating-notifications.background .notification-row .notification-background {
box-shadow:
0 0 8px 0 rgba(0, 0, 0, 0.8),
inset 0 0 0 1px #313244;
border-radius: 12.6px;
margin: 18px;
background-color: #1e1e2e;
color: #cdd6f4;
padding: 0;
}
.floating-notifications.background
.notification-row
.notification-background
.notification {
padding: 7px;
border-radius: 12.6px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification.critical {
box-shadow: inset 0 0 7px 0 #f38ba8;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: #cdd6f4;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.time {
color: #a6adc8;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.body {
color: #cdd6f4;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 7px;
color: #cdd6f4;
background-color: #313244;
box-shadow: inset 0 0 0 1px #45475a;
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #313244;
color: #cdd6f4;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.floating-notifications.background
.notification-row
.notification-background
.close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #1e1e2e;
background-color: #f38ba8;
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:hover {
background-color: #eba0ac;
color: #1e1e2e;
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:active {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center {
box-shadow:
0 0 8px 0 rgba(0, 0, 0, 0.8),
inset 0 0 0 1px #313244;
border-radius: 12.6px;
margin: 18px;
background-color: #1e1e2e;
color: #cdd6f4;
padding: 14px;
}
.control-center .widget-title > label {
color: #cdd6f4;
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
color: #cdd6f4;
background-color: #313244;
box-shadow: inset 0 0 0 1px #45475a;
padding: 8px;
}
.control-center .widget-title button:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #585b70;
color: #cdd6f4;
}
.control-center .widget-title button:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #1e1e2e;
}
.control-center .notification-row .notification-background {
border-radius: 7px;
color: #cdd6f4;
background-color: #313244;
box-shadow: inset 0 0 0 1px #45475a;
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center
.notification-row
.notification-background
.notification.critical {
box-shadow: inset 0 0 7px 0 #f38ba8;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: #cdd6f4;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.time {
color: #a6adc8;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.body {
color: #cdd6f4;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 7px;
color: #cdd6f4;
background-color: #11111b;
box-shadow: inset 0 0 0 1px #45475a;
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #313244;
color: #cdd6f4;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #1e1e2e;
background-color: #eba0ac;
}
.close-button {
border-radius: 6.3px;
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center
.notification-row
.notification-background
.close-button:active {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center .notification-row .notification-background:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #7f849c;
color: #cdd6f4;
}
.control-center .notification-row .notification-background:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.notification.critical progress {
background-color: #f38ba8;
}
.notification.low progress,
.notification.normal progress {
background-color: #89b4fa;
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: #313244;
border: 1px solid #45475a;
box-shadow: none;
}
.control-center-dnd:checked {
background: #313244;
}
.control-center-dnd slider {
background: #45475a;
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: #313244;
border: 1px solid #45475a;
box-shadow: none;
}
.widget-dnd > switch:checked {
background: #313244;
}
.widget-dnd > switch slider {
background: #45475a;
border-radius: 8px;
border: 1px solid #6c7086;
}
.widget-mpris .widget-mpris-player {
background: #313244;
padding: 7px;
}
.widget-mpris .widget-mpris-title {
font-size: 1.2rem;
}
.widget-mpris .widget-mpris-subtitle {
font-size: 0.8rem;
}
.widget-menubar > box > .menu-button-bar > button > label {
font-size: 3rem;
padding: 0.5rem 2rem;
}
.widget-menubar > box > .menu-button-bar > :last-child {
color: #f38ba8;
}
.power-buttons button:hover,
.powermode-buttons button:hover,
.screenshot-buttons button:hover {
background: #313244;
}
.control-center .widget-label > label {
color: #cdd6f4;
font-size: 2rem;
}
.widget-buttons-grid {
padding-top: 1rem;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-size: 2.5rem;
}
.widget-volume {
padding-top: 1rem;
}
.widget-volume label {
font-size: 1.5rem;
color: #74c7ec;
}
.widget-volume trough highlight {
background: #74c7ec;
}
.widget-backlight trough highlight {
background: #f9e2af;
}
.widget-backlight label {
font-size: 1.5rem;
color: #f9e2af;
}
.widget-backlight .KB {
padding-bottom: 1rem;
}
.image {
padding-right: 0.5rem;
}

View file

@ -51,12 +51,12 @@ in {
inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
background = "#181825";
prompt = "#1e1e2e";
border = "#313244";
text = "#cdd6f4";
stext = "#45475a";
select = "#1e1e2e";
background = colors.mantle.hex;
prompt = colors.base.hex;
border = colors.surface0.hex;
text = colors.text.hex;
stext = colors.surface1.hex;
select = colors.base.hex;
"background-color" = mkLiteral "transparent";
"text-color" = mkLiteral "@text";
margin = 0;
@ -143,15 +143,42 @@ in {
};
};
# Create the colors.rasi file
# Create the colors.rasi file with our theme colors
xdg.configFile."rofi/colors.rasi".text = ''
* {
background: #181825;
prompt: #1e1e2e;
border: #313244;
text: #cdd6f4;
stext: #45475a;
select: #1e1e2e;
background: ${colors.mantle.hex};
prompt: ${colors.base.hex};
border: ${colors.surface0.hex};
text: ${colors.text.hex};
stext: ${colors.surface1.hex};
select: ${colors.base.hex};
/* Full color palette */
rosewater: ${colors.rosewater.hex};
flamingo: ${colors.flamingo.hex};
pink: ${colors.pink.hex};
mauve: ${colors.mauve.hex};
red: ${colors.red.hex};
maroon: ${colors.maroon.hex};
peach: ${colors.peach.hex};
yellow: ${colors.yellow.hex};
green: ${colors.green.hex};
teal: ${colors.teal.hex};
sky: ${colors.sky.hex};
sapphire: ${colors.sapphire.hex};
blue: ${colors.blue.hex};
lavender: ${colors.lavender.hex};
subtext0: ${colors.subtext0.hex};
subtext1: ${colors.subtext1.hex};
overlay0: ${colors.overlay0.hex};
overlay1: ${colors.overlay1.hex};
overlay2: ${colors.overlay2.hex};
surface0: ${colors.surface0.hex};
surface1: ${colors.surface1.hex};
surface2: ${colors.surface2.hex};
base: ${colors.base.hex};
mantle: ${colors.mantle.hex};
crust: ${colors.crust.hex};
}
'';

View file

@ -0,0 +1,366 @@
{
options,
config,
lib,
inputs,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.helpers.swaync;
in {
options.apps.helpers.swaync = with types; {
enable = mkBoolOpt false "Enable SwayNC";
};
config = mkIf cfg.enable {
services.swaync = {
enable = true;
style = lib.mkForce ''
* {
all: unset;
font-size: 14px;
font-family: "Adwaita Sans", "JetBrains Mono Nerd Font";
transition: 200ms;
}
trough highlight {
background: ${colors.text.hex};
}
scale trough {
margin: 0rem 1rem;
background-color: ${colors.surface0.hex};
min-height: 8px;
min-width: 70px;
}
slider {
background-color: ${colors.blue.hex};
}
.floating-notifications.background .notification-row .notification-background {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px ${colors.surface0.hex};
border-radius: 12.6px;
margin: 18px;
background-color: ${colors.base.hex};
color: ${colors.text.hex};
padding: 0;
}
.floating-notifications.background .notification-row .notification-background .notification {
padding: 7px;
border-radius: 12.6px;
}
.floating-notifications.background .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 ${colors.red.hex};
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .summary {
color: ${colors.text.hex};
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .time {
color: ${colors.subtext0.hex};
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .body {
color: ${colors.text.hex};
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: ${colors.text.hex};
background-color: ${colors.surface0.hex};
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.surface0.hex};
color: ${colors.text.hex};
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.sky.hex};
color: ${colors.text.hex};
}
.floating-notifications.background .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: ${colors.base.hex};
background-color: ${colors.red.hex};
}
.floating-notifications.background .notification-row .notification-background .close-button:hover {
background-color: ${colors.maroon.hex};
color: ${colors.base.hex};
}
.floating-notifications.background .notification-row .notification-background .close-button:active {
background-color: ${colors.red.hex};
color: ${colors.base.hex};
}
.control-center {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px ${colors.surface0.hex};
border-radius: 12.6px;
margin: 18px;
background-color: ${colors.base.hex};
color: ${colors.text.hex};
padding: 14px;
}
.control-center .widget-title > label {
color: ${colors.text.hex};
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
color: ${colors.text.hex};
background-color: ${colors.surface0.hex};
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
padding: 8px;
}
.control-center .widget-title button:hover {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.surface2.hex};
color: ${colors.text.hex};
}
.control-center .widget-title button:active {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.sky.hex};
color: ${colors.base.hex};
}
.control-center .notification-row .notification-background {
border-radius: 7px;
color: ${colors.text.hex};
background-color: ${colors.surface0.hex};
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 ${colors.red.hex};
}
.control-center .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.control-center .notification-row .notification-background .notification .notification-content .summary {
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background .notification .notification-content .time {
color: ${colors.subtext0.hex};
}
.control-center .notification-row .notification-background .notification .notification-content .body {
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: ${colors.text.hex};
background-color: ${colors.crust.hex};
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
margin: 7px;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.surface0.hex};
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.sky.hex};
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: ${colors.base.hex};
background-color: ${colors.maroon.hex};
}
.close-button {
border-radius: 6.3px;
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: ${colors.red.hex};
color: ${colors.base.hex};
}
.control-center .notification-row .notification-background .close-button:active {
background-color: ${colors.red.hex};
color: ${colors.base.hex};
}
.control-center .notification-row .notification-background:hover {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.overlay1.hex};
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background:active {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.sky.hex};
color: ${colors.text.hex};
}
.notification.critical progress {
background-color: ${colors.red.hex};
}
.notification.low progress,
.notification.normal progress {
background-color: ${colors.blue.hex};
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: ${colors.surface0.hex};
border: 1px solid ${colors.surface1.hex};
box-shadow: none;
}
.control-center-dnd:checked {
background: ${colors.surface0.hex};
}
.control-center-dnd slider {
background: ${colors.surface1.hex};
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: ${colors.surface0.hex};
border: 1px solid ${colors.surface1.hex};
box-shadow: none;
}
.widget-dnd > switch:checked {
background: ${colors.surface0.hex};
}
.widget-dnd > switch slider {
background: ${colors.surface1.hex};
border-radius: 8px;
border: 1px solid ${colors.overlay0.hex};
}
.widget-mpris .widget-mpris-player .widget-mpd {
background: ${colors.surface0.hex};
padding: 7px;
}
.widget-mpris .widget-mpris-title .widget-mpd .widget-mpd-title {
font-size: 1.2rem;
}
.widget-mpris .widget-mpris-subtitle .widget-mpd .widget-mpd-subtitle {
font-size: 0.8rem;
}
.widget-menubar > box > .menu-button-bar > button > label {
font-size: 3rem;
padding: 0.5rem 2rem;
}
.widget-menubar > box > .menu-button-bar > :last-child {
color: ${colors.red.hex};
}
.power-buttons button:hover,
.powermode-buttons button:hover,
.screenshot-buttons button:hover {
background: ${colors.surface0.hex};
}
.control-center .widget-label > label {
color: ${colors.text.hex};
font-size: 2rem;
}
.widget-buttons-grid {
padding-top: 1rem;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-size: 2.5rem;
}
.widget-volume {
padding-top: 1rem;
}
.widget-volume label {
font-size: 1.5rem;
color: ${colors.sky.hex};
}
.widget-volume trough highlight {
background: ${colors.sky.hex};
}
.widget-backlight trough highlight {
background: ${colors.yellow.hex};
}
.widget-backlight label {
font-size: 1.5rem;
color: ${colors.yellow.hex};
}
.widget-backlight .KB {
padding-bottom: 1rem;
}
.image {
padding-right: 0.5rem;
}
'';
};
};
}

View file

@ -15,362 +15,101 @@ in {
};
config = mkIf cfg.enable {
services.swaync = {
enable = true;
style = lib.mkForce ''
* {
all: unset;
font-size: 14px;
font-family: "Adwaita Sans", "JetBrains Mono Nerd Font";
transition: 200ms;
}
trough highlight {
background: #cad3f5;
}
scale trough {
margin: 0rem 1rem;
background-color: #363a4f;
min-height: 8px;
min-width: 70px;
}
slider {
background-color: #8aadf4;
}
.floating-notifications.background .notification-row .notification-background {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #363a4f;
border-radius: 12.6px;
margin: 18px;
background-color: #24273a;
color: #cad3f5;
padding: 0;
}
.floating-notifications.background .notification-row .notification-background .notification {
padding: 7px;
border-radius: 12.6px;
}
.floating-notifications.background .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 #ed8796;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .summary {
color: #cad3f5;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .time {
color: #a5adcb;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .body {
color: #cad3f5;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: #cad3f5;
background-color: #363a4f;
box-shadow: inset 0 0 0 1px #494d64;
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #363a4f;
color: #cad3f5;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #7dc4e4;
color: #cad3f5;
}
.floating-notifications.background .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #24273a;
background-color: #ed8796;
}
.floating-notifications.background .notification-row .notification-background .close-button:hover {
background-color: #ee99a0;
color: #24273a;
}
.floating-notifications.background .notification-row .notification-background .close-button:active {
background-color: #ed8796;
color: #24273a;
}
.control-center {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #363a4f;
border-radius: 12.6px;
margin: 18px;
background-color: #24273a;
color: #cad3f5;
padding: 14px;
}
.control-center .widget-title > label {
color: #cad3f5;
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
color: #cad3f5;
background-color: #363a4f;
box-shadow: inset 0 0 0 1px #494d64;
padding: 8px;
}
.control-center .widget-title button:hover {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #5b6078;
color: #cad3f5;
}
.control-center .widget-title button:active {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #7dc4e4;
color: #24273a;
}
.control-center .notification-row .notification-background {
border-radius: 7px;
color: #cad3f5;
background-color: #363a4f;
box-shadow: inset 0 0 0 1px #494d64;
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 #ed8796;
}
.control-center .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.control-center .notification-row .notification-background .notification .notification-content .summary {
color: #cad3f5;
}
.control-center .notification-row .notification-background .notification .notification-content .time {
color: #a5adcb;
}
.control-center .notification-row .notification-background .notification .notification-content .body {
color: #cad3f5;
}
.control-center .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: #cad3f5;
background-color: #181926;
box-shadow: inset 0 0 0 1px #494d64;
margin: 7px;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #363a4f;
color: #cad3f5;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #7dc4e4;
color: #cad3f5;
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #24273a;
background-color: #ee99a0;
}
.close-button {
border-radius: 6.3px;
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: #ed8796;
color: #24273a;
}
.control-center .notification-row .notification-background .close-button:active {
background-color: #ed8796;
color: #24273a;
}
.control-center .notification-row .notification-background:hover {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #8087a2;
color: #cad3f5;
}
.control-center .notification-row .notification-background:active {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #7dc4e4;
color: #cad3f5;
}
.notification.critical progress {
background-color: #ed8796;
}
.notification.low progress,
.notification.normal progress {
background-color: #8aadf4;
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: #363a4f;
border: 1px solid #494d64;
box-shadow: none;
}
.control-center-dnd:checked {
background: #363a4f;
}
.control-center-dnd slider {
background: #494d64;
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: #363a4f;
border: 1px solid #494d64;
box-shadow: none;
}
.widget-dnd > switch:checked {
background: #363a4f;
}
.widget-dnd > switch slider {
background: #494d64;
border-radius: 8px;
border: 1px solid #6e738d;
}
.widget-mpris .widget-mpris-player .widget-mpd {
background: #363a4f;
padding: 7px;
}
.widget-mpris .widget-mpris-title .widget-mpd .widget-mpd-title {
font-size: 1.2rem;
}
.widget-mpris .widget-mpris-subtitle .widget-mpd .widget-mpd-subtitle {
font-size: 0.8rem;
}
.widget-menubar > box > .menu-button-bar > button > label {
font-size: 3rem;
padding: 0.5rem 2rem;
}
.widget-menubar > box > .menu-button-bar > :last-child {
color: #ed8796;
}
.power-buttons button:hover,
.powermode-buttons button:hover,
.screenshot-buttons button:hover {
background: #363a4f;
}
.control-center .widget-label > label {
color: #cad3f5;
font-size: 2rem;
}
.widget-buttons-grid {
padding-top: 1rem;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-size: 2.5rem;
}
.widget-volume {
padding-top: 1rem;
}
.widget-volume label {
font-size: 1.5rem;
color: #7dc4e4;
}
.widget-volume trough highlight {
background: #7dc4e4;
}
.widget-backlight trough highlight {
background: #eed49f;
}
.widget-backlight label {
font-size: 1.5rem;
color: #eed49f;
}
.widget-backlight .KB {
padding-bottom: 1rem;
}
.image {
padding-right: 0.5rem;
}
'';
};
programs.waybar = {
enable = true;
systemd.enable = true;
systemd.target = "graphical-session.target";
style = ''
/* Custom colors from lib/theme/default.nix */
@define-color rosewater ${colors.rosewater.hex};
@define-color flamingo ${colors.flamingo.hex};
@define-color pink ${colors.pink.hex};
@define-color mauve ${colors.mauve.hex};
@define-color red ${colors.red.hex};
@define-color maroon ${colors.maroon.hex};
@define-color peach ${colors.peach.hex};
@define-color yellow ${colors.yellow.hex};
@define-color green ${colors.green.hex};
@define-color teal ${colors.teal.hex};
@define-color sky ${colors.sky.hex};
@define-color sapphire ${colors.sapphire.hex};
@define-color blue ${colors.blue.hex};
@define-color lavender ${colors.lavender.hex};
@define-color text ${colors.text.hex};
@define-color subtext1 ${colors.subtext1.hex};
@define-color subtext0 ${colors.subtext0.hex};
@define-color overlay2 ${colors.overlay2.hex};
@define-color overlay1 ${colors.overlay1.hex};
@define-color overlay0 ${colors.overlay0.hex};
@define-color surface2 ${colors.surface2.hex};
@define-color surface1 ${colors.surface1.hex};
@define-color surface0 ${colors.surface0.hex};
@define-color base ${colors.base.hex};
@define-color mantle ${colors.mantle.hex};
@define-color crust ${colors.crust.hex};
/* Mullvad specific styles */
#custom-mullvad.connected {
color: @green;
}
#custom-mullvad.disconnected {
color: @red;
}
${builtins.readFile ./style.css}
'';
settings = let
# Script to get Mullvad status for Waybar
mullvad-status = pkgs.writeShellScriptBin "mullvad-status-waybar" ''
#!${pkgs.runtimeShell}
set -euo pipefail
# Run mullvad status, capture output, handle potential errors
STATUS=$(mullvad status || echo "Disconnected")
if echo "$STATUS" | grep -q "Connected"; then
# Extract Relay using sed: find line starting with Relay:, remove prefix
SERVER=$(echo "$STATUS" | sed -n 's/^\s*Relay:\s*//p')
# Extract Location using sed: find line starting with Visible location:,
# remove prefix, keep text up to the first comma
LOCATION=$(echo "$STATUS" | sed -n 's/^\s*Visible location:\s*\([^,]*\).*/\1/p')
# Trim potential leading/trailing whitespace just in case sed leaves some
SERVER=$(echo "$SERVER" | sed 's/^[ \t]*//;s/[ \t]*$//')
LOCATION=$(echo "$LOCATION" | sed 's/^[ \t]*//;s/[ \t]*$//')
# Construct tooltip based on extracted info
if [ -n "$SERVER" ] && [ -n "$LOCATION" ]; then
TOOLTIP="Mullvad: Connected via $SERVER ($LOCATION)"
elif [ -n "$SERVER" ]; then
# Fallback if location parsing failed but server was found
TOOLTIP="Mullvad: Connected via $SERVER"
else
# Generic fallback if parsing failed
TOOLTIP="Mullvad: Connected"
fi
# Output JSON for Waybar
# Using nerd font icons: nf-fa-lock (connected), nf-fa-unlock (disconnected)
# Ensure your font supports these glyphs:  (U+F023),  (U+F09C)
echo '{"text": "", "tooltip": "'"$TOOLTIP"'", "class": "connected"}'
else
# Output disconnected status
echo '{"text": "", "tooltip": "Mullvad: Disconnected", "class": "disconnected"}'
fi
'';
# Script to toggle Mullvad connection
mullvad-toggle = pkgs.writeShellScriptBin "mullvad-toggle" ''
set -euo pipefail
if mullvad status | grep -q "Connected"; then
mullvad disconnect
else
mullvad connect
fi
# Optional: trigger a Waybar refresh if needed, though interval should handle it
# pkill -SIGRTMIN+8 waybar
'';
cava = pkgs.writeShellScriptBin "cava" "${builtins.readFile ./bar.sh}";
in {
mainBar = {
@ -392,6 +131,7 @@ in {
"custom/gpu-mem"
"custom/gpu-temp"
"pulseaudio"
"custom/mullvad"
"custom/weather"
"clock"
"clock#simpleclock"
@ -409,6 +149,15 @@ in {
exec = "spotifatius monitor";
};
"custom/mullvad" = {
format = "{}";
return-type = "json";
interval = 1;
exec = "${mullvad-status}/bin/mullvad-status-waybar";
"on-click" = "${mullvad-toggle}/bin/mullvad-toggle";
tooltip = true;
};
mpd = {
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {title}";
"format-disconnected" = "Disconnected ";
@ -516,7 +265,7 @@ in {
tray = {
"show-passive-items" = true;
spacing = 10;
spacing = 2;
};
"clock#simpleclock" = {

View file

@ -17,7 +17,7 @@ window#waybar {
}
#custom-cava-system, #custom-cava-tt {
color: #cba6f7;
color: @mauve;
border-left: 0px;
border-right: 0px;
padding: 6px;
@ -94,7 +94,9 @@ menu,
#bluetooth,
#network,
#battery,
#custom-power, #custom-notification,
#custom-power,
#custom-notification,
#custom-mullvad,
#custom-weather {
background: @base;
padding: 8px 8px;
@ -103,6 +105,7 @@ menu,
border-radius: 6px;
}
#custom-mullvad,
#custom-notification {
padding-left: 12px;
padding-right: 18px;
@ -123,7 +126,7 @@ menu,
font-style: normal;
opacity: 1;
font-size: 16px;
color: #1e1;
color: @surface0;
border-radius: 6px;
}
@ -132,22 +135,20 @@ menu,
margin: 3px;
border-radius: 6px;
border: none;
color: #f5e0dc;
/* background-color: #1e1e2e; */
transition: all 0.3s ease-in-out;
opacity: 0.4;
}
#workspaces button.active {
color: #1e1e2e;
background: #cba6f7;
color: @base;
background: @mauve;
min-width: 20px;
opacity: 1;
}
#workspaces button:hover {
color: #c3dee5;
background: #1e1e2e;
color: @text;
background: @mantle;
opacity: 1;
animation: none;
}
@ -164,20 +165,20 @@ menu,
padding: 0px 10px;
margin-right: 2px;
background: @base;
color: rgba(137, 220, 235, 1);
color: @sky;
border-radius: 0 6px 6px 0;
}
#pulseaudio {
padding: 0 8px;
margin-right: 1px;
color: @beige;
color: @yellow;
border-radius: 6px 6px;
}
#bluetooth,
#network {
color: #cba6f7;
color: @mauve;
border-radius: 6px;
margin: 0 1px;
}
@ -193,8 +194,6 @@ menu,
#network {
min-width: 30px;
padding: 0 7px 0 2px;
/* margin: 0 2px; */
border-radius: 6px;
/* border-radius: 0 6px 6px 0; */
}

View file

@ -72,7 +72,7 @@ in {
settings = {
colors = {
primary.background = "#11111b";
primary.background = colors.crust.hex;
};
env = {
term = "xterm-256color";

View file

@ -21,6 +21,30 @@ in {
};
colors = {
alpha = "0.9";
# Custom colors from lib/theme/default.nix
foreground = "${colors.text.hex}";
background = "${colors.crust.hex}";
# Normal colors
regular0 = "${colors.surface1.hex}"; # black
regular1 = "${colors.red.hex}"; # red
regular2 = "${colors.green.hex}"; # green
regular3 = "${colors.yellow.hex}"; # yellow
regular4 = "${colors.blue.hex}"; # blue
regular5 = "${colors.mauve.hex}"; # magenta
regular6 = "${colors.teal.hex}"; # cyan
regular7 = "${colors.text.hex}"; # white
# Bright colors
bright0 = "${colors.surface2.hex}"; # bright black
bright1 = "${colors.red.hex}"; # bright red
bright2 = "${colors.green.hex}"; # bright green
bright3 = "${colors.yellow.hex}"; # bright yellow
bright4 = "${colors.blue.hex}"; # bright blue
bright5 = "${colors.mauve.hex}"; # bright magenta
bright6 = "${colors.teal.hex}"; # bright cyan
bright7 = "${colors.text.hex}"; # bright white
};
};
};

View file

@ -21,10 +21,15 @@ in {
# italic = mkStringOpt "Iosevka Bold Italic" "Italic Font";
# bold_italic = mkStringOpt "Iosevka ExtraBold Italic" "Bold Italic Font";
normal = mkStringOpt "Iosevka" "Normal Font";
bold = mkStringOpt "Iosevka" "Bold Font";
italic = mkStringOpt "Iosevka" "Italic Font";
bold_italic = mkStringOpt "Iosevka" "Bold Italic Font";
normal = mkStringOpt "Cozette" "Normal";
bold = mkStringOpt "Cozette" "Bold";
italic = mkStringOpt "Cozette" "Italic";
bold_italic = mkStringOpt "Cozette" "Bold Italic";
# normal = mkStringOpt "Iosevka Nerd Font Mono" "Normal Font";
# bold = mkStringOpt "Iosevka Nerd Font Mono" "Bold Font";
# italic = mkStringOpt "Iosevka Nerd Font Mono" "Italic Font";
# bold_italic = mkStringOpt "Iosevka Nerd Font Mono" "Bold Italic Font";
};
};
@ -36,6 +41,16 @@ in {
font-family = cfg.fonts.normal;
gtk-single-instance = true;
gtk-titlebar = false;
background = colors.crust.hex;
window-padding-x = 20;
window-padding-y = 20;
window-padding-balance = true;
font-style = "SemiBold";
font-style-bold = "Bold";
font-style-italic = "SemiBold Italic";
font-style-bold-italic = "Bold Italic";
};
};
};

View file

@ -20,10 +20,10 @@ in {
# bold = mkStringOpt "Kirsch Nerd Font Mono" "BBoldold Font";
# italic = mkStringOpt "Kirsch Nerd Font Mono" "Italic Font";
# bold_italic = mkStringOpt "Kirsch Nerd Font Mono" "Bold Italic Font";
normal = mkStringOpt "CozetteVector" "Normal Font";
bold = mkStringOpt "CozetteVector" "Bold Font";
italic = mkStringOpt "CozetteVector" "Italic Font";
bold_italic = mkStringOpt "CozetteVector" "Bold Italic Font";
normal = mkStringOpt "PragmataPro Mono Liga" "Normal Font";
bold = mkStringOpt "PragmataPro Mono Liga Bold" "Bold Font";
italic = mkStringOpt "PragmataPro Mono Liga Italic" "Italic Font";
bold_italic = mkStringOpt "PragmataPro Mono Liga Bold Italic" "Bold Italic Font";
};
};
@ -46,7 +46,28 @@ in {
settings = {
window_padding_width = 12;
# background_opacity = "0.9";
# background = "#000000";
background = colors.crust.hex;
foreground = colors.text.hex;
# Normal colors
color0 = colors.surface1.hex; # black
color1 = colors.red.hex; # red
color2 = colors.green.hex; # green
color3 = colors.yellow.hex; # yellow
color4 = colors.blue.hex; # blue
color5 = colors.mauve.hex; # magenta
color6 = colors.teal.hex; # cyan
color7 = colors.text.hex; # white
# Bright colors
color8 = colors.surface2.hex; # bright black
color9 = colors.red.hex; # bright red
color10 = colors.green.hex; # bright green
color11 = colors.yellow.hex; # bright yellow
color12 = colors.blue.hex; # bright blue
color13 = colors.mauve.hex; # bright magenta
color14 = colors.teal.hex; # bright cyan
color15 = colors.text.hex; # bright white
};
};
};

View file

@ -1,8 +1,6 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
@ -18,6 +16,12 @@ in {
direnv = {
enable = true;
nix-direnv.enable = true;
config = {
global = {
log_format = "-";
log_filter = "^$";
};
};
};
};
home.sessionVariables = {

View file

@ -11,3 +11,5 @@ end
vim.g.lazyvim_blink_main = true
vim.o.termguicolors = true
vim.g.lazyvim_python_lsp = "basedpyright"

View file

@ -70,7 +70,11 @@ return {
---@class PluginLspOpts
opts = {
servers = {
emmet_ls = {},
jinja_lsp = {},
emmet_ls = {
filetypes = { "html", "jinja" },
},
somesass_ls = {},
slangd = {
settings = {
slangd = {

View file

@ -21,7 +21,7 @@ in {
package = pkgs.swaylock-effects;
settings = with colors; {
clock = true;
color = base;
color = base.hex;
font = "Work Sans";
image = "${wallpaper}";
show-failed-attempts = false;
@ -33,21 +33,21 @@ in {
inside-color = "00000000";
key-hl-color = "f2cdcd";
separator-color = "00000000";
text-color = text;
text-color = text.hex;
text-caps-lock-color = "";
line-ver-color = love;
ring-ver-color = rose;
inside-ver-color = base;
text-ver-color = text;
ring-wrong-color = foam;
text-wrong-color = foam;
inside-wrong-color = base;
inside-clear-color = base;
text-clear-color = text;
ring-clear-color = iris;
line-clear-color = base;
line-wrong-color = base;
bs-hl-color = foam;
line-ver-color = rosewater.hex;
ring-ver-color = rosewater.hex;
inside-ver-color = base.hex;
text-ver-color = text.hex;
ring-wrong-color = teal.hex;
text-wrong-color = teal.hex;
inside-wrong-color = base.hex;
inside-clear-color = base.hex;
text-clear-color = text.hex;
ring-clear-color = lavender.hex;
line-clear-color = base.hex;
line-wrong-color = base.hex;
bs-hl-color = teal.hex;
line-uses-ring = false;
grace = 2;
grace-no-mouse = true;

View file

@ -129,8 +129,8 @@ in {
allow_tearing = true;
# active border color
"col.active_border" = "rgb(${base})";
"col.inactive_border" = "rgb(${base})";
"col.active_border" = "rgb(${colors.lavender.hex})";
"col.inactive_border" = "rgb(${colors.base.hex})";
};
input = {

View file

@ -25,6 +25,20 @@ with lib.custom; let
}: {
gradient = {inherit from to angle relative-to in';};
};
spawnSlackOnWeekday = pkgs.writeShellScriptBin "spawn-slack-on-weekday" ''
# Get the day of the week (1=Monday, ..., 7=Sunday)
DAY_OF_WEEK=$(${pkgs.coreutils}/bin/date +%u)
# Check if it's a weekday (between 1 and 5 inclusive)
if [ "$DAY_OF_WEEK" -ge 1 ] && [ "$DAY_OF_WEEK" -le 5 ]; then
# Execute Slack. Use the full path for robustness.
# Ensure pkgs.slack is available (e.g., via environment.systemPackages)
exec ${pkgs.slack}/bin/slack
fi
# Exit successfully if not a weekday or after exec replaces the process
exit 0
'';
in {
options.wms.niri = with types; {
enable = mkBoolOpt false "Enable niri";
@ -108,7 +122,11 @@ in {
# Environment variables
environment = {
DISPLAY = ":0";
DISPLAY = ":0"; # for applications using xwayland-satillite
};
hotkey-overlay = {
skip-at-startup = true;
};
# Layout settings
@ -131,9 +149,9 @@ in {
focus-ring = {
enable = true; # Not explicitly 'off'
width = 4;
active = mkGradient "#89b4fa" "#74c7ec" {angle = 45;};
active = mkGradient colors.blue.hex colors.sky.hex {angle = 45;};
# active = mkColor "#7fc8ff"; # Alternative solid color from KDL
inactive = mkGradient "#505050" "#808080" {
inactive = mkGradient colors.surface1.hex colors.surface2.hex {
angle = 45;
relative-to = "workspace-view";
};
@ -143,8 +161,8 @@ in {
border = {
enable = true; # Explicitly 'off' in KDL
width = 0;
active = mkColor "#89b4fa";
inactive = mkColor "#1e1e2e";
active = mkColor colors.blue.hex;
inactive = mkColor colors.base.hex;
# active-gradient = ... # Commented out in KDL
# inactive-gradient = ... # Commented out in KDL
};
@ -160,13 +178,12 @@ in {
# Spawn processes at startup
spawn-at-startup = [
{command = ["xwayland-satellite"];}
{command = ["thunderbird"];}
{command = ["zen"];}
{
command = [
"${lib.getExe pkgs.bash} -c '(( $(date +%u) < 6 )) && ${lib.getExe pkgs.slack}'"
];
}
{command = ["${pkgs.writeShellScriptBin "thunderbird-delayed" ''sleep 5; thunderbird''}/bin/thunderbird-delayed"];}
{command = ["${pkgs.writeShellScriptBin "zen-delayed" ''sleep 5; zen''}/bin/zen-delayed"];}
{command = ["vesktop"];}
{command = ["spotify"];}
{command = ["${spawnSlackOnWeekday}/bin/spawn-slack-on-weekday"];}
];
# Prefer server-side decorations
@ -187,6 +204,16 @@ in {
wait-for-frame-completion-in-pipewire = [];
};
layer-rules = [
{
matches = [
{namespace = "notifications$";}
];
block-out-from = "screen-capture";
}
];
# Window rules
window-rules = [
# Password manager rule (example from KDL comments)
@ -194,12 +221,13 @@ in {
matches = [
{app-id = "^org\\.keepassxc\\.KeePassXC$";}
{app-id = "^org\\.gnome\\.World\\.Secrets$";}
{app-id = "^1Password$";}
{app-id = "^thunderbird$";}
{app-id = "^signal$";}
{app-id = "^vesktop$";}
{app-id = "^slack$";}
];
block-out-from = "screen-capture";
# block-out-from = "screencast"; # Alternative
}
# Rounded corners rule (example from KDL comments)
{
@ -216,22 +244,16 @@ in {
{
matches = [{is-window-cast-target = true;}];
focus-ring = {
active = mkColor "#f38ba8";
inactive = mkColor "#7d0d2d";
};
border = {
# Only inactive is specified in KDL rule
active = mkColor "#f38ba8";
width = 4;
inactive = mkColor "#7d0d2d";
active = mkColor colors.red.hex;
inactive = mkColor (lerpColor colors.red.hex colors.base.hex 0.5);
};
shadow = {
# Only color is specified in KDL rule
color = "#7d0d2d70";
};
tab-indicator = {
active = mkColor "#f38ba8";
inactive = mkColor "#7d0d2d";
active = mkColor colors.red.hex;
inactive = mkColor (lerpColor colors.red.hex colors.base.hex 0.5);
};
}
@ -253,17 +275,77 @@ in {
y = 16;
};
}
{
matches = [
{
at-startup = true;
app-id = "^zen$";
}
];
open-maximized = true;
open-on-workspace = "browser";
}
{
matches = [
{
at-startup = true;
app-id = "^spotify$";
}
{
at-startup = true;
app-id = "^vesktop$";
}
];
open-on-workspace = "chat";
}
{
matches = [
{
at-startup = true;
app-id = "^Slack$";
}
{
at-startup = true;
app-id = "^thunderbird$";
}
];
open-on-workspace = "work";
}
];
workspaces."01-browser" = {
name = "browser";
};
workspaces."02-code" = {
name = "code";
};
workspaces."03-chat" = {
name = "chat";
};
workspaces."04-work" = {
name = "work";
};
# Keybindings
binds = {
"Mod+Shift+Slash" = {action = actions.show-hotkey-overlay;};
"Mod+Return" = {action = actions.spawn "alacritty";};
"Mod+Return" = {action = actions.spawn "kitty";};
"Mod+D" = {action = actions.spawn "fuzzel";};
"Super+Alt+L" = {action = actions.spawn "swaylock";};
# "Mod+T" = { action = actions.spawn "bash" "-c" "notify-send hello && exec alacritty"; };
"Mod+S" = {action = actions.set-dynamic-cast-window;};
"Mod+Shift+S" = {action = actions.set-dynamic-cast-monitor;};
"Mod+Z" = {action = actions.clear-dynamic-cast-target;};
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
@ -322,6 +404,8 @@ in {
"Mod+Shift+K" = {action = actions.focus-workspace-up;};
"Mod+Shift+L" = {action = actions.focus-monitor-right;};
"Mod+Ctrl+Shift+F" = {action = actions.toggle-windowed-fullscreen;};
"Mod+Shift+Ctrl+Left" = {action = actions.move-column-to-monitor-left;};
"Mod+Shift+Ctrl+Down" = {action = actions.move-column-to-monitor-down;};
"Mod+Shift+Ctrl+Up" = {action = actions.move-column-to-monitor-up;};