1

Compare commits

...

20 Commits

Author SHA1 Message Date
eba8adebc2 Modules/Polkit: Replace lib.pipe with pipe operator 2025-07-20 00:42:19 +02:00
9d19e2954a Lib/Rofi: Replace lib.pipe with pipe operator 2025-07-20 00:42:07 +02:00
8356efd1a8 System: Refactor documentation and i18n attrsets 2025-07-19 22:56:01 +02:00
471264da98 Modules/Zathura: Use updated color module for theme 2025-07-19 22:55:13 +02:00
f574df52d5 Modules/Rofi: Use updated color module for theme 2025-07-19 22:49:07 +02:00
c1dac98fdd Modules/Hyprpanel: Use updated color module for theme 2025-07-19 22:48:53 +02:00
b04ba87e3d Home: Define semantic color aliases 2025-07-19 22:38:09 +02:00
a361b60a8f Modules/Hyprland: Disable rofi transparency xray 2025-07-19 22:37:46 +02:00
be4616063a Modules/Fish: Use updated color module in fish and starship themes 2025-07-19 22:37:30 +02:00
8213225893 Modules/Color: Implement transformation rules for applyColor script 2025-07-19 22:37:06 +02:00
c88c548238 Modules/Color: Add semantic color aliases 2025-07-19 21:46:06 +02:00
11ea2ef022 Modules/Color: Add a helper script to output the current colorscheme to the terminal 2025-07-19 20:20:10 +02:00
9c84b6c93d Modules/Color: Don't specify light/dark schemes, choose a single scheme where everything is based on 2025-07-19 19:23:17 +02:00
11b4c506de Modules/Color: Prepare applyColors helper script 2025-07-19 17:50:47 +02:00
758f545621 Modules/Neovim: Enable colorizer plugin (highlights color strings in code) 2025-07-19 15:47:45 +02:00
bde50a727d Modules/Kitty: Switch to dark colorscheme 2025-07-19 15:47:30 +02:00
335030840e Modules/Color: Add hex string representation (e.g. "#123456" instead of "123456") 2025-07-19 15:47:20 +02:00
336aac8adf Config/Navi: Update nixos cheats 2025-07-19 15:46:55 +02:00
a43b0b4e97 Modules/Firefox: Update bookmarks 2025-07-19 14:22:46 +02:00
4023da399d Home: Delay keepassxc autostart to make it show up in systray correctly 2025-07-19 14:22:39 +02:00
20 changed files with 670 additions and 416 deletions

View File

@ -2,23 +2,23 @@
; NIXOS
; ===========================
% nixos
% nixos-rebuild
# Rebuild a flake system derivation
sudo nixos-rebuild <type> --flake .#<flake>
$ type: echo -e "switch\nbuild\nboot"
$ flake: echo -e "nixinator\nnixtop"
% nixos
% nh
# Rebuild the system using nh
nh os <mode>
$ mode: echo -e "switch\nbuild\nboot"
% nixos
% nh
# Clean the nix store
nh clean <mode>
$ mode: echo -e "all\nuser"
% nixos
% nix
# Find out why a package is included in the closure when building the system derivation
nix why-depends /run/current-system nixpkgs#<package>
@ -32,35 +32,39 @@ $ executable: bash -c "compgen -c"
ldd $(readlink -f $(which <executable>))
$ executable: bash -c "compgen -c"
% nixos
% nix-tree
# Browse closures in the nix store sorted by size
nix-tree
% nixos
% nps
# Search in nixpkgs
nps -e "<package>"
% nixos
% nix-search-tv
# Search in nixpkgs, nur, nixos and home-manager
nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history
% nixos
% nvd
# Compare the current NixOS generation to another one
nvd diff /run/current-system ./result
% nixos
% nurl
# Generate a nix fetcher section
nurl "<url>"
% nixos
% nurl
# Generate a nix fetcher section for a specific revision
nurl "<url>" "<rev>"
% nixos
% nix-alien
# Run an unpatched binary on NixOS
nix-alien-ld -- <binary>
$ binary: eza -f -1
% nix repl
# Enter a repl with loaded NixFlake
nix repl --extra-experimental-features "flakes" /home/christoph/NixFlake
; ===========================
; SYSTEMD
; ===========================

View File

@ -52,10 +52,14 @@
};
color = {
lightScheme = "catppuccin-latte";
darkScheme = "catppuccin-mocha";
# font = "JetBrainsMono Nerd Font Mono";
scheme = "catppuccin-mocha";
font = builtins.head nixosConfig.fonts.fontconfig.defaultFonts.monospace;
bg = "base";
text = "text";
accent = "mauve";
accentHL = "pink";
accentText = "base";
};
docs.enable = !headless;
@ -140,19 +144,20 @@
"kitty"
"nextcloud --background"
"protonvpn-app"
"keepassxc"
# "kdeconnect-indicator" # started by services.kdeconnect.indicator
];
delayed = [
"keepassxc" # The tray doesn't work when started too early
];
special-silent = {
"ferdium" = ["ferdium"];
"msty" = ["msty"];
"btop" = ["kitty --title=Btop btop"];
"rmpc" = ["kitty --title=Rmpc rmpc"];
};
delayed = [];
};
windowrules = [];

View File

