Compare commits

..

15 commits

Author SHA1 Message Date
3352880bbe
title/pane
All checks were successful
/ job (push) Successful in 3m59s
2025-07-02 04:36:51 +02:00
66af2d5373
size/title 2025-07-02 04:32:56 +02:00
7d324e6138
size/tab 2025-07-02 04:15:14 +02:00
063ece9015
size/3 2025-07-02 04:13:09 +02:00
82e69fab3e
size/yellow 2025-07-02 04:00:45 +02:00
0e640b88f9
−numbers 2025-07-02 03:48:10 +02:00
eba8fa52b1
uptime 2025-07-02 03:43:27 +02:00
029034d687
−session 2025-07-02 03:41:45 +02:00
caa762b137
fix 2025-07-02 03:25:56 +02:00
b96c804717
tmux/status
All checks were successful
/ job (push) Successful in 4m58s
2025-07-02 01:07:24 +02:00
a4f13e49a2
tmux/unresolved
All checks were successful
/ job (push) Successful in 4m0s
2025-07-02 00:35:14 +02:00
4bea7c24e7
split/path 2025-06-30 11:40:58 +02:00
fcf460d94e
session 2025-06-30 05:42:42 +02:00
1964c4b172
uptime 2025-06-30 05:36:22 +02:00
b400c85174
centre 2025-06-30 05:27:22 +02:00
2 changed files with 48 additions and 17 deletions

View file

@ -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}

View file

@ -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 -g status \"\${current}\"
}
rwx_tmux_uptime() {
local since=\"\$(uptime --since)\"
local date=\"\$(echo \"\${since}\" | awk '{print \$1}')\"
@ -106,12 +134,16 @@ 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}\
- \
#{window_width} × #{window_height}\
/ \
#{pane_width} × #{pane_height}\
'
# ╭────────┬──────╮
@ -155,6 +187,7 @@ set-option -g status-format[0] '\
#[fg=default]\
#[bg=default] \
} \
\
#[align=right]\
#[fg=yellow]\
#[bg=##181818] \
@ -179,6 +212,7 @@ set-option -g status-format[1] '\
#[fg=default]\
#[bg=default] \
} \
\
#[align=right]\
#(sh -c \". ${script}; rwx_tmux_servers\")\
'
@ -188,11 +222,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 +236,7 @@ set-option -g status-format[3] '\
#[fg=default]\
#[bg=default] \
} \
\
#[align=right]\
#(sh -c \". ${script}; rwx_tmux_uptime\")\
'
@ -219,12 +251,7 @@ set-option -g status-format[4] '\
#[fg=default]\
#[bg=default] \
} \
#[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] \
@ -268,6 +295,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
@ -286,8 +315,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