Fixed uptime and changed tmux config

nvim
KeeganForelight 2 years ago
parent 66e3065a14
commit 1a1ad62a9a

@ -1,16 +1,15 @@
#!/usr/bin/env bash
ft_seconds=$(cat /proc/uptime | awk '{print $1}' | xargs printf '%d' 2>/dev/null) # floored int total
ft_minutes=$(($ft_seconds/60))
uptime=$(( $(date +%s) - $(date -d "$(uptime -s)" +%s)))
ft_minutes=$(($uptime/60))
ft_hours=$(($ft_minutes/60))
echo $ft_hours $ft_minutes $ft_seconds
#echo $ft_hours $ft_minutes $ft_seconds
if [[ $ft_hours -gt 0 ]] ; then
# display with leading hours
rem_mins=$(($ft_minutes % 60)) # get remaining mins
printf '%dH %dM' $ft_hours $rem_mins
ft_mins=$(($ft_minutes % 60)) # get remaining mins
printf '%dH %dM' $ft_hours $ft_mins
else
# display with leading minutes
rem_secs=$(($ft_seconds % 60)) # get remaining mins
printf '%dM %dS' $ft_minutes $rem_secs
printf '%dM' $ft_minutes
fi

@ -27,7 +27,7 @@ set -g status-interval 10
set -g status-style "bg=black, fg=brightWhite"
set -g status-right "#(~/.dotfiles/bin/docker.sh)| #(~/.dotfiles/bin/agent/checker.sh) | #(~/.tmux/plugins/tmux-mem-cpu-load/tmux-mem-cpu-load -p -i 1 -a 1) | #(~/.dotfiles/bin/up.sh) | %A, %b %d %l:%M %P "
set -g status-right-length 100
set -g status-left "#(~/.dotfiles/bin/weather/weather) | #(~/.dotfiles/bin/bluebikes/bb) | #(~/.dotfiles/bin/water/water.sh) |"
set -g status-left "#(~/.dotfiles/bin/weather/weather) | #(~/.dotfiles/bin/bluebikes/bb -c) | #(~/.dotfiles/bin/water/water.sh) |"
set -g status-left-length 100
# tmux auto start

Loading…
Cancel
Save