feat: update information about dark256 & light256 themes
This commit is contained in:
parent
fec8ecdca4
commit
4a5d510c15
4 changed files with 100 additions and 37 deletions
117
README.md
117
README.md
|
@ -25,60 +25,126 @@ Theme with 'retro groove' flavor for [Tmux][github-tmux], based on Pavel Pertsev
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
**Available Themes**
|
### Install via [TPM][github-tpm] (recommended)
|
||||||
|
|
||||||
- [`dark`](./docs/assets/img/gruvbox-dark-theme.png)
|
Add plugin at the top list of TPM plugins in `.tmux.conf` and select desired theme.
|
||||||
- [`light`](./docs/assets/img/gruvbox-light-theme.png)
|
|
||||||
- `dark-transparent` (experimental)
|
|
||||||
- `light-transparent` (experimental)
|
|
||||||
|
|
||||||
### Install manually
|
|
||||||
|
|
||||||
The simplest way is just:
|
|
||||||
|
|
||||||
> [!TIP]
|
|
||||||
> Always make a backup of your config files before any action.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cat tmux-gruvbox-dark.conf >> ~/.tmux.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
### Install through [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm)
|
|
||||||
|
|
||||||
Add plugin to the list of TPM plugins in `.tmux.conf` and select desired theme.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# ~/.tmux.conf
|
||||||
set -g @plugin 'egel/tmux-gruvbox'
|
set -g @plugin 'egel/tmux-gruvbox'
|
||||||
set -g @tmux-gruvbox 'dark' # or 'light', 'dark-transparent', 'light-transparent'
|
# 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.
|
Hit `prefix + I` to fetch the plugin and source it. Your Tmux should be updated with the theme at this point.
|
||||||
|
|
||||||
|
### Install manually
|
||||||
|
|
||||||
|
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 ...
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Add theme at to top of your `~/.tmux.conf` config.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# ~/.tmux.conf
|
||||||
|
run ~/projects/tmux-gruvbox/tmux-gruvbox.tmux
|
||||||
|
# set desired options...
|
||||||
|
set -g @tmux-gruvbox 'dark' # or light
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration options
|
||||||
|
|
||||||
|
### Theme
|
||||||
|
|
||||||
|
- default value: `dark256`
|
||||||
|
- available themes:
|
||||||
|
- [`dark256`](./docs/assets/img/gruvbox-dark-theme.png)
|
||||||
|
- [`light256`](./docs/assets/img/gruvbox-light-theme.png)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
set -g @tmux-gruvbox 'dark256'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Transparent status-bar
|
||||||
|
|
||||||
|
- default value: `'false'`
|
||||||
|
- tmux >= 3.2 (experimental)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
set -g @tmux-gruvbox-statusbar-alpha 'true'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Left Status (Section A)
|
||||||
|
|
||||||
|
- default value: `'#S'`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
set -g @tmux-gruvbox-left-status-a
|
||||||
|
```
|
||||||
|
|
||||||
|
### Right Status (Section X)
|
||||||
|
|
||||||
|
- default value: `'%Y-%m-%d'`
|
||||||
|
|
||||||
|
This section is customizable for user, and by default contains current date.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
set -g @tmux-gruvbox-right-status-x
|
||||||
|
```
|
||||||
|
|
||||||
|
### Right Status (Section Y)
|
||||||
|
|
||||||
|
- default value: `'%H:%M'`
|
||||||
|
|
||||||
|
This section is customizable for user, and by default contains current time.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# set different time format
|
||||||
|
set -g @tmux-gruvbox-right-status-y '%H:%M'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Right Status (Section Z)
|
||||||
|
|
||||||
|
- default value: `'#h'`
|
||||||
|
|
||||||
|
This section is customizable for user, and by default contains hostname.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# enhance this section with other plugin
|
||||||
|
set -g @tmux-gruvbox-right-status-z '#h #{tmux_mode_indicator} '
|
||||||
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
To run project locally:
|
To run project locally:
|
||||||
|
|
||||||
1. clone the repo to desired place
|
1. clone the repository to desired place
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd $HOME/projects/
|
cd $HOME/projects/
|
||||||
git clone ...
|
git clone ...
|
||||||
```
|
```
|
||||||
|
|
||||||
1. create symlink in plugin dir to the cloned repo:
|
1. create a symlink to the cloned repository (best in the standard [TPM][github-tpm] plugin directory):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# cd to tmux plugin directory
|
# cd to tmux plugin directory
|
||||||
cd ~/.tmux/plugins/
|
cd ~/.tmux/plugins/
|
||||||
|
|
||||||
# create simlink to cloned repo
|
# create symlink to cloned repo
|
||||||
ln -sf $HOME/projects/tmux-gruvbox/ tmux-gruvbox
|
ln -sf $HOME/projects/tmux-gruvbox/ tmux-gruvbox
|
||||||
```
|
```
|
||||||
|
|
||||||
1. and in `~/.tmux.conf` set
|
1. and in `~/.tmux.conf` set
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# add plugin
|
# ~/.tmux.conf
|
||||||
set -g @plugin 'egel/tmux-gruvbox'
|
set -g @plugin 'egel/tmux-gruvbox'
|
||||||
# set desired options...
|
# set desired options...
|
||||||
set -g @tmux-gruvbox 'dark'
|
set -g @tmux-gruvbox 'dark'
|
||||||
|
@ -101,6 +167,7 @@ GPLv3 - Maciej Sypień
|
||||||
[github-hack]: https://github.com/chrissimpkins/Hack
|
[github-hack]: https://github.com/chrissimpkins/Hack
|
||||||
[github-nerd-fonts]: https://github.com/ryanoasis/nerd-fonts
|
[github-nerd-fonts]: https://github.com/ryanoasis/nerd-fonts
|
||||||
[github-alacritty]: https://github.com/alacritty/alacritty
|
[github-alacritty]: https://github.com/alacritty/alacritty
|
||||||
|
[github-tpm]: https://github.com/tmux-plugins/tpm
|
||||||
[tmux-color-solarized]: https://github.com/seebi/tmux-colors-solarized
|
[tmux-color-solarized]: https://github.com/seebi/tmux-colors-solarized
|
||||||
[pexcel-1]: https://www.pexels.com/photo/urban-photo-of-an-alley-2411688/
|
[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/
|
[pexcel-2]: https://www.pexels.com/photo/lights-hanging-above-the-alley-in-a-city-at-night-27044195/
|
||||||
|
|
|
@ -13,10 +13,6 @@ declate -a TMUX_CMDS
|
||||||
source "${CURRENT_DIR}/src/helper_methods.sh"
|
source "${CURRENT_DIR}/src/helper_methods.sh"
|
||||||
# shellcheck disable=1091
|
# shellcheck disable=1091
|
||||||
source "${CURRENT_DIR}/src/tmux_utils.sh"
|
source "${CURRENT_DIR}/src/tmux_utils.sh"
|
||||||
# shellcheck disable=1091
|
|
||||||
source "${CURRENT_DIR}/src/theme_gruvbox_dark256.sh"
|
|
||||||
# shellcheck disable=1091
|
|
||||||
source "${CURRENT_DIR}/src/theme_gruvbox_light256.sh"
|
|
||||||
|
|
||||||
readonly TMUX_GRUVBOX="@tmux-gruvbox"
|
readonly TMUX_GRUVBOX="@tmux-gruvbox"
|
||||||
readonly TMUX_GRUVBOX_STATUSBAR_ALPHA="@tmux-gruvbox-statusbar-alpha"
|
readonly TMUX_GRUVBOX_STATUSBAR_ALPHA="@tmux-gruvbox-statusbar-alpha"
|
||||||
|
@ -45,15 +41,15 @@ main() {
|
||||||
case "$_theme" in
|
case "$_theme" in
|
||||||
light | light256)
|
light | light256)
|
||||||
# shellcheck disable=1091
|
# shellcheck disable=1091
|
||||||
source "${CURRENT_DIR}/src/palette_gruvbox_light.sh"
|
source "${CURRENT_DIR}/src/palette_gruvbox_light256.sh"
|
||||||
# shellcheck disable=1091
|
# shellcheck disable=1091
|
||||||
source "${CURRENT_DIR}/src/theme_gruvbox_light256.sh"
|
source "${CURRENT_DIR}/src/theme_gruvbox_light.sh"
|
||||||
;;
|
;;
|
||||||
dark | dark256 | *)
|
dark | dark256 | *)
|
||||||
# shellcheck disable=1091
|
# shellcheck disable=1091
|
||||||
source "${CURRENT_DIR}/src/palette_gruvbox_dark.sh"
|
source "${CURRENT_DIR}/src/palette_gruvbox_dark256.sh"
|
||||||
# shellcheck disable=1091
|
# shellcheck disable=1091
|
||||||
source "${CURRENT_DIR}/src/theme_gruvbox_dark256.sh"
|
source "${CURRENT_DIR}/src/theme_gruvbox_dark.sh"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -73,10 +69,10 @@ main() {
|
||||||
|
|
||||||
case $_theme in
|
case $_theme in
|
||||||
light | light256)
|
light | light256)
|
||||||
theme_set_light_256 "${theme_args[@]}"
|
theme_set_light "${theme_args[@]}"
|
||||||
;;
|
;;
|
||||||
dark | dark256 | *)
|
dark | dark256 | *)
|
||||||
theme_set_dark_256 "${theme_args[@]}"
|
theme_set_dark "${theme_args[@]}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# separately.
|
# separately.
|
||||||
#
|
#
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
theme_set_dark_256() {
|
theme_set_dark() {
|
||||||
local _left_status_a _right_status_x _right_status_y _right_status_z _statusbar_alpha
|
local _left_status_a _right_status_x _right_status_y _right_status_z _statusbar_alpha
|
||||||
_left_status_a=$1
|
_left_status_a=$1
|
||||||
_right_status_x=$2
|
_right_status_x=$2
|
|
@ -4,7 +4,7 @@
|
||||||
# separately.
|
# separately.
|
||||||
#
|
#
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
theme_set_light_256() {
|
theme_set_light() {
|
||||||
local _left_status_value _right_status_value _window_status_current_format _window_status_format
|
local _left_status_value _right_status_value _window_status_current_format _window_status_format
|
||||||
_left_status_a=$1
|
_left_status_a=$1
|
||||||
_right_status_x=$2
|
_right_status_x=$2
|
Loading…
Add table
Add a link
Reference in a new issue