๐Ÿ”’ Backup for my config files
dotfiles

update jj timestamp and colors

kacaii.dev fec3ef24 720b3854

verified
+49 -5
+8 -4
.config/jj/conf.d/colors.toml
··· 1 1 #:schema https://jj-vcs.github.io/jj/latest/config-schema.json 2 2 3 3 [colors] 4 - commit_id = "blue" 5 - change_id = { bold = true, fg = "magenta" } 6 - prefix = { bold = true, fg = "magenta" } 7 - rest = { bold = false, fg = "bright black" } 4 + commit_id = { fg = "blue" } 5 + change_id = { fg = "magenta", bold = true } 6 + rest = { fg = "bright black", bold = false } 7 + 8 + node = { bold = false } 9 + "node elided" = { fg = "yellow" } 10 + "node working_copy" = { fg = "green" } 11 + "node conflict" = { fg = "red" }
+41 -1
.config/jj/conf.d/templates.toml
··· 1 + #:schema https://jj-vcs.github.io/jj/latest/config-schema.json 1 2 [template-aliases] 3 + "abbreviate_timestamp_suffix(s, suffix, abbr)" = ''' 4 + if( 5 + s.ends_with(suffix), 6 + s.remove_suffix(suffix) ++ label("timestamp", abbr) 7 + ) 8 + ''' 9 + 10 + "abbreviate_relative_timestamp(s)" = ''' 11 + coalesce( 12 + abbreviate_timestamp_suffix(s, " millisecond", "ms"), 13 + abbreviate_timestamp_suffix(s, " second", "s"), 14 + abbreviate_timestamp_suffix(s, " minute", "m"), 15 + abbreviate_timestamp_suffix(s, " hour", "h"), 16 + abbreviate_timestamp_suffix(s, " day", "d"), 17 + abbreviate_timestamp_suffix(s, " week", "w"), 18 + abbreviate_timestamp_suffix(s, " month", "mo"), 19 + abbreviate_timestamp_suffix(s, " year", "y"), 20 + s 21 + ) 22 + ''' 23 + 24 + "format_timestamp(timestamp)" = ''' 25 + coalesce( 26 + if(timestamp.after("1 minute ago"), label("timestamp", "<1m")), 27 + abbreviate_relative_timestamp(timestamp.ago().remove_suffix(' ago').remove_suffix('s')) 28 + ) 29 + ''' 2 30 3 31 [templates] 4 - git_push_bookmark = '"bryce/push-" ++ change_id.short()' 32 + git_push_bookmark = '"kacaii/push-" ++ change_id.short()' 33 + 34 + log_node = ''' 35 + label("node", 36 + coalesce( 37 + if(!self, label("elided", "~")), 38 + if(current_working_copy, label("working_copy", "@")), 39 + if(conflict, label("conflict", "ร—")), 40 + if(immutable, label("immutable", "โ€ข")), 41 + label("normal", "ยท") 42 + ) 43 + ) 44 + '''