summaryrefslogtreecommitdiff
path: root/ui/ui.go (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-01-15Multi-WIP that I probably should have done in multiples commits:Jordan Bracco1-12/+21
- more colors settings: - server foreground - channel foreground (active, inactive) - dumb cosmetic changes because why not (`!` -> `:(`, coloring) - temporary lines to unclutter main ui from disconnections/reconnections - display line head only once in case of multiple lines - cosmetic motd - handle 396 numeric as "server" head - improved ACTION display - imrpoved topic display bugs: - ACTION fucks up with multi-line head - multi-line head needs rework before trying upstream - what the fuck to with my cosmetic changes - document new config values
2022-10-18Clear highlights from MARKREAD when only NotifyNone lines are leftdelthas1-2/+2
Previously, we did not clear buffers highlight statuses on MARKREAD if there was any unread line after it. This meant that if we received a plain message, than a join message, and some other device sent us a read marker for the plain message, we would still highlight the buffer. But we should not: a join message should not highlight the buffer. This is a recurrent use case because some clients do not display join mesasges and therefore do not send read markers for it. This updates the logic to actually store the notify level (in the line) and uses it to reset the highlight status when only NotifyNone messages (or no messages) are left.
2022-10-13Scroll to buffer on zoomNomeji1-0/+1
2022-09-14Make the last opened channel visible in the horizontal listdelthas1-1/+5
When starting senpai, we jump to the last opened buffer. Offset the horizontal target list to make the buffer visible, as if scrolled to with CTRL+N. Fixes: https://todo.sr.ht/~taiite/senpai/100
2022-08-15Revert to using base colors by default, making extended configurabledelthas1-1/+2
In a previous commit, the color scheme for displaying nicks was changed to use more colors (30 rather than 14), using extended colors from the 256 colors set. The issue with this is that most terminal emulators customize the colors of the first 16 colors to make them more readable (eg, a terminal emulator with a light theme will make colors darker, and one with a dark theme will make colors lighter). So the 14 colors used before were usually not the default color codes from the original xterm/X11 spec, but specific colors chosen by the terminal emulator to be particularly readable. In a way, changing the behavior to use colors from the 256 colors set, which is usually not overriden, made them much less readable. Which is why we need a configuration option for this. I conversatively chose to make the default color scheme the previous one, with only the base 16 colors. The 256 colors scheme can be enable by adding to the configuration file: colors { nicks extended }
2022-08-10Color nicks in the member list the same as in the timelinedelthas1-1/+2
Also, change the color scheme to use more colors. Now 30 instead of 15, and with the consistent color codes offered by the extended XTerm 256 color scheme. Fixes: https://todo.sr.ht/~taiite/senpai/90
2022-08-10Add support for soju.im/bouncer-networks-notifydelthas1-0/+5
This enables dynamic discovery of new and deleted networks. Fixes: https://todo.sr.ht/~taiite/senpai/71
2022-08-01Add a config option to beep on highlightKirill Chibisov1-0/+4
This will allow to bring user attention when you are getting highlighted.
2022-07-25Add pane-widths { text } to limit the max line widthdelthas1-2/+7
Fixes: https://todo.sr.ht/~taiite/senpai/87
2022-07-22Fix crashing when shrinking the text to a zero widthdelthas1-0/+3
Thanks steamyalt for the bug report. Fixes: https://todo.sr.ht/~taiite/senpai/86
2022-07-22Scroll to the channel when changing the horizontal channelNomeji1-0/+16
Previously, when running CTRL+N or CTRL+P to go to the next or previous channel, with the horizontal channel mode, the selected channel could appear offscreen. This patch ensures that we scroll just enough to make the newly selected chan visible. Thanks to Nomeji for his hard work on this. Adapted slightly to refactor existing code to use the newly created width computation routine.
2022-04-20Add a config option for unread buffer text colorTim Culverhouse1-1/+6
This patch adds the ability to set a config option for changing the foreground text color of unread buffers (This was refactored slightly by delthas.)
2022-04-20Enable clicking on a horizontal buffer to switch to itdelthas1-0/+4
This is inspired by a patch from mooff. This keeps the same click & drag behavior as for the vertical channel list.
2022-04-20Scroll horizontal channel list with the mouse wheeldelthas1-1/+1
This is inspired by a patch by mooff. The horizontal channel list can now be scrolled with the mouse wheel.
2022-04-20Show/hide the channel & member list with F7/F8delthas1-22/+59
This patch is inspired and modified from a patch by mooff. Also this switches the default configuration to *display* the channel & member list by default.
2022-04-12Implement SEARCHdelthas1-0/+12
Also refactor ui/ to support overlays, temporary anonmyous buffers. See: https://github.com/emersion/soju/pull/39
2022-02-13Enable clicking on channel members to open a query with themdelthas1-6/+23
2022-02-13Make CTRL+C alternatively clear the input and set '/quit' in itdelthas1-0/+4
2022-02-11Add support for the soju.im/read capability and READ commanddelthas1-0/+9
See: https://github.com/emersion/soju/blob/c7f0634ec8ee94425547b159bc36705582151012/doc/read.md
2022-02-10MONITOR user with whom we have an open bufferdelthas1-2/+14
2021-12-06Merge redundant eventsHubert Hirtz1-1/+2
2021-11-24Show the current channel topic at the top of the timelinedelthas1-0/+4
2021-11-16Fix part-ing a channel with duplicate name in other networksdelthas1-2/+2
If there are multiple channels with the same name in several networks, we should part from the one from the correct network.
2021-11-16Allow App.Close() and App.Run() to be run concurrentlyHubert Hirtz1-1/+7
2021-11-05Revert "Show the current channel topic at the top of the timeline"Hubert Hirtz1-4/+0
This reverts commit 96340f8c4d91f59f6e39767891f9bb52d7fad329 because of a bug in timeline rendering.
2021-11-04Show the current channel topic at the top of the timelinedelthas1-0/+4
2021-10-31Make vertical channel list scrollabledelthas1-2/+18
Seems like I really have too many channels... :)
2021-10-27Sync screen during resizeHubert Hirtz1-0/+1
For CtrlL to actually refresh the screen.
2021-10-26Scroll up/down highlight by highlightHubert Hirtz1-0/+8
2021-10-26status bar drawing: fix off-by-one errorHubert Hirtz1-7/+1
2021-10-24Support for soju.im/bouncer-networksHubert Hirtz1-7/+20
This patch also disable the highlight on reconnect. This might be an issue (the user would want to know when senpai is online again?), but with multiple connections, it's bothersome to have to unread all of them on start (it wasn't a problem with only one connection since it was read instantly). Now, lastbuffer.txt also contains the network ID, otherwise the user might end up on another buffer with the same name. This patch does not extend /r to support multiple networks (it will send the message to the latest query, whatever the current displayed network is).
2021-10-23Make use of away-notifyHubert Hirtz1-2/+10
2021-10-22Rework vertical listsHubert Hirtz1-13/+11
2021-10-22Fix ui.StyledStringBuilderHubert Hirtz1-0/+1
2021-10-19Cleanup drawVerticalMemberListHubert Hirtz1-1/+31
2021-10-19Only show buffer numbers when necessaryHubert Hirtz1-6/+7
Saves space also removed non-edition related method IsCommand out of editor.go
2021-09-13Fix horizontal channel bar drawingHubert Hirtz1-1/+1
2021-09-03Use messageBounds for infinite scroll CHATHISTORY requestsHubert Hirtz1-5/+0
2021-09-01Don't show the member list by defaultHubert Hirtz1-1/+3
2021-09-01Channel list is horizontal by defaultHubert Hirtz1-7/+30
2021-09-01Fetch missed messages on reconnectHubert Hirtz1-3/+3
just one step closer to proper CHATHISTORY support!! :=D ^v^
2021-08-07Introduce backsearch message support with ctrl+Rdelthas1-0/+4
Fixes: #47
2021-08-06Enable scrolling through the vertical member list with the mouse wheeldelthas1-4/+30
2021-07-14ui: Introduce a vertical member list on channelsdelthas1-11/+18
Also, fix the UI timeline clearing too much, as well as the status line. Also, remove the width in the editor and buffer list constructors. We were initializing them with wrong values, only to overwrite these values with correct ones later in Resize().
2021-07-14Add notify types for fine-grained control of unread/highlight statedelthas1-2/+2
Namely, we want the unread light to show up only on actual messages, not commands etc. This opens the way for not showing an unread light when printing topic on join.
2021-07-13Don't send typing=done when input is already emptyHubert Hirtz1-2/+2
2021-07-13Switch to the buffer of a new user-requested channel joindelthas1-2/+10
2021-07-13Clear the input on CTRL+C instead of quittingdelthas1-0/+4
We have /QUIT for quitting. Most well-known IRC clients don't quit on CTRL+C but they do on QUIT. Clearing the editor input on CTRL+C is useful for shell-like behaviour "abort current line, let me start my line again".
2021-07-12Ignore case when searching for a /BUFFERdelthas1-1/+2
Best-effort regular casemapping, not the IRC session's one. :P
2021-05-26Pick nick colors in terminal color schemeHubert Hirtz1-7/+14
So that the colors go well with the terminal background.