script/shelldoc
This commit is contained in:
parent
be8245a5f5
commit
69edbd40d7
1 changed files with 13 additions and 0 deletions
13
sh/tmux.sh
13
sh/tmux.sh
|
@ -135,13 +135,21 @@ rwx_tmux_setup() {
|
|||
file="${HOME}/.tmux.conf"
|
||||
script="${HOME}/.tmux.sh"
|
||||
fi
|
||||
# FIXME skip parsing these functions
|
||||
rwx_file_write "${script}" "\
|
||||
# ╭─────┬──────┬────────╮
|
||||
# │ rwx │ tmux │ script │
|
||||
# ╰─────┴──────┴────────╯
|
||||
|
||||
# return current server socket name
|
||||
rwx_tmux_server() {
|
||||
basename \"\${TMUX}\" |
|
||||
cut \\
|
||||
--delimiter \",\" \\
|
||||
--fields \"1\"
|
||||
}
|
||||
|
||||
# return active & current servers socket names
|
||||
rwx_tmux_servers() {
|
||||
local active name root sockets text user_id
|
||||
active=\"\$(rwx_tmux_server)\"
|
||||
|
@ -169,6 +177,9 @@ ${RWX_TMUX_BORDER_BACKGROUND} \\
|
|||
EOF
|
||||
echo \"\${text}\"
|
||||
}
|
||||
|
||||
# set status lines option
|
||||
# off, on, 2, 3, 4, 5
|
||||
rwx_tmux_status() {
|
||||
local current=\"\${1}\"
|
||||
local operand=\"\${2}\"
|
||||
|
@ -197,6 +208,8 @@ rwx_tmux_status() {
|
|||
esac
|
||||
tmux set-option -g status \"\${current}\"
|
||||
}
|
||||
|
||||
# render uptime date & time
|
||||
rwx_tmux_uptime() {
|
||||
local since=\"\$(uptime --since)\"
|
||||
local date=\"\$(echo \"\${since}\" | awk '{print \$1}')\"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue