move colorscheme out of gui section

This commit is contained in:
Noah Masur 2022-07-25 23:36:06 -04:00
parent 6353ac188e
commit 4e8546728e
10 changed files with 97 additions and 98 deletions

View File

@ -1,11 +1,7 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
imports = [ imports =
../modules/shell [ ../modules/shell ../modules/neovim ../modules/repositories/dotfiles.nix ];
../modules/neovim
../modules/repositories/notes.nix
../modules/repositories/dotfiles.nix
];
options = with lib; { options = with lib; {
user = mkOption { user = mkOption {
@ -26,10 +22,10 @@
description = "Enable graphics"; description = "Enable graphics";
default = false; default = false;
}; };
colorscheme = mkOption { };
type = types.attrs; colorscheme = mkOption {
description = "Base16 color scheme"; type = types.attrs;
}; description = "Base16 color scheme";
}; };
homePath = mkOption { homePath = mkOption {
type = types.path; type = types.path;

View File

@ -32,6 +32,7 @@ nixpkgs.lib.nixosSystem {
../../modules/gaming ../../modules/gaming
../../modules/applications ../../modules/applications
../../modules/mail/himalaya.nix ../../modules/mail/himalaya.nix
../../modules/repositories/notes.nix
../../modules/services/keybase.nix ../../modules/services/keybase.nix
../../modules/services/gnupg.nix ../../modules/services/gnupg.nix
../../modules/services/mullvad.nix ../../modules/services/mullvad.nix

View File

@ -9,7 +9,7 @@ darwin.lib.darwinSystem {
home-manager.darwinModules.home-manager home-manager.darwinModules.home-manager
{ {
gui.enable = true; gui.enable = true;
gui.colorscheme = (import ../../modules/colorscheme/gruvbox); colorscheme = (import ../../modules/colorscheme/gruvbox);
mailUser = globals.user; mailUser = globals.user;
nixpkgs.overlays = [ nur.overlay ]; nixpkgs.overlays = [ nur.overlay ];
} }
@ -18,6 +18,7 @@ darwin.lib.darwinSystem {
../../modules/applications/alacritty.nix ../../modules/applications/alacritty.nix
../../modules/applications/discord.nix ../../modules/applications/discord.nix
../../modules/mail/himalaya.nix ../../modules/mail/himalaya.nix
../../modules/repositories/notes.nix
../../modules/programming/nix.nix ../../modules/programming/nix.nix
../../modules/programming/terraform.nix ../../modules/programming/terraform.nix
../../modules/programming/python.nix ../../modules/programming/python.nix

View File

@ -11,7 +11,7 @@ nixpkgs.lib.nixosSystem {
{ {
networking.hostName = "wsl"; networking.hostName = "wsl";
gui.enable = false; gui.enable = false;
gui.colorscheme = (import ../../modules/colorscheme/gruvbox); colorscheme = (import ../../modules/colorscheme/gruvbox);
passwordHash = passwordHash =
"$6$PZYiMGmJIIHAepTM$Wx5EqTQ5GApzXx58nvi8azh16pdxrN6Qrv1wunDlzveOgawitWzcIxuj76X9V868fsPi/NOIEO8yVXqwzS9UF."; "$6$PZYiMGmJIIHAepTM$Wx5EqTQ5GApzXx58nvi8azh16pdxrN6Qrv1wunDlzveOgawitWzcIxuj76X9V868fsPi/NOIEO8yVXqwzS9UF.";
wsl = { wsl = {
@ -28,6 +28,7 @@ nixpkgs.lib.nixosSystem {
../../modules/wsl ../../modules/wsl
../../modules/nixos ../../modules/nixos
../../modules/mail/himalaya.nix ../../modules/mail/himalaya.nix
../../modules/repositories/notes.nix
../../modules/programming/nix.nix ../../modules/programming/nix.nix
../../modules/programming/lua.nix ../../modules/programming/lua.nix
]; ];

View File

@ -54,32 +54,32 @@
]; ];
colors = { colors = {
primary = { primary = {
background = config.gui.colorscheme.base00; background = config.colorscheme.base00;
foreground = config.gui.colorscheme.base05; foreground = config.colorscheme.base05;
}; };
cursor = { cursor = {
text = "#1d2021"; text = "#1d2021";
cursor = config.gui.colorscheme.base05; cursor = config.colorscheme.base05;
}; };
normal = { normal = {
black = "#1d2021"; black = "#1d2021";
red = config.gui.colorscheme.base08; red = config.colorscheme.base08;
green = config.gui.colorscheme.base0B; green = config.colorscheme.base0B;
yellow = config.gui.colorscheme.base0A; yellow = config.colorscheme.base0A;
blue = config.gui.colorscheme.base0D; blue = config.colorscheme.base0D;
magenta = config.gui.colorscheme.base0E; magenta = config.colorscheme.base0E;
cyan = config.gui.colorscheme.base0C; cyan = config.colorscheme.base0C;
white = config.gui.colorscheme.base05; white = config.colorscheme.base05;
}; };
bright = { bright = {
black = config.gui.colorscheme.base03; black = config.colorscheme.base03;
red = config.gui.colorscheme.base09; red = config.colorscheme.base09;
green = config.gui.colorscheme.base01; green = config.colorscheme.base01;
yellow = config.gui.colorscheme.base02; yellow = config.colorscheme.base02;
blue = config.gui.colorscheme.base04; blue = config.colorscheme.base04;
magenta = config.gui.colorscheme.base06; magenta = config.colorscheme.base06;
cyan = config.gui.colorscheme.base0F; cyan = config.colorscheme.base0F;
white = config.gui.colorscheme.base07; white = config.colorscheme.base07;
}; };
}; };
draw_bold_text_with_bright_colors = false; draw_bold_text_with_bright_colors = false;

View File

@ -47,65 +47,65 @@
}; };
userChrome = '' userChrome = ''
:root { :root {
--focus-outline-color: ${config.gui.colorscheme.base04} !important; --focus-outline-color: ${config.colorscheme.base04} !important;
--toolbar-color: ${config.gui.colorscheme.base07} !important; --toolbar-color: ${config.colorscheme.base07} !important;
--tab-min-height: 30px !important; --tab-min-height: 30px !important;
} }
/* Background of tab bar */ /* Background of tab bar */
.toolbar-items { .toolbar-items {
background-color: ${config.gui.colorscheme.base00} !important; background-color: ${config.colorscheme.base00} !important;
} }
/* Tabs themselves */ /* Tabs themselves */
.tabbrowser-tab .tab-stack { .tabbrowser-tab .tab-stack {
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
overflow: hidden; overflow: hidden;
background-color: ${config.gui.colorscheme.base00}; background-color: ${config.colorscheme.base00};
color: ${config.gui.colorscheme.base06} !important; color: ${config.colorscheme.base06} !important;
} }
.tab-content { .tab-content {
border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 40%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 40%, transparent);
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
background-color: ${config.gui.colorscheme.base00}; background-color: ${config.colorscheme.base00};
color: ${config.gui.colorscheme.base06} !important; color: ${config.colorscheme.base06} !important;
} }
.tab-content[selected=true] { .tab-content[selected=true] {
border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 25%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 25%, transparent);
background-color: ${config.gui.colorscheme.base01} !important; background-color: ${config.colorscheme.base01} !important;
color: ${config.gui.colorscheme.base07} !important; color: ${config.colorscheme.base07} !important;
} }
/* Below tab bar */ /* Below tab bar */
#nav-bar { #nav-bar {
background: ${config.gui.colorscheme.base01} !important; background: ${config.colorscheme.base01} !important;
} }
/* URL bar in nav bar */ /* URL bar in nav bar */
#urlbar[focused=true] { #urlbar[focused=true] {
color: ${config.gui.colorscheme.base07} !important; color: ${config.colorscheme.base07} !important;
background: ${config.gui.colorscheme.base02} !important; background: ${config.colorscheme.base02} !important;
caret-color: ${config.gui.colorscheme.base05} !important; caret-color: ${config.colorscheme.base05} !important;
} }
#urlbar:not([focused=true]) { #urlbar:not([focused=true]) {
color: ${config.gui.colorscheme.base04} !important; color: ${config.colorscheme.base04} !important;
background: ${config.gui.colorscheme.base02} !important; background: ${config.colorscheme.base02} !important;
} }
#urlbar ::-moz-selection { #urlbar ::-moz-selection {
color: ${config.gui.colorscheme.base07} !important; color: ${config.colorscheme.base07} !important;
background: ${config.gui.colorscheme.base02} !important; background: ${config.colorscheme.base02} !important;
} }
#urlbar-input-container { #urlbar-input-container {
border: 1px solid ${config.gui.colorscheme.base01} !important; border: 1px solid ${config.colorscheme.base01} !important;
} }
#urlbar-background { #urlbar-background {
background: ${config.gui.colorscheme.base01} !important; background: ${config.colorscheme.base01} !important;
} }
/* Text in URL bar */ /* Text in URL bar */
#urlbar-input, #urlbar-scheme, .searchbar-textbox { #urlbar-input, #urlbar-scheme, .searchbar-textbox {
color: ${config.gui.colorscheme.base07} !important; color: ${config.colorscheme.base07} !important;
} }
''; '';
userContent = '' userContent = ''
@-moz-document url-prefix(about:blank) { @-moz-document url-prefix(about:blank) {
* { * {
background-color:${config.gui.colorscheme.base01} !important; background-color:${config.colorscheme.base01} !important;
} }
} }
''; '';

