Merge pull request #30 from o0th/documentation

docs: improvement to documentation with screenshots
This commit is contained in:
Sabato Luca Guadagno 2023-02-17 14:37:48 +01:00 committed by GitHub
commit 7103fd78fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 239 additions and 140 deletions

View file

@ -1,5 +1,5 @@
[*]
indent_size = 2
indent_style = space
insert_final_newline = true
insert_final_newline = false
trim_trailing_whitespace = true

BIN
.github/assets/gallery/o0th.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
.github/assets/tmux-nova-nerdfonts.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
.github/assets/tmux-nova-no-conf.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
.github/assets/tmux-nova-nord.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
.github/assets/tmux-nova-pane-centre.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
.github/assets/tmux-nova-pane.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
.github/assets/tmux-nova-rows.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
.github/assets/tmux-nova.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

122
.github/documentation.md vendored Normal file
View file

@ -0,0 +1,122 @@
## Documentation
### Pane
Pane content
<p align="center">
<a><img src="assets/tmux-nova-pane.png" alt="screenshot"></a>
</p>
```bash
# default: "#S:#I:#W"
set -g @nova-pane "#I#{?pane_in_mode,  #{pane_mode},}  #W"
```
Pane position
<p align="center">
<a><img src="assets/tmux-nova-pane-centre.png" alt="screenshot"></a>
</p>
```bash
# one of: "left", "right", "centre", "absolute-centre"; default: "left"
set -g @nova-pane-justify "centre"
```
### Segments
Create a custom segment
<p align="center">
<a><img src="assets/tmux-nova-segment-custom.png" alt="screenshot"></a>
</p>
```bash
# this will create a new segment named 'custom'
set -g @nova-segment-custom "custom"
set -g @nova-segment-custom-colors "#50fa7b #282a36"
# this will position the custom segment on the right side
set -g @nova-segments-0-left ""
set -g @nova-segments-0-right "custom"
```
Mode segment
<p align="center">
<a><img src="assets/tmux-nova-segment-mode.png" alt="screenshot"></a>
</p>
```bash
set -g @nova-segment-mode "#{?client_prefix,Ω,ω}"
set -g @nova-segment-mode-colors "#50fa7b #282a36"
set -g @nova-segments-0-left "mode"
set -g @nova-segments-0-right ""
```
Whoami segment
<p align="center">
<a><img src="assets/tmux-nova-segment-whoami.png" alt="screenshot"></a>
</p>
```bash
set -g @nova-segment-mode "#{?client_prefix,Ω,ω}"
set -g @nova-segment-mode-colors "#50fa7b #282a36"
set -g @nova-segment-whoami "#(whoami)@#h"
set -g @nova-segment-whoami-colors "#50fa7b #282a36"
set -g @nova-segments-0-left "mode"
set -g @nova-segments-0-right "whoami"
```
### Nerdfonts
Default
<p align="center">
<a><img src="assets/tmux-nova-nerdfonts.png" alt="screenshot"></a>
</p>
```bash
# one of: true, false; default: false
set -g @nova-nerdfonts true
```
Custom
<p align="center">
<a><img src="assets/tmux-nova-nerdfonts-custom.png" alt="screenshot"></a>
</p>
```bash
# one of: true, false; default: false
set -g @nova-nerdfonts true
set -g @nova-nerdfonts-left 
set -g @nova-nerdfonts-right 
```
### Rows
Define how many status line to show.
<p align="center">
<a><img src="assets/tmux-nova-rows.png" alt="screenshot"></a>
</p>
```bash
# one of: 0, 1, 2, 3, 4; default: 0
set -g @nova-rows 1
set -g @nova-segment-bleft "bottom left"
set -g @nova-segment-bleft-colors "#282a36 #f8f8f2"
set -g @nova-segment-bright "bottom right"
set -g @nova-segment-bright-colors "#282a36 #f8f8f2"
set -g @nova-segments-1-left "bleft"
set -g @nova-segments-1-right "bright"
```

View file

