Experimental color support.

This commit is contained in:
Dmitry Voronin 2024-04-02 18:50:20 +03:00
parent 050deac529
commit 87d4ff0ab6
3 changed files with 28 additions and 3 deletions

View file

@ -107,6 +107,25 @@
timeZone = "Europe/Moscow";
};
# Colors.
nixosModules.color = {
aqua = "689d68";
bg = "1d2021";
bg_1 = "504945";
blue = "458588";
blue_faded = "076678";
darkgray = "282828";
fg = "ebdbb2";
fg_1 = "fbf1c7";
fg_2 = "d5c4a1";
gray = "a89984";
green = "98971a";
purple = "b16286";
red = "cc241d";
transparent = "ffffff00";
yellow = "b8bb26";
};
# Common modules used across all hosts.
nixosModules.common.imports = [
./module/common/AutoUpdate.nix
@ -149,6 +168,7 @@
specialArgs = {
const = self.nixosModules.const;
color = self.nixosModules.color;
flake = self;
inputs = inputs;
};
@ -261,6 +281,7 @@
];
extraSpecialArgs = {
const = self.nixosModules.const;
color = self.nixosModules.color;
flake = self;
inputs = inputs;
};

View file

@ -1,9 +1,13 @@
{ pkgs, ... }: let
{ pkgs, color, ... }: let
script = pkgs.writeShellScriptBin "tmux_script" (builtins.readFile ./tmux/Script.sh);
in {
programs.tmux = {
enable = true;
extraConfig = builtins.readFile ./tmux/tmux.conf;
extraConfig = ''
set -g @COLOR_BG #${color.bg}
set -g @COLOR_DARKGRAY #${color.darkgray}
set -g @COLOR_YELLOW #${color.yellow}
'' + (builtins.readFile ./tmux/tmux.conf);
};
environment.systemPackages = [ script ];
}

View file

@ -21,7 +21,7 @@ bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
# Selection style.
set -g mode-style "fg=#282828 bg=#b8bb26 bold"
set -g mode-style "fg=#{@COLOR_DARKGRAY} bg=#{@COLOR_YELLOW} bold"
# Pane style.
set -g pane-border-style "fg=#504945"