Skip to content

Commit

Permalink
feat: add support for dark and light 16-bit color palettes (#34)
Browse files Browse the repository at this point in the history
* feat: add dark 16-bit colors palette

* feat: add light 16-bit colors palette

* feat: remove unnecessary files

* docs: update names

* chore: add changelog entry
  • Loading branch information
egel committed Sep 22, 2024
1 parent 694252d commit de0815e
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 216 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added code linters for shellcheck & shfmt [#33](https://github.com/egel/tmux-gruvbox/issues/33)
- Added tests (for linux) [#39](https://github.com/egel/tmux-gruvbox/issues/39)
- Added customizable statusbar [#31](https://github.com/egel/tmux-gruvbox/issues/31)
- Added support for 16-bit colors palette light & dark [#34](https://github.com/egel/tmux-gruvbox/issues/34)

### Changed

Expand Down
16 changes: 14 additions & 2 deletions src/gruvbox-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,25 @@ main() {
_statusbar_alpha=$(tmux_get_option "${TMUX_GRUVBOX_STATUSBAR_ALPHA}" "${DEFAULT_STATUSBAR_ALPHA}")

case "$_theme" in
light | light256)
light)
# shellcheck disable=1091
source "${CURRENT_DIR}/src/palette_gruvbox_light.sh"
# shellcheck disable=1091
source "${CURRENT_DIR}/src/theme_gruvbox_light.sh"
;;
light256)
# shellcheck disable=1091
source "${CURRENT_DIR}/src/palette_gruvbox_light256.sh"
# shellcheck disable=1091
source "${CURRENT_DIR}/src/theme_gruvbox_light.sh"
;;
dark | dark256 | *)
dark)
# shellcheck disable=1091
source "${CURRENT_DIR}/src/palette_gruvbox_dark.sh"
# shellcheck disable=1091
source "${CURRENT_DIR}/src/theme_gruvbox_dark.sh"
;;
dark256 | *)
# shellcheck disable=1091
source "${CURRENT_DIR}/src/palette_gruvbox_dark256.sh"
# shellcheck disable=1091
Expand Down
46 changes: 46 additions & 0 deletions src/palette_gruvbox_dark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

##########################
# gruvbox dark pallete
##########################

####
# When using 'colour124' you are using the color default in terminal pallete.
# This could be important for people which terminals support only 256 colors
# and does not support HEX values.
#
# The names of colors used from https://github.com/morhetz/gruvbox

# shellcheck disable=2034 # ignored as this file only contains var definitions
col_bg="#282828"
col_bg0_h="#1d2021"
col_bg0="#282828"
col_bg1="#3c3836"
col_bg2="#504945"
col_bg3="#665c54"
col_bg4="#7c6f64"
col_gray0="#a89984"
col_gray1="#928374"
col_gray2="#928374"
col_bg0_s="#32302f"
col_fg="#ebdbb2"
col_fg4="#a89984"
col_fg3="#bdae93"
col_fg2="#d5c4a1"
col_fg1="#ebdbb2"
col_fg0="#fbf1c7"

col_red="#cc241d"
col_red2="#fb4934"
col_green="#98971a"
col_green2="#b8bb26"
col_yellow="#d79921"
col_yellow2="#fabd2f"
col_blue="#458588"
col_blue2="#83a598"
col_purple="#b16286"
col_purple2="#d3869b"
col_aqua="#689d6a"
col_aqua2="#8ec07c"
col_orange="#d65d0e"
col_orange2="#fe8019"
2 changes: 1 addition & 1 deletion src/palette_gruvbox_dark256.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

##########################
# gruvbox dark pallete
# gruvbox dark256 pallete
##########################

####
Expand Down
46 changes: 46 additions & 0 deletions src/palette_gruvbox_light.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

##########################
# gruvbox light pallete
##########################

####
# When using 'colour124' you are using the color default in terminal pallete.
# This could be important for people which terminals support only 256 colors
# and does not support HEX values.
#
# The names of colors used from https://github.com/morhetz/gruvbox

# shellcheck disable=2034 # ignored as this file only contains var definitions
col_bg="#fbf1c7"
col_bg0_h="#f9f5d7"
col_bg0="#fbf1c7"
col_bg1="#ebdbb2"
col_bg2="#d5c4a1"
col_bg3="#bdae93"
col_bg4="#a89984"
col_gray0="#7c6f64"
col_gray1="#928374"
col_gray2="#928374"
col_bg0_s="#f2e5bc"
col_fg="#3c3836"
col_fg4="#7c6f64"
col_fg3="#665c54"
col_fg2="#504945"
col_fg1="#3c3836"
col_fg0="#282828"

col_red="#cc241d"
col_red2="#9d0006"
col_green="#98971a"
col_green2="#79740e"
col_yellow="#d79921"
col_yellow2="#b57614"
col_blue="#458588"
col_blue2="#076678"
col_purple="#b16286"
col_purple2="#8f3f71"
col_aqua="#689d6a"
col_aqua2="#427b58"
col_orange="#d65d0e"
col_orange2="#af3a03"
2 changes: 1 addition & 1 deletion src/palette_gruvbox_light256.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

##########################
# gruvbox dark pallete
# gruvbox light256 pallete
##########################

####
Expand Down
50 changes: 0 additions & 50 deletions src/tmux-gruvbox-dark-transparent.conf

This file was deleted.

50 changes: 0 additions & 50 deletions src/tmux-gruvbox-dark.conf

This file was deleted.

56 changes: 0 additions & 56 deletions src/tmux-gruvbox-light-transparent.conf

This file was deleted.

56 changes: 0 additions & 56 deletions src/tmux-gruvbox-light.conf

This file was deleted.

0 comments on commit de0815e

Please sign in to comment.