From 61a01b75f0a7e58dac486ddf022c628a71528399 Mon Sep 17 00:00:00 2001 From: Mirza Arnaut Date: Thu, 4 Dec 2025 15:59:12 +0100 Subject: [PATCH] vivid: init (#1938) Closes: https://github.com/nix-community/stylix/issues/560 Link: https://github.com/nix-community/stylix/pull/1938 Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> --- modules/vivid/hm.nix | 180 +++++++++++++++++++++++++++++++ modules/vivid/meta.nix | 6 ++ modules/vivid/testbeds/vivid.nix | 17 +++ 3 files changed, 203 insertions(+) create mode 100644 modules/vivid/hm.nix create mode 100644 modules/vivid/meta.nix create mode 100644 modules/vivid/testbeds/vivid.nix diff --git a/modules/vivid/hm.nix b/modules/vivid/hm.nix new file mode 100644 index 00000000..a76f522f --- /dev/null +++ b/modules/vivid/hm.nix @@ -0,0 +1,180 @@ +{ mkTarget, ... }: +mkTarget { + name = "vivid"; + humanName = "vivid"; + + configElements = + { colors }: + let + theme = "stylix"; + in + { + programs.vivid = { + activeTheme = theme; + themes.${theme} = { + colors = { + inherit (colors) + base00 + base01 + base02 + base03 + base04 + base05 + base06 + base07 + base08 + base09 + base0A + base0B + base0C + base0D + base0E + base0F + ; + }; + + core = { + normal_text.foreground = "base04"; + + reset_to_normal = { + background = "base00"; + foreground = "base04"; + font-style = "regular"; + }; + + # File Types + + regular_file.foreground = "base04"; + + directory = { + foreground = "base0F"; + font-style = "bold"; + }; + + multi_hard_link = { + foreground = "base0C"; + font-style = "underline"; + }; + + symlink.foreground = "base0C"; + broken_symlink.foreground = "base08"; + + missing_symlink_target = { + background = "base08"; + foreground = "base05"; + font-style = "bold"; + }; + + fifo = { + foreground = "base07"; + font-style = [ + "bold" + "underline" + ]; + }; + + character_device.foreground = "base0A"; + + block_device = { + foreground = "base0A"; + font-style = "underline"; + }; + + door = { + foreground = "base0A"; + font-style = "italic"; + }; + + socket = { + foreground = "base0A"; + font-style = "bold"; + }; + + # File Permissions + + executable_file = { + foreground = "base07"; + font-style = "bold"; + }; + + file_with_capability = { + foreground = "base04"; + font-style = [ + "bold" + "underline" + ]; + }; + + setuid = { + foreground = "base04"; + font-style = [ + "bold" + "underline" + ]; + }; + + setgid = { + foreground = "base04"; + font-style = [ + "bold" + "underline" + ]; + }; + + sticky = { + background = "base0F"; + foreground = "base05"; + font-style = "underline"; + }; + + other_writable = { + background = "base0F"; + foreground = "base05"; + font-style = "bold"; + }; + + sticky_other_writable = { + background = "base0F"; + foreground = "base05"; + font-style = [ + "bold" + "underline" + ]; + }; + }; + + # Document Types + + archives = { + foreground = "base05"; + font-style = "bold"; + }; + + executable = { + foreground = "base07"; + font-style = "bold"; + }; + + markup = { + foreground = "base06"; + web.foreground = "base04"; + }; + + media = { + foreground = "base0E"; + fonts.foreground = "base04"; + }; + + office.foreground = "base0B"; + + programming = { + source.foreground = "base07"; + tooling.foreground = "base04"; + }; + + text.foreground = "base04"; + unimportant.foreground = "base03"; + }; + }; + }; +} diff --git a/modules/vivid/meta.nix b/modules/vivid/meta.nix new file mode 100644 index 00000000..d1d05ebf --- /dev/null +++ b/modules/vivid/meta.nix @@ -0,0 +1,6 @@ +{ lib, ... }: +{ + name = "vivid"; + homepage = "https://github.com/sharkdp/vivid"; + maintainers = [ lib.maintainers.arunoruto ]; +} diff --git a/modules/vivid/testbeds/vivid.nix b/modules/vivid/testbeds/vivid.nix new file mode 100644 index 00000000..e3fc5626 --- /dev/null +++ b/modules/vivid/testbeds/vivid.nix @@ -0,0 +1,17 @@ +{ lib, pkgs, ... }: +let + package = pkgs.vivid; +in +{ + stylix.testbed.ui.command = { + text = "${lib.getExe pkgs.lsd} --all --long --recursive flake-parts/"; + useTerminal = true; + }; + + home-manager.sharedModules = lib.singleton { + programs.vivid = { + enable = true; + inherit package; + }; + }; +}