Rename colors.

This commit is contained in:
Dmitry Voronin 2024-04-02 22:47:20 +03:00
parent b9c4b2e3b9
commit 3d8eebff55
6 changed files with 32 additions and 41 deletions

View file

@ -109,28 +109,27 @@
# Colors. # Colors.
nixosModules.color = { nixosModules.color = {
accent = "b8bb26";
bg = "1d2021"; bg = "1d2021";
bg_1 = "504945"; bg_1 = "504945";
bg_2 = "3c3836"; bg_2 = "3c3836";
blue = "458588"; bg_3 = "282828";
blue_1 = "076678";
darkgray = "282828";
fg = "ebdbb2"; fg = "ebdbb2";
fg_1 = "fbf1c7"; fg_1 = "fbf1c7";
fg_2 = "d5c4a1"; fg_2 = "d5c4a1";
gray = "a89984"; fg_3 = "a89984";
green = "98971a"; negative = "cc241d";
green_1 = "87af87"; neutral = "458588";
purple = "b16286"; neutral_1 = "076678";
red = "cc241d"; positive = "98971a";
positive_1 = "87af87";
transparent = "ffffff00"; transparent = "ffffff00";
yellow = "b8bb26";
blue_1_rgb = "69;133;136"; accent_rgb = "184;187;38";
fg_1_rgb = "251;241;199"; fg_1_rgb = "251;241;199";
green_1_rgb = "135;175;135"; negative_rgb = "204;36;29";
red_rgb = "204;36;29"; neutral_1_rgb = "69;133;136";
yellow_rgb = "184;187;38"; positive_1_rgb = "135;175;135";
}; };
# Common modules used across all hosts. # Common modules used across all hosts.

View file

