From 77cdd79acbcb2fd52c25bb4fa42f23bf30269ddf Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 02:58:30 +0200 Subject: [PATCH 01/15] @ --- sh/tmux.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8c5770a..1f91e30 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -182,10 +182,6 @@ set-option -g status-format[3] '\ #[bg=default] \ }\ #[align=right]\ -#[fg=yellow]\ -#[bg=##181818] \ -#[bg=##282828]#{host}\ -#[bg=##181818] \ ' # line 5 @@ -209,6 +205,12 @@ set-option -g status-format[4] '\ #[bg=##181818] \ #[bg=##282828]#{user}\ #[bg=##181818] \ +#[fg=default]\ +#[bg=default] \ +#[fg=yellow]\ +#[bg=##181818] \ +#[bg=##282828]#{host}\ +#[bg=##181818] \ ' # refresh period From 829e26f403aa14d35321b465a017d8b16b1ad0ea Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 03:02:49 +0200 Subject: [PATCH 02/15] tmux/uptime --- sh/tmux.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 1f91e30..761b90e 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -182,6 +182,10 @@ set-option -g status-format[3] '\ #[bg=default] \ }\ #[align=right]\ +#[fg=yellow]\ +#[bg=##181818] \ +#[bg=##282828]#(uptime --since)\ +#[bg=##181818] \ ' # line 5 From 8b3a326763e6dca86423c3cf71e9e0e6be20ad17 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 03:07:32 +0200 Subject: [PATCH 03/15] title/spaces --- sh/tmux.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 761b90e..1fdc6ae 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -84,11 +84,11 @@ set-option -g set-titles on # set title to working directory set-option -g set-titles-string '\ #(sh -c \". ${script}; rwx_tmux_server\")\ - → \ + → \ #{session_name}\ - → \ + → \ #{window_name} (#{window_index}∕#{session_windows})\ - → \ + → \ #{pane_current_command} (#{pane_index}∕#{window_panes})\ ' From 2fb16aa2f4f98876c70d8b0e6f4e86689e8551f0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 03:08:57 +0200 Subject: [PATCH 04/15] title/spaces --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 1fdc6ae..7fe872d 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -87,9 +87,9 @@ set-option -g set-titles-string '\ → \ #{session_name}\ → \ -#{window_name} (#{window_index}∕#{session_windows})\ +#{window_name} (#{window_index}∕#{session_windows})\ → \ -#{pane_current_command} (#{pane_index}∕#{window_panes})\ +#{pane_current_command} (#{pane_index}∕#{window_panes})\ ' # ╭────────┬──────╮ From f97f6a0fcdec1519b305bdbfe38925a6eba05e76 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 03:40:04 +0200 Subject: [PATCH 05/15] servers/right --- sh/tmux.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 7fe872d..625d187 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -27,15 +27,20 @@ rwx_tmux_servers() { \" for path in \${paths}; do name=\"\$(basename \"\${path}\")\" + text=\"\${text}\\ +#[fg=default]\\ +#[bg=default] \\ +\" if [ \"\${active}\" = \"\${name}\" ]; then text=\"\${text}#[fg=green]\" else text=\"\${text}#[fg=yellow]\" fi text=\"\${text}\\ -#[bg=##181818] #[bg=##282828]\\ -\${name}\\ -#[bg=##181818] #[bg=default]#[fg=default] \" +#[bg=##181818] \\ +#[bg=##282828]\${name}\\ +#[bg=##181818] \\ +\" done IFS=\"\${ifs}\" echo \"\${text}\" @@ -166,9 +171,9 @@ set-option -g status-format[1] '\ # line 3 set-option -g status-format[2] '\ -#[fg=yellow]\ -#(sh -c \". ${script}; rwx_tmux_servers\")\ #[fg=cyan]#{pane_current_path}\ +#[align=right]\ +#(sh -c \". ${script}; rwx_tmux_servers\")\ ' # line 4 From 405473c8c51bc203704b93bbed451e5c3acd23de Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 03:52:26 +0200 Subject: [PATCH 06/15] tmux/uptime --- sh/tmux.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 625d187..38853bd 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -45,6 +45,23 @@ rwx_tmux_servers() { IFS=\"\${ifs}\" echo \"\${text}\" } +rwx_tmux_uptime() { + local since=\"\$(uptime --since)\" + local date=\"\$(echo \"\${since}\" | awk '{print \$1}')\" + local time=\"\$(echo \"\${since}\" | awk '{print \$2}')\" + echo \"\\ +#[fg=yellow]\\ +#[bg=##181818] \\ +#[bg=##282828]\${date}\\ +#[bg=##181818] \\ +#[fg=default]\\ +#[bg=default] \\ +#[fg=yellow]\\ +#[bg=##181818] \\ +#[bg=##282828]\${time}\\ +#[bg=##181818] \\ +\" +} " rwx_file_write "${file}" "\ # ╭────────╮ @@ -187,10 +204,7 @@ set-option -g status-format[3] '\ #[bg=default] \ }\ #[align=right]\ -#[fg=yellow]\ -#[bg=##181818] \ -#[bg=##282828]#(uptime --since)\ -#[bg=##181818] \ +#[bg=##282828]#(sh -c \". ${script}; rwx_tmux_uptime\")\ ' # line 5 From 2076ccf6e18f0d4be250aa998231295471889551 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 04:03:08 +0200 Subject: [PATCH 07/15] lefts/pad --- sh/tmux.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 38853bd..0fbc0ee 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -153,7 +153,7 @@ set-option -g status-format[0] '\ #[bg=##282828]#{window_name}\ #[bg=##181818]#{?window_zoomed_flag,#[fg=magenta]], }\ #[fg=default]\ -#[bg=default] \ +#[bg=default] \ }\ #[align=right]\ #[fg=yellow]\ @@ -179,6 +179,8 @@ set-option -g status-format[1] '\ #[bg=##181818] \ #[bg=##282828]#{session_name}\ #[bg=##181818] \ +#[fg=default]\ +#[bg=default] \ #[align=right]\ #[fg=yellow]\ #[bg=##181818] \ @@ -189,6 +191,8 @@ set-option -g status-format[1] '\ # line 3 set-option -g status-format[2] '\ #[fg=cyan]#{pane_current_path}\ +#[fg=default]\ +#[bg=default] \ #[align=right]\ #(sh -c \". ${script}; rwx_tmux_servers\")\ ' @@ -201,7 +205,7 @@ set-option -g status-format[3] '\ #[bg=##282828]#{pane_current_command}\ #[bg=##181818] \ #[fg=default]\ -#[bg=default] \ +#[bg=default] \ }\ #[align=right]\ #[bg=##282828]#(sh -c \". ${script}; rwx_tmux_uptime\")\ @@ -223,6 +227,8 @@ set-option -g status-format[4] '\ #[bg=##181818] \ #[bg=##282828]#{window_width}×#{window_height}\ #[bg=##181818] \ +#[fg=default]\ +#[bg=default] \ #[align=right]\ #{?uid,#[fg=green],#[fg=red]}\ #[bg=##181818] \ From 1072b9b55b21c13f4dddef281d7de721f8996b4c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 04:07:33 +0200 Subject: [PATCH 08/15] fixes --- sh/tmux.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0fbc0ee..8f58c34 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -153,8 +153,8 @@ set-option -g status-format[0] '\ #[bg=##282828]#{window_name}\ #[bg=##181818]#{?window_zoomed_flag,#[fg=magenta]], }\ #[fg=default]\ -#[bg=default] \ -}\ +#[bg=default] \ +} \ #[align=right]\ #[fg=yellow]\ #[bg=##181818] \ @@ -205,8 +205,8 @@ set-option -g status-format[3] '\ #[bg=##282828]#{pane_current_command}\ #[bg=##181818] \ #[fg=default]\ -#[bg=default] \ -}\ +#[bg=default] \ +} \ #[align=right]\ #[bg=##282828]#(sh -c \". ${script}; rwx_tmux_uptime\")\ ' From 148cdd8c14f8bded2602cb85d51fd7602fa2ca1a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 04:20:53 +0200 Subject: [PATCH 09/15] =?UTF-8?q?magenta=20=E2=86=94=20red?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8f58c34..a19f948 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -165,8 +165,8 @@ set-option -g status-format[0] '\ # line 2 set-option -g status-format[1] '\ #{S:\ -#{?session_many_attached,#[fg=magenta],\ -#{?session_attached,#[fg=red],#[fg=yellow]}}\ +#{?session_many_attached,#[fg=red],\ +#{?session_attached,#[fg=magenta],#[fg=yellow]}}\ #[bg=##181818] \ #[bg=##282828]#{session_name}\ #[bg=##181818] \ From 329c019809fe19613b7d5e4cd0d4d7bc77331599 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 04:32:08 +0200 Subject: [PATCH 10/15] green --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index a19f948..b4b112c 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -166,7 +166,7 @@ set-option -g status-format[0] '\ set-option -g status-format[1] '\ #{S:\ #{?session_many_attached,#[fg=red],\ -#{?session_attached,#[fg=magenta],#[fg=yellow]}}\ +#{?session_attached,#[fg=green],#[fg=yellow]}}\ #[bg=##181818] \ #[bg=##282828]#{session_name}\ #[bg=##181818] \ From 8674e5048c159a04bd86367bcea7dbf0362c453f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 04:36:00 +0200 Subject: [PATCH 11/15] date --- sh/tmux.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index b4b112c..a858c5b 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -158,6 +158,10 @@ set-option -g status-format[0] '\ #[align=right]\ #[fg=yellow]\ #[bg=##181818] \ +#[bg=##282828]%Y-%m-%d\ +#[bg=##181818] \ +#[fg=yellow]\ +#[bg=##181818] \ #[bg=##282828]%H:%M:%S\ #[bg=##181818]#{?client_prefix,#[fg=green]p, }\ ' @@ -182,10 +186,6 @@ set-option -g status-format[1] '\ #[fg=default]\ #[bg=default] \ #[align=right]\ -#[fg=yellow]\ -#[bg=##181818] \ -#[bg=##282828]%Y-%m-%d\ -#[bg=##181818] \ ' # line 3 @@ -208,7 +208,7 @@ set-option -g status-format[3] '\ #[bg=default] \ } \ #[align=right]\ -#[bg=##282828]#(sh -c \". ${script}; rwx_tmux_uptime\")\ +#(sh -c \". ${script}; rwx_tmux_uptime\")\ ' # line 5 From eb2b9b83fc9377d7f144c9acb3c1fde6b6faa225 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 04:37:06 +0200 Subject: [PATCH 12/15] space --- sh/tmux.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index a858c5b..7a368cd 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -160,6 +160,8 @@ set-option -g status-format[0] '\ #[bg=##181818] \ #[bg=##282828]%Y-%m-%d\ #[bg=##181818] \ +#[fg=default]\ +#[bg=default] \ #[fg=yellow]\ #[bg=##181818] \ #[bg=##282828]%H:%M:%S\ From 8a895f90b5042a9b58fbdb727094673d44acfb4d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 04:42:15 +0200 Subject: [PATCH 13/15] servers --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 7a368cd..35bb300 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -188,6 +188,7 @@ set-option -g status-format[1] '\ #[fg=default]\ #[bg=default] \ #[align=right]\ +#(sh -c \". ${script}; rwx_tmux_servers\")\ ' # line 3 @@ -196,7 +197,6 @@ set-option -g status-format[2] '\ #[fg=default]\ #[bg=default] \ #[align=right]\ -#(sh -c \". ${script}; rwx_tmux_servers\")\ ' # line 4 From df55d6a82f2cc54464a771a556eef503b2437623 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 04:47:53 +0200 Subject: [PATCH 14/15] fixes --- sh/tmux.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 35bb300..6caa28e 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -178,15 +178,7 @@ set-option -g status-format[1] '\ #[bg=##181818] \ #[fg=default]\ #[bg=default] \ -}\ -#[fg=white]→\ -#[fg=default] \ -#[fg=green]\ -#[bg=##181818] \ -#[bg=##282828]#{session_name}\ -#[bg=##181818] \ -#[fg=default]\ -#[bg=default] \ +} \ #[align=right]\ #(sh -c \". ${script}; rwx_tmux_servers\")\ ' @@ -197,6 +189,10 @@ set-option -g status-format[2] '\ #[fg=default]\ #[bg=default] \ #[align=right]\ +#[fg=green]\ +#[bg=##181818] \ +#[bg=##282828]#{session_name}\ +#[bg=##181818] \ ' # line 4 From a5a069f8d31c9417c9d8638de5b3778eda938e42 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 04:52:12 +0200 Subject: [PATCH 15/15] fixes --- sh/tmux.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 6caa28e..a437b23 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -189,7 +189,7 @@ set-option -g status-format[2] '\ #[fg=default]\ #[bg=default] \ #[align=right]\ -#[fg=green]\ +#[fg=yellow]\ #[bg=##181818] \ #[bg=##282828]#{session_name}\ #[bg=##181818] \ @@ -218,9 +218,7 @@ set-option -g status-format[4] '\ #[bg=##181818] \ #[fg=default]\ #[bg=default] \ -}\ -#[fg=white]=\ -#[fg=default] \ +} \ #[fg=green]\ #[bg=##181818] \ #[bg=##282828]#{window_width}×#{window_height}\