diff options
author | Adam Hovorka <[email protected]> | 2020-05-20 17:17:39 -0600 |
---|---|---|
committer | Adam Hovorka <[email protected]> | 2020-05-20 17:17:39 -0600 |
commit | 2da3eee39b2d246b5b768696e7556378df95c070 (patch) | |
tree | 6469fd0d9fd89216dbbaeff80630046216ba8d11 /base | |
parent | e8b39c99c9d4bce62777ed091e8a4c9cc186facf (diff) |
Tweak colors and spacing in k.zsh some more
Diffstat (limited to 'base')
-rw-r--r-- | base/zsh/k.zsh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/base/zsh/k.zsh b/base/zsh/k.zsh index dc95e93..9b63423 100644 --- a/base/zsh/k.zsh +++ b/base/zsh/k.zsh @@ -243,10 +243,11 @@ k () { #31449600 240 # < less than 1 year old #62899200 238 # < less than 2 years old 0 1 # < in the future, #spooky - 3600 21 # < less than an hour old - 86400 7 # < less than 1 day old - 604800 20 # < less than 1 week old - 2419200 8 # < less than 28 days (4 weeks) old + 3600 15 # < less than an hour old + 86400 21 # < less than 1 day old + 604800 7 # < less than 1 week old + 2419200 20 # < less than 28 days (4 weeks) old + 15724800 8 # < less than 26 weeks (6 months) old 31449600 19 # < less than 1 year old ) @@ -421,8 +422,8 @@ k () { # Pad so all the lines align - firstline gets padded the other way PERMISSIONS="${(r:MAX_LEN[1]:)PERMISSIONS}" HARDLINKCOUNT="${(l:MAX_LEN[2]:)HARDLINKCOUNT}" - OWNER="${(l:MAX_LEN[3]:)OWNER}" - GROUP="${(l:MAX_LEN[4]:)GROUP}" + OWNER="${(r:MAX_LEN[3]:)OWNER}" + GROUP="${(r:MAX_LEN[4]:)GROUP}" FILESIZE_OUT="${(l:MAX_LEN[5]:)FILESIZE_OUT}" # -------------------------------------------------------------------------- @@ -477,11 +478,11 @@ k () { # Format date to show year if more than 6 months since last modified if (( TIME_DIFF < 15724800 )); then - DATE_OUTPUT="${DATE[2]} ${(r:5:: :)${DATE[3][0,5]}} ${DATE[4]}" + DATE_OUTPUT="${DATE[3]} ${DATE[2]} ${DATE[4]}" else - DATE_OUTPUT="${DATE[2]} ${(r:6:: :)${DATE[3][0,5]}} ${DATE[5]}" # extra space; 4 digit year instead of 5 digit HH:MM + DATE_OUTPUT="${DATE[3]} ${DATE[2]} ${DATE[5]}" # extra space; 4 digit year instead of 5 digit HH:MM fi; - DATE_OUTPUT[1]="${DATE_OUTPUT[1]//0/ }" # If day of month begins with zero, replace zero with space + #DATE_OUTPUT[1]="${DATE_OUTPUT[1]//0/ }" # If day of month begins with zero, replace zero with space # Apply colour to formated date DATE_OUTPUT=$'\e[38;5;'"${TIME_COLOR}m${DATE_OUTPUT}"$'\e[0m' |