Commit Graph

1005 Commits (master)

Author SHA1 Message Date
Curtis McEnroe ed9961410e
Set title to tag name 2018-08-13 23:09:53 -04:00
Curtis McEnroe 11d445b672
Add termTitle 2018-08-13 22:54:02 -04:00
Curtis McEnroe 1ca6974b64
Don't ping self 2018-08-13 19:54:26 -04:00
Curtis McEnroe e713e6a162
Improve configuration of Makefile 2018-08-13 19:27:22 -04:00
Curtis McEnroe 372b79b59e
Detect pings anywhere in message 2018-08-13 14:37:37 -04:00
Curtis McEnroe 2ae5b6b9ab
Add /query, /part and /close
Closing a channel before parting it is a bit weird, but if I send a PART
on /close, it would get reopened again to show the part message.
2018-08-13 13:49:03 -04:00
Curtis McEnroe 1232ce451d
Factor out input param and add tagFind
So that /view can't just invent tags.
2018-08-12 23:55:12 -04:00
Curtis McEnroe 19464369c3
Fix /open ranges by passing all URLs to open(1)
This is going to be incompatible with xdg-open since it takes only one
URL at a time. Write a wrapper script.
2018-08-12 23:44:58 -04:00
Curtis McEnroe a09df5f697
Avoid setting mark if switching to the same view 2018-08-12 21:38:25 -04:00
Curtis McEnroe 2ec109e246
Disable focus tracking in uiHide
Most significantly so that the sequences don't end up on screen during a
/url.
2018-08-12 20:41:13 -04:00
Curtis McEnroe 0dfeb3df84
Add shift-{left,right} for single-line scrolling 2018-08-11 22:46:28 -04:00
Curtis McEnroe 24ca3aed81
Leave room for topic when creating view 2018-08-11 22:45:53 -04:00
Curtis McEnroe a281f89592
Rework UI code for multi-channel
Tags are now permanently assigned (and I'm betting on never needing more
than 256 of them) and the UI maps tags to a linked list of views for
easy reordering and removal. Currently, views can only be added. Views
don't have a topic window until they need one. All UI code wants to be
functional reactive.

Beeping is temporarily removed until message priorities (status,
message, ping) can be added to the UI. At that point spawning
notify-send should also be possible. Priorities will also help with
unnecessary markers, which will not appear for status messages.

The tab system is now used to send QUIT and NICK messages to all the
relevant tags. Verbose output now goes to its own tag, and sending to
it sends raw IRC.

IRC colors are now listed in chat.h and handler functions for numeric
replies have real names. The color algorithm now uses a real hash
function for hopefully better results. QUIT, PART and KICK messages are
scanned for URLs.
2018-08-11 20:02:03 -04:00
Curtis McEnroe 461bfca378
Add term.c for extra terminal features
Look at the cute little state machine!
2018-08-11 15:49:39 -04:00
Curtis McEnroe fec5e51d78
Fix isSelf user checking
Other users with the same username are not self.

