Compare commits

..

No commits in common. "3352880bbed315fd4983ab22a04e4c0c47bcae7d" and "a5a069f8d31c9417c9d8638de5b3778eda938e42" have entirely different histories.

2 changed files with 17 additions and 48 deletions

View file

@ -113,7 +113,5 @@ Two interpreted languages for flexibility.
* apt * apt
* apt-file search | grep * apt-file search | grep
* ffmpeg * ffmpeg
* tmux
* get unresolved path for new panes & windows
### 6.2 [Further tasks](#when) {#when-further} ### 6.2 [Further tasks](#when) {#when-further}

View file

@ -45,34 +45,6 @@ rwx_tmux_servers() {
IFS=\"\${ifs}\" IFS=\"\${ifs}\"
echo \"\${text}\" 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() { rwx_tmux_uptime() {
local since=\"\$(uptime --since)\" local since=\"\$(uptime --since)\"
local date=\"\$(echo \"\${since}\" | awk '{print \$1}')\" local date=\"\$(echo \"\${since}\" | awk '{print \$1}')\"
@ -134,16 +106,12 @@ set-option -g set-titles on
# set title to working directory # set title to working directory
set-option -g set-titles-string '\ set-option -g set-titles-string '\
#(sh -c \". ${script}; rwx_tmux_server\")\ #(sh -c \". ${script}; rwx_tmux_server\")\
/ \ \
#{session_name}\ #{session_name}\
/ \ \
#{window_name}\ #{window_name} (#{window_index}∕#{session_windows})\
/ \ \
#{pane_current_command}\ #{pane_current_command} (#{pane_index}∕#{window_panes})\
- \
#{window_width} × #{window_height}\
/ \
#{pane_width} × #{pane_height}\
' '
# ╭────────┬──────╮ # ╭────────┬──────╮
@ -187,7 +155,6 @@ set-option -g status-format[0] '\
#[fg=default]\ #[fg=default]\
#[bg=default] \ #[bg=default] \
} \ } \
\
#[align=right]\ #[align=right]\
#[fg=yellow]\ #[fg=yellow]\
#[bg=##181818] \ #[bg=##181818] \
@ -212,7 +179,6 @@ set-option -g status-format[1] '\
#[fg=default]\ #[fg=default]\
#[bg=default] \ #[bg=default] \
} \ } \
\
#[align=right]\ #[align=right]\
#(sh -c \". ${script}; rwx_tmux_servers\")\ #(sh -c \". ${script}; rwx_tmux_servers\")\
' '
@ -222,8 +188,11 @@ set-option -g status-format[2] '\
#[fg=cyan]#{pane_current_path}\ #[fg=cyan]#{pane_current_path}\
#[fg=default]\ #[fg=default]\
#[bg=default] \ #[bg=default] \
\
#[align=right]\ #[align=right]\
#[fg=yellow]\
#[bg=##181818] \
#[bg=##282828]#{session_name}\
#[bg=##181818] \
' '
# line 4 # line 4
@ -236,7 +205,6 @@ set-option -g status-format[3] '\
#[fg=default]\ #[fg=default]\
#[bg=default] \ #[bg=default] \
} \ } \
\
#[align=right]\ #[align=right]\
#(sh -c \". ${script}; rwx_tmux_uptime\")\ #(sh -c \". ${script}; rwx_tmux_uptime\")\
' '
@ -251,7 +219,12 @@ set-option -g status-format[4] '\
#[fg=default]\ #[fg=default]\
#[bg=default] \ #[bg=default] \
} \ } \
\ #[fg=green]\
#[bg=##181818] \
#[bg=##282828]#{window_width}×#{window_height}\
#[bg=##181818] \
#[fg=default]\
#[bg=default] \
#[align=right]\ #[align=right]\
#{?uid,#[fg=green],#[fg=red]}\ #{?uid,#[fg=green],#[fg=red]}\
#[bg=##181818] \ #[bg=##181818] \
@ -295,8 +268,6 @@ bind-key -n C-F2 set-option -g status 2
bind-key -n C-F3 set-option -g status 3 bind-key -n C-F3 set-option -g status 3
bind-key -n C-F4 set-option -g status 4 bind-key -n C-F4 set-option -g status 4
bind-key -n C-F5 set-option -g status 5 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 # switch session
bind-key -n M-Down switch-client -n bind-key -n M-Down switch-client -n
@ -315,8 +286,8 @@ bind-key C-s command-prompt { rename-session '%%' }
bind-key C-w command-prompt { rename-window '%%' } bind-key C-w command-prompt { rename-window '%%' }
# split window # split window
bind-key h split-window -c '#{pane_current_path}' -h bind-key h split-window -h
bind-key v split-window -c '#{pane_current_path}' -v bind-key v split-window -v
# kill server # kill server
bind-key k kill-server bind-key k kill-server