@ -82,15 +82,7 @@ in {
}; };
programs.tmux = { programs.tmux = {
enable = true; enable = true;
extraConfig = '' extraConfig = builtins.readFile ./common/tmux/tmux.conf;
set -g @COLOR_BG "#${color.bg}"
set -g @COLOR_BG_1 "#${color.bg_1}"
set -g @COLOR_BG_2 "#${color.bg_2}"
set -g @COLOR_DARKGRAY "#${color.darkgray}"
set -g @COLOR_FG "#${color.fg}"
set -g @COLOR_GRAY "#${color.gray}"
set -g @COLOR_YELLOW "#${color.yellow}"
'' + (builtins.readFile ./common/tmux/tmux.conf);
}; };
programs.git = { programs.git = {
enable = true; enable = true;

View file

@ -29,7 +29,7 @@ function __prompt_command() {
# Set error red. # Set error red.
if ${is_error}; then if ${is_error}; then
PS1+="$(__prompt_color ${red_rgb})" PS1+="$(__prompt_color ${negative_rgb})"
PS1+="[" PS1+="["
else else
PS1+="$(__prompt_color)" PS1+="$(__prompt_color)"
@ -42,26 +42,26 @@ function __prompt_command() {
# Set root red. # Set root red.
if ${is_root}; then if ${is_root}; then
PS1+="$(__prompt_color ${red_rgb})" PS1+="$(__prompt_color ${negative_rgb})"
else else
PS1+="$(__prompt_color ${blue_1_rgb})" PS1+="$(__prompt_color ${neutral_1_rgb})"
fi fi
# Add user, host and working dir. # Add user, host and working dir.
PS1+="\u@\h " PS1+="\u@\h "
PS1+="$(__prompt_color ${green_1_rgb})" PS1+="$(__prompt_color ${positive_1_rgb})"
PS1+="\w" PS1+="\w"
# PS1+="\${PWD}" # PS1+="\${PWD}"
# Add git branch if available. # Add git branch if available.
local git_branch="$(_git_current_branch)" local git_branch="$(_git_current_branch)"
if [[ "${git_branch}" != "" ]]; then if [[ "${git_branch}" != "" ]]; then
PS1+=" $(__prompt_color ${yellow_rgb})@${git_branch}" PS1+=" $(__prompt_color ${accent_rgb})@${git_branch}"
fi fi
# Set error red. # Set error red.
if ${is_error}; then if ${is_error}; then
PS1+="$(__prompt_color ${red_rgb})" PS1+="$(__prompt_color ${negative_rgb})"
PS1+="] " PS1+="] "
else else
PS1+="$(__prompt_color)" PS1+="$(__prompt_color)"
@ -70,7 +70,7 @@ function __prompt_command() {
# If error, show code. # If error, show code.
if ${is_error}; then if ${is_error}; then
PS1+="$(__prompt_color ${red_rgb})(" PS1+="$(__prompt_color ${negative_rgb})("
PS1+="${last_status}" PS1+="${last_status}"
local error_type="$(_ps1error ${last_status})" local error_type="$(_ps1error ${last_status})"
[[ "${error_type}" != "" ]] && PS1+=" ${error_type}" [[ "${error_type}" != "" ]] && PS1+=" ${error_type}"

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" bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
# Selection style. # Selection style.
set -g mode-style "fg=#$darkgray bg=#$yellow bold" set -g mode-style "fg=#$bg_3 bg=#$accent bold"
# Pane style. # Pane style.
set -g pane-border-style "fg=#$bg_1" set -g pane-border-style "fg=#$bg_1"
@ -68,12 +68,12 @@ bind-key -n M-f run-shell 'tmux_script togglestatusbar'
set -g status-interval 2 set -g status-interval 2
set -g status-position bottom set -g status-position bottom
set -g status-justify left set -g status-justify left
set -g status-style "bg=#$bg_2 fg=#$gray" set -g status-style "bg=#$bg_2 fg=#$fg_3"
set -g status-left "#[bold,bg=#$gray,fg=#$darkgray] #H-#S #(tmux_script client_count #S)#[bg=#$bg_2,fg=#$gray]" set -g status-left "#[bold,bg=#$fg_3,fg=#$bg_3] #H-#S #(tmux_script client_count #S)#[bg=#$bg_2,fg=#$fg_3]"
set -g status-left-length 50 set -g status-left-length 50
set -g status-right-length 50 set -g status-right-length 50
set -g status-right "#(tmux_script statusbar) %d %a #[fg=#$gray]#[bold,bg=#$gray,fg=#$darkgray] %H:%M " set -g status-right "#(tmux_script statusbar) %d %a #[fg=#$fg_3]#[bold,bg=#$fg_3,fg=#$bg_3] %H:%M "
set-window-option -g window-status-separator "" set-window-option -g window-status-separator ""

View file

@ -1,7 +1,7 @@
# Class Border Bground Text Indicator ChildBorder # Class Border Bground Text Indicator ChildBorder
client.focused #$yellow #$yellow #$fg #$yellow #$yellow # client.focused #$accent #$accent #$fg #$accent #$accent
client.focused_inactive #$bg_1 #$darkgray #$fg #$darkgray #$darkgray # client.focused_inactive #$bg_1 #$bg_3 #$fg #$bg_3 #$bg_3
client.unfocused #$bg_1 #$darkgray #$gray #$darkgray #$darkgray # client.unfocused #$bg_1 #$bg_3 #$fg_3 #$bg_3 #$bg_3
client.urgent #$darkgray #$red #$fg_1 #$red #$red # client.urgent #$bg_3 #$negative #$fg_1 #$negative #$negative
client.placeholder #$bg #$bg #$fg #$bg #$bg # client.placeholder #$bg #$bg #$fg #$bg #$bg

View file

@ -1,6 +1,6 @@
# Application launcher. # Application launcher.
# Note: pass the final command to swaymsg so that the resulting window can be opened # Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on. # on the original workspace that the command was run on.
set $menu _dmenu_path_wrapped | wmenu -b -p 'Run:' -i -f "SF Pro Display Medium 14" -M $bg -S $bg -N $bg -m $yellow -s $yellow -n $fg | xargs swaymsg exec -- set $menu _dmenu_path_wrapped | wmenu -b -p 'Run:' -i -f "SF Pro Display Medium 14" -M $bg -S $bg -N $bg -m $accent -s $accent -n $fg | xargs swaymsg exec --
bindsym $mod+space exec $menu bindsym $mod+space exec $menu