Skip to content

Commit

Permalink
fix: tmux uptime script
Browse files Browse the repository at this point in the history
  • Loading branch information
kyau committed Nov 1, 2023
1 parent f4d24be commit d32ddd3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## Visual Studio
*/.vs/
.vs/
## ark
bin/arkmanager
## ckb
Expand Down
9 changes: 5 additions & 4 deletions bin/vuptime
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# $KYAULabs: vuptime,v 1.0.2 2021/07/11 00:13:41 kyau Exp $
#!/bin/bash
# $KYAULabs: vuptime,v 1.0.3 2023/10/31 22:36:00 kyau Exp $
# ▄▄▄▄ ▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
# █ ▄▄ ▄ ▄▄ ▄ ▄▄▄▄ ▄▄ ▄ ▄▄ ▄▄▄▄ ▄▄▄▄ ▄▄▄ ▀
# █ ██ █ ██ █ ██ █ ██ █ ██ ██ █ ██ █ ██▀ █
Expand All @@ -8,7 +9,7 @@
# ▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀
#
# Visual Uptime Script
# Copyright (C) 2021 KYAU Labs (https://kyaulabs.com)
# Copyright (C) 2023 KYAU Labs (https://kyaulabs.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
Expand All @@ -23,7 +24,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

UPTIME=$(uptime | sed -E 's/^[^,]*up *//; s/, *[[:digit:]]* users.*//; s/min/minutes/; s/([[:digit:]]+):0?([[:digit:]]+)/\1 hours, \2 minutes/')
UPTIME=$(uptime -p | sed -E 's/^[^,]*up *//')
echo "$UPTIME" | sed -e 's/ day/day/g; s/ days/days/g; s/ hours/hrs/g; s/ hour/hr/g; s/ minutes/mins/g; s/ minute/min/g; s/ seconds/secs/g; s/ second/sec/g; s/, /, /g'

# vim: ft=bash sts=4 sw=4 ts=4 noet:
# vim: ft=bash sts=4 sw=4 ts=4 noet:
22 changes: 21 additions & 1 deletion config/starship.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# $KYAULabs: starship.toml,v 1.0.0 2021/07/10 00:37:02 kyau Exp $
# $KYAULabs: starship.toml,v 1.0.1 2023/05/25 04:34:22 kyau Exp $
#

format = '$shell$all'

[character]
success_symbol = "[✓](bold green)"
error_symbol = "[✕](bold red)"

[dotnet]
format = 'via [$symbol($version )(🎯 $tfm )]($style)'
symbol = '󰘐'
style = 'purple bold'

[git_branch]
format = "on [$symbol$branch]($style) "

Expand All @@ -16,6 +23,19 @@ style = "242"
[line_break]
disabled = true

[nodejs]
disabled = true

[shell]
bash_indicator = ''
cmd_indicator = ''
fish_indicator = ''
powershell_indicator = ''
unknown_indicator = ''
format = '[$indicator]($style)'
style = 'white bold'
disabled = false

[username]
format = "[$user]($style)[ ┅ ](247)"
style_user = "27"
Expand Down

0 comments on commit d32ddd3

Please sign in to comment.