@ -6,7 +6,7 @@
pkgs,
...
}: let
inherit (config.modules) TEMPLATE;
inherit (config.modules) TEMPLATE color;
in {
options.modules.TEMPLATE = import ./options.nix {inherit lib mylib;};

View File

@ -0,0 +1,96 @@
import fileinput
import re
from typing import Callable
# This dict gets defined before.
# The code is templated by nix to fill the color values automatically.
# colors: dict[str, str] = {
# "rosewater": "f5e0dc",
# "flamingo": "f2cdcd",
# }
colors: dict[str, str]
def getRule(
line: str,
value: str,
) -> Callable[[str, str, str], str] | None:
"""Obtain a substitution rule for a line"""
# This contains each rule assigned to a pattern
rules: dict[str, Callable[[str, str, str], str]] = {
# "#ffffff" -> ${color.hexS.white}
f'"#{value}"': lambda line, name, value: line.replace(
f'"#{value}"', f"${{color.hexS.{name}}}"
),
# '#ffffff' -> ${color.hexS.white}
f"'#{value}'": lambda line, name, value: line.replace(
f"'#{value}'", f"${{color.hexS.{name}}}"
),
# #ffffff -> ${color.hexS.white}
f"#{value}": lambda line, name, value: line.replace(
f"#{value}", f"${{color.hexS.{name}}}"
),
# "ffffff" -> ${color.hex.white}
f'"{value}"': lambda line, name, value: line.replace(
f'"{value}"', f"${{color.hex.{name}}}"
),
# 'ffffff' -> ${color.hex.white}
f"'{value}'": lambda line, name, value: line.replace(
f"'{value}'", f"${{color.hex.{name}}}"
),
# ffffff -> ${color.hex.white}
f"{value}": lambda line, name, value: line.replace(
f"{value}", f"${{color.hex.{name}}}"
),
# "#${color.hex.white}" -> ${color.hexS.white}
'"#${color.hex."': lambda line, name, value: line.replace(
'"#${color.hex."', "${color.hexS.}"
),
# ff,ff,ff -> ${color.rgbS.white}
f"{value[0:2]},{value[2:4]},{value[4:6]}": lambda line, name, value: line.replace(
f"{value[0:2]},{value[2:4]},{value[4:6]}", f"${{color.rgbS.{name}}}"
),
}
for pattern, rule in rules.items():
# If the line matches the pattern, use this rule
if len(re.findall(pattern, line, re.IGNORECASE)) > 0:
return rule
return None
def applyColorToLine(
line: str,
name: str,
value: str,
) -> str:
"""Apply a single color to a single line"""
result: str = line
rule: Callable[[str, str, str], str] | None = getRule(result, value)
while rule is not None:
result = rule(line, name, value)
# We apply rules until no rule can be applied anymore
rule = getRule(result, value)
return result
def applyColorsToLine(
line: str,
) -> None:
"""Apply all defined colors to a single line"""
result: str = line
for name, value in colors.items():
result = applyColorToLine(result, name, value)
# Print to stdout
print(result)
# Apply transformation to every line from stdin
for line in fileinput.input():
applyColorsToLine(line.rstrip())

View File

@ -2,61 +2,106 @@
config,
lib,
mylib,
pkgs,
...
}: let
inherit (config.modules) color;
in {
options.modules.color = import ./options.nix {inherit lib mylib;};
config = let
lightDefs = import ./schemes/${color.lightScheme}.nix;
darkDefs = import ./schemes/${color.darkScheme}.nix;
config = {
home.packages = let
mkPythonColorDef = name: value: " '${name}': '${value}',";
# Assignments will be generated from those keys
colorKeys = builtins.attrNames lightDefs;
# Helper script that processes a visual mode selection and replaces
# referenced colors in-place with their counterparts in this module.
# Usage: ":'<,'>!applyColors<cr>"
applyColors =
pkgs.writers.writePython3Bin
"applyColors"
{
doCheck = false;
}
(builtins.concatStringsSep "\n" [
"colors: dict[str, str] = {"
(color.hex
|> builtins.mapAttrs mkPythonColorDef
|> builtins.attrValues
|> builtins.concatStringsSep "\n")
"}"
(builtins.readFile ./applyColors.py)
]);
mkColorAssignment = defs: key: {${key} = defs.${key};};
mkRgbColorAssignment = defs: key: {${key} = mylib.color.hexToRGB defs.${key};};
mkRgbStringColorAssignment = defs: key: {${key} = mylib.color.hexToRGBString "," defs.${key};};
in {
# This module sets its own options
# to the values specified in a colorscheme file.
modules.color = {
hex = {
light = lib.pipe colorKeys [
(builtins.map (mkColorAssignment lightDefs))
lib.mergeAttrsList
];
mkBashColorEcho = let
pastel = "${pkgs.pastel}/bin/pastel";
in
name: value: ''printf "%-12s" " ${name}:" && ${pastel} color "${value}" | ${pastel} format hex'';
dark = lib.pipe colorKeys [
(builtins.map (mkColorAssignment darkDefs))
lib.mergeAttrsList
];
};
# Helper script that prints the color scheme to the terminal
printNixColors =
pkgs.writeShellScriptBin
"printNixColors"
(builtins.concatStringsSep "\n" [
''echo " ${color.scheme}:"''
''echo ${lib.concatStrings (lib.replicate 20 "=")}''
(color.hexS
|> builtins.mapAttrs mkBashColorEcho
|> builtins.attrValues
|> builtins.concatStringsSep "\n")
''echo ${lib.concatStrings (lib.replicate 20 "=")}''
]);
in [
applyColors
printNixColors
];
rgb = {
light = lib.pipe colorKeys [
(builtins.map (mkRgbColorAssignment lightDefs))
lib.mergeAttrsList
];
# This module sets its own options to the values specified in a colorscheme file.
modules.color = let
scheme = import ./schemes/${color.scheme}.nix;
dark = lib.pipe colorKeys [
(builtins.map (mkRgbColorAssignment darkDefs))
lib.mergeAttrsList
];
};
# Add the aliases
colorDefs =
scheme
// {
bg = scheme.${color.bg};
text = scheme.${color.text};
accent = scheme.${color.accent};
accentHL = scheme.${color.accentHL};
accentText = scheme.${color.accentText};
};
rgbString = {
light = lib.pipe colorKeys [
(builtins.map (mkRgbStringColorAssignment lightDefs))
lib.mergeAttrsList
];
mkColorAssignment = key: {${key} = colorDefs.${key};};
mkStringColorAssignment = key: {${key} = "#${colorDefs.${key}}";};
mkRgbColorAssignment = key: {${key} = mylib.color.hexToRGB colorDefs.${key};};
mkRgbStringColorAssignment = key: {${key} = mylib.color.hexToRGBString "," colorDefs.${key};};
in {
# RRGGBB (0-F)
hex =
colorDefs
|> builtins.attrNames
|> builtins.map mkColorAssignment
|> lib.mergeAttrsList;
dark = lib.pipe colorKeys [
(builtins.map (mkRgbStringColorAssignment darkDefs))
lib.mergeAttrsList
];
};
# #RRGGBB (0-F)
hexS =
colorDefs
|> builtins.attrNames
|> builtins.map mkStringColorAssignment
|> lib.mergeAttrsList;
# [RR GG BB] (0-255)
rgb =
colorDefs
|> builtins.attrNames
|> builtins.map mkRgbColorAssignment
|> lib.mergeAttrsList;
# RR,GG,BB (0-255)
rgbS =
colorDefs
|> builtins.attrNames
|> builtins.map mkRgbStringColorAssignment
|> lib.mergeAttrsList;
};
};
}

View File

@ -2,25 +2,49 @@
lib,
mylib,
...
}:
with lib;
with mylib.modules; {
lightScheme = mkOption {
type = types.str;
description = "The color scheme to use for light colors";
example = "catppuccin-latte";
default = "catppuccin-latte";
};
}: let
colorKeys = [
"rosewater"
"flamingo"
"pink"
"mauve"
"red"
"maroon"
"peach"
"yellow"
"green"
"teal"
"sky"
"sapphire"
"blue"
"lavender"
darkScheme = mkOption {
type = types.str;
description = "The color scheme to use for dark colors";
"text"
"subtext1"
"subtext0"
"overlay2"
"overlay1"
"overlay0"
"surface2"
"surface1"
"surface0"
"base"
"mantle"
"crust"
];
in {
scheme = lib.mkOption {
type = lib.types.enum [
"catppuccin-latte"
"catppuccin-mocha"
];
description = "The color scheme to use";
example = "catppuccin-mocha";
default = "catppuccin-mocha";
};
font = mkOption {
type = types.str;
font = lib.mkOption {
type = lib.types.str;
description = "The font to use";
example = "JetBrainsMono Nerd Font Mono";
default = "JetBrainsMono Nerd Font Mono";
@ -28,18 +52,59 @@ with mylib.modules; {
# These options will be populated automatically.
hex = mkOption {
type = types.attrs;
hex = lib.mkOption {
type = lib.types.attrs;
description = "Colors in \"RRGGBB\" hexadecimal format";
};
rgbString = mkOption {
type = types.attrs;
hexS = lib.mkOption {
type = lib.types.attrs;
description = "Colors in \"#RRGGBB\" hexadecimal format";
};
rgb = lib.mkOption {
type = lib.types.attrs;
description = "Colors in [RR GG BB] decimal format";
};
rgbS = lib.mkOption {
type = lib.types.attrs;
description = "Colors in \"RR,GG,BB\" decimal format";
};
rgb = mkOption {
type = types.attrs;
description = "Colors in [RR GG BB] decimal format";
# Some semantic aliases for colors
bg = lib.mkOption {
type = lib.types.enum colorKeys;
description = "The color to use as background";
example = "base";
default = "base";
};
text = lib.mkOption {
type = lib.types.enum colorKeys;
description = "The text color to use";
example = "text";
default = "text";
};
accent = lib.mkOption {
type = lib.types.enum colorKeys;
description = "The accent color to use";
example = "mauve";
default = "mauve";
};
accentHL = lib.mkOption {
type = lib.types.enum colorKeys;
description = "The accented accent color to use";
example = "pink";
default = "pink";
};
accentText = lib.mkOption {
type = lib.types.enum colorKeys;
description = "The text color to use for accents";
example = "base";
default = "base";
};
}

View File

@ -15,15 +15,16 @@ in [
(mkBm "Package Search" "https://search.nixos.org/packages")
(mkBm "Option Search" "https://search.nixos.org/options?")
(mkBm "Function Search" "https://noogle.dev/")
(mkBm "HM Option Search" "https://mipmip.github.io/home-manager-option-search/")
(mkBm "NUR Package Sarch" "https://nur.nix-community.org/")
(mkBm "Nix Package Versions" "https://lazamar.co.uk/nix-versions/")
(mkBm "Nixpkgs Progress Tracker" "https://nixpk.gs/pr-tracker.html")
(mkBm "HM Search" "https://mipmip.github.io/home-manager-option-search/")
(mkBm "NUR Search" "https://nur.nix-community.org/")
(mkBm "Nixpkgs Version Search" "https://lazamar.co.uk/nix-versions/")
(mkBm "Nixpkgs PR Tracker" "https://nixpk.gs/pr-tracker.html")
"separator"
(mkBm "NixOS Wiki" "https://wiki.nixos.org/wiki/NixOS_Wiki")
(mkBm "Nix Manual" "https://nix.dev/manual/nix/stable/")
(mkBm "Nixpkgs Issues" "https://github.com/NixOS/nixpkgs/issues")
(mkBm "Nixpkgs Manual" "https://nixos.org/manual/nixpkgs/unstable/")
(mkBm "NixOS Manual" "https://nixos.org/manual/nixos/unstable/")
(mkBm "Nixpkgs Issues" "https://github.com/NixOS/nixpkgs/issues")
(mkBm "Nix Manual" "https://nix.dev/manual/nix/stable/")
];
}
(mkBm "Searchix" "https://searchix.ovh/")
@ -38,13 +39,14 @@ in [
(mkBm "LAN Smart Switch" "http://192.168.86.2/")
(mkBm "WiFi Access Point" "http://192.168.86.3/")
(mkBm "OPNsense" "https://192.168.86.5/")
(mkBm "Synology DS223j" "https://synology.think.chriphost.de/")
(mkBm "PVE Direct" "https://192.168.86.4:8006/#v1:0:18:4:::::::")
(mkBm "PVF Direct" "https://192.168.86.13:8006/#v1:0:18:4:::::::")
(mkBm "Portainer" "https://portainer.think.chriphost.de/")
"separator"
(mkBm "Local NGINX" "https://nginx.local.chriphost.de/")
(mkBm "Think NGINX" "https://nginx.think.chriphost.de/")
(mkBm "VPS NGINX" "http://vps.chriphost.de:51810/")
(mkBm "Synology DS223j" "https://synology.think.chriphost.de/")
(mkBm "Portainer" "https://portainer.think.chriphost.de/")
(mkBm "WUD ServeNix" "https://update.local.chriphost.de/")
(mkBm "WUD ThinkNix" "https://update.think.chriphost.de/")
];
@ -69,6 +71,20 @@ in [
(mkBm "Interpreters" "https://craftinginterpreters.com/contents.html")
];
}
{
name = "\"AI\"";
bookmarks = [
(mkBm "Mistral Chat" "https://chat.mistral.ai/chat")
(mkBm "DeepSeek Chat" "https://chat.deepseek.com/")
(mkBm "Claude Chat" "https://claude.ai/new")
(mkBm "ChatGPT" "https://chatgpt.com/")
"separator"
(mkBm "Mistral API" "https://console.mistral.ai/usage")
(mkBm "DeepSeek API" "https://platform.deepseek.com/usage")
(mkBm "Claude API" "https://console.anthropic.com/usage")
(mkBm "OpenRouter API" "https://openrouter.ai/activity")
];
}
(mkBm "GH" "https://github.com/churl")
(mkBm "GL" "https://gitlab.com/churl")
(mkBm "SO" "https://stackoverflow.com/users/saves/17337508/all")

View File

@ -4,48 +4,47 @@
mylib,
pkgs,
username,
nixosConfig,
...
}: let
inherit (config.modules) fish;
inherit (config.modules) fish color;
in {
options.modules.fish = import ./options.nix {inherit lib mylib;};
config = lib.mkIf fish.enable {
# https://github.com/catppuccin/fish/blob/main/themes/Catppuccin%20Mocha.theme
home.file.".config/fish/themes/catppuccin-latte.theme".text = ''
# name: 'Catppuccin Latte'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: eff1f5
fish_color_normal 4c4f69
fish_color_command 1e66f5
fish_color_param dd7878
fish_color_keyword d20f39
fish_color_quote 40a02b
fish_color_redirection ea76cb
fish_color_end fe640b
fish_color_comment 8c8fa1
fish_color_error d20f39
fish_color_gray 9ca0b0
fish_color_selection --background=ccd0da
fish_color_search_match --background=ccd0da
fish_color_option 40a02b
fish_color_operator ea76cb
fish_color_escape e64553
fish_color_autosuggestion 9ca0b0
fish_color_cancel d20f39
fish_color_cwd df8e1d
fish_color_user 179299
fish_color_host_remote 40a02b
fish_color_host 1e66f5
fish_color_status d20f39
fish_pager_color_progress 9ca0b0
fish_pager_color_prefix ea76cb
fish_pager_color_completion 4c4f69
fish_pager_color_description 9ca0b0
fish_color_normal ${color.hex.text}
fish_color_command ${color.hex.blue}
fish_color_param ${color.hex.flamingo}
fish_color_keyword ${color.hex.red}
fish_color_quote ${color.hex.green}
fish_color_redirection ${color.hex.accentHL}
fish_color_end ${color.hex.peach}
fish_color_comment ${color.hex.overlay1}
fish_color_error ${color.hex.red}
fish_color_gray ${color.hex.overlay0}
fish_color_selection --background=${color.hex.surface0}
fish_color_search_match --background=${color.hex.surface0}
fish_color_option ${color.hex.green}
fish_color_operator ${color.hex.accentHL}
fish_color_escape ${color.hex.maroon}
fish_color_autosuggestion ${color.hex.overlay0}
fish_color_cancel ${color.hex.red}
fish_color_cwd ${color.hex.yellow}
fish_color_user ${color.hex.teal}
fish_color_host ${color.hex.blue}
fish_color_host_remote ${color.hex.green}
fish_color_status ${color.hex.red}
fish_pager_color_progress ${color.hex.overlay0}
fish_pager_color_prefix ${color.hex.accentHL}
fish_pager_color_completion ${color.hex.text}
fish_pager_color_description ${color.hex.overlay0}
'';
programs.fish = {
enable = true;
generateCompletions = nixosConfig.programs.fish.generateCompletions;
functions = lib.mergeAttrsList [
(lib.optionalAttrs config.modules.nnn.enable {
@ -222,7 +221,7 @@ in {
(abbrify pkgs.ripgrep rec {
rg = "rg --trim --pretty";
grep = rg;
# grep = rg;
})
(abbrify pkgs.rsync rec {
@ -230,30 +229,48 @@ in {
copy = rsync;
})
(abbrify pkgs.sd {sed = "sd";})
# (abbrify pkgs.sd {sed = "sd";})
];
};
programs.starship = let
flavour = "latte"; # One of `latte`, `frappe`, `macchiato`, or `mocha`
in {
programs.starship = {
enable = true;
enableFishIntegration = config.modules.fish.enable;
settings =
{
# Other config here
format = "$all"; # Remove this line to disable the default prompt format
palette = "catppuccin_${flavour}";
}
// builtins.fromTOML (builtins.readFile
(pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "starship";
rev = "3e3e54410c3189053f4da7a7043261361a1ed1bc";
sha256 = "sha256-soEBVlq3ULeiZFAdQYMRFuswIIhI9bclIU8WXjxd7oY=";
}
+ /palettes/${flavour}.toml));
settings = {
# Other config here
format = "$all"; # Remove this line to disable the default prompt format
palette = "nixos-palette";
# https://github.com/catppuccin/starship/blob/main/themes/mocha.toml
palettes."nixos-palette" = {
rosewater = color.hexS.rosewater;
flamingo = color.hexS.flamingo;
pink = color.hexS.accentHL;
mauve = color.hexS.accent;
red = color.hexS.red;
maroon = color.hexS.maroon;
peach = color.hexS.peach;
yellow = color.hexS.yellow;
green = color.hexS.green;
teal = color.hexS.teal;
sky = color.hexS.sky;
sapphire = color.hexS.sapphire;
blue = color.hexS.blue;
lavender = color.hexS.lavender;
text = color.hexS.text;
subtext1 = color.hexS.subtext1;
subtext0 = color.hexS.subtext0;
overlay2 = color.hexS.overlay2;
overlay1 = color.hexS.overlay1;
overlay0 = color.hexS.overlay0;
surface2 = color.hexS.surface2;
surface1 = color.hexS.surface1;
surface0 = color.hexS.surface0;
base = color.hexS.accentText;
mantle = color.hexS.mantle;
crust = color.hexS.crust;
};
};
};
};
}

View File

@ -7,7 +7,7 @@
nixosConfig,
...
}: let
inherit (config.modules) hyprland color waybar;
inherit (config.modules) hyprland color;
always-bind = lib.mergeAttrsList [
{
@ -203,11 +203,11 @@ in {
enable = true;
settings = {
options = {
background = "${color.hex.dark.text}";
background = "${color.hex.text}";
overlay = true;
overlay_font = "${color.font}:12";
overlay_text_color = "${color.hex.dark.text}";
overlay_background_color = "${color.hex.dark.base}";
overlay_text_color = "${color.hex.text}";
overlay_background_color = "${color.hex.base}";
};
};
};
@ -242,12 +242,12 @@ in {
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(${color.hex.dark.base})";
font_color = "rgb(${color.hex.base})";
font_family = "${color.font}";
inner_color = "rgb(${color.hex.dark.lavender})";
outer_color = "rgb(${color.hex.dark.base})";
inner_color = "rgb(${color.hex.lavender})";
outer_color = "rgb(${color.hex.base})";
outline_thickness = 2;
placeholder_text = "<span foreground='\#\#${color.hex.dark.base}'>Password...</span>";
placeholder_text = "<span foreground='\#\#${color.hex.base}'>Password...</span>";
shadow_passes = 0;
rounding = 5;
halign = "center";
@ -261,7 +261,7 @@ in {
position = "0, 300";
monitor = "";
text = ''cmd[update:1000] date -I'';
color = "rgba(${color.hex.dark.text}AA)";
color = "rgba(${color.hex.text}AA)";
font_size = 22;
font_family = "${color.font}";
halign = "center";
@ -273,7 +273,7 @@ in {
position = "0, 200";
monitor = "";
text = ''cmd[update:1000] date +"%-H:%M"'';
color = "rgba(${color.hex.dark.text}AA)";
color = "rgba(${color.hex.text}AA)";
font_size = 95;
font_family = "${color.font} Extrabold";
halign = "center";
@ -339,26 +339,26 @@ in {
settings = {
global = {
monitor = waybar.monitor;
monitor = config.modules.waybar.monitor;
font = "${color.font} 11";
offset = "10x10";
background = "#${color.hex.light.base}";
foreground = "#${color.hex.light.text}";
background = "#${color.hex.base}";
foreground = "#${color.hex.text}";
frame_width = 2;
corner_radius = 5;
separator_color = "frame";
};
urgency_low = {
frame_color = "#${color.hex.light.green}";
frame_color = "#${color.hex.green}";
};
urgency_normal = {
frame_color = "#${color.hex.light.green}";
frame_color = "#${color.hex.green}";
};
urgency_critical = {
frame_color = "#${color.hex.light.red}";
frame_color = "#${color.hex.red}";
};
};
};
@ -386,8 +386,8 @@ in {
gaps_out = 10;
border_size = 2;
"col.active_border" = "rgb(${color.hex.dark.lavender})";
"col.inactive_border" = "rgba(${color.hex.dark.base}AA)";
"col.active_border" = "rgb(${color.hex.lavender})";
"col.inactive_border" = "rgba(${color.hex.base}AA)";
};
group = {
@ -397,12 +397,12 @@ in {
font_size = 10;
gradients = false;
"col.active" = "rgb(${color.hex.dark.lavender})";
"col.inactive" = "rgba(${color.hex.dark.base}AA)";
"col.active" = "rgb(${color.hex.lavender})";
"col.inactive" = "rgba(${color.hex.base}AA)";
};
"col.border_active" = "rgb(${color.hex.dark.lavender})";
"col.border_inactive" = "rgba(${color.hex.dark.base}AA)";
"col.border_active" = "rgb(${color.hex.lavender})";
"col.border_inactive" = "rgba(${color.hex.base}AA)";
};
input = {
@ -538,7 +538,8 @@ in {
# we have to blur them explicitly
layerrule = [
"blur,rofi"
"ignorealpha 0.001,rofi"
"ignorealpha 0.001,rofi" # Fix pixelated corners
"xray 0,rofi" # Render on top of other windows
"dimaround,rofi"
"blur,waybar"

View File

@ -32,12 +32,12 @@ in {
"bar.layouts" = {
"HDMI-A-1" = {
"left" = ["workspaces" "windowtitle"];
"middle" = ["media" "cava"];
"middle" = ["media"]; # "cava"
"right" = ["volume" "network" "bluetooth" "cpu" "ram" "storage" "clock" "systray" "notifications"];
};
"DP-1" = {
"left" = ["workspaces" "windowtitle"];
"middle" = ["media" "cava"];
"middle" = ["media"]; # "cava"
"right" = ["volume" "clock" "notifications"];
};
};
@ -71,8 +71,8 @@ in {
};
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/index.ts
"theme.bar.background" = "#${color.hex.light.base}";
"theme.bar.border.color" = "#${color.hex.dark.lavender}";
"theme.bar.background" = "#${color.hex.bg}";
"theme.bar.border.color" = "#${color.hex.accent}";
"theme.bar.border.location" = "full";
"theme.bar.border_radius" = "6px";
"theme.bar.border.width" = "2px";
@ -82,7 +82,7 @@ in {
"theme.bar.margin_bottom" = "0px";
"theme.bar.margin_sides" = "10px";
"theme.bar.margin_top" = "10px";
"theme.bar.opacity" = 30;
"theme.bar.opacity" = 60;
"theme.bar.outer_spacing" = "0px"; # NOTE: Left/Right bar padding
"theme.bar.transparent" = false;
@ -93,7 +93,7 @@ in {
"theme.bar.buttons.radius" = "6px";
"theme.bar.buttons.spacing" = "2px"; # NOTE: Horizontal inter-button spacing
"theme.bar.buttons.style" = "default";
"theme.bar.buttons.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.text" = "#${color.hex.accentText}";
"theme.bar.buttons.y_margins" = "2px"; # NOTE: Top/Bottom bar padding
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/general/index.ts
@ -123,19 +123,19 @@ in {
"bar.workspaces.workspaces" = 9;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/workspaces.ts
"theme.bar.buttons.workspaces.active" = "#${color.hex.dark.pink}";
"theme.bar.buttons.workspaces.available" = "#${color.hex.dark.base}";
"theme.bar.buttons.workspaces.background" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.workspaces.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.workspaces.active" = "#${color.hex.accentHL}";
"theme.bar.buttons.workspaces.available" = "#${color.hex.accentText}";
"theme.bar.buttons.workspaces.background" = "#${color.hex.accent}";
"theme.bar.buttons.workspaces.border" = "#${color.hex.accent}";
"theme.bar.buttons.workspaces.enableBorder" = false;
"theme.bar.buttons.workspaces.fontSize" = "18px";
"theme.bar.buttons.workspaces.hover" = "#${color.hex.dark.pink}";
"theme.bar.buttons.workspaces.hover" = "#${color.hex.accentHL}";
"theme.bar.buttons.workspaces.numbered_active_highlight_border" = "4px"; # border radius
"theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = "#${color.hex.dark.base}";
"theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = "#${color.hex.accentText}";
"theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "6px";
"theme.bar.buttons.workspaces.numbered_active_underline_color" = "#${color.hex.dark.pink}";
"theme.bar.buttons.workspaces.numbered_active_underline_color" = "#${color.hex.accentHL}";
"theme.bar.buttons.workspaces.numbered_inactive_padding" = "6px"; # make the same as numbered_active_highlight_padding to avoid layout jumping
"theme.bar.buttons.workspaces.occupied" = "#${color.hex.dark.base}";
"theme.bar.buttons.workspaces.occupied" = "#${color.hex.accentText}";
"theme.bar.buttons.workspaces.smartHighlight" = "false";
"theme.bar.buttons.workspaces.spacing" = "6px"; # no visible difference?
@ -156,13 +156,13 @@ in {
"bar.windowtitle.truncation_size" = 50;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/windowtitle.ts
"theme.bar.buttons.windowtitle.background" = "#${color.hex.dark.pink}";
"theme.bar.buttons.windowtitle.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.windowtitle.background" = "#${color.hex.pink}";
"theme.bar.buttons.windowtitle.border" = "#${color.hex.accent}";
"theme.bar.buttons.windowtitle.enableBorder" = false;
"theme.bar.buttons.windowtitle.icon_background" = "#${color.hex.dark.pink}";
"theme.bar.buttons.windowtitle.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.windowtitle.icon_background" = "#${color.hex.pink}";
"theme.bar.buttons.windowtitle.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.windowtitle.spacing" = "6px"; # Spacing between icon and text
"theme.bar.buttons.windowtitle.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.windowtitle.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/media/index.ts
"bar.media.format" = "{artist: - }{title}";
@ -172,13 +172,13 @@ in {
"bar.media.truncation_size" = 30;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/media.ts
"theme.bar.buttons.media.background" = "#${color.hex.dark.mauve}";
"theme.bar.buttons.media.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.media.background" = "#${color.hex.lavender}";
"theme.bar.buttons.media.border" = "#${color.hex.accent}";
"theme.bar.buttons.media.enableBorder" = false;
"theme.bar.buttons.media.icon_background" = "#${color.hex.dark.base}";
"theme.bar.buttons.media.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.media.icon_background" = "#${color.hex.lavender}";
"theme.bar.buttons.media.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.media.spacing" = "6px";
"theme.bar.buttons.media.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.media.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/cava/index.ts
"bar.customModules.cava.showActiveOnly" = true;
@ -186,73 +186,73 @@ in {
# "bar.customModules.cava.leftClick" = "menu:media";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/cava.ts
"theme.bar.buttons.modules.cava.background" = "#${color.hex.dark.red}";
"theme.bar.buttons.modules.cava.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.modules.cava.background" = "#${color.hex.red}";
"theme.bar.buttons.modules.cava.border" = "#${color.hex.accent}";
"theme.bar.buttons.modules.cava.enableBorder" = false;
"theme.bar.buttons.modules.cava.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.cava.icon_background" = "#${color.hex.dark.red}";
"theme.bar.buttons.modules.cava.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.modules.cava.icon_background" = "#${color.hex.red}";
"theme.bar.buttons.modules.cava.spacing" = "6px";
"theme.bar.buttons.modules.cava.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.cava.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/volume/index.ts
"bar.volume.middleClick" = "kitty ncpamixer";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/volume.ts
"theme.bar.buttons.volume.background" = "#${color.hex.dark.maroon}";
"theme.bar.buttons.volume.background" = "#${color.hex.maroon}";
"theme.bar.buttons.volume.enableBorder" = false;
"theme.bar.buttons.volume.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.volume.icon_background" = "#${color.hex.dark.maroon}";
"theme.bar.buttons.volume.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.volume.border" = "#${color.hex.accent}";
"theme.bar.buttons.volume.icon_background" = "#${color.hex.maroon}";
"theme.bar.buttons.volume.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.volume.spacing" = "6px";
"theme.bar.buttons.volume.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.volume.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/network/index.ts
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/network.ts
"theme.bar.buttons.network.background" = "#${color.hex.dark.peach}";
"theme.bar.buttons.network.background" = "#${color.hex.peach}";
"theme.bar.buttons.network.enableBorder" = false;
"theme.bar.buttons.network.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.network.icon_background" = "#${color.hex.dark.peach}";
"theme.bar.buttons.network.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.network.border" = "#${color.hex.accent}";
"theme.bar.buttons.network.icon_background" = "#${color.hex.peach}";
"theme.bar.buttons.network.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.network.spacing" = "6px";
"theme.bar.buttons.network.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.network.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/bluetooth/index.ts
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/bluetooth.ts
"theme.bar.buttons.bluetooth.background" = "#${color.hex.dark.yellow}";
"theme.bar.buttons.bluetooth.background" = "#${color.hex.yellow}";
"theme.bar.buttons.bluetooth.enableBorder" = false;
"theme.bar.buttons.bluetooth.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.bluetooth.icon_background" = "#${color.hex.dark.yellow}";
"theme.bar.buttons.bluetooth.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.bluetooth.border" = "#${color.hex.accent}";
"theme.bar.buttons.bluetooth.icon_background" = "#${color.hex.yellow}";
"theme.bar.buttons.bluetooth.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.bluetooth.spacing" = "6px";
"theme.bar.buttons.bluetooth.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.bluetooth.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/cpu/index.ts
"bar.customModules.cpu.middleClick" = "kitty btop";
"bar.customModules.cpu.pollingInterval" = 1000;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/cpu.ts
"theme.bar.buttons.modules.cpu.background" = "#${color.hex.dark.green}";
"theme.bar.buttons.modules.cpu.background" = "#${color.hex.green}";
"theme.bar.buttons.modules.cpu.enableBorder" = false;
"theme.bar.buttons.modules.cpu.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.modules.cpu.icon_background" = "#${color.hex.dark.green}";
"theme.bar.buttons.modules.cpu.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.cpu.border" = "#${color.hex.accent}";
"theme.bar.buttons.modules.cpu.icon_background" = "#${color.hex.green}";
"theme.bar.buttons.modules.cpu.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.modules.cpu.spacing" = "6px";
"theme.bar.buttons.modules.cpu.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.cpu.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/ram/index.ts
"bar.customModules.ram.labelType" = "percentage"; # "used/total", "percentage"
"bar.customModules.ram.pollingInterval" = 1000;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/ram.ts
"theme.bar.buttons.modules.ram.background" = "#${color.hex.dark.teal}";
"theme.bar.buttons.modules.ram.background" = "#${color.hex.teal}";
"theme.bar.buttons.modules.ram.enableBorder" = false;
"theme.bar.buttons.modules.ram.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.modules.ram.icon_background" = "#${color.hex.dark.teal}";
"theme.bar.buttons.modules.ram.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.ram.border" = "#${color.hex.accent}";
"theme.bar.buttons.modules.ram.icon_background" = "#${color.hex.teal}";
"theme.bar.buttons.modules.ram.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.modules.ram.spacing" = "6px";
"theme.bar.buttons.modules.ram.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.ram.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/storage/index.ts
"bar.customModules.storage.labelType" = "percentage"; # "used/total", "percentage"
@ -260,34 +260,34 @@ in {
"bar.customModules.storage.pollingInterval" = 60000;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/storage.ts
"theme.bar.buttons.modules.storage.background" = "#${color.hex.dark.sky}";
"theme.bar.buttons.modules.storage.background" = "#${color.hex.sky}";
"theme.bar.buttons.modules.storage.enableBorder" = false;
"theme.bar.buttons.modules.storage.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.modules.storage.icon_background" = "#${color.hex.dark.sky}";
"theme.bar.buttons.modules.storage.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.storage.border" = "#${color.hex.accent}";
"theme.bar.buttons.modules.storage.icon_background" = "#${color.hex.sky}";
"theme.bar.buttons.modules.storage.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.modules.storage.spacing" = "6px";
"theme.bar.buttons.modules.storage.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.storage.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/clock/index.ts
"bar.clock.format" = "%Y-%m-%d %H:%M";
"bar.clock.showTime" = true;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/clock.ts
"theme.bar.buttons.clock.background" = "#${color.hex.dark.sapphire}";
"theme.bar.buttons.clock.background" = "#${color.hex.sapphire}";
"theme.bar.buttons.clock.enableBorder" = false;
"theme.bar.buttons.clock.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.clock.icon_background" = "#${color.hex.dark.sapphire}";
"theme.bar.buttons.clock.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.clock.border" = "#${color.hex.accent}";
"theme.bar.buttons.clock.icon_background" = "#${color.hex.sapphire}";
"theme.bar.buttons.clock.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.clock.spacing" = "6px";
"theme.bar.buttons.clock.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.clock.text" = "#${color.hex.accentText}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/systray/index.ts
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/systray.ts
"theme.bar.buttons.systray.background" = "#${color.hex.dark.blue}";
"theme.bar.buttons.systray.background" = "#${color.hex.blue}";
"theme.bar.buttons.systray.enableBorder" = false;
"theme.bar.buttons.systray.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.systray.customIcon" = "#${color.hex.dark.base}";
"theme.bar.buttons.systray.border" = "#${color.hex.accent}";
"theme.bar.buttons.systray.customIcon" = "#${color.hex.accentText}";
"theme.bar.buttons.systray.spacing" = "6px";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/notifications/index.ts
@ -295,20 +295,20 @@ in {
"bar.notifications.show_total" = true;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/notifications.ts
"theme.bar.buttons.notifications.background" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.notifications.background" = "#${color.hex.accent}";
"theme.bar.buttons.notifications.enableBorder" = false;
"theme.bar.buttons.notifications.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.notifications.icon_background" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.notifications.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.notifications.border" = "#${color.hex.accent}";
"theme.bar.buttons.notifications.icon_background" = "#${color.hex.accent}";
"theme.bar.buttons.notifications.icon" = "#${color.hex.accentText}";
"theme.bar.buttons.notifications.spacing" = "6px";
"theme.bar.buttons.notifications.total" = "#${color.hex.dark.base}";
"theme.bar.buttons.notifications.total" = "#${color.hex.accentText}";
#
# TODO: Menus Config
#
"theme.bar.menus.background" = "#${color.hex.light.base}";
"theme.bar.menus.border.color" = "#${color.hex.dark.lavender}";
"theme.bar.menus.background" = "#${color.hex.bg}";
"theme.bar.menus.border.color" = "#${color.hex.accent}";
"theme.bar.menus.border.radius" = "6px";
"theme.bar.menus.border.size" = "2px";
"theme.bar.menus.buttons.radius" = "0.4em";

View File

@ -15,7 +15,7 @@ in {
shellIntegration.enableFishIntegration = true;
font = {
name = "${color.font}";
name = "${config.modules.color.font}";
size = 12;
};
@ -27,20 +27,17 @@ in {
"kitty_mod+l" = "next_layout";
};
settings = let
light = color.hex.light;
dark = color.hex.dark;
in {
settings = {
editor = config.home.sessionVariables.EDITOR;
scrollback_lines = 10000;
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
# hide_window_decorations = "yes";
enabled_layouts = "grid,vertical,horizontal";
allow_remote_control = "yes"; # For nnn file preview
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
listen_on = "unix:@mykitty";
tab_bar_min_tabs = 1;
tab_bar_min_tabs = 2; # Don't show a single tab
tab_bar_edge = "bottom";
tab_bar_style = "powerline";
tab_powerline_style = "round";
@ -51,74 +48,74 @@ in {
#
# The basic colors
background = "#${light.base}";
foreground = "#${light.text}";
selection_foreground = "#${light.base}";
selection_background = "#${light.rosewater}";
background = color.hexS.base;
foreground = color.hexS.text;
selection_foreground = color.hexS.base;
selection_background = color.hexS.rosewater;
# Cursor colors
cursor = "#${light.rosewater}";
cursor_text_color = "#${light.base}";
cursor = color.hexS.rosewater;
cursor_text_color = color.hexS.base;
# URL underline color when hovering with mouse
url_color = "#${light.rosewater}";
url_color = color.hexS.rosewater;
# Kitty window border colors
active_border_color = "#${light.lavender}";
inactive_border_color = "#${light.overlay0}";
bell_border_color = "#${light.yellow}";
active_border_color = color.hexS.lavender;
inactive_border_color = color.hexS.overlay0;
bell_border_color = color.hexS.yellow;
# OS Window titlebar colors
wayland_titlebar_color = "system";
macos_titlebar_color = "system";
# Tab bar colors
active_tab_foreground = "#${dark.base}";
active_tab_background = "#${dark.lavender}";
inactive_tab_foreground = "#${dark.text}";
inactive_tab_background = "#${dark.crust}";
tab_bar_background = "#${light.base}";
active_tab_foreground = color.hexS.base;
active_tab_background = color.hexS.lavender;
inactive_tab_foreground = color.hexS.text;
inactive_tab_background = color.hexS.crust;
tab_bar_background = color.hexS.base;
# Color for marks (marked text in the terminal)
mark1_foreground = "#${light.base}";
mark1_background = "#${light.lavender}";
mark2_foreground = "#${light.base}";
mark2_background = "#${light.mauve}";
mark3_foreground = "#${light.base}";
mark3_background = "#${light.sapphire}";
mark1_foreground = color.hexS.base;
mark1_background = color.hexS.lavender;
mark2_foreground = color.hexS.base;
mark2_background = color.hexS.mauve;
mark3_foreground = color.hexS.base;
mark3_background = color.hexS.sapphire;
# The 16 terminal colors
# black
color0 = "#${light.subtext1}";
color8 = "#${light.subtext0}";
color0 = color.hexS.subtext1;
color8 = color.hexS.subtext0;
# red
color1 = "#${light.red}";
color9 = "#${light.red}";
color1 = color.hexS.red;
color9 = color.hexS.red;
# green
color2 = "#${light.green}";
color10 = "#${light.green}";
color2 = color.hexS.green;
color10 = color.hexS.green;
# yellow
color3 = "#${light.yellow}";
color11 = "#${light.yellow}";
color3 = color.hexS.yellow;
color11 = color.hexS.yellow;
# blue
color4 = "#${light.blue}";
color12 = "#${light.blue}";
color4 = color.hexS.blue;
color12 = color.hexS.blue;
# magenta
color5 = "#${light.pink}";
color13 = "#${light.pink}";
color5 = color.hexS.pink;
color13 = color.hexS.pink;
# cyan
color6 = "#${light.teal}";
color14 = "#${light.teal}";
color6 = color.hexS.teal;
color14 = color.hexS.teal;
# white
color7 = "#${light.surface2}";
color15 = "#${light.surface1}";
color7 = color.hexS.surface2;
color15 = color.hexS.surface1;
};
};
};

View File

@ -429,18 +429,28 @@ in {
};
};
# colorizer = rec {
# name = "colorizer";
# pkg = pkgs.vimPlugins.nvim-colorizer-lua;
# lazy = true;
# event = ["BufReadPost" "BufNewFile"];
# config = (mkDefaultConfig name);
# opts = {
# filtetypes = null;
# user_default_options = null;
# buftypes = null;
# };
# };
colorizer = rec {
name = "colorizer";
pkg = pkgs.vimPlugins.nvim-colorizer-lua;
lazy = true;
event = ["BufReadPost" "BufNewFile"];
config = mkDefaultConfig name;
# https://github.com/catgoose/nvim-colorizer.lua
opts = {
filtetypes = ["*"];
user_default_options = {
names = false;
RGB = true; # #RGB hex codes
RGBA = true; # #RGBA hex codes
RRGGBB = true; # #RRGGBB hex codes
RRGGBBAA = true; # #RRGGBBAA hex codes
AARRGGBB = false; # 0xAARRGGBB hex codes
rgb_fn = true; # CSS rgb() and rgba() functions
hsl_fn = true; # CSS hsl() and hsla() functions
};
};
};
_ts-context-commentstring = rec {
name = "ts_context_commentstring";
@ -1016,40 +1026,40 @@ in {
bubbles = ''
{
normal = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.lavender}", gui = "bold" },
b = { fg = "#${color.hex.dark.text}", bg = "#${color.hex.dark.crust}" },
c = { fg = "#${color.hex.dark.text}", bg = "NONE" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.lavender}", gui = "bold" },
b = { fg = "#${color.hex.text}", bg = "#${color.hex.crust}" },
c = { fg = "#${color.hex.text}", bg = "NONE" },
},
insert = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.green}", gui = "bold" },
b = { fg = "#${color.hex.dark.green}", bg = "#${color.hex.dark.crust}" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.green}", gui = "bold" },
b = { fg = "#${color.hex.green}", bg = "#${color.hex.crust}" },
},
visual = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.mauve}", gui = "bold" },
b = { fg = "#${color.hex.dark.mauve}", bg = "#${color.hex.dark.crust}" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.mauve}", gui = "bold" },
b = { fg = "#${color.hex.mauve}", bg = "#${color.hex.crust}" },
},
replace = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.red}", gui = "bold" },
b = { fg = "#${color.hex.dark.red}", bg = "#${color.hex.dark.crust}" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.red}", gui = "bold" },
b = { fg = "#${color.hex.red}", bg = "#${color.hex.crust}" },
},
-- terminal = {
-- a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.green}", gui = "bold" },
-- b = { fg = "#${color.hex.dark.green}", bg = "#${color.hex.dark.crust}" },
-- a = { fg = "#${color.hex.base}", bg = "#${color.hex.green}", gui = "bold" },
-- b = { fg = "#${color.hex.green}", bg = "#${color.hex.crust}" },
-- },
command = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.peach}", gui = "bold" },
b = { fg = "#${color.hex.dark.peach}", bg = "#${color.hex.dark.crust}" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.peach}", gui = "bold" },
b = { fg = "#${color.hex.peach}", bg = "#${color.hex.crust}" },
},
inactive = {
a = { fg = "#${color.hex.dark.text}", bg = "#${color.hex.dark.base}" },
b = { fg = "#${color.hex.dark.text}", bg = "#${color.hex.dark.base}" },
c = { fg = "#${color.hex.dark.text}", bg = "NONE" },
a = { fg = "#${color.hex.text}", bg = "#${color.hex.base}" },
b = { fg = "#${color.hex.text}", bg = "#${color.hex.base}" },
c = { fg = "#${color.hex.text}", bg = "NONE" },
},
}
'';
@ -1588,17 +1598,17 @@ in {
opts = {
line.__raw = ''
function(line)
local base = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.base}" }
local crust = { fg = "#${color.hex.dark.crust}", bg = "#${color.hex.dark.crust}" }
local text = { fg = "#${color.hex.dark.text}", bg = "#${color.hex.dark.crust}" }
local lavender = { fg = "#${color.hex.dark.lavender}", bg = "#${color.hex.dark.lavender}" }
local base = { fg = "#${color.hex.base}", bg = "#${color.hex.base}" }
local crust = { fg = "#${color.hex.crust}", bg = "#${color.hex.crust}" }
local text = { fg = "#${color.hex.text}", bg = "#${color.hex.crust}" }
local lavender = { fg = "#${color.hex.lavender}", bg = "#${color.hex.lavender}" }
local numtabs = vim.call("tabpagenr", "$")
return {
-- Head
{
{ " NEOVIM ", hl = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.lavender}", style = "bold" } },
{ " NEOVIM ", hl = { fg = "#${color.hex.base}", bg = "#${color.hex.lavender}", style = "bold" } },
-- The separator gets a foreground and background fill (each have fg + bg).
-- line.sep("", lavender, lavender),
@ -1607,7 +1617,7 @@ in {
-- Tabs
line.tabs().foreach(function(tab)
-- Switch out the start separator instead of the ending one because the last separator is different
local hl = tab.is_current() and { fg = "#${color.hex.dark.lavender}", bg = "#${color.hex.dark.crust}", style = "bold" } or text
local hl = tab.is_current() and { fg = "#${color.hex.lavender}", bg = "#${color.hex.crust}", style = "bold" } or text
local sep_start = tab.number() == 1 and "" or ""
local sep_end = tab.number() == numtabs and "" or ""
@ -2023,9 +2033,7 @@ in {
catppuccin # Colortheme (also add this here to access palettes)
clangd-extensions # Improved clang LSP support
blink-cmp # Fast as fuck auto completion
# colorizer # Colorize color strings # TODO: Only colorize html/css/scss/sass/js
colorizer # Colorize color strings
comment # Toggle line- or block-comments
conform # Auto formatting on save

View File

@ -809,7 +809,7 @@ _: let
# }
{
mode = "n";
key = "<leader>cC";
key = "<leader>cc";
action = "<cmd>Neogen<cr>";
options.desc = "Generate Doc Comment";
}

View File

@ -277,14 +277,11 @@ in {
'';
".config/rmpc/themes/${themeName}.ron".text = let
light = color.hex.light;
dark = color.hex.dark;
bg = light.base;
text = light.text;
accent = dark.mauve;
accentHL = dark.red;
surface = dark.base;
bg = color.hex.base;
text = color.hex.text;
accent = color.hex.mauve;
accentHL = color.hex.red;
surface = color.hex.base;
in ''
#![enable(implicit_some)]
#![enable(unwrap_newtypes)]
@ -331,10 +328,10 @@ in {
// The stuff shown in the status bar (on the progress bar)
level_styles: (
info: (fg: "#${accent}", bg: "#${surface}"),
warn: (fg: "#${dark.yellow}", bg: "#${surface}"),
error: (fg: "#${dark.red}", bg: "#${surface}"),
debug: (fg: "#${dark.green}", bg: "#${surface}"),
trace: (fg: "#${dark.mauve}", bg: "#${surface}"),
warn: (fg: "#${color.hex.yellow}", bg: "#${surface}"),
error: (fg: "#${color.hex.red}", bg: "#${surface}"),
debug: (fg: "#${color.hex.green}", bg: "#${surface}"),
trace: (fg: "#${color.hex.mauve}", bg: "#${surface}"),
),
progress_bar: (

View File

@ -35,46 +35,42 @@ in {
sidebar-mode = false;
};
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#basic-layout-structure
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets
theme = let
inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
bg = mkLiteral "rgba(${color.rgbString.light.base}, 0.3)";
hl = mkLiteral "#${color.hex.dark.lavender}";
hl-pink = mkLiteral "#${color.hex.dark.pink}";
text = mkLiteral "#${color.hex.dark.base}";
trans = mkLiteral "rgba(0, 0, 0, 0)";
};
trans = "rgba(0, 0, 0, 0)";
in {
"element-text,element-icon,mode-switcher" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"window" = {
height = 480;
width = 700;
height = "50%";
width = "50%";
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 6;
border-color = mkLiteral "@hl";
background-color = mkLiteral "@bg";
border-color = mkLiteral color.hexS.accent;
background-color = mkLiteral "rgba(${color.rgbS.bg}, 0.2)";
};
"mainbox" = {
background-color = mkLiteral "@trans";
background-color = mkLiteral trans;
};
"message" = {
background-color = mkLiteral "@trans";
background-color = mkLiteral trans;
};
"error-message" = {
background-color = mkLiteral "@trans";
background-color = mkLiteral trans;
margin = mkLiteral "0px 0px 20px 0px";
};
"textbox" = {
background-color = mkLiteral "@trans";
background-color = mkLiteral trans;
padding = 6;
margin = mkLiteral "20px 20px 0px 20px";
border-radius = 3;
@ -82,13 +78,13 @@ in {
"inputbar" = {
children = builtins.map mkLiteral ["prompt" "entry"];
background-color = mkLiteral "@trans";
background-color = mkLiteral trans;
};
"prompt" = {
background-color = mkLiteral "@hl-pink";
background-color = mkLiteral color.hexS.accentHL;
padding = 6;
text-color = mkLiteral "@text";
text-color = mkLiteral color.hexS.accentText;
border-radius = 3;
margin = mkLiteral "20px 0px 0px 20px";
};
@ -96,11 +92,11 @@ in {
"entry" = {
padding = 6;
margin = mkLiteral "20px 20px 0px 10px";
text-color = mkLiteral "@text";
background-color = mkLiteral "@trans";
text-color = mkLiteral color.hexS.text;
background-color = mkLiteral trans;
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 3;
border-color = mkLiteral "@hl-pink";
border-color = mkLiteral color.hexS.accentHL;
};
"listview" = {
@ -108,17 +104,17 @@ in {
padding = 0;
margin = mkLiteral "10px 20px 20px 20px";
columns = 1;
background-color = mkLiteral "@trans";
background-color = mkLiteral trans;
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 3;
border-color = mkLiteral "@hl-pink";
border-color = mkLiteral color.hexS.accentHL;
};
"element" = {
padding = 5;
margin = 0;
background-color = mkLiteral "@trans";
text-color = mkLiteral "@text";
background-color = mkLiteral trans;
text-color = mkLiteral color.hexS.text;
# border-radius = 3;
};
@ -127,8 +123,8 @@ in {
};
"element selected" = {
background-color = mkLiteral "@hl-pink";
text-color = mkLiteral "@text";
background-color = mkLiteral color.hexS.accentHL;
text-color = mkLiteral color.hexS.accentText;
};
};
};
@ -138,12 +134,12 @@ in {
mylib.rofi.mkSimpleMenu
"power"
{
"Poweroff" = "poweroff";
"Reboot" = "reboot";
"Lock" = "loginctl lock-session";
"Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
"Reload Hyprland" = "hyprctl reload";
"Exit Hyprland" = "hyprctl dispatch exit";
"󰤂 Poweroff" = "poweroff";
"󰜉 Reboot" = "reboot";
"󰌾 Lock" = "loginctl lock-session";
" Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
" Reload Hyprland" = "hyprctl reload";
" Exit Hyprland" = "hyprctl dispatch exit";
};
vpn-menu = pkgs.writeScript "rofi-menu-vpn" (builtins.readFile ./menus/vpn.fish);

View File

@ -25,32 +25,32 @@ in {
window-title-home-tilde = statusbar-home-tilde;
# Colorscheme
default-bg = "#${color.hex.light.base}";
default-fg = "#${color.hex.light.text}";
default-bg = "#${color.hex.bg}";
default-fg = "#${color.hex.text}";
highlight-color = "rgba(${color.rgbString.dark.lavender}, 0.5)";
highlight-fg = "rgba(${color.rgbString.dark.green}, 0.5)";
highlight-active-color = "rgba(${color.rgbString.dark.pink}, 0.5)";
highlight-color = "rgba(${color.rgbS.accent}, 0.5)";
highlight-fg = "rgba(${color.rgbS.accentText}, 0.5)";
highlight-active-color = "rgba(${color.rgbS.accentHL}, 0.5)";
statusbar-bg = "#${color.hex.dark.lavender}";
statusbar-fg = default-fg;
statusbar-bg = "#${color.hex.accent}";
statusbar-fg = "#${color.hex.accentText}";
inputbar-bg = statusbar-bg;
inputbar-fg = statusbar-fg;
completion-bg = "#${color.hex.light.surface0}";
completion-bg = "#${color.hex.bg}";
completion-fg = default-fg;
completion-highlight-bg = statusbar-bg;
completion-highlight-fg = completion-fg;
completion-highlight-fg = statusbar-fg;
completion-group-bg = completion-bg;
completion-group-fg = completion-fg;
notification-bg = completion-bg;
notification-fg = default-fg;
notification-warning-bg = notification-bg;
notification-warning-fg = "#${color.hex.light.peach}";
notification-warning-fg = "#${color.hex.peach}";
notification-error-bg = notification-bg;
notification-error-fg = "#${color.hex.light.red}";
notification-error-fg = "#${color.hex.red}";
recolor-lightcolor = default-bg;
recolor-darkcolor = default-fg;

View File

@ -16,11 +16,10 @@
mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
cases = attrs:
lib.pipe attrs [
(builtins.mapAttrs mkCase)
builtins.attrValues
(builtins.concatStringsSep "\n")
];
attrs
|> builtins.mapAttrs mkCase
|> builtins.attrValues
|> builtins.concatStringsSep "\n";
in
prompt: attrs:
pkgs.writeScript "rofi-menu-${prompt}" ''

View File

@ -175,13 +175,14 @@ with mylib.networking; {
documentation = {
enable = true;
man.enable = true;
# NOTE: Disable this while configuring stuff, it's slow
man.enable = config.documentation.enable;
man.generateCaches = true; # Slow but needed for neovim man picker
info.enable = true;
dev.enable = true;
doc.enable = false;
info.enable = config.documentation.enable;
dev.enable = config.documentation.enable;
doc.enable = config.documentation.enable;
nixos = {
enable = true;
enable = config.documentation.enable;
includeAllModules = true;
};
};
@ -193,19 +194,22 @@ with mylib.networking; {
};
# Select internationalisation properties.
i18n = {
defaultLocale = "en_US.UTF-8";
i18n = let
en = "en_US.UTF-8";
de = "de_DE.UTF-8";
in {
defaultLocale = en;
extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
LC_ADDRESS = de;
LC_IDENTIFICATION = de;
LC_MEASUREMENT = de;
LC_MONETARY = de;
LC_NAME = de;
LC_NUMERIC = de;
LC_PAPER = de;
LC_TELEPHONE = de;
LC_TIME = de;
};
# https://github.com/NixOS/nixpkgs/issues/179486
@ -276,7 +280,6 @@ with mylib.networking; {
programs = {
adb.enable = true;
dconf.enable = !headless;
fish.enable = true;
firejail.enable = true; # Use to run app in network namespace (e.g. through vpn)
fuse.userAllowOther = true; # Allow users to mount e.g. samba shares (cifs)
git.enable = true;
@ -284,6 +287,11 @@ with mylib.networking; {
neovim.enable = true;
nix-ld.enable = true; # Load dynamically linked executables
fish = {
enable = true;
generateCompletions = config.documentation.enable;
};
gnupg.agent = {
enable = false;
enableBrowserSocket = true;

View File

@ -55,21 +55,21 @@ in {
# Allow start/stop containers without root password
modules.polkit.allowedSystemServices = let
container-services = lib.pipe virtualisation.oci-containers.containers [
builtins.attrNames
(builtins.filter (c: cfg.${c}.enable))
(builtins.map (c: "podman-${c}.service"))
];
container-services =
virtualisation.oci-containers.containers
|> builtins.attrNames
|> builtins.filter (c: cfg.${c}.enable)
|> builtins.map (c: "podman-${c}.service");
in
container-services;
# Generate list of containers for rofi menu
environment.etc."rofi-containers".text = let
containers = lib.pipe virtualisation.oci-containers.containers [
builtins.attrNames
(builtins.filter (c: cfg.${c}.enable))
(builtins.concatStringsSep "\n")
];
containers =
virtualisation.oci-containers.containers
|> builtins.attrNames
|> builtins.filter (c: cfg.${c}.enable)
|> builtins.concatStringsSep "\n";
in
containers;
};

View File

@ -23,19 +23,19 @@ in {
always-services = [];
mkServicePredicate = service: "action.lookup(\"unit\") == \"${service}\"";
servicePredicates = lib.pipe (cfg.allowedSystemServices ++ always-services) [
(builtins.map mkServicePredicate)
(builtins.concatStringsSep " ||\n")
];
servicePredicates =
(cfg.allowedSystemServices ++ always-services)
|> builtins.map mkServicePredicate
|> builtins.concatStringsSep " ||\n";
# Actions that should always be allowed
always-actions = [];
mkActionPredicate = action: "action.id == \"${action}\"";
actionPredicates = lib.pipe (cfg.allowedActions ++ always-actions) [
(builtins.map mkActionPredicate)
(builtins.concatStringsSep " ||\n")
];
actionPredicates =
(cfg.allowedActions ++ always-actions)
|> builtins.map mkActionPredicate
|> builtins.concatStringsSep " ||\n";
in
lib.concatStrings [
''