Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/theming #296

Merged
merged 6 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ set -g @dracula-powerline-bg-transparent true
set -g @dracula-inverse-divider 
```

#### [color theming](/docs/color_theming/README.md)

Each individual widget's foreground and background color can be overridden.
Additionally, the variables used for storing color values can be overridden and extended.
This allows for the use of custom themes like catppuccin or gruvbox.

For everything regarding colors, please refer to [the color theming directory](/docs/color_theming/README.md).

#### cpu-usage options

Customize label
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Configuration and options can be found at [draculatheme.com/tmux](https://dracul

- Support for powerline
- Day, date, time, timezone
- [Fully custom color theming](/docs/color_theming/README.md)
- Current location based on network with temperature and forecast icon (if available)
- Network connection status, bandwidth and SSID
- SSH session user, hostname and port of active tmux pane
Expand Down
64 changes: 64 additions & 0 deletions docs/color_theming/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# overriding widget colors
ethancedwards8 marked this conversation as resolved.
Show resolved Hide resolved
widget color options with default values - sorted alphabetically:
```
set -g @dracula-attached-clients-colors "cyan dark_gray"
set -g @dracula-battery-colors "pink dark_gray"
set -g @dracula-continuum-colors "cyan dark_gray"
set -g @dracula-cpu-usage-colors "orange dark_gray"
set -g @dracula-custom-plugin-colors "cyan dark_gray"
set -g @dracula-cwd-colors "dark_gray white"
set -g @dracula-fossil-colors "green dark_gray"
set -g @dracula-git-colors "green dark_gray"
set -g @dracula-gpu-power-draw-colors "green dark_gray"
set -g @dracula-gpu-ram-usage-colors "cyan dark_gray"
set -g @dracula-gpu-usage-colors "pink dark_gray"
set -g @dracula-hg-colors "green dark_gray"
set -g @dracula-kubernetes-context-colors "cyan dark_gray"
set -g @dracula-libre-colors "white dark_gray"
set -g @dracula-mpc-colors "green dark_gray"
set -g @dracula-network-bandwidth-colors "cyan dark_gray"
set -g @dracula-network-colors "cyan dark_gray"
set -g @dracula-network-ping-colors "cyan dark_gray"
set -g @dracula-network-vpn-colors "cyan dark_gray"
set -g @dracula-playerctl-colors "green dark_gray"
set -g @dracula-ram-usage-colors "cyan dark_gray"
set -g @dracula-spotify-tui-colors "green dark_gray"
set -g @dracula-ssh-session-colors "green dark_gray"
set -g @dracula-synchronize-panes-colors "cyan dark_gray"
set -g @dracula-terraform-colors "light_purple dark_gray"
set -g @dracula-time-colors "dark_purple white"
set -g @dracula-tmux-ram-usage-colors "cyan dark_gray"
set -g @dracula-weather-colors "orange dark_gray"
```

# overriding color variables

all dracula colors can be overridden and new variables can be added.
use the `set -g @dracula-colors "color variables go here"` option. put each new variable on a new line for readability or all variables on one line to save space.

for a quick setup, add one of the following options to your config:
**better readability**
```
set -g @dracula-colors "
# Dracula Color Pallette
white='#f8f8f2'
gray='#44475a'
dark_gray='#282a36'
light_purple='#bd93f9'
dark_purple='#6272a4'
cyan='#8be9fd'
green='#50fa7b'
orange='#ffb86c'
red='#ff5555'
pink='#ff79c6'
yellow='#f1fa8c'
"
```
**saving space**
```
set -g @dracula-colors " white='#f8f8f2' gray='#44475a' dark_gray='#282a36' light_purple='#bd93f9' dark_purple='#6272a4' cyan='#8be9fd' green='#50fa7b' orange='#ffb86c' red='#ff5555' pink='#ff79c6' yellow='#f1fa8c' "
```
## plug and play themes
as part of this directory there are some plug and play themes with explanations on how to use them:
- [catppuccin](/docs/color_theming/catppuccin.md)
- [gruvbox](/docs/color_theming/gruvbox.md)
176 changes: 176 additions & 0 deletions docs/color_theming/catppuccin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# drac to cat


for a quick setup, set the following option:
```
set -g @dracula-colors "
# simple catppuccin Color Pallette
pink='#cba6f7'
orange='#fab387'
yellow='#f9e2af'
green='#a6e3a1'
cyan='#89dceb'
light_purple='#b4befe'
white='#cdd6f4'
dark_gray='#313244'
red='#f38ba8'
gray='#45475a'
dark_purple='#6c7086'
"
```


alternatively use the full catppuccin color palette and customise the flags accordingly

# catppuccin Color Pallette

# latte
```
Rosewater='#dc8a78'
Flamingo='#dd7878'
Pink='#ea76cb'
Mauve='#8839ef'
Red='#d20f39'
Maroon='#e64553'
Peach='#fe640b'
Yellow='#df8e1d'
Green='#40a02b'
Teal='#179299'
Sky='#04a5e5'
Sapphire='#209fb5'
Blue='#1e66f5'
Lavender='#7287fd'
Text='#4c4f69'
Subtext1='#5c5f77'
Subtext0='#6c6f85'
Overlay2='#7c7f93'
Overlay1='#8c8fa1'
Overlay0='#9ca0b0'
Surface2='#acb0be'
Surface1='#bcc0cc'
Surface0='#ccd0da'
Base='#eff1f5'
Mantle='#e6e9ef'
Crust='#dce0e8'
```

# frappe
```
Rosewater='#f2d5cf'
Flamingo='#eebebe'
Pink='#f4b8e4'
Mauve='#ca9ee6'
Red='#e78284'
Maroon='#ea999c'
Peach='#ef9f76'
Yellow='#e5c890'
Green='#a6d189'
Teal='#81c8be'
Sky='#99d1db'
Sapphire='#85c1dc'
Blue='#8caaee'
Lavender='#babbf1'
Text='#c6d0f5'
Subtext1='#b5bfe2'
Subtext0='#a5adce'
Overlay2='#949cbb'
Overlay1='#838ba7'
Overlay0='#737994'
Surface2='#626880'
Surface1='#51576d'
Surface0='#414559'
Base='#303446'
Mantle='#292c3c'
Crust='#232634'
```

# macchiato
```
Rosewater='#f4dbd6'
Flamingo='#f0c6c6'
Pink='#f5bde6'
Mauve='#c6a0f6'
Red='#ed8796'
Maroon='#ee99a0'
Peach='#f5a97f'
Yellow='#eed49f'
Green='#a6da95'
Teal='#8bd5ca'
Sky='#91d7e3'
Sapphire='#7dc4e4'
Blue='#8aadf4'
Lavender='#b7bdf8'
Text='#cad3f5'
Subtext1='#b8c0e0'
Subtext0='#a5adcb'
Overlay2='#939ab7'
Overlay1='#8087a2'
Overlay0='#6e738d'
Surface2='#5b6078'
Surface1='#494d64'
Surface0='#363a4f'
Base='#24273a'
Mantle='#1e2030'
Crust='#181926'
```

# mocha
```
Rosewater='#f5e0dc'
Flamingo='#f2cdcd'
Pink='#f5c2e7'
Mauve='#cba6f7'
Red='#f38ba8'
Maroon='#eba0ac'
Peach='#fab387'
Yellow='#f9e2af'
Green='#a6e3a1'
Teal='#94e2d5'
Sky='#89dceb'
Sapphire='#74c7ec'
Blue='#89b4fa'
Lavender='#b4befe'
Text='#cdd6f4'
Subtext1='#bac2de'
Subtext0='#a6adc8'
Overlay2='#9399b2'
Overlay1='#7f849c'
Overlay0='#6c7086'
Surface2='#585b70'
Surface1='#45475a'
Surface0='#313244'
Base='#1e1e2e'
Mantle='#181825'
Crust='#11111b'
```

# TODO: check em all
```
set -g "@dracula-cwd-colors" "Surface0 Text"
set -g "@dracula-fossil-colors" "Green Surface0"
set -g "@dracula-git-colors" "Green Surface0"
set -g "@dracula-hg-colors" "Green Surface0"
set -g "@dracula-battery-colors" "Mauve Surface0"
set -g "@dracula-gpu-usage-colors" "Mauve Surface0"
set -g "@dracula-gpu-ram-usage-colors" "Sky Surface0"
set -g "@dracula-gpu-power-draw-colors" "Green Surface0"
set -g "@dracula-cpu-usage-colors" "orange Surface0"
set -g "@dracula-ram-usage-colors" "Sky Surface0"
set -g "@dracula-tmux-ram-usage-colors" "Sky Surface0"
set -g "@dracula-network-colors" "Sky Surface0"
set -g "@dracula-network-bandwidth-colors" "Sky Surface0"
set -g "@dracula-network-ping-colors" "Sky Surface0"
set -g "@dracula-network-vpn-colors" "Sky Surface0"
set -g "@dracula-attached-clients-colors" "Sky Surface0"
set -g "@dracula-mpc-colors" "Green Surface0"
set -g "@dracula-spotify-tui-colors" "Green Surface0"
set -g "@dracula-playerctl-colors" "Green Surface0"
set -g "@dracula-kubernetes-context-colors" "Sky Surface0"
set -g "@dracula-terraform-colors" "Lavender Surface0"
set -g "@dracula-continuum-colors" "Sky Surface0"
set -g "@dracula-weather-colors" "orange Surface0"
set -g "@dracula-time-colors" "dark_purple white"
set -g "@dracula-synchronize-panes-colors" "Sky Surface0"
set -g "@dracula-libre-colors" "Text Surface0"
set -g "@dracula-ssh-session-colors" "Green Surface0"
```
99 changes: 99 additions & 0 deletions docs/color_theming/gruvbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# drac to gruv

**TODO**
for a quick setup, set the following option:
```
set -g @dracula-colors "
# simple gruvbox Color Pallette
pink='#'
orange='#'
yellow='#'
green='#'
cyan='#'
light_purple='#'
white='#'
dark_gray='#'
red='#'
gray='#'
dark_purple='#'
"
```


alternatively use the full gruvbox color palette and customise the flags accordingly

# GruvBox Color Pallette
## dark
```
# === colors ===
# --- muted ---
muted_back="#282828"
muted_red="#CC241D"
muted_green="#98971A"
muted_yellow="#D79921"
muted_blue="#458588"
muted_purple="#B16286"
muted_aqua="#689D6A"
muted_orange="#D65D0E"
muted_fore="#A89984"
# --- strong ---
strong_back="#928374"
strong_red="#FB4934"
strong_green="#B8BB26"
strong_yellow="#FABD2F"
strong_blue="#83A598"
strong_purple="#D3869B"
strong_aqua="#8EC07C"
strong_orange="#FE8019"
strong_fore="#EBDBB2"
# === backgrounds ===
back_0_hard="#1D2021"
back_0_soft="#32302F"
back_1="#3C3836"
back_2="#504945"
back_3="#665C54"
back_4="#7C6F64"
fore_0_hard="#FBF1C7"
fore_0_soft="#FBF1C7"
fore_1="#EBDBB2"
fore_2="#D5C4A1"
fore_3="#BDAE93"
fore_4="#A89984"
```
## light
```
# === colors ===
# --- muted ---
muted_back="#FBF1C7"
muted_red="#CC241D"
muted_green="#98971A"
muted_yellow="#D79921"
muted_blue="#458588"
muted_purple="#B16286"
muted_aqua="#689D6A"
muted_orange="#D65D0E"
muted_fore="#7C6F64"
# --- strong ---
strong_back="#928374"
strong_red="#9d0006"
strong_green="#79740E"
strong_yellow="#B57614"
strong_blue="#076678"
strong_purple="#8F3F71"
strong_aqua="#427B58"
strong_orange="#AF3A03"
strong_fore="#3C3836"
# === backgrounds ===
back_0_hard="#F9F5D7"
back_0_soft="#F2E5BC"
back_1="#EBDBB2"
back_2="#D5C4A1"
back_3="#BDAE93"
back_4="#A89984"
fore_0_hard="#282828"
fore_0_soft="#282828"
fore_1="#3C3836"
fore_2="#504945"
fore_3="#665C54"
fore_4="#7C6F64"
```
28 changes: 17 additions & 11 deletions scripts/dracula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,23 @@ main()
show_empty_plugins=$(get_tmux_option "@dracula-show-empty-plugins" true)

# Dracula Color Pallette
white=$(get_tmux_option "@dracula-color-white" "#f8f8f2")
gray=$(get_tmux_option "@dracula-color-gray" "#44475a")
dark_gray=$(get_tmux_option "@dracula-color-dark_gray" "#282a36")
light_purple=$(get_tmux_option "@dracula-color-light_purple" "#bd93f9")
dark_purple=$(get_tmux_option "@dracula-color-dark_purple" "#6272a4")
cyan=$(get_tmux_option "@dracula-color-cyan" "#8be9fd")
green=$(get_tmux_option "@dracula-color-green" "#50fa7b")
orange=$(get_tmux_option "@dracula-color-orange" "#ffb86c")
red=$(get_tmux_option "@dracula-color-red" "#ff5555")
pink=$(get_tmux_option "@dracula-color-pink" "#ff79c6")
yellow=$(get_tmux_option "@dracula-color-yellow" "#f1fa8c")
white="#f8f8f2"
gray="#44475a"
dark_gray="#282a36"
light_purple="#bd93f9"
dark_purple="#6272a4"
cyan="#8be9fd"
green="#50fa7b"
orange="#ffb86c"
red="#ff5555"
pink="#ff79c6"
yellow="#f1fa8c"

# Override default colors and possibly add more
colors="$(get_tmux_option "@dracula-colors" "")"
if [ -n "$colors" ]; then
eval "$colors"
fi

# Set transparency variables - Colors and window dividers
if $transparent_powerline_bg; then
Expand Down