]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/jujutsu/jjui/config.lua
+user/op(xmonad): tweak key bindings
[julm/julm-nix.git] / home-manager / profiles / jujutsu / jjui / config.lua
1 function setup(config)
2 config.action("show diff in diffnav", function()
3 local change_id = context.change_id()
4 if not change_id or change_id == "" then
5 flash({ text = "No revision selected", error = true })
6 return
7 end
8
9 exec_shell(string.format("jj diff -r %q --git --color always | diffnav", change_id))
10 end, { desc = "show diff in diffnav", key = "ctrl+d", scope = "revisions" })
11
12 config.action("copy-change-id", function()
13 local id = context.change_id()
14 if id then
15 copy_to_clipboard(id)
16 flash("Copied: " .. id)
17 end
18 end, { key = "Y", scope = "revisions", desc = "copy change id" })
19 end