Use stylix and refactor related things

This commit is contained in:
Pedro Rey Anca 2025-06-09 18:49:44 +02:00
parent f173a43c72
commit 96dc27ff50
Signed by: peprolinbot
GPG key ID: 053EA6E00116533A
19 changed files with 600 additions and 397 deletions

View file

@ -3,13 +3,6 @@
enable = true;
config = {
pager = "less -FR";
theme = "catppuccin-mocha";
};
themes = {
catppuccin-mocha = {
src = inputs.catppuccin-bat;
file = "/themes/Catppuccin Mocha.tmTheme";
};
};
};
}

View file

@ -8,7 +8,7 @@
settings = {
"webgl.disabled" = false;
# "privacy.resistFingerprinting" = false;
"privacy.clearOnShutdown.history" = false;
"privacy.clearOnShutdown.history" = true;
"privacy.clearOnShutdown.cookies" = false;
"network.cookie.lifetimePolicy" = 0;
"identity.fxaccounts.enabled" = true;
@ -35,6 +35,7 @@
libredirect
multi-account-containers
clearurls
tridactyl
hoppscotch
];
};
@ -48,6 +49,7 @@
"services.sync.engine.passwords" = false;
"services.sync.engine.prefs" = false;
"services.sync.engine.tabs" = true;
"browser.urlbar.autoFill" = false;
# Layout
"browser.uiCustomization.state" = builtins.toJSON {

View file

@ -3,11 +3,8 @@
enable = true;
settings = {
color_theme = "dracula";
theme_background = false;
update_ms = 500;
};
};
home.packages = with pkgs; [nvtopPackages.intel];
}

View file

@ -7,10 +7,5 @@
enable = true;
};
# https://github.com/catppuccin/cava
home.file.".config/cava/config".text =
''
# custom cava config
''
+ builtins.readFile "${inputs.catppuccin-cava}/themes/mocha.cava";
stylix.targets.cava.rainbow.enable = true;
}

View file

@ -9,7 +9,7 @@
++ [(import ./browsers)] # browser configurations
++ [(import ./btop.nix)] # resouces monitor
++ [(import ./cava.nix)] # audio visualizer
++ [(import ./cliphist.nix)] # clipboard
++ [(import ./cliphist.nix)] # clipboard
++ [(import ./discord.nix)] # discord with catppuccin theme
++ [(import ./gpg.nix)] # GnuPG and its agent (gpg-agent)
++ [(import ./fuzzel.nix)] # launcher
@ -20,7 +20,7 @@
++ [(import ./kdeconnect.nix)]
++ [(import ./kitty.nix)] # terminal
++ [(import ./swaync)] # notification deamon
++ [(import ./nemo.nix)] # File manager
++ [(import ./nemo.nix)] # File manager
++ [(import ./nextcloud.nix)] # nextcloud client
++ [(import ./nvim.nix)] # neovim editor
++ [(import ./packages.nix)] # other packages
@ -30,6 +30,7 @@
++ [(import ./starship.nix)] # shell prompt
++ [(import ./libreoffice.nix)]
++ [(import ./qt.nix)]
++ [(import ./stylix.nix)] # shell
++ [(import ./vscodium.nix)] # vscode forck
++ [(import ./waybar)] # status bar
++ [(import ./zsh.nix)]; # shell

View file

