Skip to content

appid / persist splitter location (horizontal + vertical) / arrow keys / context lines + whitespace#3

Merged
Marenz merged 9 commits into
Marenz:masterfrom
selckin:keyboard-nav-and-diff-options
Jun 24, 2026
Merged

appid / persist splitter location (horizontal + vertical) / arrow keys / context lines + whitespace#3
Marenz merged 9 commits into
Marenz:masterfrom
selckin:keyboard-nav-and-diff-options

Conversation

@selckin

@selckin selckin commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Take 2: Some gitk features I was missing

  • set appid so compositors can apply rules to the window
  • persist the location of splitters + make the file list resizeable
  • arrow keys browse through commits
  • diff option for number of context lines + ignore whitespace (visible on hover)

Entirely written by claude & tested by me, feel free to instantly deny or requests changes

These are the initial smaller changes I made, that should be fairly safe.
After that I made some more invasive changes, but I am not sure what you vision for this project is, and if these would be welcome, they are also all written by claude, I use gitkay daily now at work, and so far not had any issues.

Changes includes:

  • configure fonts
  • syntax highlighting (cached + prewarming)
  • configurable color themes
  • remember window size
  • updated all dependencies
  • option to hide the filelist/diffstat below the commit description
  • gitkay [-C ] [--all] [<rev>...] [-- <path>...]
  • gitkay --reflog
  • gitkay --follow
  • word diff option

There is an overview here: https://github.com/selckin/gitkay/blob/master/OVERVIEW.md

I can try to make individual PR per features that are reviewable if you wish, or maybe just a giant PR with everything, or just keep them in my fork

Cheers

selckin added 9 commits June 21, 2026 22:45
Enable eframe's persistence feature and persist ONLY the diff-panel splitter
height (~/.local/share/gitkay/app.ron) via App::save / cc.storage:
persist_egui_memory() returns false, so the whole egui-memory blob (which would
also restore every ScrollArea offset) is not saved; the height is captured from
the panel response each frame and re-applied as default_height on startup.

Window geometry is deliberately not persisted (persist_window = false): eframe's
window-size round-trip grows the window on every Wayland restart (fractional
scaling + client-side decorations).
Replace the content-computed sidebar width with an egui SidePanel::right so the
divider between the diff and the file list is a draggable splitter. Its width is
persisted across runs like the diff-panel height: read from cc.storage into
default_width in new(), captured from the panel response each frame, and written
under "file_list_width" in App::save. The sidebar still only appears when the
selected commit touches files.
Up/Down move the selection to the previous/next commit (loading its diff) when
the search bar isn't focused. graph_scroll_to now carries a scroll alignment so
clicks and search jumps still center the target, while arrow navigation scrolls
minimally — only when the selection would leave the viewport.
When the search bar is focused, Up/Down step backward/forward through the
matches (wrapping), mirroring Enter's forward cycling. Outside the search bar
they still move the commit-list selection.
A toolbar revealed on hover at the top of the diff panel adds a context-lines
stepper (0-99, default 3) and an 'Ignore whitespace' (-w) checkbox. It's a
floating overlay (egui Area), so it never takes vertical space from the diff.
The settings flow through a DiffSettings struct into all three diff paths
(commit, uncommitted, staged), persist across runs via App::save, and re-run the
current diff immediately when changed. Settings are read before the startup diff
so persisted values apply on launch.
@Marenz Marenz merged commit 08c59b9 into Marenz:master Jun 24, 2026
1 check passed
@Marenz

Marenz commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Thank you for the contribution! These are pretty cool features and fixes!

I use gitkay daily now at work, and so far not had any issues.

Oh, very nice! Happy to read that it has value for others :)
I basically wrote it because I wanted a "proper modern" gitk for my new wayland based compositor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants