| 1 | { |
| 2 | programs.jujutsu = { |
| 3 | enable = true; |
| 4 | # my workflow is based on creating changes and editing them. while they |
| 5 | # are in progress the description starts with "WIP: " |
| 6 | settings = rec { |
| 7 | colors = { |
| 8 | bookmark = "green"; |
| 9 | bookmarks = colors.bookmark; |
| 10 | local_bookmarks = colors.bookmarks; |
| 11 | remote_bookmarks = colors.bookmark; |
| 12 | "working_copy bookmark" = "bright green"; |
| 13 | "working_copy bookmarks" = colors."working_copy bookmark"; |
| 14 | "working_copy local_bookmarks" = colors."working_copy bookmark"; |
| 15 | "working_copy remote_bookmarks" = colors."working_copy bookmark"; |
| 16 | |
| 17 | "author" = { |
| 18 | fg = "bright black"; |
| 19 | bold = false; |
| 20 | italic = true; |
| 21 | }; |
| 22 | "working_copy author" = colors.author; |
| 23 | committer = { |
| 24 | fg = "bright black"; |
| 25 | bold = false; |
| 26 | }; |
| 27 | |
| 28 | desc = { |
| 29 | bold = true; |
| 30 | fg = "default"; |
| 31 | }; |
| 32 | description = colors.desc; |
| 33 | cc_wip = { |
| 34 | fg = "bright yellow"; |
| 35 | bold = true; |
| 36 | reverse = true; |
| 37 | }; |
| 38 | cc_header = { |
| 39 | bold = true; |
| 40 | fg = "default"; |
| 41 | }; |
| 42 | cc_feat = "green"; |
| 43 | cc_fix = "red"; |
| 44 | cc_hotfix = "red"; |
| 45 | cc_chore = "yellow"; |
| 46 | cc_test = "blue"; |
| 47 | cc_other = "blue"; |
| 48 | cc_scope = { |
| 49 | fg = "cyan"; |
| 50 | bold = false; |
| 51 | italic = true; |
| 52 | }; |
| 53 | |
| 54 | active_marker = { |
| 55 | fg = "bright magenta"; |
| 56 | bold = true; |
| 57 | reverse = true; |
| 58 | }; |
| 59 | "change_id shortest rest" = { |
| 60 | fg = "bright black"; |
| 61 | bold = true; |
| 62 | }; |
| 63 | conflict_marker = { |
| 64 | fg = "bright red"; |
| 65 | bold = true; |
| 66 | reverse = true; |
| 67 | }; |
| 68 | |
| 69 | timestamp = "bright black"; |
| 70 | "committer timestamp" = colors.committer; |
| 71 | commit_id = { |
| 72 | fg = "bright black"; |
| 73 | bold = false; |
| 74 | }; |
| 75 | muted = "bright black"; |
| 76 | }; |
| 77 | ui.default-command = "log"; |
| 78 | # ui.graph.style = "square"; |
| 79 | revsets = { |
| 80 | short-prefixes = "(trunk()..@)::"; |
| 81 | }; |
| 82 | "template-aliases" = { |
| 83 | "format_log_author(commit)" = '' |
| 84 | if(commit.mine(), "You", commit.author().name().match("[^ ]+")) |
| 85 | ''; |
| 86 | "format_log_timestamp(timestamp)" = '' |
| 87 | if(timestamp.after("1 day ago"), timestamp.ago(), timestamp.local().format("%Y-%m-%d")) |
| 88 | ''; |
| 89 | "format_short_commit_header(commit)" = '' |
| 90 | separate(" ", |
| 91 | format_short_change_id_with_change_offset(commit), |
| 92 | label("author", format_log_author(commit)), |
| 93 | label("timestamp", format_log_timestamp(commit_timestamp(commit))), |
| 94 | commit.bookmarks(), |
| 95 | commit.tags(), |
| 96 | commit.working_copies(), |
| 97 | format_commit_labels(commit), |
| 98 | if(config("ui.show-cryptographic-signatures").as_boolean(), |
| 99 | format_short_cryptographic_signature(commit.signature()) |
| 100 | ), |
| 101 | ) |
| 102 | ''; |
| 103 | }; |
| 104 | aliases = { |
| 105 | "ab" = [ "abandon" ]; |
| 106 | "desc" = [ |
| 107 | "describe" |
| 108 | "--ignore-working-copy" |
| 109 | ]; |
| 110 | }; |
| 111 | }; |
| 112 | }; |
| 113 | } |