@ -1,14 +1,13 @@
{...}: {
{lib, ...}: {
programs.fuzzel = {
enable = true;
settings = {
main = {
font = "JetBrainsMono Nerd Font:weight=bold:size=14";
use-bold = true;
line-height = 25;
fields = "name,generic,comment,categories,filename,keywords";
terminal = "kitty";
prompt = "'🔍 '";
icon-theme = "Papirus-Dark";
layer = "top";
lines = 10;
width = 35;
@ -16,15 +15,6 @@
inner-pad = 5;
dpi-aware = false;
};
colors = {
background = "1e1e2ecc";
text = "cdd6f4ff";
match = "f38ba8ff";
selection = "b4befeaa";
selection-match = "f38ba8ff";
selection-text = "cdd6f4ff";
border = "b4befeff";
};
border = {
radius = 15;
width = 3;

View file

@ -15,31 +15,5 @@
gtk = {
enable = true;
font = {
name = "JetBrainsMono Nerd Font";
size = 11;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.catppuccin-papirus-folders.override {
flavor = "mocha";
accent = "lavender";
};
};
theme = {
name = "Dracula";
package = pkgs.dracula-theme;
};
cursorTheme = {
name = "mochaDark";
package = pkgs.catppuccin-cursors;
size = 22;
};
};
home.pointerCursor = {
name = "Nordzy-cursors";
package = pkgs.nordzy-cursor-theme;
size = 22;
};
}

View file

@ -32,9 +32,9 @@
gaps_in = 0;
gaps_out = 0;
border_size = 2;
"col.active_border" = "rgb(cba6f7) rgb(94e2d5) 45deg";
"col.inactive_border" = "0x00000000";
border_part_of_window = false;
# "col.active_border" = "rgb(cba6f7) rgb(94e2d5) 45deg";
# "col.inactive_border" = "0x00000000";
# border_part_of_window = false;
no_border_on_floating = false;
};
@ -89,7 +89,7 @@
offset = "0 2";
range = 20;
render_power = 3;
color = "rgba(00000055)";
# color = "rgba(00000055)";
};
};
@ -234,36 +234,25 @@
# windowrule
windowrule = [
"float,imv"
"center,imv"
"size 1200 725,imv"
"float,mpv"
"center,mpv"
"tile,Aseprite"
"size 1200 725,mpv"
"float,class:vimiv"
"center,class:vimiv"
"float,class:mpv"
"center,class:mpv"
"size 1200 725,class:mpv"
"float,title:^(float_kitty)$"
"center,title:^(float_kitty)$"
"size 950 600,title:^(float_kitty)$"
# "pin,wofi"
# "float,wofi"
# "noborder,wofi"
"tile, neovide"
"idleinhibit focus,mpv"
"float,udiskie"
"tile, class:neovide"
"idleinhibit focus,class:mpv"
"float,class:udiskie"
"float,title:^(Volume Control)$"
"float,title:^(Firefox Sharing Indicator)$"
"move 0 0,title:^(Firefox Sharing Indicator)$"
"size 700 450,title:^(Volume Control)$"
"move 40 55%,title:^(Volume Control)$"
];
# windowrulev2
windowrulev2 = [
"float, title:^(Picture-in-Picture)$"
"opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$"
"pin, title:^(Picture-in-Picture)$"
"opacity 1.0 override 1.0 override, title:^(.*imv.*)$"
"opacity 1.0 override 1.0 override, title:^(.*mpv.*)$"
"opacity 1.0 override 1.0 override, class:(Aseprite)"
"opacity 1.0 override 1.0 override, class:(Unity)"
"idleinhibit focus, class:^(mpv)$"

View file

@ -1,97 +1,73 @@
{pkgs, ...}: {
programs.hyprlock.enable = true;
xdg.configFile."hypr/hyprlock.conf".text = ''
$red = rgb(f38ba8)
$yellow = rgb(f9e2af)
$lavender = rgb(b4befe)
{config, ...}: {
programs.hyprlock = {
enable = true;
settings = let
colors = with config.lib.stylix.colors; {
text = base05;
accent = base0E;
warning = base0A;
};
in {
general = {
hide_cursor = true;
};
$mauve = rgb(cba6f7)
$mauveAlpha = cba6f7
background = {
path = "~/.config/hypr/wallpaper.png";
blur_passes = 2;
};
$base = rgb(1e1e2e)
$surface0 = rgb(313244)
$text = rgb(cdd6f4)
$textAlpha = cdd6f4
label = [
# Time
{
text = "cmd[update:30000] echo \"<b><big> $(date +\"%R\") </big></b>\"";
color = "rgb(${colors.text})";
font_size = 110;
shadow_passes = 3;
shadow_size = 3;
$accent = $lavender
$accentAlpha = $mauveAlpha
$font = JetBrainsMono Nerd Font
position = "0, -100";
halign = "center";
valign = "top";
}
# GENERAL
general {
disable_loading_bar = true
hide_cursor = true
}
# Date
{
text = "cmd[update:43200000] echo \"$(date +\"%A, %d %B %Y\")\"";
color = "rgb(${colors.text})";
font_size = 18;
position = "0, -300";
halign = "center";
valign = "top";
}
];
# BACKGROUND
background {
monitor =
path = ~/.config/hypr/wallpaper.png
color = $base
blur_passes = 2
}
# User Avatar
image = {
path = "~/.face.png";
size = 125;
border_color = "rgb(${colors.accent})";
# TIME
label {
monitor =
text = cmd[update:30000] echo "<b><big> $(date +"%R") </big></b>"
color = $text
font_size = 110
font_family = $font
shadow_passes = 3
shadow_size = 3
position = "0, -450";
halign = "center";
valign = "center";
};
position = 0, -100
halign = center
valign = top
}
# DATE
label {
monitor =
text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
color = $text
font_size = 18
font_family = $font
position = 0, -300
halign = center
valign = top
}
# USER AVATAR
image {
monitor =
path = ~/.face.png
size = 125
border_color = $accent
position = 0, -450
halign = center
valign = center
}
# INPUT FIELD
input-field {
monitor =
size = 300, 60
outline_thickness = 4
dots_size = 0.2
dots_spacing = 0.4
dots_center = true
outer_color = $accent
inner_color = $surface0
font_color = $text
fade_on_empty = false
placeholder_text = <span foreground="##$textAlpha"><i>󰌾 Logged in as </i><span foreground="##$accentAlpha">$USER</span></span>
hide_input = false
check_color = $accent
fail_color = $red
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
capslock_color = $yellow
position = 0, -100
halign = center
valign = center
}
'';
input-field = {
size = "300, 60";
outline_thickness = 4;
dots_size = 0.2;
dots_spacing = 0.4;
dots_center = true;
fade_on_empty = false;
placeholder_text = "<span foreground=\"##${colors.text}\"><i>󰌾 Logged in as </i><span foreground=\"##${colors.accent}\">$USER</span></span>";
hide_input = false;
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = "rgb(${colors.warning})";
position = "0, -100";
halign = "center";
valign = "center";
};
};
};
}

View file

@ -4,16 +4,8 @@
shellIntegration.enableZshIntegration = true;
themeFile = "Catppuccin-Mocha";
font = {
name = "JetBrainsMono Nerd Font";
size = 13;
};
settings = {
confirm_os_window_close = 0;
background_opacity = "0.55";
window_padding_width = 10;
scrollback_lines = 10000;
enable_audio_bell = false;

View file

@ -4,34 +4,4 @@
...
}: {
qt.enable = true;
qt.platformTheme.name = "qtct";
qt.style.name = "kvantum";
home.packages = with pkgs; [
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5.qtwayland
qt6.qtwayland
];
xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" {
General.theme = "catppuccin-mocha-lavender";
};
xdg.configFile."Kvantum/catppuccin-mocha-lavender".source = "${(pkgs.catppuccin-kvantum.override {
variant = "mocha";
accent = "lavender";
})}/share/Kvantum/catppuccin-mocha-lavender";
xdg.configFile."qt5ct/qt5ct.conf".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" {
Appearance = {
style = "kvantum-dark";
icon_theme = "Papirus-Dark";
};
Fonts = {
general = "\"JetBrainsMono Nerd Font,12,-1,5,50,0,0,0,0,0,Regular\"";
fixed = "\"JetBrainsMono Nerd Font,12,-1,5,50,0,0,0,0,0,Regular\"";
};
};
xdg.configFile."qt6ct/qt6ct.conf".source = config.xdg.configFile."qt5ct/qt5ct.conf".source;
}

