Commit graph

28 commits

Author SHA1 Message Date
Ananth Bhaskararaman c191b34201 feat: Structured log messages
Log messages have been re-written with structured fields.

Also, important Go depenedencies like x/sys and errors packages have
been updated.

Github actions have also been updated.
2023-12-09 13:17:50 -05:00
Yash Singh 540882ec8c
Added in Ctrl+U option for view-source (#355)
* Added in Ctrl+U option for view-source

* Fix
2020-12-28 20:56:36 +01:00
CodyGramlich 5c09d70601 Removed color_mode 2018-09-29 12:14:53 -06:00
CodyGramlich e4761be367 Added monochrome CLI flag 2018-09-29 11:17:51 -06:00
Jared Rewerts 1004777ed7 Switched to server side scrolling. 2018-08-20 21:57:43 -06:00
Thomas Buckley-Houston 7a76b3d9aa First basic implementation of configurable keys
Only 'next-tab' is currently supported.

You will need to run Browsh with `--debug` then press the key
combination and watch the logs for something like;

`TTY sending: /stdin,{"char":"\u001c","key":28,"mod":2}`

That is the result of having `pressed CTRL+\`. Then add something
like the following to your config file:
```toml
[tty.keys]
next-tab = ["\u001c", "28", "2"]
```

touches #52
2018-07-21 17:05:02 +08:00
Thomas Buckley-Houston ec36c9c570 Show removable call to donate in TTY 2018-07-18 19:52:22 +08:00
Thomas Buckley-Houston ef18913e3c First implementation of config file
Includes change of CLI args, many of been moved to the config file and
those that remain begin with `--` not `-` and may be worded differently.

Touches #37
2018-07-17 18:43:52 +08:00
Thomas Buckley-Houston effa2acc77 Add caveats to Homebrew Tap about FF 57+ dep
Touches #65
2018-07-13 17:28:24 +08:00
Thomas Buckley-Houston 2fc0b5cde3 Formatted all Go code
Closes #97
2018-07-11 17:00:06 +08:00
Thomas Buckley-Houston 3ee9b16ea8 Prevent mouse interaction crashing app
Possibly helps everyone in #63, #73 and #94

Whether it solves the issue or not, this definitely fixes a bug.
`CurrentTab` doesn't refer to anything until the first frame is received
from the webextension, yet tthe `handleMouseEvent` function can be
triggered long before that.
2018-07-11 11:30:22 +08:00
Thomas Buckley-Houston 2ea4eb0f8c Better ENTER key UX
This came about from using Slack's web client.

Adding the input boxes padding to the DOM box coords makes the TTY
cursor more closely reflect the actual input box. Also using keyup/down
seems more universally applicable than merely kepress
2018-07-07 18:22:17 +08:00
Thomas Buckley-Houston 4f637ccddc F1 key to open help tab
Closes #38
2018-06-23 19:27:55 +08:00
Thomas Buckley-Houston d6406ac734 Don't forward keypresses when URL box is active
This fixes a bug where pressing return after entering a new URL would
forward the ENTER key to the DOM and sometimes trigger the focussed
result in a Google search.
2018-06-05 16:30:07 +08:00
Thomas Buckley-Houston 12c8a58868 Prevent crash when keys pressed during boot screen 2018-06-05 16:11:46 +08:00
Thomas Buckley-Houston e937f81a60 Added shortcut to toggle a mobile user agent 2018-06-05 14:40:03 +08:00
Thomas Buckley-Houston 55c70d9e5e Multiline text input boxes
No doubt a lot of this code is reinventing the wheel, after all this is
basically now a simple text editor. I'm sure there'll be a few bugs to
iron out.
2018-06-02 18:47:37 +08:00
Thomas Buckley-Houston b78abbf26f Overflow scrolling for single line input boxes
Such a basic thing, that we take it for granted. But it's actually a bit
tricky to implement.
2018-05-28 22:03:33 +08:00
Thomas Buckley-Houston 4b84d52ae1 Backspace goes back in history
Also:
  * Use webextension to navigate URLs instead of the DOM. This means
    that crashed pages can still be navigated away from.
  * An attempt to implement mouse dragndrop, but it doesn't work :(
2018-05-25 18:48:57 +08:00
Thomas Buckley-Houston 938d51b692 Tabs! As we all know and love
Adding, cycling, deleting. The width of the tab handle is currently
fixed to 20. And if there are more tabs than can fit in the tab bar then
the extra ones just dissapear off to the right, but they can still be
cycled to with CTRL-Tab.

The marks the end of feature development in preperation for a version
1 release.
2018-05-24 18:45:07 +08:00
Thomas Buckley-Houston 5c7ff71c79 Input boxes, for searches, logins, writing, etc
Input boxes are currently only one line and to not properly wrap. So
textareas are also one line. TBC...

Also includes:
  * First implementation of the DOM MutationObserver. This needs to have
    an eye kept on it in case some websites trigger too mutatation
    events. For now it doesn't seem too bad. Although strangely it seems
    to stop on Youtube after about 15 seconds.
2018-05-20 21:17:33 +08:00
Thomas Buckley-Houston 7a8811c526 Webext can now reconnect to a re-opened TTY
Albeit it is quite slow to notice the re-opened TTY client :/
2018-05-08 13:30:08 +08:00
Thomas Buckley-Houston dd4a29f04a Send 'sub-frames' rather than the whole DOM
Firstly, this improves performance on a larger pages. But it also
prevents browser crashes a very large pages by setting a limit to how
much work is done per frame.

Also includes:
  * Thread safe cell map for simultaneously reading and writing to the
    buffered frame of TTY cells.
  * Improved webext tests so that they programmaticlly build DOM rects
    based off simple text strings.
2018-05-05 16:43:10 +08:00
Thomas Buckley-Houston ae44a18cfc Moved URL bar input and mono mode toggle to CLI
Finally fixes integration tests
2018-04-28 19:02:40 +08:00
Thomas Buckley-Houston b605965e77 Move UI building to CLI
* CLI is now prepared for supporting multiple tabs.
  * Refactored global vars into relevant files
  * Now using real types in JSON sent to CLI
  * Still doesn't fix integration tests
2018-04-28 12:18:34 +08:00
Thomas Buckley-Houston ba5ce3c58b Move frame building from webext to CLI
This offloads significant CPU load from the browser. However it's become
clear that the previous feature of parsing the entire DOM needs to have
an upper limit imposed. For instance large Wikipedia pages still cause
problematic CPU load.

This commit does not fix the broken UI so integration tests fail.
2018-04-22 22:59:00 +08:00
Thomas Buckley-Houston c0f5fcca69 Compose frames of whole DOM, for faster scrolling
Instead of mirroring the browser's viewport, as if we had a camera over
the browser, the entire DOM is now sent in the frame. This means that
the CLI itself can scroll without having to wait for updates from the
webextension screenshotter.
2018-04-18 21:11:04 +08:00
Thomas Buckley-Houston 3d0b2ec9c8 Split main browsh code into separate files 2018-04-01 17:03:21 +08:00