Skip to content

Commit

Permalink
Migrate from nix-colors to stylix
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovico Piero <lewdovico@gnuweeb.org>
  • Loading branch information
LudovicoPiero committed May 30, 2024
1 parent 885f03c commit 59996d5
Show file tree
Hide file tree
Showing 19 changed files with 300 additions and 386 deletions.
37 changes: 1 addition & 36 deletions cells/workstations/homeProfiles/alacritty/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
{ config, ... }:
let
inherit (config) colorScheme;
inherit (colorScheme) palette;
in
{ ... }:
{
programs.alacritty = {
enable = true;

settings = {
font = {
normal.family = "Iosevka q SemiBold";
bold.family = "Iosevka q";
italic.family = "Iosevka q";
size = 15;
};

window = {
decorations = "None";
dynamic_padding = true;
padding = {
x = 5;
y = 5;
};
opacity = 0.88;
startup_mode = "Maximized";
};

Expand All @@ -32,29 +20,6 @@ in
};

mouse.hide_when_typing = true;

colors = {
primary.background = "#${palette.base00}";
primary.foreground = "#${palette.base07}";
cursor.text = "#${palette.base00}";
cursor.cursor = "#${palette.base07}";
normal.black = "#${palette.base00}";
normal.red = "#${palette.base08}";
normal.green = "#${palette.base0B}";
normal.yellow = "#${palette.base0A}";
normal.blue = "#${palette.base0D}";
normal.magenta = "#${palette.base0E}";
normal.cyan = "#${palette.base0B}";
normal.white = "#${palette.base05}";
bright.black = "#${palette.base03}";
bright.red = "#${palette.base09}";
bright.green = "#${palette.base01}";
bright.yellow = "#${palette.base02}";
bright.blue = "#${palette.base04}";
bright.magenta = "#${palette.base06}";
bright.cyan = "#${palette.base0F}";
bright.white = "#${palette.base07}";
};
};
};
}
3 changes: 2 additions & 1 deletion cells/workstations/homeProfiles/fish/__functions.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
pkgs,
config,
inputs,
...
}:
let
Expand All @@ -13,7 +14,7 @@ with pkgs;
{
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
fish_greeting = ""; # disable welcome text
run = "${_ nh} run nixpkgs#$argv[1] -- $argv[2..-1]";
run = "${_ inputs.nix-super.packages.${pkgs.system}.nix} run nixpkgs#$argv[1] -- $argv[2..-1]";

bs = ''
pushd ${config.home.homeDirectory}/Code/nixos
Expand Down
4 changes: 0 additions & 4 deletions cells/workstations/homeProfiles/fish/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,10 @@ in
shellAliases = import ./__shellAliases.nix { inherit lib pkgs config; };

interactiveShellInit =
let
inherit (config.colorScheme) palette;
in
''
set --global async_prompt_functions _pure_prompt_git
set --universal pure_check_for_new_release false
set pure_symbol_prompt "❯"
set pure_color_success '#${palette.base0E}'
${_ any-nix-shell} fish --info-right | source
'';
Expand Down
31 changes: 1 addition & 30 deletions cells/workstations/homeProfiles/foot/default.nix
Original file line number Diff line number Diff line change
@@ -1,45 +1,16 @@
{ config, ... }:
let
inherit (config.colorScheme) palette;
in
{ ... }:
{
programs.foot = {
enable = true;
settings = {
main = {
term = "screen-256color";
font = "Iosevka q:size=15,Material Design Icons:size=15,Noto Color Emoji:size=15,Symbols Nerd Font:size=15";
dpi-aware = "yes";
initial-window-size-chars = "82x23";
initial-window-mode = "windowed";
pad = "10x10";
resize-delay-ms = 100;
};

colors = {
# alpha = "0.88";
foreground = "${palette.base05}"; # Text
background = "${palette.base00}"; # colors.base

regular0 = "${palette.base03}"; # Surface 1
regular1 = "${palette.base08}"; # red
regular2 = "${palette.base0B}"; # green
regular3 = "${palette.base0A}"; # yellow
regular4 = "${palette.base0D}"; # blue
regular5 = "${palette.base0F}"; # pink
regular6 = "${palette.base0C}"; # teal
regular7 = "${palette.base06}"; # Subtext 0
# Subtext 1 ???
bright0 = "${palette.base04}"; # Surface 2
bright1 = "${palette.base08}"; # red
bright2 = "${palette.base0B}"; # green
bright3 = "${palette.base0A}"; # yellow
bright4 = "${palette.base0D}"; # blue
bright5 = "${palette.base0F}"; # pink
bright6 = "${palette.base0C}"; # teal
bright7 = "${palette.base07}"; # Subtext 0
};

mouse = {
hide-when-typing = "yes";
alternate-scroll-mode = "yes";
Expand Down
17 changes: 2 additions & 15 deletions cells/workstations/homeProfiles/fuzzel/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{ config, ... }:
let
inherit (config.colorScheme) palette;
in
{ lib, config, ... }:
{
programs.fuzzel = {
enable = true;
settings = {
main = {
font = "Iosevka q SemiBold-16";
font = lib.mkForce "Iosevka q SemiBold-16";
terminal = "wezterm";
icon-theme = "${config.gtk.iconTheme.name}";
prompt = "->";
Expand All @@ -21,16 +18,6 @@ in
dmenu = {
mode = "text";
};

colors = {
background = "${palette.base00}f2";
text = "${palette.base05}ff";
match = "${palette.base0A}ff";
selection = "${palette.base03}ff";
selection-text = "${palette.base05}ff";
selection-match = "${palette.base0A}ff";
border = "${palette.base0D}ff";
};
};
};
}
8 changes: 0 additions & 8 deletions cells/workstations/homeProfiles/hyprland/__settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
...
}:
let
inherit (config.colorScheme) palette;
_ = lib.getExe;
launcher = "${_ pkgs.fuzzel}";
powermenu = "${_ pkgs.wlogout}";
Expand Down Expand Up @@ -77,28 +76,21 @@ in
shadow_range = 8;
shadow_render_power = 3;
shadow_offset = "2 2";
"col.shadow" = "rgb(f300ff)";
};

general = {
sensitivity = 1;
gaps_in = 3;
gaps_out = 3;
border_size = 2;
"col.active_border" = "rgb(${palette.base0E})";
"col.inactive_border" = "rgb(${palette.base02})";

layout = "dwindle";
};

group = {
groupbar = {
render_titles = false;
"col.active" = "rgb(${palette.base0B})";
"col.inactive" = "rgb(${palette.base03})";
};
"col.border_active" = "rgb(a6e3a1)";
"col.border_inactive" = "rgb(585b70)";
};

input = {
Expand Down
1 change: 0 additions & 1 deletion cells/workstations/homeProfiles/i3status-rust/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ config, lib, ... }:
let
inherit (config.colorScheme) palette;
sway = config.wayland.windowManager.sway.enable;
in
{
Expand Down
65 changes: 5 additions & 60 deletions cells/workstations/homeProfiles/kitty/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
config,
pkgs,
lib,
...
}:
{ pkgs, lib, ... }:
let
inherit (config) colorScheme;
inherit (colorScheme) palette;
_ = lib.getExe;
in
{
Expand All @@ -15,6 +8,10 @@ in

shellIntegration.mode = "no-rc no-cursor";

font = {
name = lib.mkForce "Iosevka q";
};

keybindings = {
"ctrl+a>c" = "new_tab_with_cwd";
"ctrl+a>v" = "new_window_with_cwd";
Expand All @@ -34,13 +31,7 @@ in
};

settings = {
font_family = "Iosevka q";
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
font_size = 15;
window_margin_width = 2;
background_opacity = "1";

cursor_shape = "block";
disable_ligatures = "cursor";
Expand All @@ -56,52 +47,6 @@ in
tab_bar_style = "powerline";
tab_powerline_style = "slanted";
tab_title_template = "{index}:{title}";

# Colors
active_border_color = "#${palette.base03}";
active_tab_background = "#${palette.base00}";
active_tab_foreground = "#${palette.base05}";
background = "#${palette.base00}";
foreground = "#${palette.base05}";
cursor = "#${palette.base05}";
# cursor_text_color = "#${palette.base00}";
# inactive_border_color = "#${palette.base01}";
inactive_tab_background = "#${palette.base01}";
inactive_tab_foreground = "#${palette.base04}";
selection_background = "#${palette.base05}";
selection_foreground = "#${palette.base00}";
tab_bar_background = "#${palette.base01}";
url_color = "#${palette.base04}";

mark1_foreground = "#${palette.base00}";
mark1_background = "#${palette.base07}";
mark2_foreground = "#${palette.base00}";
mark2_background = "#${palette.base0E}";
mark3_foreground = "#${palette.base00}";
mark3_background = "#74C7EC";

color0 = "#${palette.base00}";
color1 = "#${palette.base08}";
color2 = "#${palette.base0B}";
color3 = "#${palette.base0A}";
color4 = "#${palette.base0D}";
color5 = "#${palette.base0E}";
color6 = "#${palette.base0C}";
color7 = "#${palette.base05}";
color8 = "#${palette.base03}";
color9 = "#${palette.base08}";
color10 = "#${palette.base0B}";
color11 = "#${palette.base0A}";
color12 = "#${palette.base0D}";
color13 = "#${palette.base0E}";
color14 = "#${palette.base0C}";
color15 = "#${palette.base07}";
color16 = "#${palette.base09}";
color17 = "#${palette.base0F}";
color18 = "#${palette.base01}";
color19 = "#${palette.base02}";
color20 = "#${palette.base04}";
color21 = "#${palette.base06}";
};
};
}
13 changes: 1 addition & 12 deletions cells/workstations/homeProfiles/mako/default.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,24 @@
{ config, pkgs, ... }:
let
inherit (config.colorScheme) palette;
in
{ pkgs, ... }:
{
home.packages = [ pkgs.libnotify ];
services.mako = {
enable = true;

anchor = "top-right";
backgroundColor = "#${palette.base00}";
borderColor = "#${palette.base0E}";
textColor = "#${palette.base05}";
borderRadius = 5;
borderSize = 2;
padding = "20";
defaultTimeout = 5000;
font = "Iosevka q 10";
layer = "top";
height = 100;
width = 300;
format = "<b>%s</b>\\n%b";

extraConfig = ''
[urgency=low]
border-color=#${palette.base0B}
background-color=#${palette.base01}
default-timeout=3000
[urgency=high]
background-color=#${palette.base01}
border-color=#${palette.base0B}
default-timeout=10000
[mode=dnd]
Expand Down
38 changes: 0 additions & 38 deletions cells/workstations/homeProfiles/sway/__bars.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
palette,
pkgs,
lib,
...
Expand All @@ -8,43 +7,6 @@
{
statusCommand = "${lib.getExe pkgs.i3status}";
# statusCommand = "${lib.getExe pkgs.i3status-rust} ~/.config/i3status-rust/config-bottom.toml";
fonts = {
names = [
"Iosevka q"
"Symbols Nerd Font"
];
size = 8.0;
};
position = "bottom";
colors = {
background = "#${palette.base00}";
separator = "#${palette.base05}";
statusline = "#${palette.base05}";
focusedWorkspace = {
border = "#${palette.base05}";
background = "#${palette.base0D}";
text = "#${palette.base00}";
};
activeWorkspace = {
border = "#${palette.base05}";
background = "#${palette.base03}";
text = "#${palette.base00}";
};
inactiveWorkspace = {
border = "#${palette.base03}";
background = "#${palette.base01}";
text = "#${palette.base05}";
};
urgentWorkspace = {
border = "#${palette.base08}";
background = "#${palette.base08}";
text = "#${palette.base00}";
};
bindingMode = {
border = "#${palette.base00}";
background = "#${palette.base0A}";
text = "#${palette.base00}";
};
};
}
]
Loading

0 comments on commit 59996d5

Please sign in to comment.