View file

@ -1,8 +1,4 @@
{
lib,
inputs,
...
}: {
{lib, ...}: {
programs.starship = {
enable = true;
@ -10,37 +6,33 @@
enableZshIntegration = true;
enableNushellIntegration = true;
settings =
{
# right_format = "$cmd_duration";
settings = {
# right_format = "$cmd_duration";
directory = {
format = "[ ](bold #89b4fa)[ $path ]($style)";
style = "bold #b4befe";
};
directory = {
format = "[ ](bold #89b4fa)[ $path ]($style)";
style = "bold #b4befe";
};
character = {
success_symbol = "[ ](bold #89b4fa)[ ](bold green)";
error_symbol = "[ ](bold #89b4fa)[ ](bold red)";
# error_symbol = "[ ](bold #89dceb)[ ✗](bold red)";
};
character = {
success_symbol = "[ ](bold #89b4fa)[ ](bold green)";
error_symbol = "[ ](bold #89b4fa)[ ](bold red)";
# error_symbol = "[ ](bold #89dceb)[ ✗](bold red)";
};
cmd_duration = {
format = "[]($style)[[󰔚 ](bg:#161821 fg:#d4c097 bold)$duration](bg:#161821 fg:#BBC3DF)[ ]($style)";
disabled = false;
style = "bg:none fg:#161821";
};
cmd_duration = {
format = "[]($style)[[󰔚 ](bg:#161821 fg:#d4c097 bold)$duration](bg:#161821 fg:#BBC3DF)[ ]($style)";
disabled = false;
style = "bg:none fg:#161821";
};
# directory.substitutions = {
# "~" = "󰋞";
# "Documents" = " ";
# "Downloads" = " ";
# "Music" = " ";
# "Pictures" = " ";
# };
palette = "catppuccin_mocha";
}
// builtins.fromTOML (builtins.readFile "${inputs.catppuccin-starship}/themes/mocha.toml");
# directory.substitutions = {
# "~" = "󰋞";
# "Documents" = " ";
# "Downloads" = " ";
# "Music" = " ";
# "Pictures" = " ";
# };
};
};
}

56
modules/home/stylix.nix Normal file
View file

@ -0,0 +1,56 @@
{
inputs,
config,
pkgs,
...
}: {
imports = [inputs.stylix.homeModules.stylix];
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
targets = {
librewolf.profileNames = ["pedro"];
};
fonts = {
serif = config.stylix.fonts.monospace;
sansSerif = config.stylix.fonts.monospace;
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
cursor = {
package = pkgs.catppuccin-cursors.mochaDark;
name = "Catppuccin Mocha Dark";
size = 22;
};
iconTheme = {
enable = true;
package = pkgs.catppuccin-papirus-folders.override {
flavor = "mocha";
accent = "lavender";
};
light = "Papirus-Light";
dark = "Papirus-Dark";
};
opacity = {
applications = 0.65;
desktop = 1.0;
popups = 0.8;
terminal = 0.55;
};
polarity = "dark";
};
}

View file

@ -22,10 +22,6 @@
ms-vscode.cmake-tools
# TOML
tamasfe.even-better-toml
# Color theme
catppuccin.catppuccin-vsc
catppuccin.catppuccin-vsc-icons
];
userSettings = {
@ -34,12 +30,6 @@
"window.titleBarStyle" = "custom"; # needed otherwise vscode crashes, see https://github.com/NixOS/nixpkgs/issues/246509
"window.menuBarVisibility" = "toggle";
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'SymbolsNerdFont', 'monospace', monospace";
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font', 'SymbolsNerdFont'";
"editor.fontSize" = 16;
"workbench.colorTheme" = "Catppuccin Mocha";
"workbench.iconTheme" = "catppuccin-mocha";
"catppuccin.accentColor" = "lavender";
"vsicons.dontShowNewVersionMessage" = true;
"explorer.confirmDragAndDrop" = true;
"editor.fontLigatures" = true;

View file

@ -1,17 +1,4 @@
{
custom ? {
font = "JetBrainsMono Nerd Font";
fontsize = "12";
primary_accent = "cba6f7";
secondary_accent = "89b4fa";
tertiary_accent = "f5f5f5";
background = "11111B";
opacity = ".85";
cursor = "Numix-Cursor";
},
host,
...
}: {
{host, ...}: {
programs.waybar.settings.mainBar = {
position = "top";
layer = "top";

View file

@ -1,100 +1,94 @@
{
custom ? {
font = "JetBrainsMono Nerd Font";
fontsize = "12";
primary_accent = "cba6f7";
secondary_accent = "89b4fa";
tertiary_accent = "cdd6f4";
background = "11111B";
opacity = ".98";
cursor = "Numix-Cursor";
},
lib,
config,
...
}: {
stylix.targets.waybar.addCss = false;
programs.waybar.style = ''
* {
border: none;
border-radius: 0px;
font-family: ${custom.font};
font-weight: bold;
font-size: 15px;
border-radius: 0;
min-height: 0;
opacity: ${custom.opacity};
}
window#waybar {
background: none;
}
.module {
background: @base00;
color: @base05;
margin: 5px 0px;
min-height: 0;
font-weight: bold;
}
tooltip {
background: @base02;
color: @base05;
border-radius: 4px;
}
tooltip label {
color: @base05;
}
#workspaces {
background: #${custom.palette.tertiary_background_hex};
margin: 5px 5px;
padding: 8px 12px;
border-radius: 12px 12px 24px 24px;
color: #${custom.primary_accent}
}
#workspaces button {
padding: 0px 5px;
margin: 0px 3px;
border-radius: 15px;
color: #${custom.background};
background: #${custom.secondary_accent};
color: @base00;
background-color: @base0D;
min-width: 15px;
transition: all 0.2s ease-in-out;
}
#workspaces button.visible {
background-color: @base0F;
}
#workspaces button.active {
background-color: #${custom.primary_accent};
color: #${custom.background};
border-radius: 15px;
background-color: @base0E;
min-width: 35px;
background-size: 200% 200%;
transition: all 0.2s ease-in-out;
}
#workspaces button:hover {
background-color: #b4befe;
color: #${custom.background};
border-radius: 15px;
background-color: @base07;
min-width: 35px;
background-size: 200% 200%;
}
#tray, #pulseaudio, #network, #cpu, #memory, #disk,
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.forward, #battery, #idle_inhibitor, #custom-notification {
background: #${custom.palette.tertiary_background_hex};
font-weight: bold;
margin: 5px 0px;
}
#cpu {
color: #${custom.tertiary_accent};
border-radius: 10px 0px 0px 24px;
padding-left: 15px;
padding-right: 9px;
margin-left: 7px;
}
#memory {
color: #${custom.tertiary_accent};
border-radius: 0;
padding-left: 9px;
padding-right: 9px;
}
#disk {
color: #${custom.tertiary_accent};
border-radius: 0px 24px 10px 0px;
padding-left: 9px;
padding-right: 15px;
}
#tray {
color: #${custom.tertiary_accent};
border-radius: 10px 24px 10px 24px;
padding: 0 20px;
margin-left: 7px;
}
#pulseaudio {
color: #${custom.tertiary_accent};
border-radius: 10px 0px 0px 24px;
padding-left: 15px;
padding-right: 9px;
@ -102,46 +96,39 @@
}
#battery {
color: #${custom.tertiary_accent};
border-radius: 0;
padding-left: 9px;
padding-right: 9px;
}
#idle_inhibitor {
color: #${custom.tertiary_accent};
border-radius: 0;
padding-left: 9px;
padding-right: 9px;
}
#network {
color: #${custom.tertiary_accent};
border-radius: 0;
padding-left: 9px;
padding-right: 9px;
}
#custom-notification {
color: #${custom.tertiary_accent};
border-radius: 0px 24px 10px 0px;
padding-left: 9px;
padding-right: 15px;
}
#clock {
color: #${custom.tertiary_accent};
background: #${custom.palette.tertiary_background_hex};
border-radius: 0px 0px 0px 40px;
padding: 10px 10px 15px 25px;
margin: 0px;
margin-left: 7px;
font-weight: bold;
font-size: 16px;
}
#custom-launcher {
color: #${custom.secondary_accent};
background: #${custom.palette.tertiary_background_hex};
color: @base0D;
border-radius: 0px 0px 40px 0px;
margin: 0px;
padding: 0px 30px 0px 10px;
@ -149,37 +136,26 @@
}
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.forward {
background: #${custom.palette.tertiary_background_hex};
font-size: 22px;
}
#custom-playerctl.backward:hover, #custom-playerctl.play:hover, #custom-playerctl.forward:hover{
color: #${custom.tertiary_accent};
color: @base05;
}
#custom-playerctl.backward {
color: #${custom.primary_accent};
color: @base0E;
border-radius: 24px 0px 0px 10px;
padding-left: 16px;
margin-left: 7px;
}
#custom-playerctl.play {
color: #${custom.secondary_accent};
color: @base0D;
padding: 0 5px;
}
#custom-playerctl.forward {
color: #${custom.primary_accent};
color: @base0E;
border-radius: 0px 10px 24px 0px;
padding-right: 12px;
margin-right: 7px
}
#window{
background: #${custom.palette.tertiary_background_hex};
padding-left: 15px;
padding-right: 15px;
border-radius: 16px;
margin-top: 5px;
margin-bottom: 5px;
font-weight: normal;
font-style: normal;
}
'';
}