feat(uptime): replace plugin with sed (#163)
* module(uptime): replace plugin with custom sed * module(uptime): update doc
This commit is contained in:
parent
6e40906b2d
commit
e80cb735bb
2 changed files with 3 additions and 25 deletions
|
@ -1,11 +1,10 @@
|
|||
# Requires https://github.com/robhurring/tmux-uptime.
|
||||
show_uptime() {
|
||||
local index=$1
|
||||
local icon="$(get_tmux_option "@catppuccin_uptime_icon" "")"
|
||||
local color="$(get_tmux_option "@catppuccin_uptime_color" "$thm_green")"
|
||||
local text="$(get_tmux_option "@catppuccin_uptime_text" "#{uptime}")"
|
||||
local text="$(get_tmux_option "@catppuccin_uptime_text" "#(uptime | sed 's/^[^,]*up *//; s/, *[[:digit:]]* users.*//; s/ day.*, */d /; s/:/h /; s/ min//; s/$/m/')")"
|
||||
|
||||
local module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
local module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||
|
||||
echo "$module"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue