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

View File

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

View File

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

View File

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

View File

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

View File

@ -47,65 +47,65 @@
};
userChrome = ''
:root {
--focus-outline-color: ${config.gui.colorscheme.base04} !important;
--toolbar-color: ${config.gui.colorscheme.base07} !important;
--focus-outline-color: ${config.colorscheme.base04} !important;
--toolbar-color: ${config.colorscheme.base07} !important;
--tab-min-height: 30px !important;
}
/* Background of tab bar */
.toolbar-items {
background-color: ${config.gui.colorscheme.base00} !important;
background-color: ${config.colorscheme.base00} !important;
}
/* Tabs themselves */
.tabbrowser-tab .tab-stack {
border-radius: 5px 5px 0 0;
overflow: hidden;
background-color: ${config.gui.colorscheme.base00};
color: ${config.gui.colorscheme.base06} !important;
background-color: ${config.colorscheme.base00};
color: ${config.colorscheme.base06} !important;
}
.tab-content {
border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 40%, transparent);
border-radius: 5px 5px 0 0;
background-color: ${config.gui.colorscheme.base00};
color: ${config.gui.colorscheme.base06} !important;
background-color: ${config.colorscheme.base00};
color: ${config.colorscheme.base06} !important;
}
.tab-content[selected=true] {
border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 25%, transparent);
background-color: ${config.gui.colorscheme.base01} !important;
color: ${config.gui.colorscheme.base07} !important;
background-color: ${config.colorscheme.base01} !important;
color: ${config.colorscheme.base07} !important;
}
/* Below tab bar */
#nav-bar {
background: ${config.gui.colorscheme.base01} !important;
background: ${config.colorscheme.base01} !important;
}
/* URL bar in nav bar */
#urlbar[focused=true] {
color: ${config.gui.colorscheme.base07} !important;
background: ${config.gui.colorscheme.base02} !important;
caret-color: ${config.gui.colorscheme.base05} !important;
color: ${config.colorscheme.base07} !important;
background: ${config.colorscheme.base02} !important;
caret-color: ${config.colorscheme.base05} !important;
}
#urlbar:not([focused=true]) {
color: ${config.gui.colorscheme.base04} !important;
background: ${config.gui.colorscheme.base02} !important;
color: ${config.colorscheme.base04} !important;
background: ${config.colorscheme.base02} !important;
}
#urlbar ::-moz-selection {
color: ${config.gui.colorscheme.base07} !important;
background: ${config.gui.colorscheme.base02} !important;
color: ${config.colorscheme.base07} !important;
background: ${config.colorscheme.base02} !important;
}
#urlbar-input-container {
border: 1px solid ${config.gui.colorscheme.base01} !important;
border: 1px solid ${config.colorscheme.base01} !important;
}
#urlbar-background {
background: ${config.gui.colorscheme.base01} !important;
background: ${config.colorscheme.base01} !important;
}
/* Text in URL bar */
#urlbar-input, #urlbar-scheme, .searchbar-textbox {
color: ${config.gui.colorscheme.base07} !important;
color: ${config.colorscheme.base07} !important;
}
'';
userContent = ''
@-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
colors = let
background = config.gui.colorscheme.base00;
inactiveBackground = config.gui.colorscheme.base01;
border = config.gui.colorscheme.base01;
inactiveBorder = config.gui.colorscheme.base01;
text = config.gui.colorscheme.base07;
inactiveText = config.gui.colorscheme.base04;
urgentBackground = config.gui.colorscheme.base08;
background = config.colorscheme.base00;
inactiveBackground = config.colorscheme.base01;
border = config.colorscheme.base01;
inactiveBorder = config.colorscheme.base01;
text = config.colorscheme.base07;
inactiveText = config.colorscheme.base04;
urgentBackground = config.colorscheme.base08;
indicator = "#00000000";
in {
background = config.gui.colorscheme.base00;
background = config.colorscheme.base00;
focused = {
inherit background indicator text border;
childBorder = background;

View File

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

View File

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

View File

@ -15,7 +15,7 @@
source = ./lua;
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";