The fun effect of this was that I could tab-complete "june_" but not
"june".
2018-08-11 12:50:56 -04:00
Curtis McEnroe a1bb27ae01
Fix commented out error handling
Oops. Had commented it out so I could attach a debugger without exiting
on EINTR.
2018-08-11 12:47:39 -04:00
Curtis McEnroe 6323ca0209
Fix removing entries during tab complete
Since tabNext starts on match->next, if match gets removed, it should be
set to match->prev so that tabNext will start in the same spot.
2018-08-11 12:46:21 -04:00
Curtis McEnroe 07c750d25c
Become multi-channel
There's a lot of UI missing for it, but it technically works.
2018-08-10 23:31:20 -04:00
Curtis McEnroe e9793b4bce
Move process spawning onto the event loop
Child processes weren't being reaped before, either. I wanted to have a
function called readEmAndReap but the reaping should actually happen in
a signal handler.
2018-08-10 13:36:00 -04:00
Curtis McEnroe b740e937df
Remove unnecessary va_end
va_end must be called before the function returns, but errx is noreturn.
2018-08-10 12:45:37 -04:00
Curtis McEnroe 1a9ae050d6
Rename chan to join
In preparation for multi-channel?
2018-08-10 00:01:35 -04:00
Curtis McEnroe 4e1501df41
Add -u option for setting user 2018-08-09 21:46:22 -04:00
Curtis McEnroe 6dd9eb71e1
Color brackets around nicks
Also switch self-brackets to () since [] can appear in nicks.
2018-08-09 21:37:11 -04:00
Curtis McEnroe c45e192608
Fix 432 handler params 2018-08-09 21:27:48 -04:00
Curtis McEnroe 1d5cafc2eb
Add M-b, M-f, M-DEL, M-d, C-w 2018-08-09 19:15:12 -04:00
Curtis McEnroe d1fea96e86
Add PASS option
WEBIRC is now -W.
2018-08-09 18:26:53 -04:00
Curtis McEnroe dbdf13b51a
Ignore trailing space on slash commands 2018-08-09 17:49:31 -04:00
Curtis McEnroe fc113c8ef9
Replace shift with a great variadic function
I am disappointed in the lack of compiler attributes for type-checking
variadic functions.
2018-08-09 17:37:14 -04:00
Curtis McEnroe 05fe4ece20
Only tabTouch nick if not self 2018-08-09 15:50:30 -04:00
Curtis McEnroe a64f1a4ea2
Add URL detection, listing and opening
Might also add /copy, like /open.
2018-08-09 00:24:49 -04:00
Curtis McEnroe c024147504
Add commands to tab complete 2018-08-08 21:48:30 -04:00
Curtis McEnroe 09fe40abd9
Use blank line as unread marker 2018-08-08 19:52:25 -04:00
Curtis McEnroe eb035896bd
Add Homebrew LibreSSL paths to Makefile 2018-08-08 19:36:02 -04:00
Curtis McEnroe 6f9b928e53
Distinguish self with square brackets 2018-08-08 19:22:49 -04:00
Curtis McEnroe 4771a54bf9
Add markers as lines to the log 2018-08-08 18:50:57 -04:00
Curtis McEnroe eac0f83efa
Factor out line editing to edit.c 2018-08-08 16:59:26 -04:00
Curtis McEnroe b66c8abf70
Set log marker on FocusOut event
All of this needs refactoring, probably separating the line editing out
from the actual input handling.
2018-08-08 00:55:45 -04:00
Curtis McEnroe c0ee457ab1
Color own messages 15
My own settings have "white" slightly darker than the default color, so
this helps to distinguish my own messages.
2018-08-08 00:42:27 -04:00
Curtis McEnroe c9b7846d23
Use BLACK LEFT-POINTING TRIANGLE for marker 2018-08-08 00:09:09 -04:00
Curtis McEnroe ee0df2846e
Reset attrs after addIRC
Otherwise the marker inherits whatever was left on.
2018-08-07 23:40:40 -04:00
Curtis McEnroe 9114d0555c
Add tab complete UI
This definitely needs refactoring.
2018-08-07 23:03:08 -04:00
Curtis McEnroe 43eee8da71
Implement cycling tab complete
Not properly hooked up to the UI yet.
2018-08-07 22:40:05 -04:00
Curtis McEnroe ee49c36655
Mark log when scrolling up 2018-08-07 22:19:45 -04:00
Curtis McEnroe 41e7105fec
Remove extraneous slash from unrecognized command 2018-08-07 22:19:00 -04:00
Curtis McEnroe 7d76246c3f
Highlight and beep pings 2018-08-07 17:51:23 -04:00
Curtis McEnroe a6ede6f91f
Factor out allocating conversion between wcs and mbs 2018-08-07 16:24:14 -04:00
Curtis McEnroe 2fe8b4e614
Match commands case-insensitively
Also include the slash in their names so that they can be added to
tab-complete later.
2018-08-07 15:59:27 -04:00
Curtis McEnroe fe21b1410f
Convert input to multibyte before handling 2018-08-07 15:46:04 -04:00
Curtis McEnroe 5d2b5cd51e
Populate tab-complete list 2018-08-07 14:58:32 -04:00
Curtis McEnroe 9ccb25a1a5
Fix /me formatting side-effects
NEVER pass side-effects to a macro.
2018-08-07 14:34:26 -04:00