diff options
Diffstat (limited to 'user/jj')
| -rw-r--r-- | user/jj/config.toml | 46 | 
1 files changed, 46 insertions, 0 deletions
diff --git a/user/jj/config.toml b/user/jj/config.toml index 72e8c4e..41f4bdf 100644 --- a/user/jj/config.toml +++ b/user/jj/config.toml @@ -6,3 +6,49 @@ email = "martin@push-f.com"  [ui]  pager = ["less", "--quit-if-one-screen", "--RAW-CONTROL-CHARS"] + +[aliases] +l = ["log", "-T", "my_log_oneline", "-r", "..@"] +ll = ["log", "-T", "builtin_log_compact_full_description", "-r", "..@"] +grep = ["util", "exec", "--", "rg", "--no-require-git", "--no-heading", "--no-line-number"] + +[template-aliases] +# The default shows seconds which I don't care about. +'format_timestamp(timestamp)' = 'timestamp.local().format("%Y-%m-%d %H:%M")' + +# Adapted builtin_log_oneline to only show change id and show author's timestamp instead of commit timestamp. +my_log_oneline = 'builtin_log_oneline(self)' +'builtin_log_oneline(commit)' = ''' +if(commit.root(), +  format_root_commit(commit), +  label( +    separate(" ", +      if(commit.current_working_copy(), "working_copy"), +      if(commit.immutable(), "immutable", "mutable"), +      if(commit.conflict(), "conflicted"), +    ), +    concat( +      separate(" ", +        format_short_signature_oneline(commit.author()), +        format_timestamp(commit.author().timestamp()), +        format_short_change_id_with_hidden_and_divergent_info(commit), +        commit.bookmarks(), +        commit.tags(), +        commit.working_copies(), +        if(commit.conflict(), label("conflict", "conflict")), +        if(config("ui.show-cryptographic-signatures").as_boolean(), +          format_short_cryptographic_signature(commit.signature())), +        if(commit.empty(), label("empty", "(empty)")), +        if(commit.description(), +          commit.description().first_line(), +          label(if(commit.empty(), "empty"), description_placeholder), +        ), +      ) ++ "\n", +    ), +  ) +) +''' + +[colors] +"diff removed token" = { bg = "#221111", underline = false } +"diff added token" = { bg = "#002200", underline = false }  | 
