diff --git a/.github/workflows/dev-push-check.yml b/.github/workflows/dev-push-check.yml
deleted file mode 100644
index f40befc..0000000
--- a/.github/workflows/dev-push-check.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-name: dev-push-check
-run-name: ${{ github.actor }} pushed new code 💻
-on: [push] #, pull_request]
-jobs:
- lint_shellcheck:
- runs-on: ubuntu-latest
- steps:
- - name: Install shellcheck
- run: sudo apt-get install -y shellcheck
- - name: Checkout repo
- uses: actions/checkout@main
- - name: Lint files against shellcheck
- run: make lint_shellcheck
- lint_shfmt:
- runs-on: ubuntu-latest
- steps:
- - name: Install shfmt
- run: sudo apt-get install -y shfmt
- - name: Checkout repository
- uses: actions/checkout@main
- - name: Lint files against shfmt
- run: make lint_shfmt
- tests_linux:
- runs-on: ubuntu-latest
- needs:
- - lint_shfmt
- - lint_shellcheck
- steps:
- - name: Install required software
- run: sudo apt install -y tmux git
- - name: Checkout repository
- uses: actions/checkout@main
- - name: Execute all linux tests and check results
- run: ./tests/run_all_linux_tests.sh
diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml
new file mode 100644
index 0000000..6f76a98
--- /dev/null
+++ b/.github/workflows/github-actions.yml
@@ -0,0 +1,22 @@
+name: GitHub Actions
+run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
+on: [push]
+jobs:
+ lint-shellcheck:
+ runs-on: ubuntu-latest
+ steps:
+ - name: install shellcheck
+ run: sudo apt-get install -y shellcheck
+ - name: checkout repo
+ uses: actions/checkout@main
+ - name: lint files against shellcheck
+ run: make lint_shellcheck
+ lint-shfmt:
+ runs-on: ubuntu-latest
+ steps:
+ - name: install shfmt
+ run: sudo apt-get install -y shfmt
+ - name: checkout repo
+ uses: actions/checkout@main
+ - name: lint files against shfmt
+ run: make lint_shfmt
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 57edbfd..d16fccb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,27 +9,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
-### Changed
-
-### Deprecated
-
-### Removed
-
-### Fixed
-
-### Security
-
-## [v2.0.0]
-
-### Added
-
- Added light and dark transparent themes [#18](https://github.com/egel/tmux-gruvbox/issues/18)
- Added editorconfig
- 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)
-- Added migration guide v1 to v2 [#44](https://github.com/egel/tmux-gruvbox/issues/44)
### Changed
@@ -37,13 +21,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Removed
-- Reduce repo weight by removing unused images [#41](https://github.com/egel/tmux-gruvbox/issues/41)
-
### Fixed
- Fixed incorrect spacings in template file
-- Improved README with more examples
-- Reduced repo size by outsource images to external platform [#36](https://github.com/egel/tmux-gruvbox/issues/36)
### Security
@@ -70,5 +50,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
[Unreleased]: https://github.com/egel/tmux-gruvbox/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/egel/tmux-gruvbox/compare/v0.0.0...v1.0.0
-[1.1.0]: https://github.com/egel/tmux-gruvbox/compare/v1.0.0...v1.1.0
-[2.0.0]: https://github.com/egel/tmux-gruvbox/compare/v1.1.0...v2.0.0
diff --git a/README.md b/README.md
index e2169b0..eb2da52 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-
+
Gruvbox theme for Tmux
-Theme with 'retro groove' flavor for [Tmux][github-tmux], based on Pavel Pertsev's [gruvbox colorscheme][github-grovbox] and inspired by work of [Gordon Chiam](https://gist.github.com/gchiam/4606522f513cc64b79ce). Subthemes switching inspired by [tmux-color-solarized][github-seebi-tmux-color-solarized].
+Theme with 'retro groove' flavor for [Tmux][github-tmux], based on Pavel Pertsev's [gruvbox colorscheme][github-grovbox] and inspired by work of [Gordon Chiam](https://gist.github.com/gchiam/4606522f513cc64b79ce). Subthemes switching inspired by [tmux-color-solarized][tmux-color-solarized].
-> Screenshot made with dark & light themes (16-bit) from macOS [alacritty][github-alacritty] terminal with xterm-256color and [Hack Nerd Font Regular][github-nerd-fonts]. Backgrounds by [Aleksandar Pasaric][pexcel-1] and [Vishnu Murali][pexcel-2].
+> Screenshot made from macOS [alacritty][github-alacritty] terminal with xterm-256color and [Hack Nerd Font Regular][github-nerd-fonts].
+> Backgrounds by [Aleksandar Pasaric][pexcel-1] and [Vishnu Murali][pexcel-2].
## Installation
### Install via [TPM][github-tpm] (recommended)
-Add plugin at the top list of TPM plugins list in `.tmux.conf` and select desired theme.
+Add plugin at the top list of TPM plugins in `.tmux.conf` and select desired theme.
```bash
# ~/.tmux.conf
-
-set -g @plugin 'tmux-plugins/tpm' # mandatory
-set -g @plugin 'tmux-plugins/tmux-sensible' # optional recommended
-
-set -g @plugin 'https://git.k4li.de/mirrors/tmux-gruvbox'
-# set desired theme options...
-set -g @tmux-gruvbox 'dark' # or 'dark256', 'light', 'light256'
-
-# other plugins
-...
+set -g @plugin 'egel/tmux-gruvbox'
+# set desired options...
+set -g @tmux-gruvbox 'dark' # or 'light'
```
Hit `prefix + I` to fetch the plugin and source it. Your Tmux should be updated with the theme at this point.
-> [!NOTE]
-> If you used v1 before and interested to adapt to v2 use this [Migration Guide from v1 to v2][docs-migration-guide-from-v1-to-v2].
-
### Install manually
-> [!TIP]
-> If you do not have github account [download](https://github.com/egel/tmux-gruvbox/archive/refs/heads/main.zip) it and unzip.
-
1. Clone the project to desired location
+ > ![TIP] If you do not have github account [download](https://github.com/egel/tmux-gruvbox/archive/refs/heads/main.zip) it and unzip.
+
```bash
cd ~/projects/
git clone ...
@@ -65,47 +53,24 @@ Hit `prefix + I` to fetch the plugin and source it. Your Tmux should be updated
```bash
# ~/.tmux.conf
-
run ~/projects/tmux-gruvbox/tmux-gruvbox.tmux
# set desired options...
- set -g @tmux-gruvbox 'dark' # or 'dark256', 'light', 'light256'
+ set -g @tmux-gruvbox 'dark' # or light
```
## Configuration options
-
-
### Theme
- default value: `dark256`
-
-| Theme name | Color palette | Preview link |
-| :--------- | :------------ | :-------------------------------------------------------------------- |
-| `dark` | 16-bit colors | preview |
-| `light` | 16-bit colors | preview |
-| `dark256` | 256 colors | preview |
-| `light256` | 256 colors | preview |
+- available themes:
+ - [`dark256`](./docs/assets/img/gruvbox-dark-theme.png)
+ - [`light256`](./docs/assets/img/gruvbox-light-theme.png)
```bash
-set -g @tmux-gruvbox 'dark' # dark256, light, light256
+set -g @tmux-gruvbox 'dark256'
```
-> [!TIP]
-> Each terminal emulator can behave bit differently regarding displaying colors.
-> If you have some problems see
-> [True Color (24-bit) and italics with alacritty + tmux + vim (neovim)][github-gist-andersevenrud-alacritty-tmux-vim-truecolor]
-> where there is great wisdom how to adjust terminal, especially when used
-> alacritty and tmux.
-
### Transparent status-bar
- default value: `'false'`
@@ -117,10 +82,10 @@ set -g @tmux-gruvbox-statusbar-alpha 'true'
### Left Status (Section A)
-- default value: `'#S'` (session name)
+- default value: `'#S'`
```bash
-set -g @tmux-gruvbox-left-status-a '#S' # tmux's session name
+set -g @tmux-gruvbox-left-status-a
```
### Right Status (Section X)
@@ -130,19 +95,9 @@ set -g @tmux-gruvbox-left-status-a '#S' # tmux's session name
This section is customizable for user, and by default contains current date.
```bash
-# set date in US notation
-set -g @tmux-gruvbox-right-status-x '%m/%d/%Y' # e.g.: 01/31/2024
+set -g @tmux-gruvbox-right-status-x
```
-```bash
-# or set date in EU notation
-set -g @tmux-gruvbox-right-status-x '%d.%m.%Y' # e.g.: 30.01.2024
-```
-
-> [!TIP]
-> Some user may have problem with displaying dates in desired format, if this
-> case for you try using double percent `%%`
-
### Right Status (Section Y)
- default value: `'%H:%M'`
@@ -150,26 +105,21 @@ set -g @tmux-gruvbox-right-status-x '%d.%m.%Y' # e.g.: 30.01.2024
This section is customizable for user, and by default contains current time.
```bash
-# set US time format
-set -g @tmux-gruvbox-right-status-y '%I:%M %p' # 09:54 PM
+# set different time format
+set -g @tmux-gruvbox-right-status-y '%H:%M'
```
### Right Status (Section Z)
-- default value: `'#h'` (hostname)
+- default value: `'#h'`
This section is customizable for user, and by default contains hostname.
```bash
-# display hostname and enhance section with other plugin
-set -g @tmux-gruvbox-right-status-z '#h #{tmux_mode_indicator}'
+# enhance this section with other plugin
+set -g @tmux-gruvbox-right-status-z '#h #{tmux_mode_indicator} '
```
-> [!TIP]
-> Make sure the themes' settings are defined before all other plugins,
-> otherwise content from external plugins may not be displayed correctly by
-> the theme.
-
## Development
To run project locally:
@@ -212,20 +162,12 @@ To keep the files clean we use few program to help us achieve it:
GPLv3 - Maciej Sypień
-[docs-migration-guide-from-v1-to-v2]: ./docs/migration-guide-from-v1-to-v2.md
-[github-alacritty]: https://github.com/alacritty/alacritty
-[github-gist-andersevenrud-alacritty-tmux-vim-truecolor]: https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
+[github-tmux]: https://github.com/tmux/tmux
[github-grovbox]: https://github.com/morhetz/gruvbox
[github-hack]: https://github.com/chrissimpkins/Hack
[github-nerd-fonts]: https://github.com/ryanoasis/nerd-fonts
-[github-seebi-tmux-color-solarized]: https://github.com/seebi/tmux-colors-solarized
-[github-tmux]: https://github.com/tmux/tmux
+[github-alacritty]: https://github.com/alacritty/alacritty
[github-tpm]: https://github.com/tmux-plugins/tpm
-[imgur-img-gruvbox-dark-16bit-1x]: https://i.imgur.com/ae88LQI.png
-[imgur-img-gruvbox-dark-light-comparision-0.5x]: https://i.imgur.com/p6lUnzb.png
-[imgur-img-gruvbox-dark-light-comparision-1x]: https://i.imgur.com/uGyGwlC.png
-[imgur-img-gruvbox-dark256-1x]: https://i.imgur.com/kzQTTCa.png
-[imgur-img-gruvbox-light-16bit-1x]: https://i.imgur.com/fvpdRjg.png
-[imgur-img-gruvbox-light256-1x]: https://i.imgur.com/tQsl6LA.png
+[tmux-color-solarized]: https://github.com/seebi/tmux-colors-solarized
[pexcel-1]: https://www.pexels.com/photo/urban-photo-of-an-alley-2411688/
[pexcel-2]: https://www.pexels.com/photo/lights-hanging-above-the-alley-in-a-city-at-night-27044195/
diff --git a/docs/assets/img/gruvbox-dark-and-light-theme-structure.png b/docs/assets/img/gruvbox-dark-and-light-theme-structure.png
new file mode 100644
index 0000000..206735c
Binary files /dev/null and b/docs/assets/img/gruvbox-dark-and-light-theme-structure.png differ
diff --git a/docs/assets/img/gruvbox-dark-and-light-theme-structure@0.25x.png b/docs/assets/img/gruvbox-dark-and-light-theme-structure@0.25x.png
new file mode 100644
index 0000000..58a174c
Binary files /dev/null and b/docs/assets/img/gruvbox-dark-and-light-theme-structure@0.25x.png differ
diff --git a/docs/assets/img/gruvbox-dark-and-light-theme-structure@0.5x.png b/docs/assets/img/gruvbox-dark-and-light-theme-structure@0.5x.png
new file mode 100644
index 0000000..fef1fba
Binary files /dev/null and b/docs/assets/img/gruvbox-dark-and-light-theme-structure@0.5x.png differ
diff --git a/docs/assets/img/gruvbox-dark-theme.png b/docs/assets/img/gruvbox-dark-theme.png
new file mode 100644
index 0000000..5753d3e
Binary files /dev/null and b/docs/assets/img/gruvbox-dark-theme.png differ
diff --git a/docs/assets/img/gruvbox-light-theme.png b/docs/assets/img/gruvbox-light-theme.png
new file mode 100644
index 0000000..a6b815e
Binary files /dev/null and b/docs/assets/img/gruvbox-light-theme.png differ
diff --git a/docs/assets/img/logo-v1.png b/docs/assets/img/logo-v1.png
new file mode 100644
index 0000000..f96a428
Binary files /dev/null and b/docs/assets/img/logo-v1.png differ
diff --git a/docs/assets/img/logo-v1.svg b/docs/assets/img/logo-v1.svg
new file mode 100644
index 0000000..cf0fdee
--- /dev/null
+++ b/docs/assets/img/logo-v1.svg
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/assets/img/logo-v1@0.5x.png b/docs/assets/img/logo-v1@0.5x.png
new file mode 100644
index 0000000..84dbb03
Binary files /dev/null and b/docs/assets/img/logo-v1@0.5x.png differ
diff --git a/docs/assets/img/logo-v1@0.75x.png b/docs/assets/img/logo-v1@0.75x.png
new file mode 100644
index 0000000..b0cad22
Binary files /dev/null and b/docs/assets/img/logo-v1@0.75x.png differ
diff --git a/docs/migration-guide-from-v1-to-v2.md b/docs/migration-guide-from-v1-to-v2.md
deleted file mode 100644
index 0c69639..0000000
--- a/docs/migration-guide-from-v1-to-v2.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# Migration guide from v1 to v2
-
-Hello there!
-
-I am so happy to see you here and are interested in using the new version of tmux-gruvbox theme.
-
-I really try to do all my best giving you new, interesting features that you probably always wanted to have.
-
-In here I also wanted to thank you all people involved in contributing to this theme 🙏🙇. Especially for adding all suggestions, or reporting problems if they occurred - this helped a lot!
-
-## What's new?
-
-There are couple of great things ahead:
-
-- new themes supporting 16-bit color palette
-- new fully customizable spaces A, X, Y, Z for your disposal
-- support for transparency (experimental)
-- and many more
-
-See what's new in [CHANGELOG][docs-changelog].
-
-## Breaking changes
-
-I planned to have best possible user experience between migrating from v1 and v2, therefore tried to build new changes this way to keep the breaking changes as low as possible. This was not ideal, although I believe for many this would not require many changes and for some none.
-
-### Theme names changes
-
-| v1 | v2 | description |
-| :-----------------: | :--------: | ----------------------------------------------------------------------- |
-| `dark` | `dark256` | 256-colors theme |
-| `light` | `light256` | 256-colors theme |
-| `dark-transparent` | ∅ | set `dark` or `dark256` theme and add `@tmux-gruvbox-statusbar-alpha` |
-| `light-transparent` | ∅ | set `light` or `light256` theme and add `@tmux-gruvbox-statusbar-alpha` |
-
-In v2 we've introduced a 16-bit color themes that should give the users more happiness utilizing a greater amount of supported colors (full gruvbox palette).
-
-Therefore in v2 themes `light` & `dark` has been simply renamed and `256` postfix has been added to indicate used palette. In v2 `light` & `dark` themes will be refering to 16-bit versions.
-
-> [!NOTE]
-> While implementing 16-bit colors I realized that many users (including me) had problems with setting up correct the color interpretation in their workspace to support multiple colors.
->
-> Here is the page [True Color (24-bit) and italics with alacritty + tmux + vim (neovim)][github-gist-andersevenrud-alacritty-tmux-vim-truecolor] where I found great wisdom how to adjust my terminal, especially when used alacritty, tmux & neovim.
-
-### Fallback theme name
-
-| v1 | v2 |
-| :----: | :-------: |
-| `dark` | `dark256` |
-
-Continuing topic of introducing 16-bit colors, we have make slight change in fallback theme name. We love idea adding new colors to our theme, although during those changes we cannot forget about users whose terminals might not support more then basic 256 colors. Therefore the fallback theme name also has to be adapted and in v2 it's `dark256`.
-
-## FAQ
-
-### Plugin not upgrading automatically with tmux update
-
-Error ([source](https://github.com/egel/tmux-gruvbox/issues/21#issuecomment-2373794273)):
-
-```
-"tmux-gruvbox" update fail
- | fatal: couldn't find remote ref refs/heads/master
-```
-
-Solution:
-
-We recently migrate from `master` to `main` as the primary branch, therefore tmux plugin manager using old reference to master and it's not possible to pull.
-
-The simplest way would be to:
-
-1. remove the plugin `rm -rf ~/.tmux/plugins/tmux-gruvbox`
-2. and reinstall it again via tpm key-binding `` + `I`.
-
-[docs-changelog]: ../CHANGELOG.md
-[github-gist-andersevenrud-alacritty-tmux-vim-truecolor]: https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
diff --git a/gruvbox-tpm.tmux b/gruvbox-tpm.tmux
index 936ef65..6d3946a 100755
--- a/gruvbox-tpm.tmux
+++ b/gruvbox-tpm.tmux
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-source "${CURRENT_DIR}/src/gruvbox-main.sh"
+# shellcheck disable=SC1091
+source "./src/gruvbox-main.sh"
# vim: ai et ft=bash
diff --git a/src/gruvbox-main.sh b/src/gruvbox-main.sh
index eb93dc4..be5b811 100755
--- a/src/gruvbox-main.sh
+++ b/src/gruvbox-main.sh
@@ -1,6 +1,8 @@
#!/bin/bash
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+SCRIPT_SRC="$(dirname "${BASH_SOURCE[${#BASH_SOURCE[@]} - 1]}")"
+readonly SCRIPT_SRC
+CURRENT_DIR=$(cd "${SCRIPT_SRC}" >/dev/null 2>&1 && pwd) readonly CURRENT_DIR
readonly CURRENT_DIR
# hold the array of all command to configure tmux theme
@@ -8,9 +10,9 @@ declate -a TMUX_CMDS
# load libraries
# shellcheck disable=1091
-source "${CURRENT_DIR}/helper_methods.sh"
+source "${CURRENT_DIR}/src/helper_methods.sh"
# shellcheck disable=1091
-source "${CURRENT_DIR}/tmux_utils.sh"
+source "${CURRENT_DIR}/src/tmux_utils.sh"
readonly TMUX_GRUVBOX="@tmux-gruvbox"
readonly TMUX_GRUVBOX_STATUSBAR_ALPHA="@tmux-gruvbox-statusbar-alpha"
@@ -20,13 +22,13 @@ readonly TMUX_GRUVBOX_RIGHT_STAUTS_Y="@tmux-gruvbox-right-status-y"
readonly TMUX_GRUVBOX_RIGHT_STAUTS_Z="@tmux-gruvbox-right-status-z"
# define simple theme options (no color interpolation required)
-readonly DEFAULT_THEME="dark256"
-readonly DEFAULT_STATUSBAR_ALPHA='false'
+DEFAULT_THEME="dark"
+DEFAULT_STATUSBAR_ALPHA=false
# defaults for theme option (with color interpolation)
-readonly DEFAULT_LEFT_STATUS_A=' '
-readonly DEFAULT_RIGHT_STATUS_X='%d.%m.%Y'
-readonly DEFAULT_RIGHT_STATUS_Y='%H:%M'
-readonly DEFAULT_RIGHT_STATUS_Z="$USER@#h "
+DEFAULT_LEFT_STATUS_A='#S'
+DEFAULT_RIGHT_STATUS_X='%Y-%m-%d'
+DEFAULT_RIGHT_STATUS_Y='%H:%M'
+DEFAULT_RIGHT_STATUS_Z='#h'
main() {
TMUX_CMDS=() # clear
@@ -39,27 +41,27 @@ main() {
case "$_theme" in
light)
# shellcheck disable=1091
- source "${CURRENT_DIR}/palette_gruvbox_light.sh"
+ source "${CURRENT_DIR}/src/palette_gruvbox_light.sh"
# shellcheck disable=1091
- source "${CURRENT_DIR}/theme_gruvbox_light.sh"
+ source "${CURRENT_DIR}/src/theme_gruvbox_light.sh"
;;
light256)
# shellcheck disable=1091
- source "${CURRENT_DIR}/palette_gruvbox_light256.sh"
+ source "${CURRENT_DIR}/src/palette_gruvbox_light256.sh"
# shellcheck disable=1091
- source "${CURRENT_DIR}/theme_gruvbox_light256.sh"
+ source "${CURRENT_DIR}/src/theme_gruvbox_light.sh"
;;
dark)
# shellcheck disable=1091
- source "${CURRENT_DIR}/palette_gruvbox_dark.sh"
+ source "${CURRENT_DIR}/src/palette_gruvbox_dark.sh"
# shellcheck disable=1091
- source "${CURRENT_DIR}/theme_gruvbox_dark.sh"
+ source "${CURRENT_DIR}/src/theme_gruvbox_dark.sh"
;;
dark256 | *)
# shellcheck disable=1091
- source "${CURRENT_DIR}/palette_gruvbox_dark256.sh"
+ source "${CURRENT_DIR}/src/palette_gruvbox_dark256.sh"
# shellcheck disable=1091
- source "${CURRENT_DIR}/theme_gruvbox_dark.sh"
+ source "${CURRENT_DIR}/src/theme_gruvbox_dark.sh"
;;
esac
@@ -69,8 +71,7 @@ main() {
_status_right_y=$(tmux_get_option "$TMUX_GRUVBOX_RIGHT_STAUTS_Y" "$DEFAULT_RIGHT_STATUS_Y")
_status_right_z=$(tmux_get_option "$TMUX_GRUVBOX_RIGHT_STAUTS_Z" "$DEFAULT_RIGHT_STATUS_Z")
- local _theme_args
- _theme_args=(
+ theme_args=(
"$_status_left_a"
"$_status_right_x"
"$_status_right_y"
@@ -79,15 +80,11 @@ main() {
)
case $_theme in
- light256)
- # light256 have slightly different colors placement then regular light 16-bit
- theme_set_light256 "${_theme_args[@]}"
- ;;
- light)
- theme_set_light "${_theme_args[@]}"
+ light | light256)
+ theme_set_light "${theme_args[@]}"
;;
dark | dark256 | *)
- theme_set_dark "${_theme_args[@]}"
+ theme_set_dark "${theme_args[@]}"
;;
esac
diff --git a/src/palette_gruvbox_dark256.sh b/src/palette_gruvbox_dark256.sh
index 47b3bb1..fe6c84d 100644
--- a/src/palette_gruvbox_dark256.sh
+++ b/src/palette_gruvbox_dark256.sh
@@ -25,7 +25,7 @@ col_gray2=colour245
col_bg0_s=colour236
col_fg=colour223
col_fg4=colour246
-col_fg3=colour167
+col_fg3=colour248
col_fg2=colour250
col_fg1=colour223
col_fg0=colour229
diff --git a/src/theme_gruvbox_dark.sh b/src/theme_gruvbox_dark.sh
index 4bee163..3ee9e88 100644
--- a/src/theme_gruvbox_dark.sh
+++ b/src/theme_gruvbox_dark.sh
@@ -28,9 +28,9 @@ theme_set_dark() {
tmux_append_setwo "window-status-activity-style" "bg=${col_bg1},fg=${col_fg3}"
# active window title colors
- local _active_window_title_bg=${col_yellow2}
- if [[ "$_statusbar_alpha" == "true" ]]; then _active_window_title_bg="default"; fi
- tmux_append_setwo "window-status-current-style" "bg=${_active_window_title_bg},fg=${col_bg1}" # TODO cosider removing red!
+ local active_window_title_bg=${col_yellow2}
+ if [[ "$_statusbar_alpha" == "true" ]]; then active_window_title_bg="default"; fi
+ tmux_append_setwo "window-status-current-style" "bg=${active_window_title_bg},fg=${col_bg1}" # TODO cosider removing red!
# pane border
tmux_append_seto "pane-active-border-style" "fg=${col_fg2}"
diff --git a/src/theme_gruvbox_light.sh b/src/theme_gruvbox_light.sh
index ebbf4d9..f5c21fd 100644
--- a/src/theme_gruvbox_light.sh
+++ b/src/theme_gruvbox_light.sh
@@ -5,32 +5,25 @@
#
# shellcheck disable=SC2154
theme_set_light() {
- local _left_status_a _right_status_x _right_status_y _right_status_z _statusbar_alpha
+ local _left_status_value _right_status_value _window_status_current_format _window_status_format
_left_status_a=$1
_right_status_x=$2
_right_status_y=$3
_right_status_z=$4
- _statusbar_alpha=$5
tmux_append_seto "status" "on"
- # default statusbar bg color
- local _statusbar_bg="${col_bg1}"
- if [[ "$_statusbar_alpha" == "true" ]]; then _statusbar_bg="default"; fi
- tmux_append_seto "status-style" "bg=${_statusbar_bg},fg=${col_fg1}"
+ # default statusbar color
+ tmux_append_seto "status-style" "bg=${col_bg1},fg=${col_fg1}"
# default window title colors
- local _window_title_bg=${col_yellow2}
- if [[ "$_statusbar_alpha" == "true" ]]; then _window_title_bg="default"; fi
- tmux_append_setwo "window-status-style" "bg=${_window_title_bg},fg=${col_bg1}"
+ tmux_append_setwo "window-status-style" "bg=${col_yellow2},fg=${col_bg1}"
# default window with an activity alert
tmux_append_setwo "window-status-activity-style" "bg=${col_bg1},fg=${col_fg3}"
# active window title colors
- local _active_window_title_bg=${col_yellow2}
- if [[ "$_statusbar_alpha" == "true" ]]; then _active_window_title_bg="default"; fi
- tmux_append_setwo "window-status-current-style" "bg=${_active_window_title_bg},fg=${col_bg1}" # TODO cosider removing red!
+ tmux_append_setwo "window-status-current-style" "bg=default,fg=${col_bg1}" # TODO cosider removing red!
# pane border
tmux_append_seto "pane-active-border-style" "fg=${col_fg2}"
@@ -61,19 +54,8 @@ theme_set_light() {
tmux_append_setwo "window-status-separator" ""
tmux_append_seto "status-left" "#[bg=${col_bg3},fg=${col_fg3}] ${_left_status_a} #[bg=${col_bg1},fg=${col_bg3},nobold,noitalics,nounderscore]"
+ tmux_append_seto "status-right" "#[bg=${col_bg1},fg=${col_bg2},nobold,nounderscore,noitalics]#[bg=${col_bg2},fg=${col_fg4}] ${_right_status_x} ${_right_status_y} #[bg=${col_bg2},fg=${col_fg3},nobold,noitalics,nounderscore]#[bg=${col_fg3},fg=${col_bg1}] ${_right_status_z}"
- # right status
- local _status_right_bg=${col_bg1}
- if [[ "$_statusbar_alpha" == "true" ]]; then _status_right_bg="default"; fi
- tmux_append_seto "status-right" "#[bg=${_status_right_bg},fg=${col_bg2},nobold,nounderscore,noitalics]#[bg=${col_bg2},fg=${col_fg4}] ${_right_status_x} ${_right_status_y} #[bg=${col_bg2},fg=${col_fg3},nobold,noitalics,nounderscore]#[bg=${col_fg3},fg=${col_bg1}] ${_right_status_z}"
-
- # current window
- local _current_window_status_format_bg=${col_bg1}
- if [[ "$_statusbar_alpha" == "true" ]]; then _current_window_status_format_bg="default"; fi
- tmux_append_setwo "window-status-current-format" "#[bg=${col_yellow2},fg=${col_bg1},nobold,noitalics,nounderscore]#[bg=${col_yellow2},fg=${col_bg2}] #I #[bg=${col_yellow2},fg=${col_bg2},bold] #W#{?window_zoomed_flag,*Z,} #{?window_end_flag,#[bg=${_current_window_status_format_bg}],#[bg=${col_bg1}]}#[fg=${col_yellow2},nobold,noitalics,nounderscore]"
-
- # default window
- local _default_window_status_format_bg=${col_bg1}
- if [[ "$_statusbar_alpha" == "true" ]]; then _default_window_status_format_bg="default"; fi
- tmux_append_setwo "window-status-format" "#[bg=${col_bg2},fg=${col_bg1},noitalics]#[bg=${col_bg2},fg=${col_fg1}] #I #[bg=${col_bg2},fg=${col_fg1}] #W #{?window_end_flag,#[bg=${_default_window_status_format_bg}],#[bg=${col_bg1}]}#[fg=${col_bg2},noitalics]"
+ tmux_append_setwo "window-status-current-format" "#[bg=${col_yellow2},fg=${col_bg1},nobold,noitalics,nounderscore]#[bg=${col_yellow2},fg=${col_bg2}] #I #[bg=${col_yellow2},fg=${col_bg2},bold] #W#{?window_zoomed_flag,*Z,} #[bg=${col_bg1},fg=${col_yellow2},nobold,noitalics,nounderscore]"
+ tmux_append_setwo "window-status-format" "#[bg=${col_bg2},fg=${col_bg1},noitalics]#[bg=${col_bg2},fg=${col_fg1}] #I #[bg=${col_bg2},fg=${col_fg1}] #W #[bg=${col_bg1},fg=${col_bg2},noitalics]"
}
diff --git a/src/theme_gruvbox_light256.sh b/src/theme_gruvbox_light256.sh
deleted file mode 100644
index 9ae1a43..0000000
--- a/src/theme_gruvbox_light256.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/bash
-
-# Themes may use different colors in sets therefore we setup dark and light
-# separately.
-#
-# shellcheck disable=SC2154
-theme_set_light256() {
- local _left_status_a _right_status_x _right_status_y _right_status_z _statusbar_alpha
- _left_status_a=$1
- _right_status_x=$2
- _right_status_y=$3
- _right_status_z=$4
- _statusbar_alpha=$5
-
- tmux_append_seto "status" "on"
-
- # default statusbar bg color
- local _statusbar_bg="${col_bg2}"
- if [[ "$_statusbar_alpha" == "true" ]]; then _statusbar_bg="default"; fi
- tmux_append_seto "status-style" "bg=${_statusbar_bg},fg=${col_fg1}"
-
- # default window title colors
- local _window_title_bg=${col_yellow2}
- if [[ "$_statusbar_alpha" == "true" ]]; then _window_title_bg="default"; fi
- tmux_append_setwo "window-status-style" "bg=${_window_title_bg},fg=${col_bg1}"
-
- # default window with an activity alert
- tmux_append_setwo "window-status-activity-style" "bg=${col_bg1},fg=${col_fg3}"
-
- # active window title colors
- local _active_window_title_bg=${col_yellow2}
- if [[ "$_statusbar_alpha" == "true" ]]; then _active_window_title_bg="default"; fi
- tmux_append_setwo "window-status-current-style" "bg=${_active_window_title_bg},fg=${col_bg1}" # TODO cosider removing red!
-
- # pane border
- tmux_append_seto "pane-active-border-style" "fg=${col_fg2}"
- tmux_append_seto "pane-border-style" "fg=${col_bg1}"
-
- # message infos
- tmux_append_seto "message-style" "bg=${col_bg2},fg=${col_fg1}"
-
- # writing commands inactive
- tmux_append_seto "message-command-style" "bg=${col_fg3},fg=${col_bg1}"
-
- # pane number display
- tmux_append_seto "display-panes-active-colour" "${col_fg2}"
- tmux_append_seto "display-panes-colour" "${col_bg1}"
-
- # clock
- tmux_append_setwo "clock-mode-colour" "${col_blue2}"
-
- # bell
- tmux_append_setwo "window-status-bell-style" "bg=${col_red2},fg=${col_bg}"
-
- ## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
- tmux_append_seto "status-justify" "left"
- tmux_append_seto "status-left-style" none
- tmux_append_seto "status-left-length" "80"
- tmux_append_seto "status-right-style" none
- tmux_append_seto "status-right-length" "80"
- tmux_append_setwo "window-status-separator" ""
-
- tmux_append_seto "status-left" "#[bg=${col_fg2},fg=${col_bg1}] ${_left_status_a} #[bg=${col_bg2},fg=${col_fg2},nobold,noitalics,nounderscore]"
-
- # right status
- local _status_right_bg=${col_bg2}
- if [[ "$_statusbar_alpha" == "true" ]]; then _status_right_bg="default"; fi
- tmux_append_seto "status-right" "#[bg=${_status_right_bg},fg=${col_fg4},nobold,nounderscore,noitalics]#[bg=${col_fg4},fg=${col_bg1}] ${_right_status_x} ${_right_status_y} #[bg=${col_fg4},fg=${col_fg2},nobold,noitalics,nounderscore]#[bg=${col_fg2},fg=${col_bg1}] ${_right_status_z}"
-
- # current window
- local _current_window_status_format_bg=${col_bg2}
- if [[ "$_statusbar_alpha" == "true" ]]; then _current_window_status_format_bg="default"; fi
- tmux_append_setwo "window-status-current-format" "#[bg=${col_yellow},fg=${col_bg2},nobold,noitalics,nounderscore]#[bg=${col_yellow},fg=${col_fg1}] #I #[bg=${col_yellow},fg=${col_fg1},bold] #W#{?window_zoomed_flag,*Z,} #{?window_end_flag,#[bg=${_current_window_status_format_bg}],#[bg=${col_bg2}]}#[fg=${col_yellow},nobold,noitalics,nounderscore]"
-
- # default window
- local _default_window_status_format_bg=${col_bg2}
- if [[ "$_statusbar_alpha" == "true" ]]; then _default_window_status_format_bg="default"; fi
- tmux_append_setwo "window-status-format" "#[bg=${col_bg3},fg=${col_bg2},noitalics]#[bg=${col_bg3},fg=${col_fg2}] #I #[bg=${col_bg3},fg=${col_fg2}] #W #{?window_end_flag,#[bg=${_default_window_status_format_bg}],#[bg=${col_bg2}]}#[fg=${col_bg3},noitalics]"
-}
diff --git a/src/tmux_utils.sh b/src/tmux_utils.sh
index 87ab063..cc235b3 100644
--- a/src/tmux_utils.sh
+++ b/src/tmux_utils.sh
@@ -1,5 +1,20 @@
#!/bin/bash
+# get desired option from tmux or default
+tmux_get_option_or_default() {
+ local _option_name _default_value
+ _option_name="$1"
+ _default_value="$2"
+
+ local _current_option_value
+ _current_option_value=$(tmux show-option -gqv "$_option_name")
+ if [[ -n "$_current_option_value" ]]; then
+ echo "$_current_option_value"
+ else
+ echo "$_default_value"
+ fi
+}
+
# get desired tmux option or use given default value
tmux_get_option() {
local _option_name _default_value
diff --git a/tests/linux/README.md b/tests/linux/README.md
deleted file mode 100644
index fe1095b..0000000
--- a/tests/linux/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Linux tests
-
-Those tests are meant to run on linux:
-
-- ubuntu 20.04 LTS
-- with bash
diff --git a/tests/linux/test_check_gruvbox_dark256_enabled.sh b/tests/linux/test_check_gruvbox_dark256_enabled.sh
deleted file mode 100755
index aad203f..0000000
--- a/tests/linux/test_check_gruvbox_dark256_enabled.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../test_helpers.sh"
-
-main() {
- helper_tearup_linux
-
- cat <~/.tmux.conf
-# List of plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-
-# Other plugins
-set -g @plugin 'egel/tmux-gruvbox'
-set -g @tmux-gruvbox 'dark256'
-
-# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
-run '~/.tmux/plugins/tpm/tpm'
-EOF
-
- cat ~/.tmux.conf
-
- # it's essential to link current repo to the plugins' directory
- ln -sfv "$CURRENT_DIR/../../../tmux-gruvbox" "${HOME}/.tmux/plugins/tmux-gruvbox"
-
- helper_install_tpm_plugins
-
- # start new detached session
- tmux new -d
-
- # check if left side match
- _status_left_expected="#[bg=colour241,fg=colour248] #S #[bg=colour237,fg=colour241,nobold,noitalics,nounderscore]"
- _status_left_current=$(helper_tmux_get_statusleft)
- if [[ "$_status_left_current" != "$_status_left_expected" ]]; then
- helper_print_fail "status-left did not match" "$_status_left_current" "$_status_left_expected"
- helper_teardown
- exit 1
- fi
- # check if status is not transparent
- _status_style_expected="bg=colour237,fg=colour223"
- _status_style_current=$(helper_tmux_get_statusstyle)
- if [[ "$_status_style_current" != "$_status_style_expected" ]]; then
- helper_print_fail "status-style did not match" "$_status_style_current" "$_status_style_expected"
- helper_teardown
- exit 1
- fi
-
- helper_print_success "status-left match"
- helper_teardown
- exit 0
-
-}
-
-main "$@"
diff --git a/tests/linux/test_check_gruvbox_dark256_transparent_enabled.sh b/tests/linux/test_check_gruvbox_dark256_transparent_enabled.sh
deleted file mode 100755
index 76fcfdc..0000000
--- a/tests/linux/test_check_gruvbox_dark256_transparent_enabled.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../test_helpers.sh"
-
-main() {
- helper_tearup_linux
-
- cat <~/.tmux.conf
-# List of plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-
-# Other plugins
-set -g @plugin 'egel/tmux-gruvbox'
-set -g @tmux-gruvbox 'dark256'
-set -g @tmux-gruvbox-statusbar-alpha 'true'
-
-# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
-run '~/.tmux/plugins/tpm/tpm'
-EOF
-
- cat ~/.tmux.conf
-
- # it's essential to link current repo to the plugins' directory
- ln -sfv "$CURRENT_DIR/../../../tmux-gruvbox" "${HOME}/.tmux/plugins/tmux-gruvbox"
-
- helper_install_tpm_plugins
-
- # start new detached session
- tmux new -d
-
- # check if left side match
- _status_left_expected="#[bg=colour241,fg=colour248] #S #[bg=colour237,fg=colour241,nobold,noitalics,nounderscore]"
- _status_left_current=$(helper_tmux_get_statusleft)
- if [[ "$_status_left_current" != "$_status_left_expected" ]]; then
- helper_print_fail "status-left did not match" "$_status_left_current" "$_status_left_expected"
- helper_teardown
- exit 1
- fi
- # check if status is not transparent
- _status_style_expected="bg=default,fg=colour223"
- _status_style_current=$(helper_tmux_get_statusstyle)
- if [[ "$_status_style_current" != "$_status_style_expected" ]]; then
- helper_print_fail "status-style did not match" "$_status_style_current" "$_status_style_expected"
- helper_teardown
- exit 1
- fi
-
- helper_print_success "status-left match"
- helper_teardown
- exit 0
-
-}
-
-main "$@"
diff --git a/tests/linux/test_check_gruvbox_dark_enabled.sh b/tests/linux/test_check_gruvbox_dark_enabled.sh
deleted file mode 100755
index e8d0505..0000000
--- a/tests/linux/test_check_gruvbox_dark_enabled.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../test_helpers.sh"
-
-main() {
- helper_tearup_linux
-
- cat <~/.tmux.conf
-# List of plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-
-# Other plugins
-set -g @plugin 'egel/tmux-gruvbox'
-set -g @tmux-gruvbox 'dark'
-
-# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
-run '~/.tmux/plugins/tpm/tpm'
-EOF
-
- cat ~/.tmux.conf
-
- # it's essential to link current repo to the plugins' directory
- ln -sfv "$CURRENT_DIR/../../../tmux-gruvbox" "${HOME}/.tmux/plugins/tmux-gruvbox"
-
- helper_install_tpm_plugins
-
- # start new detached session
- tmux new -d
-
- # check if left side match
- _status_left_expected="#[bg=#665c54,fg=#bdae93] #S #[bg=#3c3836,fg=#665c54,nobold,noitalics,nounderscore]"
- _status_left_current=$(helper_tmux_get_statusleft)
- if [[ "$_status_left_current" != "$_status_left_expected" ]]; then
- helper_print_fail "status-left did not match" "$_status_left_current" "$_status_left_expected"
- helper_teardown
- exit 1
- fi
- # check if status is not transparent
- _status_style_expected="bg=#3c3836,fg=#ebdbb2"
- _status_style_current=$(helper_tmux_get_statusstyle)
- if [[ "$_status_style_current" != "$_status_style_expected" ]]; then
- helper_print_fail "status-style did not match" "$_status_style_current" "$_status_style_expected"
- helper_teardown
- exit 1
- fi
-
- helper_print_success "status-left match"
- helper_teardown
- exit 0
-
-}
-
-main "$@"
diff --git a/tests/linux/test_check_gruvbox_dark_transparent_enabled.sh b/tests/linux/test_check_gruvbox_dark_transparent_enabled.sh
deleted file mode 100755
index fff0358..0000000
--- a/tests/linux/test_check_gruvbox_dark_transparent_enabled.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../test_helpers.sh"
-
-main() {
- helper_tearup_linux
-
- cat <~/.tmux.conf
-# List of plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-
-# Other plugins
-set -g @plugin 'egel/tmux-gruvbox'
-set -g @tmux-gruvbox 'dark'
-set -g @tmux-gruvbox-statusbar-alpha 'true'
-
-# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
-run '~/.tmux/plugins/tpm/tpm'
-EOF
-
- cat ~/.tmux.conf
-
- # it's essential to link current repo to the plugins' directory
- ln -sfv "$CURRENT_DIR/../../../tmux-gruvbox" "${HOME}/.tmux/plugins/tmux-gruvbox"
-
- helper_install_tpm_plugins
-
- # start new detached session
- tmux new -d
-
- # check if left side match
- _status_left_expected="#[bg=#665c54,fg=#bdae93] #S #[bg=#3c3836,fg=#665c54,nobold,noitalics,nounderscore]"
- _status_left_current=$(helper_tmux_get_statusleft)
- if [[ "$_status_left_current" != "$_status_left_expected" ]]; then
- helper_print_fail "status-left did not match" "$_status_left_current" "$_status_left_expected"
- helper_teardown
- exit 1
- fi
- # check if status is not transparent
- _status_style_expected="bg=default,fg=#ebdbb2"
- _status_style_current=$(helper_tmux_get_statusstyle)
- if [[ "$_status_style_current" != "$_status_style_expected" ]]; then
- helper_print_fail "status-style did not match" "$_status_style_current" "$_status_style_expected"
- helper_teardown
- exit 1
- fi
-
- helper_print_success "status-left match"
- helper_teardown
- exit 0
-
-}
-
-main "$@"
diff --git a/tests/linux/test_check_gruvbox_light256_enabled.sh b/tests/linux/test_check_gruvbox_light256_enabled.sh
deleted file mode 100755
index b9bfcd7..0000000
--- a/tests/linux/test_check_gruvbox_light256_enabled.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../test_helpers.sh"
-
-main() {
- helper_tearup_linux
-
- cat <~/.tmux.conf
-# List of plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-
-# Other plugins
-set -g @plugin 'egel/tmux-gruvbox'
-set -g @tmux-gruvbox 'light256'
-
-# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
-run '~/.tmux/plugins/tpm/tpm'
-EOF
-
- cat ~/.tmux.conf
-
- # it's essential to link current repo to the plugins' directory
- ln -sfv "$CURRENT_DIR/../../../tmux-gruvbox" "${HOME}/.tmux/plugins/tmux-gruvbox"
-
- helper_install_tpm_plugins
-
- # start new detached session
- tmux new -d
-
- # check if left side match
- _status_left_expected="#[bg=colour239,fg=colour223] #S #[bg=colour250,fg=colour239,nobold,noitalics,nounderscore]"
- _status_left_current=$(helper_tmux_get_statusleft)
- if [[ "$_status_left_current" != "$_status_left_expected" ]]; then
- helper_print_fail "status-left did not match" "$_status_left_current" "$_status_left_expected"
- helper_teardown
- exit 1
- fi
- # check if status is not transparent
- _status_style_expected="bg=colour250,fg=colour237"
- _status_style_current=$(helper_tmux_get_statusstyle)
- if [[ "$_status_style_current" != "$_status_style_expected" ]]; then
- helper_print_fail "status-style did not match" "$_status_style_current" "$_status_style_expected"
- helper_teardown
- exit 1
- fi
-
- helper_print_success "status-left match"
- helper_teardown
- exit 0
-
-}
-
-main "$@"
diff --git a/tests/linux/test_check_gruvbox_light256_transparent_enabled.sh b/tests/linux/test_check_gruvbox_light256_transparent_enabled.sh
deleted file mode 100755
index b8cf8a6..0000000
--- a/tests/linux/test_check_gruvbox_light256_transparent_enabled.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../test_helpers.sh"
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../tmux_utils.sh"
-
-main() {
- helper_tearup_linux
-
- cat <~/.tmux.conf
-# List of plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-
-# Other plugins
-set -g @plugin 'egel/tmux-gruvbox'
-set -g @tmux-gruvbox 'light256'
-set -g @tmux-gruvbox-statusbar-alpha 'true'
-
-# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
-run '~/.tmux/plugins/tpm/tpm'
-EOF
-
- cat ~/.tmux.conf
-
- # it's essential to link current repo to the plugins' directory
- ln -sfv "$CURRENT_DIR/../../../tmux-gruvbox" "${HOME}/.tmux/plugins/tmux-gruvbox"
-
- helper_install_tpm_plugins
-
- # start new detached session
- tmux new -d
-
- # check if left side match
- _status_left_expected="#[bg=colour239,fg=colour223] #S #[bg=colour250,fg=colour239,nobold,noitalics,nounderscore]"
- _status_left_current=$(helper_tmux_get_statusleft)
- if [[ "$_status_left_current" != "$_status_left_expected" ]]; then
- helper_print_fail "status-left did not match" "$_status_left_current" "$_status_left_expected"
- helper_teardown
- exit 1
- fi
- # check if status is not transparent
- _status_style_expected="bg=default,fg=colour237"
- _status_style_current=$(helper_tmux_get_statusstyle)
- if [[ "$_status_style_current" != "$_status_style_expected" ]]; then
- helper_print_fail "status-style did not match" "$_status_style_current" "$_status_style_expected"
- helper_teardown
- exit 1
- fi
-
- helper_print_success "status-left match"
- helper_teardown
- exit 0
-
-}
-
-main "$@"
diff --git a/tests/linux/test_check_gruvbox_light_enabled.sh b/tests/linux/test_check_gruvbox_light_enabled.sh
deleted file mode 100755
index 8c4404f..0000000
--- a/tests/linux/test_check_gruvbox_light_enabled.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../test_helpers.sh"
-
-main() {
- helper_tearup_linux
-
- cat <~/.tmux.conf
-# List of plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-
-# Other plugins
-set -g @plugin 'egel/tmux-gruvbox'
-set -g @tmux-gruvbox 'light'
-
-# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
-run '~/.tmux/plugins/tpm/tpm'
-EOF
-
- cat ~/.tmux.conf
-
- # it's essential to link current repo to the plugins' directory
- ln -sfv "$CURRENT_DIR/../../../tmux-gruvbox" "${HOME}/.tmux/plugins/tmux-gruvbox"
-
- helper_install_tpm_plugins
-
- # start new detached session
- tmux new -d
-
- # check if left side match
- _status_left_expected="#[bg=#bdae93,fg=#665c54] #S #[bg=#ebdbb2,fg=#bdae93,nobold,noitalics,nounderscore]"
- _status_left_current=$(helper_tmux_get_statusleft)
- if [[ "$_status_left_current" != "$_status_left_expected" ]]; then
- helper_print_fail "status-left did not match" "$_status_left_current" "$_status_left_expected"
- helper_teardown
- exit 1
- fi
- # check if status is not transparent
- _status_style_expected="bg=#ebdbb2,fg=#3c3836"
- _status_style_current=$(helper_tmux_get_statusstyle)
- if [[ "$_status_style_current" != "$_status_style_expected" ]]; then
- helper_print_fail "status-style did not match" "$_status_style_current" "$_status_style_expected"
- helper_teardown
- exit 1
- fi
-
- helper_print_success "status-left match"
- helper_teardown
- exit 0
-
-}
-
-main "$@"
diff --git a/tests/linux/test_check_gruvbox_light_transparent_enabled.sh b/tests/linux/test_check_gruvbox_light_transparent_enabled.sh
deleted file mode 100755
index 309fc6f..0000000
--- a/tests/linux/test_check_gruvbox_light_transparent_enabled.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../test_helpers.sh"
-
-main() {
- helper_tearup_linux
-
- cat <~/.tmux.conf
-# List of plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-
-# Other plugins
-set -g @plugin 'egel/tmux-gruvbox'
-set -g @tmux-gruvbox 'light'
-set -g @tmux-gruvbox-statusbar-alpha 'true'
-
-# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
-run '~/.tmux/plugins/tpm/tpm'
-EOF
-
- cat ~/.tmux.conf
-
- # it's essential to link current repo to the plugins' directory
- ln -sfv "$CURRENT_DIR/../../../tmux-gruvbox" "${HOME}/.tmux/plugins/tmux-gruvbox"
-
- helper_install_tpm_plugins
-
- # start new detached session
- tmux new -d
-
- # check if left side match
- _status_left_expected="#[bg=#bdae93,fg=#665c54] #S #[bg=#ebdbb2,fg=#bdae93,nobold,noitalics,nounderscore]"
- _status_left_current=$(helper_tmux_get_statusleft)
- if [[ "$_status_left_current" != "$_status_left_expected" ]]; then
- helper_print_fail "status-left did not match" "$_status_left_current" "$_status_left_expected"
- helper_teardown
- exit 1
- fi
- # check if status is not transparent
- _status_style_expected="bg=default,fg=#3c3836"
- _status_style_current=$(helper_tmux_get_statusstyle)
- if [[ "$_status_style_current" != "$_status_style_expected" ]]; then
- helper_print_fail "status-style did not match" "$_status_style_current" "$_status_style_expected"
- helper_teardown
- exit 1
- fi
-
- helper_print_success "status-left match"
- helper_teardown
- exit 0
-
-}
-
-main "$@"
diff --git a/tests/linux/test_without_theme_fallback_to_gruvbox_dark256.sh b/tests/linux/test_without_theme_fallback_to_gruvbox_dark256.sh
deleted file mode 100755
index b150655..0000000
--- a/tests/linux/test_without_theme_fallback_to_gruvbox_dark256.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# shellcheck disable=SC1091
-source "${CURRENT_DIR}/../test_helpers.sh"
-
-####
-# Test: when the theme is not defined in config it should fallback to 'dark256'
-#
-main() {
- helper_tearup_linux
-
- # set config without theme defined
- cat <~/.tmux.conf
-# List of plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-
-# Other plugins
-set -g @plugin 'egel/tmux-gruvbox'
-
-# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
-run '~/.tmux/plugins/tpm/tpm'
-EOF
-
- cat ~/.tmux.conf
-
- # it's essential to link current repo to the plugins' directory
- ln -sfv "$CURRENT_DIR/../../../tmux-gruvbox" "${HOME}/.tmux/plugins/tmux-gruvbox"
-
- helper_install_tpm_plugins
-
- # start new detached session
- tmux new -d
-
- # check if left side match
- _status_left_expected="#[bg=colour241,fg=colour248] #S #[bg=colour237,fg=colour241,nobold,noitalics,nounderscore]"
- _status_left_current=$(helper_tmux_get_statusleft)
- if [[ "$_status_left_current" != "$_status_left_expected" ]]; then
- helper_print_fail "status-left did not match" "$_status_left_current" "$_status_left_expected"
- helper_teardown
- exit 1
- fi
- # check if status is not transparent
- _status_style_expected="bg=colour237,fg=colour223"
- _status_style_current=$(helper_tmux_get_statusstyle)
- if [[ "$_status_style_current" != "$_status_style_expected" ]]; then
- helper_print_fail "status-style did not match" "$_status_style_current" "$_status_style_expected"
- helper_teardown
- exit 1
- fi
-
- helper_print_success "status-left match"
- helper_teardown
- exit 0
-}
-
-main "$@"
diff --git a/tests/run_all_linux_tests.sh b/tests/run_all_linux_tests.sh
deleted file mode 100755
index 77cde66..0000000
--- a/tests/run_all_linux_tests.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env bash
-
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-main() {
- set -e # exit on error
- declare -i _countFailures
- local _files
- _countFailures=0
- _files=$(find "$CURRENT_DIR/linux" -name "test_*" -type f)
- for test in $_files; do
- printf "\n"
- printf "\n=============================================="
- printf "\n %s" "$test"
- printf "\n=============================================="
- printf "\n"
- bash -c "$test"
-
- # run all and count failures
- retVal=$?
- if [ $retVal -eq 1 ]; then
- _countFailures+=1
- fi
- done
-
- # check if anything failed and fail
- if [ "$_countFailures" -gt 0 ]; then
- exit 1
- fi
-}
-
-main "$@"
diff --git a/tests/test_helpers.sh b/tests/test_helpers.sh
deleted file mode 100644
index 7b199a4..0000000
--- a/tests/test_helpers.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-
-helper_teardown() {
- echo "TEARDOWN"
- rm -rf ~/.tmux.conf
- rm -rf ~/.tmux/
- tmux kill-server >/dev/null 2>&1
-}
-
-helper_tearup_linux() {
- if [[ "$(uname)" != "Linux" ]]; then
- echo "NOT LINUX. Failed & exit."
- exit 1
- fi
- echo "TEARUP LINUX"
-
- # install software
- sudo apt update -y
- sudo apt install -y tmux git
-
- # download TPM
- mkdir -p ~/.tmux/plugins/
- git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
-}
-
-helper_print_fail() {
- local _msg="${1}"
- local _current_val="${2}"
- local _expected_val="${3}"
- printf "FAIL. %s\n" "${_msg}"
- printf "current value:\t%s\n" "$_current_val"
- printf "expected value:\t%s\n" "$_expected_val"
-}
-
-helper_print_success() {
- local _msg="${1}"
- printf "SUCCESS. %s\n" "${_msg}"
-}
-
-helper_print_fail_and_exit() {
- helper_print_fail "$1" "$2" "$3"
- exit 1
-}
-
-helper_print_success_and_exit() {
- helper_print_success "$1" "$2" "$3"
- exit 0
-}
-
-# install TMP plugins with command
-helper_install_tpm_plugins() {
- bash -c "${HOME}/.tmux/plugins/tpm/scripts/install_plugins.sh install_plugins"
-}
-
-# return the value of tmux status-style
-helper_tmux_get_statusstyle() {
- local _val
- _val=$(tmux show-option -gqv status-style)
- echo "$_val"
-}
-
-# return the value of tmux status-left
-helper_tmux_get_statusleft() {
- local _val
- _val=$(tmux show-option -gqv status-left)
- echo "$_val"
-}