Do not follow this link

~rockorager/hutui

a sourcehut tui
go.mod: remove replace directive
lists: return error if patchset can't be updated
lists: reset fetching and patches list with new listview

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~rockorager/hutui
read/write
git@git.sr.ht:~rockorager/hutui

You can also use your local clone with git send-email.

#hutui

A tui for sourcehut. Heavily under development

#Configuration

Configuration is looked for at $XDG_HOME_CONFIG/hutui/config.scfg. Like hut, hutui uses the scfg config format. The instance configuration is identical to hut, thought hutui has not yet implemented access-token-cmd.

instance "sr.ht" {
        access-token "<token>"
        meta {
            origin "https://meta.sr.ht"
        }
    }

chat-cmd "senpai"

#Installation

Installation requires a go toolchain.

make
sudo make install

#Usage

In general there isn't much functionality yet. Don't expect too much.

#General

  • <Tab>/<S-Tab> to switch tabs
  • j/k to go up and down lists
  • <Enter> to select something
  • <C-b> to toggle key bypass (useful in a terminal)
  • : to enter command mode
  • :git ~rockorager to see ~rockoragers' git repos
  • :todo ~rockorager to see ~rockoragers' trackers
  • :lists ~rockorager to see ~rockoragers' mailing lists

#git

The git tab displays repositories for a user. Navigate to a new users' list by typing :git <username>. Username should include the prefix '~'. Pressing <Enter> on a repository does a shallow clone to $XDG_CACHE_HOME/hutui directory and opens an embedded terminal. The terminal will open to a README, if one is found (using the same rules sourcehut uses to find a README). Otherwise, it will open a blank $EDITOR with the repository as the working directory.

If you open a repo that already exists in your cache, a git pull will be performed instead of a fresh shallow-clone.

When an embedded terminal opens from this view, keys are bypassed. Press <C-b> to toggle the bypass mode.

#todo

There isn't much "todo" here. Just a listing so far. See another users' list with :todo <username>, including the prefix

#lists

Lists will display a list of your (or another users') mailing lists. Pressing <Enter> will display a list of patches from this mailing list. You can change the status of a patchset (assuming you have write access) with the following commands:

:applied
:approve
:reject
:superseded
:needs-revision
:proposed

When you are viewing a patchlist, you can press 'h' to return back to the user patch list view.

#chat

Chat is just an embedded terminal running your chat-cmd. By default, keys are not bypassed when entering this tab. Press <C-b> to enable bypass of all keys (except for <C-b>)

#Motivation

Sourcehut is awesome. Terminals are awesome. Why leave the terminal to manage sourcehut stuff? hut is good, but sometimes I like a TUI. So ...TUI.

Also, out of frustration with some other TUI frameworks (looking at you, tview and bubbletea) I wanted to see what it would be like to combine the best of these, rtk is that result, and hutui has been my playground to flesh out the design, and will continue to be - expect breakages.

As such, even though hutui has very limited functionality, it has an entire suite of theming. rtk has built-in support for base16 themes. Some possibilities:

hutui --list-themes | less # See the full list of themes
hutui --theme=onedark # Specify a theme
hutui --theme=random # Be brave

#Contributing

Patches and/or questions can be sent to ~rockorager/hutui@lists.sr.ht.

Contact me on IRC: libera.chat=rockorager

Tickets can be submitted at https://todo.sr.ht/~rockorager/hutui

Do not follow this link