@ -1,9 +1,7 @@
### o0th
<p align="center">
<a>
<img src="/assets/o0th.png" alt="screenshot">
</a>
<a><img src="assets/gallery/o0th.png" alt="screenshot"></a>
</p>
```bash
@ -21,9 +19,6 @@ set -g @nova-segment-whoami-colors "#50fa7b #282a36"
set -g @nova-pane "#I#{?pane_in_mode,  #{pane_mode},}  #W"
set -g @nova-segment-spotify " #(spotifycli --status)"
set -g @nova-segment-spotify-colors "#282a36 #f8f8f2"
set -g @cpu_percentage_format "%5.1f%%"
set -g @nova-segment-cpu " #(~/.tmux/plugins/tmux-cpu/scripts/cpu_percentage.sh)"
set -g @nova-segment-cpu-colors "#282a36 #f8f8f2"
@ -38,7 +33,7 @@ set -g @nova-segment-ram "#(~/.tmux/plugins/tmux-cpu/scripts/ram_percentage.sh)"
set -g @nova-segment-ram-colors "#282a36 #f8f8f2"
set -g @gpu_percentage_format "%5.1f%%"
set -g @nova-segment-gpu " #(~/.tmux/plugins/tmux-cpu/scripts/gpu_percentage.sh)"
set -g @nova-segment-gpu "󰘚 #(~/.tmux/plugins/tmux-cpu/scripts/gpu_percentage.sh)"
set -g @nova-segment-gpu-colors "#282a36 #f8f8f2"
set -g @gpu_temp_unit "C"
@ -50,19 +45,11 @@ set -g @gram_percentage_format "%5.1f%%"
set -g @nova-segment-gram "#(~/.tmux/plugins/tmux-cpu/scripts/gram_percentage.sh)"
set -g @nova-segment-gram-colors "#282a36 #f8f8f2"
set -g @net_speed_interfaces "enp6s0"
set -g @net_speed_format "↓ %10s - ↑ %10s"
set -g @nova-segment-net "#(~/.tmux/plugins/tmux-net-speed/scripts/net_speed.sh)"
set -g @nova-segment-net-colors "#282a36 #f8f8f2"
set -g @nova-segment-pomodoro "#(pomodoro status --format ' %%c  %%r %%d') "
set -g @nova-segment-pomodoro-colors "#ff5555 #f8f8f2"
set -g @nova-rows 1
set -g @nova-segments-0-left "mode"
set -g @nova-segments-0-right "whoami pomodoro"
set -g @nova-segments-1-left "spotify"
set -g @nova-segments-1-right "cpu ram cpu-temp gpu gram gpu-temp"
set -g @nova-segments-0-right "whoami"
set -g @nova-segments-1-left "cpu ram cpu-temp"
set -g @nova-segments-1-right "gpu gram gpu-temp"
```
---
@ -70,9 +57,7 @@ set -g @nova-segments-1-right "cpu ram cpu-temp gpu gram gpu-temp"
### gruvbox
<p align="center">
<a>
<img src="/assets/gruvbox.png" alt="screenshot">
</a>
<a><img src="assets/gruvbox.png" alt="screenshot"></a>
</p>
```bash

View file

109
.github/readme.md vendored Normal file
View file

@ -0,0 +1,109 @@
<p align="center">
<a><img src="assets/tmux-nova.png" alt="screenshot"></a>
</p>
## Installation
### [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm)
Add this line in your `.tmux.conf`
```bash
set -g @plugin 'o0th/tmux-nova'
```
Hit <kbd>Prefix</kbd> + <kbd>I</kbd> to fetch the plugin and source it.
### Manual
Clone the repository
```bash
git clone git@github.com:o0th/tmux-nova.git ~/.tmux/plugins/tmux-nova
```
Add this line in your `.tmux.conf`
```bash
run-shell ~/.tmux/plugins/tmux-nova/nova.tmux
```
Reload TMUX
```bash
tmux source-file ~/.tmux.conf
```
## Simple configuration
To achieve the screenshot look use this configuration
```bash
set -g @plugin 'o0th/tmux-nova'
set -g @nova-nerdfonts true
set -g @nova-nerdfonts-left 
set -g @nova-nerdfonts-right 
set -g @nova-segment-mode "#{?client_prefix,Ω,ω}"
set -g @nova-segment-mode-colors "#50fa7b #282a36"
set -g @nova-segment-whoami "#(whoami)@#h"
set -g @nova-segment-whoami-colors "#50fa7b #282a36"
set -g @nova-pane "#I#{?pane_in_mode,  #{pane_mode},}  #W"
set -g @nova-rows 0
set -g @nova-segments-0-left "mode"
set -g @nova-segments-0-right "whoami"
```
## Nord configuration
If you prefer the nord color palette
<p align="center">
<a><img src="assets/tmux-nova-nord.png" alt="screenshot"></a>
</p>
```bash
set -g @plugin 'o0th/tmux-nova'
set -g @nova-nerdfonts true
set -g @nova-nerdfonts-left 
set -g @nova-nerdfonts-right 
set -g @nova-pane-active-border-style "#44475a"
set -g @nova-pane-border-style "#282a36"
set -g @nova-status-style-bg "#4c566a"
set -g @nova-status-style-fg "#d8dee9"
set -g @nova-status-style-active-bg "#89c0d0"
set -g @nova-status-style-active-fg "#2e3540"
set -g @nova-status-style-double-bg "#2d3540"
set -g @nova-pane "#I#{?pane_in_mode,  #{pane_mode},}  #W"
set -g @nova-segment-mode "#{?client_prefix,Ω,ω}"
set -g @nova-segment-mode-colors "#78a2c1 #2e3440"
set -g @nova-segment-whoami "#(whoami)@#h"
set -g @nova-segment-whoami-colors "#78a2c1 #2e3440"
set -g @nova-rows 0
set -g @nova-segments-0-left "mode"
set -g @nova-segments-0-right "whoami"
```
## Documentation
If you want to learn how to customize this theme have a look at the [documentation](documentation.md).
## Gallery
For more example have a look at the have a look at the [gallery](gallery.md).
## Contributors
[<img alt="goolmoos" src="https://avatars.githubusercontent.com/u/49814019?v=4&s=117" width="117">](https://github.com/goolmoos)[<img alt="fky2015" src="https://avatars.githubusercontent.com/u/16451516?v=4&s=117" width="117">](https://github.com/fky2015)[<img alt="ofirgall" src="https://avatars.githubusercontent.com/u/4954051?v=4&s=117" width="117">](https://github.com/ofirgall)[<img alt="codepeon" src="https://avatars.githubusercontent.com/u/32979574?v=4&s=117" width="117">](https://github.com/codepeon)

114
Readme.md
View file

@ -1,114 +0,0 @@
<p align="center">
<a>
<img src="/assets/screenshot.png" alt="screenshot">
</a>
</p>
## Installation
### [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm)
Add this line in your `.tmux.conf`
```bash
set -g @plugin 'o0th/tmux-nova'
```
Hit <kbd>Prefix</kbd> + <kbd>I</kbd> to fetch the plugin and source it.
### Manual
Clone the repository
```bash
git clone git@github.com:o0th/tmux-nova.git ~/.tmux/plugins/tmux-nova
```
Add this line in your `.tmux.conf`
```bash
run-shell ~/.tmux/plugins/tmux-nova/nova.tmux
```
Reload TMUX
```bash
tmux source-file ~/.tmux.conf
```
## Customizations
### Rows
Define how many status line to show.
```bash
# one of: 0, 1, 2, 3, 4; default: 0
set -g @nova-rows 0
```
### Nerdfonts
```bash
# one of: true, false; default: false
set -g @nova-nerdfonts false
```
### Pane
Pane content
```bash
# default: "#S:#I:#W"
set -g @nova-pane "#I#{?pane_in_mode,  #{pane_mode},}  #W"
```
Pane position
```bash
# one of: "left", "right", "centre", "absolute-centre"; default: "left"
set -g @nova-pane-justify "left"
```
### Segments
Mode segment
```bash
set -g @nova-segment-mode "#{?client_prefix,Ω,ω}"
set -g @nova-segment-mode-colors "#50fa7b #282a36"
set -g @nova-segments-0-left "mode"
```
Whoami segment
```bash
set -g @nova-segment-whoami "#(whoami)@#h"
set -g @nova-segment-whoami-colors "#50fa7b #282a36"
set -g @nova-segments-0-right "whoami"
```
### Nord theme
```bash
set -g "@nova-pane-active-border-style" "#44475a"
set -g "@nova-pane-border-style" "#282a36"
set -g "@nova-status-style-bg" "#4c566a"
set -g "@nova-status-style-fg" "#d8dee9"
set -g "@nova-status-style-active-bg" "#89c0d0"
set -g "@nova-status-style-active-fg" "#2e3540"
set -g "@nova-status-style-double-bg" "#2d3540"
set -g @nova-segment-mode "#{?client_prefix,Ω,ω}"
set -g @nova-segment-mode-colors "#78a2c1 #2e3440"
set -g @nova-segment-whoami "#(whoami)@#h"
set -g @nova-segment-whoami-colors "#78a2c1 #2e3440"
```
### Gallery
For more example have a look at the have a look at the [gallery](Gallery.md).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View file

@ -1,4 +1,3 @@
#!/usr/bin/env bash
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $current_dir/scripts/nova.sh

View file

@ -12,7 +12,7 @@ padding=$(get_option "@nova-padding" 1)
nerdfonts=$(get_option "@nova-nerdfonts" false)
nerdfonts_right=$(get_option "@nova-nerdfonts-right")
nerdfonts_left=$(get_option "@nova-nerdfonts-left")
rows=$(get_option "@nova-rows" 1)
rows=$(get_option "@nova-rows" 0)
pane=$(get_option "@nova-pane" "#S:#I:#W")
#
@ -288,4 +288,3 @@ for ((row=1; row <= rows; row++)); do
fi
done
done

View file

@ -18,4 +18,3 @@ upsert_option() {
padding() {
printf '%*s' $1
}