Skip to content

Commit 068a49f

Browse files
Merge pull request #296 from Theoreticallyhugo/feature/theming
Feature/theming
2 parents fead19a + 3d09984 commit 068a49f

File tree

6 files changed

+365
-11
lines changed

6 files changed

+365
-11
lines changed

INSTALL.md

+8
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ set -g @dracula-powerline-bg-transparent true
126126
set -g @dracula-inverse-divider 
127127
```
128128

129+
#### [color theming](/docs/color_theming/README.md)
130+
131+
Each individual widget's foreground and background color can be overridden.
132+
Additionally, the variables used for storing color values can be overridden and extended.
133+
This allows for the use of custom themes like catppuccin or gruvbox.
134+
135+
For everything regarding colors, please refer to [the color theming directory](/docs/color_theming/README.md).
136+
129137
#### cpu-usage options
130138

131139
Customize label

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Configuration and options can be found at [draculatheme.com/tmux](https://dracul
1616

1717
- Support for powerline
1818
- Day, date, time, timezone
19+
- [Fully custom color theming](/docs/color_theming/README.md)
1920
- Current location based on network with temperature and forecast icon (if available)
2021
- Network connection status, bandwidth and SSID
2122
- SSH session user, hostname and port of active tmux pane

docs/color_theming/README.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# overriding widget colors
2+
widget color options with default values - sorted alphabetically:
3+
```
4+
set -g @dracula-attached-clients-colors "cyan dark_gray"
5+
set -g @dracula-battery-colors "pink dark_gray"
6+
set -g @dracula-continuum-colors "cyan dark_gray"
7+
set -g @dracula-cpu-usage-colors "orange dark_gray"
8+
set -g @dracula-custom-plugin-colors "cyan dark_gray"
9+
set -g @dracula-cwd-colors "dark_gray white"
10+
set -g @dracula-fossil-colors "green dark_gray"
11+
set -g @dracula-git-colors "green dark_gray"
12+
set -g @dracula-gpu-power-draw-colors "green dark_gray"
13+
set -g @dracula-gpu-ram-usage-colors "cyan dark_gray"
14+
set -g @dracula-gpu-usage-colors "pink dark_gray"
15+
set -g @dracula-hg-colors "green dark_gray"
16+
set -g @dracula-kubernetes-context-colors "cyan dark_gray"
17+
set -g @dracula-libre-colors "white dark_gray"
18+
set -g @dracula-mpc-colors "green dark_gray"
19+
set -g @dracula-network-bandwidth-colors "cyan dark_gray"
20+
set -g @dracula-network-colors "cyan dark_gray"
21+
set -g @dracula-network-ping-colors "cyan dark_gray"
22+
set -g @dracula-network-vpn-colors "cyan dark_gray"
23+
set -g @dracula-playerctl-colors "green dark_gray"
24+
set -g @dracula-ram-usage-colors "cyan dark_gray"
25+
set -g @dracula-spotify-tui-colors "green dark_gray"
26+
set -g @dracula-ssh-session-colors "green dark_gray"
27+
set -g @dracula-synchronize-panes-colors "cyan dark_gray"
28+
set -g @dracula-terraform-colors "light_purple dark_gray"
29+
set -g @dracula-time-colors "dark_purple white"
30+
set -g @dracula-tmux-ram-usage-colors "cyan dark_gray"
31+
set -g @dracula-weather-colors "orange dark_gray"
32+
```
33+
34+
# overriding color variables
35+
36+
all dracula colors can be overridden and new variables can be added.
37+
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.
38+
39+
for a quick setup, add one of the following options to your config:
40+
**better readability**
41+
```
42+
set -g @dracula-colors "
43+
# Dracula Color Pallette
44+
white='#f8f8f2'
45+
gray='#44475a'
46+
dark_gray='#282a36'
47+
light_purple='#bd93f9'
48+
dark_purple='#6272a4'
49+
cyan='#8be9fd'
50+
green='#50fa7b'
51+
orange='#ffb86c'
52+
red='#ff5555'
53+
pink='#ff79c6'
54+
yellow='#f1fa8c'
55+
"
56+
```
57+
**saving space**
58+
```
59+
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' "
60+
```
61+
## plug and play themes
62+
as part of this directory there are some plug and play themes with explanations on how to use them:
63+
- [catppuccin](/docs/color_theming/catppuccin.md)
64+
- [gruvbox](/docs/color_theming/gruvbox.md)

docs/color_theming/catppuccin.md

+176
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# drac to cat
2+
3+
4+
for a quick setup, set the following option:
5+
```
6+
set -g @dracula-colors "
7+
# simple catppuccin Color Pallette
8+
pink='#cba6f7'
9+
orange='#fab387'
10+
yellow='#f9e2af'
11+
green='#a6e3a1'
12+
cyan='#89dceb'
13+
light_purple='#b4befe'
14+
white='#cdd6f4'
15+
dark_gray='#313244'
16+
red='#f38ba8'
17+
gray='#45475a'
18+
dark_purple='#6c7086'
19+
"
20+
```
21+
22+
23+
alternatively use the full catppuccin color palette and customise the flags accordingly
24+
25+
# catppuccin Color Pallette
26+
27+
# latte
28+
```
29+
Rosewater='#dc8a78'
30+
Flamingo='#dd7878'
31+
Pink='#ea76cb'
32+
Mauve='#8839ef'
33+
Red='#d20f39'
34+
Maroon='#e64553'
35+
Peach='#fe640b'
36+
Yellow='#df8e1d'
37+
Green='#40a02b'
38+
Teal='#179299'
39+
Sky='#04a5e5'
40+
Sapphire='#209fb5'
41+
Blue='#1e66f5'
42+
Lavender='#7287fd'
43+
Text='#4c4f69'
44+
Subtext1='#5c5f77'
45+
Subtext0='#6c6f85'
46+
Overlay2='#7c7f93'
47+
Overlay1='#8c8fa1'
48+
Overlay0='#9ca0b0'
49+
Surface2='#acb0be'
50+
Surface1='#bcc0cc'
51+
Surface0='#ccd0da'
52+
Base='#eff1f5'
53+
Mantle='#e6e9ef'
54+
Crust='#dce0e8'
55+
```
56+
57+
# frappe
58+
```
59+
Rosewater='#f2d5cf'
60+
Flamingo='#eebebe'
61+
Pink='#f4b8e4'
62+
Mauve='#ca9ee6'
63+
Red='#e78284'
64+
Maroon='#ea999c'
65+
Peach='#ef9f76'
66+
Yellow='#e5c890'
67+
Green='#a6d189'
68+
Teal='#81c8be'
69+
Sky='#99d1db'
70+
Sapphire='#85c1dc'
71+
Blue='#8caaee'
72+
Lavender='#babbf1'
73+
Text='#c6d0f5'
74+
Subtext1='#b5bfe2'
75+
Subtext0='#a5adce'
76+
Overlay2='#949cbb'
77+
Overlay1='#838ba7'
78+
Overlay0='#737994'
79+
Surface2='#626880'
80+
Surface1='#51576d'
81+
Surface0='#414559'
82+
Base='#303446'
83+
Mantle='#292c3c'
84+
Crust='#232634'
85+
```
86+
87+
# macchiato
88+
```
89+
Rosewater='#f4dbd6'
90+
Flamingo='#f0c6c6'
91+
Pink='#f5bde6'
92+
Mauve='#c6a0f6'
93+
Red='#ed8796'
94+
Maroon='#ee99a0'
95+
Peach='#f5a97f'
96+
Yellow='#eed49f'
97+
Green='#a6da95'
98+
Teal='#8bd5ca'
99+
Sky='#91d7e3'
100+
Sapphire='#7dc4e4'
101+
Blue='#8aadf4'
102+
Lavender='#b7bdf8'
103+
Text='#cad3f5'
104+
Subtext1='#b8c0e0'
105+
Subtext0='#a5adcb'
106+
Overlay2='#939ab7'
107+
Overlay1='#8087a2'
108+
Overlay0='#6e738d'
109+
Surface2='#5b6078'
110+
Surface1='#494d64'
111+
Surface0='#363a4f'
112+
Base='#24273a'
113+
Mantle='#1e2030'
114+
Crust='#181926'
115+
```
116+
117+
# mocha
118+
```
119+
Rosewater='#f5e0dc'
120+
Flamingo='#f2cdcd'
121+
Pink='#f5c2e7'
122+
Mauve='#cba6f7'
123+
Red='#f38ba8'
124+
Maroon='#eba0ac'
125+
Peach='#fab387'
126+
Yellow='#f9e2af'
127+
Green='#a6e3a1'
128+
Teal='#94e2d5'
129+
Sky='#89dceb'
130+
Sapphire='#74c7ec'
131+
Blue='#89b4fa'
132+
Lavender='#b4befe'
133+
Text='#cdd6f4'
134+
Subtext1='#bac2de'
135+
Subtext0='#a6adc8'
136+
Overlay2='#9399b2'
137+
Overlay1='#7f849c'
138+
Overlay0='#6c7086'
139+
Surface2='#585b70'
140+
Surface1='#45475a'
141+
Surface0='#313244'
142+
Base='#1e1e2e'
143+
Mantle='#181825'
144+
Crust='#11111b'
145+
```
146+
147+
# TODO: check em all
148+
```
149+
set -g "@dracula-cwd-colors" "Surface0 Text"
150+
set -g "@dracula-fossil-colors" "Green Surface0"
151+
set -g "@dracula-git-colors" "Green Surface0"
152+
set -g "@dracula-hg-colors" "Green Surface0"
153+
set -g "@dracula-battery-colors" "Mauve Surface0"
154+
set -g "@dracula-gpu-usage-colors" "Mauve Surface0"
155+
set -g "@dracula-gpu-ram-usage-colors" "Sky Surface0"
156+
set -g "@dracula-gpu-power-draw-colors" "Green Surface0"
157+
set -g "@dracula-cpu-usage-colors" "orange Surface0"
158+
set -g "@dracula-ram-usage-colors" "Sky Surface0"
159+
set -g "@dracula-tmux-ram-usage-colors" "Sky Surface0"
160+
set -g "@dracula-network-colors" "Sky Surface0"
161+
set -g "@dracula-network-bandwidth-colors" "Sky Surface0"
162+
set -g "@dracula-network-ping-colors" "Sky Surface0"
163+
set -g "@dracula-network-vpn-colors" "Sky Surface0"
164+
set -g "@dracula-attached-clients-colors" "Sky Surface0"
165+
set -g "@dracula-mpc-colors" "Green Surface0"
166+
set -g "@dracula-spotify-tui-colors" "Green Surface0"
167+
set -g "@dracula-playerctl-colors" "Green Surface0"
168+
set -g "@dracula-kubernetes-context-colors" "Sky Surface0"
169+
set -g "@dracula-terraform-colors" "Lavender Surface0"
170+
set -g "@dracula-continuum-colors" "Sky Surface0"
171+
set -g "@dracula-weather-colors" "orange Surface0"
172+
set -g "@dracula-time-colors" "dark_purple white"
173+
set -g "@dracula-synchronize-panes-colors" "Sky Surface0"
174+
set -g "@dracula-libre-colors" "Text Surface0"
175+
set -g "@dracula-ssh-session-colors" "Green Surface0"
176+
```

docs/color_theming/gruvbox.md

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# drac to gruv
2+
3+
**TODO**
4+
for a quick setup, set the following option:
5+
```
6+
set -g @dracula-colors "
7+
# simple gruvbox Color Pallette
8+
pink='#'
9+
orange='#'
10+
yellow='#'
11+
green='#'
12+
cyan='#'
13+
light_purple='#'
14+
white='#'
15+
dark_gray='#'
16+
red='#'
17+
gray='#'
18+
dark_purple='#'
19+
"
20+
```
21+
22+
23+
alternatively use the full gruvbox color palette and customise the flags accordingly
24+
25+
# GruvBox Color Pallette
26+
## dark
27+
```
28+
# === colors ===
29+
# --- muted ---
30+
muted_back="#282828"
31+
muted_red="#CC241D"
32+
muted_green="#98971A"
33+
muted_yellow="#D79921"
34+
muted_blue="#458588"
35+
muted_purple="#B16286"
36+
muted_aqua="#689D6A"
37+
muted_orange="#D65D0E"
38+
muted_fore="#A89984"
39+
# --- strong ---
40+
strong_back="#928374"
41+
strong_red="#FB4934"
42+
strong_green="#B8BB26"
43+
strong_yellow="#FABD2F"
44+
strong_blue="#83A598"
45+
strong_purple="#D3869B"
46+
strong_aqua="#8EC07C"
47+
strong_orange="#FE8019"
48+
strong_fore="#EBDBB2"
49+
# === backgrounds ===
50+
back_0_hard="#1D2021"
51+
back_0_soft="#32302F"
52+
back_1="#3C3836"
53+
back_2="#504945"
54+
back_3="#665C54"
55+
back_4="#7C6F64"
56+
fore_0_hard="#FBF1C7"
57+
fore_0_soft="#FBF1C7"
58+
fore_1="#EBDBB2"
59+
fore_2="#D5C4A1"
60+
fore_3="#BDAE93"
61+
fore_4="#A89984"
62+
```
63+
## light
64+
```
65+
# === colors ===
66+
# --- muted ---
67+
muted_back="#FBF1C7"
68+
muted_red="#CC241D"
69+
muted_green="#98971A"
70+
muted_yellow="#D79921"
71+
muted_blue="#458588"
72+
muted_purple="#B16286"
73+
muted_aqua="#689D6A"
74+
muted_orange="#D65D0E"
75+
muted_fore="#7C6F64"
76+
# --- strong ---
77+
strong_back="#928374"
78+
strong_red="#9d0006"
79+
strong_green="#79740E"
80+
strong_yellow="#B57614"
81+
strong_blue="#076678"
82+
strong_purple="#8F3F71"
83+
strong_aqua="#427B58"
84+
strong_orange="#AF3A03"
85+
strong_fore="#3C3836"
86+
# === backgrounds ===
87+
back_0_hard="#F9F5D7"
88+
back_0_soft="#F2E5BC"
89+
back_1="#EBDBB2"
90+
back_2="#D5C4A1"
91+
back_3="#BDAE93"
92+
back_4="#A89984"
93+
fore_0_hard="#282828"
94+
fore_0_soft="#282828"
95+
fore_1="#3C3836"
96+
fore_2="#504945"
97+
fore_3="#665C54"
98+
fore_4="#7C6F64"
99+
```

scripts/dracula.sh

+17-11
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,23 @@ main()
4141
show_empty_plugins=$(get_tmux_option "@dracula-show-empty-plugins" true)
4242

4343
# Dracula Color Pallette
44-
white=$(get_tmux_option "@dracula-color-white" "#f8f8f2")
45-
gray=$(get_tmux_option "@dracula-color-gray" "#44475a")
46-
dark_gray=$(get_tmux_option "@dracula-color-dark_gray" "#282a36")
47-
light_purple=$(get_tmux_option "@dracula-color-light_purple" "#bd93f9")
48-
dark_purple=$(get_tmux_option "@dracula-color-dark_purple" "#6272a4")
49-
cyan=$(get_tmux_option "@dracula-color-cyan" "#8be9fd")
50-
green=$(get_tmux_option "@dracula-color-green" "#50fa7b")
51-
orange=$(get_tmux_option "@dracula-color-orange" "#ffb86c")
52-
red=$(get_tmux_option "@dracula-color-red" "#ff5555")
53-
pink=$(get_tmux_option "@dracula-color-pink" "#ff79c6")
54-
yellow=$(get_tmux_option "@dracula-color-yellow" "#f1fa8c")
44+
white="#f8f8f2"
45+
gray="#44475a"
46+
dark_gray="#282a36"
47+
light_purple="#bd93f9"
48+
dark_purple="#6272a4"
49+
cyan="#8be9fd"
50+
green="#50fa7b"
51+
orange="#ffb86c"
52+
red="#ff5555"
53+
pink="#ff79c6"
54+
yellow="#f1fa8c"
55+
56+
# Override default colors and possibly add more
57+
colors="$(get_tmux_option "@dracula-colors" "")"
58+
if [ -n "$colors" ]; then
59+
eval "$colors"
60+
fi
5561

5662
# Set transparency variables - Colors and window dividers
5763
if $transparent_powerline_bg; then

0 commit comments

Comments
 (0)