From b400c851740ea9df129e6db59e07fed9668b51fe Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 05:27:22 +0200 Subject: [PATCH 01/15] centre --- sh/tmux.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index a437b23..64deaed 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -155,6 +155,7 @@ set-option -g status-format[0] '\ #[fg=default]\ #[bg=default] \ } \ +\ #[align=right]\ #[fg=yellow]\ #[bg=##181818] \ @@ -179,6 +180,7 @@ set-option -g status-format[1] '\ #[fg=default]\ #[bg=default] \ } \ +\ #[align=right]\ #(sh -c \". ${script}; rwx_tmux_servers\")\ ' @@ -188,11 +190,8 @@ set-option -g status-format[2] '\ #[fg=cyan]#{pane_current_path}\ #[fg=default]\ #[bg=default] \ +\ #[align=right]\ -#[fg=yellow]\ -#[bg=##181818] \ -#[bg=##282828]#{session_name}\ -#[bg=##181818] \ ' # line 4 @@ -205,6 +204,13 @@ set-option -g status-format[3] '\ #[fg=default]\ #[bg=default] \ } \ +\ +#[align=centre]\ +#[fg=yellow]\ +#[bg=##181818] \ +#[bg=##282828]#{session_name}\ +#[bg=##181818] \ +\ #[align=right]\ #(sh -c \". ${script}; rwx_tmux_uptime\")\ ' @@ -219,12 +225,15 @@ set-option -g status-format[4] '\ #[fg=default]\ #[bg=default] \ } \ +\ +#[align=centre]\ #[fg=green]\ #[bg=##181818] \ #[bg=##282828]#{window_width}×#{window_height}\ #[bg=##181818] \ #[fg=default]\ #[bg=default] \ +\ #[align=right]\ #{?uid,#[fg=green],#[fg=red]}\ #[bg=##181818] \ From 1964c4b172a6cab9cc25475bd2ad4f8e0006b463 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 05:36:22 +0200 Subject: [PATCH 02/15] uptime --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 64deaed..339df94 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -192,6 +192,7 @@ set-option -g status-format[2] '\ #[bg=default] \ \ #[align=right]\ +#(sh -c \". ${script}; rwx_tmux_uptime\")\ ' # line 4 @@ -212,7 +213,6 @@ set-option -g status-format[3] '\ #[bg=##181818] \ \ #[align=right]\ -#(sh -c \". ${script}; rwx_tmux_uptime\")\ ' # line 5 From fcf460d94e09bd593561d9d40ec6e9ecf342987a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 05:42:42 +0200 Subject: [PATCH 03/15] session --- sh/tmux.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 339df94..18b92d2 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -206,13 +206,11 @@ set-option -g status-format[3] '\ #[bg=default] \ } \ \ -#[align=centre]\ -#[fg=yellow]\ +#[align=right]\ +#[fg=green]\ #[bg=##181818] \ #[bg=##282828]#{session_name}\ #[bg=##181818] \ -\ -#[align=right]\ ' # line 5 From 4bea7c24e76f02ef53c046d0d6adeea862eebe00 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 11:40:58 +0200 Subject: [PATCH 04/15] split/path --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 18b92d2..6b58047 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -293,8 +293,8 @@ bind-key C-s command-prompt { rename-session '%%' } bind-key C-w command-prompt { rename-window '%%' } # split window -bind-key h split-window -h -bind-key v split-window -v +bind-key h split-window -c '#{pane_current_path}' -h +bind-key v split-window -c '#{pane_current_path}' -v # kill server bind-key k kill-server From a4f13e49a2e4a3b86241b241db8ece70f2d7884a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 00:35:14 +0200 Subject: [PATCH 05/15] tmux/unresolved --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index ccc5291..769eb50 100644 --- a/readme.md +++ b/readme.md @@ -113,5 +113,7 @@ Two interpreted languages for flexibility. * apt * apt-file search | grep * ffmpeg +* tmux + * get unresolved path for new panes & windows ### 6.2 [Further tasks](#when) {#when-further} From b96c8047170bf0ca2fad726ca1171cedda1d75e0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 01:07:24 +0200 Subject: [PATCH 06/15] tmux/status --- sh/tmux.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 6b58047..663776f 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -45,6 +45,34 @@ rwx_tmux_servers() { IFS=\"\${ifs}\" echo \"\${text}\" } +rwx_tmux_status() { + local current=\"\${1}\" + local operand=\"\${2}\" + case \"\${operand}\" in + \"+\") + case \"\${current}\" in + \"off\") current=\"on\" ;; + \"on\") current=\"2\" ;; + \"2\") current=\"3\" ;; + \"3\") current=\"4\" ;; + \"4\") current=\"5\" ;; + *) ;; + esac + ;; + \"-\") + case \"\${current}\" in + \"on\") current=\"off\" ;; + \"2\") current=\"on\" ;; + \"3\") current=\"2\" ;; + \"4\") current=\"3\" ;; + \"5\") current=\"4\" ;; + *) ;; + esac + ;; + *) ;; + esac + tmux set-option status \"\${current}\" +} rwx_tmux_uptime() { local since=\"\$(uptime --since)\" local date=\"\$(echo \"\${since}\" | awk '{print \$1}')\" @@ -275,6 +303,8 @@ bind-key -n C-F2 set-option -g status 2 bind-key -n C-F3 set-option -g status 3 bind-key -n C-F4 set-option -g status 4 bind-key -n C-F5 set-option -g status 5 +bind-key -n M-NPage run-shell '. ${script}; rwx_tmux_status #{status} -' +bind-key -n M-PPage run-shell '. ${script}; rwx_tmux_status #{status} +' # switch session bind-key -n M-Down switch-client -n From caa762b137f4bc2b1d44afe6d655606a31953156 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 03:25:56 +0200 Subject: [PATCH 07/15] fix --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 663776f..8403411 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -71,7 +71,7 @@ rwx_tmux_status() { ;; *) ;; esac - tmux set-option status \"\${current}\" + tmux set-option -g status \"\${current}\" } rwx_tmux_uptime() { local since=\"\$(uptime --since)\" From 029034d687e0e9d6279fae1eefed87fd9646a443 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 03:41:45 +0200 Subject: [PATCH 08/15] =?UTF-8?q?=E2=88=92session?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8403411..d454fff 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -235,10 +235,6 @@ set-option -g status-format[3] '\ } \ \ #[align=right]\ -#[fg=green]\ -#[bg=##181818] \ -#[bg=##282828]#{session_name}\ -#[bg=##181818] \ ' # line 5 From eba8fa52b1c90b84cd0ed178390b871c06ad1200 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 03:43:27 +0200 Subject: [PATCH 09/15] uptime --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index d454fff..dd1f19f 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -220,7 +220,6 @@ set-option -g status-format[2] '\ #[bg=default] \ \ #[align=right]\ -#(sh -c \". ${script}; rwx_tmux_uptime\")\ ' # line 4 @@ -235,6 +234,7 @@ set-option -g status-format[3] '\ } \ \ #[align=right]\ +#(sh -c \". ${script}; rwx_tmux_uptime\")\ ' # line 5 From 0e640b88f9d1146956e4051e2d1a5218e50cd48f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 03:48:10 +0200 Subject: [PATCH 10/15] =?UTF-8?q?=E2=88=92numbers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index dd1f19f..b6dc4d1 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -134,12 +134,12 @@ 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})\ + / \ +#{window_name}\ + / \ +#{pane_current_command}\ ' # ╭────────┬──────╮ From 82e69fab3e6003d1c9db0de0b10171b67ea91c0d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 04:00:45 +0200 Subject: [PATCH 11/15] size/yellow --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index b6dc4d1..f2b1037 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -249,7 +249,7 @@ set-option -g status-format[4] '\ } \ \ #[align=centre]\ -#[fg=green]\ +#[fg=yellow]\ #[bg=##181818] \ #[bg=##282828]#{window_width}×#{window_height}\ #[bg=##181818] \ From 063ece90155b205d552a52d5c4ce9f39f245f4ef Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 04:13:09 +0200 Subject: [PATCH 12/15] size/3 --- sh/tmux.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index f2b1037..0c5b36d 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -220,6 +220,8 @@ set-option -g status-format[2] '\ #[bg=default] \ \ #[align=right]\ +#[fg=yellow]\ +#{window_width}×#{window_height}\ ' # line 4 @@ -248,14 +250,6 @@ set-option -g status-format[4] '\ #[bg=default] \ } \ \ -#[align=centre]\ -#[fg=yellow]\ -#[bg=##181818] \ -#[bg=##282828]#{window_width}×#{window_height}\ -#[bg=##181818] \ -#[fg=default]\ -#[bg=default] \ -\ #[align=right]\ #{?uid,#[fg=green],#[fg=red]}\ #[bg=##181818] \ From 7d324e6138a027ec63cea852593374e58bd3e780 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 04:15:14 +0200 Subject: [PATCH 13/15] size/tab --- sh/tmux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0c5b36d..7b4d645 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -221,7 +221,9 @@ set-option -g status-format[2] '\ \ #[align=right]\ #[fg=yellow]\ -#{window_width}×#{window_height}\ +#[bg=##181818] \ +#[bg=##282828]#{window_width}×#{window_height}\ +#[bg=##181818] \ ' # line 4 From 66af2d5373d334f92134b324bec1aa1fcc4e4c12 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 04:32:56 +0200 Subject: [PATCH 14/15] size/title --- sh/tmux.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 7b4d645..a750b2b 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -140,6 +140,8 @@ set-option -g set-titles-string '\ #{window_name}\ / \ #{pane_current_command}\ + | \ +#{window_width}×#{window_height}\ ' # ╭────────┬──────╮ @@ -220,10 +222,6 @@ set-option -g status-format[2] '\ #[bg=default] \ \ #[align=right]\ -#[fg=yellow]\ -#[bg=##181818] \ -#[bg=##282828]#{window_width}×#{window_height}\ -#[bg=##181818] \ ' # line 4 From 3352880bbed315fd4983ab22a04e4c0c47bcae7d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 2 Jul 2025 04:36:51 +0200 Subject: [PATCH 15/15] title/pane --- sh/tmux.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index a750b2b..12f5820 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -140,8 +140,10 @@ set-option -g set-titles-string '\ #{window_name}\ / \ #{pane_current_command}\ - | \ -#{window_width}×#{window_height}\ + - \ +#{window_width} × #{window_height}\ + / \ +#{pane_width} × #{pane_height}\ ' # ╭────────┬──────╮