View File

@ -49,16 +49,16 @@ in {
}; };
bars = [{ command = "echo"; }]; # Disable i3bar bars = [{ command = "echo"; }]; # Disable i3bar
colors = let colors = let
background = config.gui.colorscheme.base00; background = config.colorscheme.base00;
inactiveBackground = config.gui.colorscheme.base01; inactiveBackground = config.colorscheme.base01;
border = config.gui.colorscheme.base01; border = config.colorscheme.base01;
inactiveBorder = config.gui.colorscheme.base01; inactiveBorder = config.colorscheme.base01;
text = config.gui.colorscheme.base07; text = config.colorscheme.base07;
inactiveText = config.gui.colorscheme.base04; inactiveText = config.colorscheme.base04;
urgentBackground = config.gui.colorscheme.base08; urgentBackground = config.colorscheme.base08;
indicator = "#00000000"; indicator = "#00000000";
in { in {
background = config.gui.colorscheme.base00; background = config.colorscheme.base00;
focused = { focused = {
inherit background indicator text border; inherit background indicator text border;
childBorder = background; childBorder = background;

View File

@ -23,14 +23,14 @@
# offset-y = -5; # offset-y = -5;
# offset-y = "5%"; # offset-y = "5%";
# dpi = 96; # dpi = 96;
background = config.gui.colorscheme.base01; background = config.colorscheme.base01;
foreground = config.gui.colorscheme.base05; foreground = config.colorscheme.base05;
line-size = "3pt"; line-size = "3pt";
border-top-size = 0; border-top-size = 0;
border-right-size = 0; border-right-size = 0;
border-left-size = 0; border-left-size = 0;
border-bottom-size = "4pt"; border-bottom-size = "4pt";
border-color = config.gui.colorscheme.base00; border-color = config.colorscheme.base00;
padding-left = 2; padding-left = 2;
padding-right = 2; padding-right = 2;
module-margin = 1; module-margin = 1;
@ -58,35 +58,35 @@
fuzzy-match = true; fuzzy-match = true;
format = "<label-state> <label-mode>"; format = "<label-state> <label-mode>";
label-focused = "%name%"; label-focused = "%name%";
label-focused-foreground = config.gui.colorscheme.base01; label-focused-foreground = config.colorscheme.base01;
label-focused-background = config.gui.colorscheme.base05; label-focused-background = config.colorscheme.base05;
label-focused-underline = config.gui.colorscheme.base03; label-focused-underline = config.colorscheme.base03;
label-focused-padding = padding; label-focused-padding = padding;
label-unfocused = "%name%"; label-unfocused = "%name%";
label-unfocused-padding = padding; label-unfocused-padding = padding;
label-visible = "%name%"; label-visible = "%name%";
label-visible-underline = config.gui.colorscheme.base01; label-visible-underline = config.colorscheme.base01;
label-visible-padding = padding; label-visible-padding = padding;
label-urgent = "%name%"; label-urgent = "%name%";
label-urgent-foreground = config.gui.colorscheme.base00; label-urgent-foreground = config.colorscheme.base00;
label-urgent-background = config.gui.colorscheme.base08; label-urgent-background = config.colorscheme.base08;
label-urgent-underline = config.gui.colorscheme.base0F; label-urgent-underline = config.colorscheme.base0F;
label-urgent-padding = padding; label-urgent-padding = padding;
}; };
"module/xworkspaces" = { "module/xworkspaces" = {
type = "internal/xworkspaces"; type = "internal/xworkspaces";
label-active = "%name%"; label-active = "%name%";
label-active-background = config.gui.colorscheme.base05; label-active-background = config.colorscheme.base05;
label-active-foreground = config.gui.colorscheme.base01; label-active-foreground = config.colorscheme.base01;
label-active-underline = config.gui.colorscheme.base03; label-active-underline = config.colorscheme.base03;
label-active-padding = 1; label-active-padding = 1;
label-occupied = "%name%"; label-occupied = "%name%";
label-occupied-padding = 1; label-occupied-padding = 1;
label-urgent = "%name%"; label-urgent = "%name%";
label-urgent-background = config.gui.colorscheme.base08; label-urgent-background = config.colorscheme.base08;
label-urgent-padding = 1; label-urgent-padding = 1;
label-empty = "%name%"; label-empty = "%name%";
label-empty-foreground = config.gui.colorscheme.base06; label-empty-foreground = config.colorscheme.base06;
label-empty-padding = 1; label-empty-padding = 1;
}; };
"module/xwindow" = { "module/xwindow" = {
@ -108,10 +108,10 @@
format-volume = "<ramp-volume> <label-volume>"; format-volume = "<ramp-volume> <label-volume>";
# format-volume-background = colors.background; # format-volume-background = colors.background;
# label-volume-background = colors.background; # label-volume-background = colors.background;
format-volume-foreground = config.gui.colorscheme.base0B; format-volume-foreground = config.colorscheme.base0B;
label-volume = "%percentage%%"; label-volume = "%percentage%%";
label-muted = " ---"; label-muted = " ---";
label-muted-foreground = config.gui.colorscheme.base03; label-muted-foreground = config.colorscheme.base03;
ramp-volume-0 = ""; ramp-volume-0 = "";
ramp-volume-1 = ""; ramp-volume-1 = "";
ramp-volume-2 = ""; ramp-volume-2 = "";
@ -163,7 +163,7 @@
date = "%d %b %l:%M %p"; date = "%d %b %l:%M %p";
date-alt = "%Y-%m-%d %H:%M:%S"; date-alt = "%Y-%m-%d %H:%M:%S";
label = "%date%"; label = "%date%";
label-foreground = config.gui.colorscheme.base0A; label-foreground = config.colorscheme.base0A;
# format-background = colors.background; # format-background = colors.background;
}; };
"settings" = { "settings" = {

View File

@ -25,19 +25,19 @@
# Inspired by https://github.com/sherubthakur/dotfiles/blob/master/users/modules/desktop-environment/rofi/launcher.rasi # Inspired by https://github.com/sherubthakur/dotfiles/blob/master/users/modules/desktop-environment/rofi/launcher.rasi
"*" = { "*" = {
background-color = mkLiteral config.gui.colorscheme.base00; background-color = mkLiteral config.colorscheme.base00;
foreground-color = mkLiteral config.gui.colorscheme.base07; foreground-color = mkLiteral config.colorscheme.base07;
text-color = mkLiteral config.gui.colorscheme.base07; text-color = mkLiteral config.colorscheme.base07;
border-color = mkLiteral config.gui.colorscheme.base04; border-color = mkLiteral config.colorscheme.base04;
}; };
# Holds the entire window # Holds the entire window
"#window" = { "#window" = {
transparency = "real"; transparency = "real";
background-color = mkLiteral config.gui.colorscheme.base00; background-color = mkLiteral config.colorscheme.base00;
text-color = mkLiteral config.gui.colorscheme.base07; text-color = mkLiteral config.colorscheme.base07;
border = mkLiteral "4px"; border = mkLiteral "4px";
border-color = mkLiteral config.gui.colorscheme.base04; border-color = mkLiteral config.colorscheme.base04;
border-radius = mkLiteral "4px"; border-radius = mkLiteral "4px";
width = mkLiteral "850px"; width = mkLiteral "850px";
padding = mkLiteral "15px"; padding = mkLiteral "15px";
@ -45,10 +45,10 @@
# Wrapper around bar and results # Wrapper around bar and results
"#mainbox" = { "#mainbox" = {
background-color = mkLiteral config.gui.colorscheme.base00; background-color = mkLiteral config.colorscheme.base00;
border = mkLiteral "0px"; border = mkLiteral "0px";
border-radius = mkLiteral "0px"; border-radius = mkLiteral "0px";
border-color = mkLiteral config.gui.colorscheme.base04; border-color = mkLiteral config.colorscheme.base04;
children = map mkLiteral [ "inputbar" "listview" ]; children = map mkLiteral [ "inputbar" "listview" ];
spacing = mkLiteral "10px"; spacing = mkLiteral "10px";
padding = mkLiteral "10px"; padding = mkLiteral "10px";
@ -59,7 +59,7 @@
expand = false; expand = false;
str = ":"; str = ":";
margin = mkLiteral "0px 0.3em 0em 0em"; margin = mkLiteral "0px 0.3em 0em 0em";
text-color = mkLiteral config.gui.colorscheme.base07; text-color = mkLiteral config.colorscheme.base07;
}; };
# Command prompt left of the input # Command prompt left of the input
@ -67,7 +67,7 @@
# Actual text box # Actual text box
"#entry" = { "#entry" = {
placeholder-color = mkLiteral config.gui.colorscheme.base03; placeholder-color = mkLiteral config.colorscheme.base03;
expand = true; expand = true;
horizontal-align = "0"; horizontal-align = "0";
placeholder = "Launch Program"; placeholder = "Launch Program";
@ -85,7 +85,7 @@
# Results # Results
"#listview" = { "#listview" = {
background-color = mkLiteral config.gui.colorscheme.base00; background-color = mkLiteral config.colorscheme.base00;
padding = mkLiteral "0px"; padding = mkLiteral "0px";
columns = 1; columns = 1;
lines = 12; lines = 12;
@ -104,9 +104,9 @@
"#element.selected" = { "#element.selected" = {
border = mkLiteral "1px"; border = mkLiteral "1px";
border-radius = mkLiteral "4px"; border-radius = mkLiteral "4px";
border-color = mkLiteral config.gui.colorscheme.base07; border-color = mkLiteral config.colorscheme.base07;
background-color = mkLiteral config.gui.colorscheme.base04; background-color = mkLiteral config.colorscheme.base04;
text-color = mkLiteral config.gui.colorscheme.base00; text-color = mkLiteral config.colorscheme.base00;
}; };
"#element-text" = { "#element-text" = {
@ -116,8 +116,8 @@
margin = mkLiteral "0px 2.5px 0px 2.5px"; margin = mkLiteral "0px 2.5px 0px 2.5px";
}; };
"#element-text.selected" = { "#element-text.selected" = {
background-color = mkLiteral config.gui.colorscheme.base04; background-color = mkLiteral config.colorscheme.base04;
text-color = mkLiteral config.gui.colorscheme.base00; text-color = mkLiteral config.colorscheme.base00;
}; };
# Not sure how to get icons # Not sure how to get icons
@ -125,11 +125,11 @@
size = mkLiteral "18px"; size = mkLiteral "18px";
border = mkLiteral "0px"; border = mkLiteral "0px";
padding = mkLiteral "2px 5px 2px 2px"; padding = mkLiteral "2px 5px 2px 2px";
background-color = mkLiteral config.gui.colorscheme.base00; background-color = mkLiteral config.colorscheme.base00;
}; };
"#element-icon.selected" = { "#element-icon.selected" = {
background-color = mkLiteral config.gui.colorscheme.base04; background-color = mkLiteral config.colorscheme.base04;
text-color = mkLiteral config.gui.colorscheme.base00; text-color = mkLiteral config.colorscheme.base00;
}; };
}; };

View File

@ -15,7 +15,7 @@
source = ./lua; source = ./lua;
recursive = true; # Allows adding more files recursive = true; # Allows adding more files
}; };
"nvim/lua/packer/colors.lua".source = config.gui.colorscheme.neovimConfig; "nvim/lua/packer/colors.lua".source = config.colorscheme.neovimConfig;
}; };
programs.git.extraConfig.core.editor = "nvim"; programs.git.extraConfig.core.editor = "nvim";