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

release/v2.0.0 #35

Merged
merged 23 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,41 @@ 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

### Deprecated

### 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

Expand All @@ -49,3 +70,5 @@ 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
179 changes: 152 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,200 @@
<div align="center">
<img src="./docs/assets/img/[email protected].png" width="200px">
<img src="https://i.imgur.com/Ukyf4Iu.png" width="200px" referrerpolicy="no-referrer">
<h1>Gruvbox theme for Tmux</h1>
</div>

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].
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].

<!--
Using HTML table instead default markdown tables as provide it provide
much better code readability especially for long columns.
-->

<div align="center">
<a href="./docs/assets/img/gruvbox-dark-and-light-theme-structure.png" title="Grovbox dark and light themes for Tmux">
<img src="./docs/assets/img/[email protected].png"
<a href="https://i.imgur.com/uGyGwlC.png" target="_blank" title="Grovbox dark and light themes for Tmux">
<img src="https://i.imgur.com/p6lUnzb.png"
title="Grovbox dark and light themes for Tmux"
width="100%"
height="auto"
style="max-width: 800px; text-align: center; border-radius: 12px; overflow:hidden;" />
style="max-width: 800px; text-align: center; border-radius: 12px; overflow:hidden;"
referrerpolicy="no-referrer"
/>
</a>
</div>

> Screenshot made from macOS [alacritty][github-alacritty] terminal with xterm-256color and [Hack Nerd Font Regular][github-nerd-fonts].<br/>
> Backgrounds by [Aleksandar Pasaric][pexcel-1] and [Vishnu Murali][pexcel-2].
> 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].

## Installation

**Available Themes**
### Install via [TPM][github-tpm] (recommended)

- [`dark`](./docs/assets/img/gruvbox-dark-theme.png)
- [`light`](./docs/assets/img/gruvbox-light-theme.png)
- `dark-transparent` (experimental)
- `light-transparent` (experimental)
Add plugin at the top list of TPM plugins list 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 'egel/tmux-gruvbox'
# set desired theme options...
set -g @tmux-gruvbox 'dark' # or 'dark256', 'light', 'light256'

# other plugins
...
```

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

The simplest way is just:
> [!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

```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 'dark256', 'light', 'light256'
```

## Configuration options

<div align="center">
<a href="https://i.imgur.com/tO5Y1NN.png" target="_blank" title="Grovbox dark and light themes configuration sections">
<img src="https://i.imgur.com/x4tkeU7.png"
title="Grovbox dark and light themes configuration sections"
width="100%"
height="auto"
style="max-width: 800px; text-align: center; border-radius: 12px; overflow:hidden;"
referrerpolicy="no-referrer" />
</a>
</div>

### Theme

- default value: `dark256`

| Theme name | Color palette | Preview link |
| :--------- | :------------ | :-------------------------------------------------------------------- |
| `dark` | 16-bit colors | <a href="https://i.imgur.com/ae88LQI.png" target="_blank">preview</a> |
| `light` | 16-bit colors | <a href="https://i.imgur.com/fvpdRjg.png" target="_blank">preview</a> |
| `dark256` | 256 colors | <a href="https://i.imgur.com/kzQTTCa.png" target="_blank">preview</a> |
| `light256` | 256 colors | <a href="https://i.imgur.com/tQsl6LA.png" target="_blank">preview</a> |

```bash
set -g @tmux-gruvbox 'dark' # dark256, light, light256
```

> [!TIP]
> Always make a backup of your config files before any action.
> 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'`
- tmux >= 3.2 (experimental)

```bash
cat tmux-gruvbox-dark.conf >> ~/.tmux.conf
set -g @tmux-gruvbox-statusbar-alpha 'true'
```

### Install through [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm)
### Left Status (Section A)

Add plugin to the list of TPM plugins in `.tmux.conf` and select desired theme.
- default value: `'#S'` (session name)

```bash
set -g @plugin 'egel/tmux-gruvbox'
set -g @tmux-gruvbox 'dark' # or 'light', 'dark-transparent', 'light-transparent'
set -g @tmux-gruvbox-left-status-a '#S' # tmux's session name
```

Hit `prefix + I` to fetch the plugin and source it. Your Tmux should be updated with the theme at this point.
### Right Status (Section X)

- default value: `'%Y-%m-%d'`

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
```

```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'`

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
```

### Right Status (Section Z)

- default value: `'#h'` (hostname)

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}'
```

> [!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:

1. clone the repo to desired place
1. clone the repository to desired place

```bash
cd $HOME/projects/
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
# cd to tmux plugin directory
cd ~/.tmux/plugins/

# create simlink to cloned repo
# create symlink to cloned repo
ln -sf $HOME/projects/tmux-gruvbox/ tmux-gruvbox
```

1. and in `~/.tmux.conf` set

```bash
# add plugin
# ~/.tmux.conf
set -g @plugin 'egel/tmux-gruvbox'
# set desired options...
set -g @tmux-gruvbox 'dark'
Expand All @@ -96,11 +212,20 @@ To keep the files clean we use few program to help us achieve it:

GPLv3 - Maciej Sypień

[github-tmux]: https://github.com/tmux/tmux
[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-grovbox]: https://github.com/morhetz/gruvbox
[github-hack]: https://github.com/chrissimpkins/Hack
[github-nerd-fonts]: https://github.com/ryanoasis/nerd-fonts
[github-alacritty]: https://github.com/alacritty/alacritty
[tmux-color-solarized]: https://github.com/seebi/tmux-colors-solarized
[github-seebi-tmux-color-solarized]: https://github.com/seebi/tmux-colors-solarized
[github-tmux]: https://github.com/tmux/tmux
[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
[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/
Binary file not shown.
Binary file removed docs/assets/img/[email protected]
Binary file not shown.
Binary file removed docs/assets/img/[email protected]
Binary file not shown.
Binary file removed docs/assets/img/gruvbox-dark-theme.png
Binary file not shown.
Binary file removed docs/assets/img/gruvbox-light-theme.png
Binary file not shown.
Binary file removed docs/assets/img/logo-v1.png
Binary file not shown.
Loading