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

View file

@ -82,15 +82,7 @@ in {
};
programs.tmux = {
enable = true;
extraConfig = ''
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);
extraConfig = builtins.readFile ./common/tmux/tmux.conf;
};
programs.git = {
enable = true;

View file

@ -29,7 +29,7 @@ function __prompt_command() {
# Set error red.
if ${is_error}; then
PS1+="$(__prompt_color ${red_rgb})"
PS1+="$(__prompt_color ${negative_rgb})"
PS1+="["
else
PS1+="$(__prompt_color)"
@ -42,26 +42,26 @@ function __prompt_command() {
# Set root red.
if ${is_root}; then
PS1+="$(__prompt_color ${red_rgb})"
PS1+="$(__prompt_color ${negative_rgb})"
else
PS1+="$(__prompt_color ${blue_1_rgb})"
PS1+="$(__prompt_color ${neutral_1_rgb})"
fi
# Add user, host and working dir.
PS1+="\u@\h "
PS1+="$(__prompt_color ${green_1_rgb})"
PS1+="$(__prompt_color ${positive_1_rgb})"
PS1+="\w"
# PS1+="\${PWD}"
# Add git branch if available.
local git_branch="$(_git_current_branch)"
if [[ "${git_branch}" != "" ]]; then
PS1+=" $(__prompt_color ${yellow_rgb})@${git_branch}"
PS1+=" $(__prompt_color ${accent_rgb})@${git_branch}"
fi
# Set error red.
if ${is_error}; then
PS1+="$(__prompt_color ${red_rgb})"
PS1+="$(__prompt_color ${negative_rgb})"
PS1+="] "
else
PS1+="$(__prompt_color)"
@ -70,7 +70,7 @@ function __prompt_command() {
# If error, show code.
if ${is_error}; then
PS1+="$(__prompt_color ${red_rgb})("
PS1+="$(__prompt_color ${negative_rgb})("
PS1+="${last_status}"
local error_type="$(_ps1error ${last_status})"
[[ "${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"
# Selection style.
set -g mode-style "fg=#$darkgray bg=#$yellow bold"
set -g mode-style "fg=#$bg_3 bg=#$accent bold"
# Pane style.
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-position bottom
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-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 ""

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_inactive #$bg_1 #$darkgray #$fg #$darkgray #$darkgray
client.unfocused #$bg_1 #$darkgray #$gray #$darkgray #$darkgray
client.urgent #$darkgray #$red #$fg_1 #$red #$red
client.placeholder #$bg #$bg #$fg #$bg #$bg
# client.focused #$accent #$accent #$fg #$accent #$accent
# client.focused_inactive #$bg_1 #$bg_3 #$fg #$bg_3 #$bg_3
# client.unfocused #$bg_1 #$bg_3 #$fg_3 #$bg_3 #$bg_3
# client.urgent #$bg_3 #$negative #$fg_1 #$negative #$negative
# client.placeholder #$bg #$bg #$fg #$bg #$bg

View file

@ -1,6 +1,6 @@
# Application launcher.
# 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.
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