mirror of
https://github.com/o0th/tmux-nova.git
synced 2026-09-10 07:16:28 -04:00
Compare commits
No commits in common. "master" and "1.1.0" have entirely different histories.
BIN
.github/assets/gallery/cyberdream.png
vendored
BIN
.github/assets/gallery/cyberdream.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
9
.github/documentation.md
vendored
9
.github/documentation.md
vendored
|
|
@ -1,4 +1,4 @@
|
|||
## Documentation
|
||||
## Documentation
|
||||
|
||||
### Pane
|
||||
|
||||
|
|
@ -99,11 +99,6 @@ set -g @nova-nerdfonts-left
|
|||
set -g @nova-nerdfonts-right
|
||||
```
|
||||
|
||||
```bash
|
||||
set -g @nova-nerdfonts-first
|
||||
set -g @nova-nerdfonts-last
|
||||
```
|
||||
|
||||
### Rows
|
||||
|
||||
Define how many status line to show.
|
||||
|
|
@ -124,4 +119,4 @@ set -g @nova-segment-bright-colors "#282a36 #f8f8f2"
|
|||
|
||||
set -g @nova-segments-1-left "bleft"
|
||||
set -g @nova-segments-1-right "bright"
|
||||
```
|
||||
```
|
||||
|
|
|
|||
31
.github/gallery.md
vendored
31
.github/gallery.md
vendored
|
|
@ -57,7 +57,7 @@ set -g @nova-segments-1-right "gpu gram gpu-temp"
|
|||
### gruvbox
|
||||
|
||||
<p align="center">
|
||||
<a><img src="assets/gallery/gruvbox.png" alt="screenshot"></a>
|
||||
<a><img src="assets/gruvbox.png" alt="screenshot"></a>
|
||||
</p>
|
||||
|
||||
```bash
|
||||
|
|
@ -119,32 +119,3 @@ set -g @nova-segment-layout-colors "$seg_a"
|
|||
set -g @nova-segments-0-left "session"
|
||||
set -g @nova-segments-0-right "prefix cpu battery layout whoami"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Cyberdream
|
||||
|
||||
<p align="center">
|
||||
<a><img src="assets/gallery/cyberdream.png" alt="screenshot"></a>
|
||||
</p>
|
||||
|
||||
```bash
|
||||
set -g @nova-segment-mode "#S #{?client_prefix, , } "
|
||||
set -g @nova-segment-mode-colors " #181818 #ff5ea0"
|
||||
|
||||
set -g @nova-segment-whoami " #(whoami) | #h"
|
||||
set -g @nova-segment-whoami-colors " #252525 #ff5ea0 "
|
||||
|
||||
set -g @nova-pane "#I#{?pane_in_mode, #{pane_mode},} #W"
|
||||
set -g @nova-pane-active-border-style "#252525"
|
||||
set -g @nova-pane-border-style "#252525"
|
||||
|
||||
set -g @nova-status-style-bg "#181818"
|
||||
set -g @nova-status-style-fg "#d8dee9"
|
||||
set -g @nova-status-style-active-bg "#5ef1ff"
|
||||
set -g @nova-status-style-active-fg "#181818"
|
||||
|
||||
set -g @nova-rows 0
|
||||
set -g @nova-segments-0-left "mode"
|
||||
set -g @nova-segments-0-right "whoami"
|
||||
```
|
||||
15
.github/readme.md
vendored
15
.github/readme.md
vendored
|
|
@ -104,19 +104,6 @@ If you want to learn how to customize this theme have a look at the [documentati
|
|||
For more example have a look at the have a look at the [gallery](gallery.md).
|
||||
|
||||
|
||||
## FAQ
|
||||
|
||||
**Why are my components being cut off or truncated?**
|
||||
By default tmux set `status-left-length` to 20 characters and `status-right-length` to 40 characters,
|
||||
which may cause components to be truncated or cut off if their combined length exceeds these limits.
|
||||
To resolve this issue you can adjust this default values with:
|
||||
|
||||
```bash
|
||||
# .tmux.conf
|
||||
set -g status-left-length 100
|
||||
set -g status-right-length 100
|
||||
```
|
||||
|
||||
## Contributors
|
||||
|
||||
[<img alt="goolmoos" src="https://avatars.githubusercontent.com/u/49814019" width="117">](https://github.com/goolmoos)[<img alt="fky2015" src="https://avatars.githubusercontent.com/u/16451516" width="117">](https://github.com/fky2015)[<img alt="ofirgall" src="https://avatars.githubusercontent.com/u/4954051" width="117">](https://github.com/ofirgall)[<img alt="codepeon" src="https://avatars.githubusercontent.com/u/32979574" width="117">](https://github.com/codepeon)[<img alt="quiquecmtt" src="https://avatars.githubusercontent.com/u/44720459" width="117">](https://github.com/quiquecmtt)[<img alt="pabroux" src="https://avatars.githubusercontent.com/u/72023070" width="117">](https://github.com/pabroux)
|
||||
[<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)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $current_dir/utils.sh
|
||||
|
||||
#
|
||||
|
|
@ -45,11 +45,11 @@ tmux set-option -g interval $interval
|
|||
|
||||
message_command_style_bg=$(get_option "@nova-message-command-style-bg" "#44475a")
|
||||
message_command_style_fg=$(get_option "@nova-message-command-style-fg" "#f8f8f2")
|
||||
tmux set-option -g message-command-style "bg=$message_command_style_bg,fg=$message_command_style_fg,fill=$message_command_style_bg"
|
||||
tmux set-option -g message-command-style "bg=$message_command_style_bg,fg=$message_command_style_fg"
|
||||
|
||||
message_style_bg=$(get_option "@nova-message-style-bg" "#282a36")
|
||||
message_style_fg=$(get_option "@nova-message-style-fg" "#f8f8f2")
|
||||
tmux set-option -g message-style "bg=$message_style_bg,fg=$message_style_fg,fill=$message_style_bg"
|
||||
tmux set-option -g message-style "bg=$message_style_bg,fg=$message_style_fg"
|
||||
|
||||
mode_style_bg=$(get_option "@nova-mode-style-bg" "#44475a")
|
||||
mode_style_fg=$(get_option "@nova-mode-style-fg" "#f8f8f2")
|
||||
|
|
@ -63,7 +63,6 @@ status_style_bg=$(get_option "@nova-status-style-bg" "#44475a")
|
|||
status_style_fg=$(get_option "@nova-status-style-fg" "#f8f8f2")
|
||||
status_style_active_bg=$(get_option "@nova-status-style-active-bg" "#6272a4")
|
||||
status_style_active_fg=$(get_option "@nova-status-style-active-fg" "#f8f8f2")
|
||||
status_style_activity_fg=$(get_option "@nova-status-activity-fg" "#ff79C6")
|
||||
tmux set-option -g status-style "bg=$status_style_bg,fg=$status_style_fg"
|
||||
|
||||
#
|
||||
|
|
@ -80,25 +79,19 @@ tmux set-option -g pane-active-border-style "fg=${pane_active_border_style}"
|
|||
#
|
||||
|
||||
segments_left=$(get_option "@nova-segments-0-left" "")
|
||||
IFS=' ' read -r -a segments_left <<<$segments_left
|
||||
IFS=' ' read -r -a segments_left <<< $segments_left
|
||||
|
||||
tmux set-option -g status-left ""
|
||||
|
||||
first_left_segment=true
|
||||
first_left_nerdfont=$(get_option "@nova-nerdfonts-first" "")
|
||||
for segment in "${segments_left[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment" "mode")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
if [ "$segment_content" != "" ]; then
|
||||
# condition everything on the non emptiness of the evaluated segment
|
||||
tmux set-option -ga status-left "#{?#{w:#{E:@nova-segment-$segment}},"
|
||||
|
||||
if [ $nerdfonts = true ] && [ $first_left_segment = true ]; then
|
||||
tmux set-option -ga status-left "#[fg=${segment_colors[0]}#,bg=${segment_colors[1]}]"
|
||||
tmux set-option -ga status-left "$first_left_nerdfont"
|
||||
fi
|
||||
|
||||
if [ $nerdfonts = true ] && [ $first_left_segment = false ]; then
|
||||
tmux set-option -ga status-left "#[bg=${segment_colors[0]}]"
|
||||
tmux set-option -ga status-left "$nerdfonts_left"
|
||||
|
|
@ -136,23 +129,10 @@ if [ $nerdfonts = true ]; then
|
|||
tmux set-window-option -ga window-status-current-format "$nerdfonts_left"
|
||||
fi
|
||||
|
||||
tmux set-window-option -g window-status-format "#{?window_activity_flag,"
|
||||
tmux set-window-option -ga window-status-format "#[bg=$status_style_activity_fg#,fg=$status_style_bg],"
|
||||
tmux set-window-option -ga window-status-format "#[fg=$status_style_fg#,bg=$status_style_bg]}"
|
||||
|
||||
if [ $nerdfonts = true ]; then
|
||||
tmux set-window-option -ga window-status-format "$(padding $(($padding + 1)))"
|
||||
else
|
||||
tmux set-window-option -ga window-status-format "$(padding $padding)"
|
||||
fi
|
||||
|
||||
tmux set-window-option -g window-status-format "#[fg=$status_style_fg]#[bg=$status_style_bg]"
|
||||
tmux set-window-option -ga window-status-format "$(padding $padding)"
|
||||
tmux set-window-option -ga window-status-format "$pane"
|
||||
|
||||
if [ $nerdfonts = true ]; then
|
||||
tmux set-window-option -ga window-status-format "$(padding $(($padding + 1)))"
|
||||
else
|
||||
tmux set-window-option -ga window-status-format "$(padding $padding)"
|
||||
fi
|
||||
tmux set-window-option -ga window-status-format "$(padding $padding)"
|
||||
|
||||
if [ $nerdfonts = true ]; then
|
||||
tmux set-window-option -ga window-status-current-format "#[fg=${status_style_active_fg}]#[bg=${status_style_active_bg}]"
|
||||
|
|
@ -174,17 +154,14 @@ fi
|
|||
#
|
||||
|
||||
segments_right=$(get_option "@nova-segments-0-right" "")
|
||||
IFS=' ' read -r -a segments_right <<<$segments_right
|
||||
|
||||
last_right_nerdfont=$(get_option "@nova-nerdfonts-last" "")
|
||||
last_segment=${segments_right[${#segments_right[@]} - 1]}
|
||||
IFS=' ' read -r -a segments_right <<< $segments_right
|
||||
|
||||
tmux set-option -g status-right ""
|
||||
|
||||
for segment in "${segments_right[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment" "")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
if [ "$segment_content" != "" ] && [ "$segment_colors" != "" ]; then
|
||||
if [ $nerdfonts = true ] && [ ! -n "$(tmux show-option -gqv status-right)" ]; then
|
||||
tmux set-option -ga status-right "#[bg=#${status_style_bg}]"
|
||||
|
|
@ -203,11 +180,6 @@ for segment in "${segments_right[@]}"; do
|
|||
tmux set-option -ga status-right "$segment_content"
|
||||
tmux set-option -ga status-right "$(padding $padding)"
|
||||
|
||||
if [ $nerdfonts = true ] && [ $segment = $last_segment ]; then
|
||||
tmux set-option -ga status-right "#[fg=${segment_colors[0]}#,bg=${segment_colors[1]}]"
|
||||
tmux set-option -ga status-right "$last_right_nerdfont"
|
||||
fi
|
||||
|
||||
# set the bg color for the next nerdfonts seperator
|
||||
[ $nerdfonts = true ] && tmux set-option -ga status-right "#[bg=${segment_colors[0]}]"
|
||||
|
||||
|
|
@ -216,7 +188,7 @@ for segment in "${segments_right[@]}"; do
|
|||
fi
|
||||
done
|
||||
|
||||
for ((row = 1; row <= rows; row++)); do
|
||||
for ((row=1; row <= rows; row++)); do
|
||||
|
||||
#
|
||||
# segments-n-left
|
||||
|
|
@ -224,7 +196,7 @@ for ((row = 1; row <= rows; row++)); do
|
|||
|
||||
status_style_double_bg=$(get_option "@nova-status-style-double-bg" "#282a36")
|
||||
segments_bottom_left=$(get_option "@nova-segments-$row-left" "")
|
||||
IFS=' ' read -r -a segments_bottom_left <<<$segments_bottom_left
|
||||
IFS=' ' read -r -a segments_bottom_left <<< $segments_bottom_left
|
||||
|
||||
tmux set-option -g status-format[$row] "#[fill=$status_style_double_bg]#[align=left]"
|
||||
nerdfonts_color="$status_style_double_bg"
|
||||
|
|
@ -232,9 +204,9 @@ for ((row = 1; row <= rows; row++)); do
|
|||
for segment in "${segments_bottom_left[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment" "")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
if [ "$segment_content" != "" ]; then
|
||||
if [ $nerdfonts = true ] && [[ "$(tmux show-option -gqv status-format[$row])" != *"#[align=left]" ]]; then
|
||||
if [ $nerdfonts = true ] && [ "$(tmux show-option -gqv status-format[$row])" != "#[align=left]"]; then
|
||||
tmux set-option -ga status-format[$row] "#[fg=${nerdfonts_color},bg=#${segment_colors[0]}]"
|
||||
tmux set-option -ga status-format[$row] "$nerdfonts_left"
|
||||
fi
|
||||
|
|
@ -260,14 +232,14 @@ for ((row = 1; row <= rows; row++)); do
|
|||
nerdfonts_color="$status_style_double_bg"
|
||||
|
||||
segments_bottom_center=$(get_option "@nova-segments-$row-center" "")
|
||||
IFS=' ' read -r -a segments_bottom_center <<<$segments_bottom_center
|
||||
IFS=' ' read -r -a segments_bottom_center <<< $segments_bottom_center
|
||||
|
||||
tmux set-option -ga status-format[$row] "#[align=centre]"
|
||||
|
||||
for segment in "${segments_bottom_center[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
|
||||
if [ "$segment_content" != "" ]; then
|
||||
if [ $nerdfonts = true ]; then
|
||||
|
|
@ -294,14 +266,14 @@ for ((row = 1; row <= rows; row++)); do
|
|||
nerdfonts_color="$status_style_double_bg"
|
||||
|
||||
segments_bottom_right=$(get_option "@nova-segments-$row-right" "")
|
||||
IFS=' ' read -r -a segments_bottom_right <<<$segments_bottom_right
|
||||
IFS=' ' read -r -a segments_bottom_right <<< $segments_bottom_right
|
||||
|
||||
tmux set-option -ga status-format[$row] "#[align=right]"
|
||||
|
||||
for segment in "${segments_bottom_right[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
|
||||
if [ "$segment_content" != "" ]; then
|
||||
if [ $nerdfonts = true ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue