tangled
alpha
login
or
join now
kacaii.dev
/
dotfiles
0
fork
atom
๐ Backup for my config files
dotfiles
0
fork
atom
overview
issues
pulls
pipelines
update jj timestamp and colors
kacaii.dev
1 month ago
fec3ef24
720b3854
verified
This commit was signed with the committer's
known signature
.
kacaii.dev
SSH Key Fingerprint:
SHA256:n9v7QGNWHCUv1x/483hCtPUvTsVabU5PzC5CSJMUNtI=
+49
-5
2 changed files
expand all
collapse all
unified
split
.config
jj
conf.d
colors.toml
templates.toml
+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
4
-
commit_id = "blue"
5
5
-
change_id = { bold = true, fg = "magenta" }
6
6
-
prefix = { bold = true, fg = "magenta" }
7
7
-
rest = { bold = false, fg = "bright black" }
4
4
+
commit_id = { fg = "blue" }
5
5
+
change_id = { fg = "magenta", bold = true }
6
6
+
rest = { fg = "bright black", bold = false }
7
7
+
8
8
+
node = { bold = false }
9
9
+
"node elided" = { fg = "yellow" }
10
10
+
"node working_copy" = { fg = "green" }
11
11
+
"node conflict" = { fg = "red" }
+41
-1
.config/jj/conf.d/templates.toml
···
1
1
+
#:schema https://jj-vcs.github.io/jj/latest/config-schema.json
1
2
[template-aliases]
3
3
+
"abbreviate_timestamp_suffix(s, suffix, abbr)" = '''
4
4
+
if(
5
5
+
s.ends_with(suffix),
6
6
+
s.remove_suffix(suffix) ++ label("timestamp", abbr)
7
7
+
)
8
8
+
'''
9
9
+
10
10
+
"abbreviate_relative_timestamp(s)" = '''
11
11
+
coalesce(
12
12
+
abbreviate_timestamp_suffix(s, " millisecond", "ms"),
13
13
+
abbreviate_timestamp_suffix(s, " second", "s"),
14
14
+
abbreviate_timestamp_suffix(s, " minute", "m"),
15
15
+
abbreviate_timestamp_suffix(s, " hour", "h"),
16
16
+
abbreviate_timestamp_suffix(s, " day", "d"),
17
17
+
abbreviate_timestamp_suffix(s, " week", "w"),
18
18
+
abbreviate_timestamp_suffix(s, " month", "mo"),
19
19
+
abbreviate_timestamp_suffix(s, " year", "y"),
20
20
+
s
21
21
+
)
22
22
+
'''
23
23
+
24
24
+
"format_timestamp(timestamp)" = '''
25
25
+
coalesce(
26
26
+
if(timestamp.after("1 minute ago"), label("timestamp", "<1m")),
27
27
+
abbreviate_relative_timestamp(timestamp.ago().remove_suffix(' ago').remove_suffix('s'))
28
28
+
)
29
29
+
'''
2
30
3
31
[templates]
4
4
-
git_push_bookmark = '"bryce/push-" ++ change_id.short()'
32
32
+
git_push_bookmark = '"kacaii/push-" ++ change_id.short()'
33
33
+
34
34
+
log_node = '''
35
35
+
label("node",
36
36
+
coalesce(
37
37
+
if(!self, label("elided", "~")),
38
38
+
if(current_working_copy, label("working_copy", "@")),
39
39
+
if(conflict, label("conflict", "ร")),
40
40
+
if(immutable, label("immutable", "โข")),
41
41
+
label("normal", "ยท")
42
42
+
)
43
43
+
)
44
44
+
'''