Commit Graph

689 Commits

Author SHA1 Message Date
Christian Rocha 231fa2cb73
Make altscreen demo slightly fancier 2021-03-11 15:15:08 -05:00
Christian Rocha 01878b5650
Make tui-daemon-combo demo look a little more enticing 2021-03-11 15:03:52 -05:00
Christian Rocha a87e82a3e8
Bump Bubble Tea and Termenv dependencies in examples 2021-03-11 15:03:25 -05:00
Christian Rocha c310475b99
Add Gembro to list of things made with Bubble Tea 2021-03-11 10:15:27 -05:00
Kiyon 7621fad279 Add item for Bubble Tea in the Wild section 2021-03-09 03:52:23 +01:00
Kiyon ac36017f86 WithOutput option should take io.Writer as argument. 2021-03-09 03:51:34 +01:00
Christian Rocha 65e8067a82 Implement String() on type Key and make key constants type KeyType 2021-03-08 19:11:02 -05:00
kiyon 86b93a31c0
Add commands for toggling the altscreen (#62)
* Add commands EnterAltScreen and ExitAltScreen for toggling the altscreen
* Add altscreen toggling example
* ignore .idea

Co-authored-by: Christian Rocha <christian@rocha.is>
2021-03-08 12:48:34 -05:00
Christian Rocha b3f62af8b5 Add nil renderer and combination TUI-daemon program example
The Nil Renderer essentially disables the Bubble Tea renderer sending
loggings and print statements to stdout. It can be enabled via the
ProgramOption WithoutRenderer.
2021-03-07 13:01:54 -05:00
Christian Rocha 2b8b95d8f8 Fix spinners not spinning in spinners examples (fixes #58) 2021-03-03 16:07:35 -05:00
Christian Rocha cd676fab5a
Correct logic where we add a space after the prefix when logging 2021-03-01 18:05:53 -05:00
Christian Rocha fbd32c6eee
Add tz to the list of things built with Bubble Tea 2021-03-01 14:15:05 -05:00
Christian Rocha 0780601791 Open a TTY if input is not a TTY, unless the user has spec'd otherwise 2021-02-27 16:03:34 -05:00
Christian Rocha 4e2643f318 Make sure we pass our mutex by reference 2021-02-27 16:03:34 -05:00
Christian Rocha 65cb46c475
Remove notes about how we'd auto-truncate lines as we're doing that now 2021-02-25 12:12:52 -05:00
Carl Henrik Lunde 3266c3654b Avoid race on renderer.buf in flush vs. write
Fix race by acquiring the mutex before accessing renderer.buf in flush.

	WARNING: DATA RACE
	Read at 0x00c0000ee0a0 by goroutine 11:
	  bytes.(*Buffer).Len()
	      /home/chlunde/opt/go/src/bytes/buffer.go:73 +0x64
	  github.com/charmbracelet/bubbletea.(*renderer).flush()
	      /home/chlunde/src/bubbletea/renderer.go:91 +0x45
	  github.com/charmbracelet/bubbletea.(*renderer).listen()
	      /home/chlunde/src/bubbletea/renderer.go:76 +0x185

	Previous write at 0x00c0000ee0a0 by main goroutine:
	  bytes.(*Buffer).Reset()
	      /home/chlunde/opt/go/src/bytes/buffer.go:98 +0xf5
	  github.com/charmbracelet/bubbletea.(*renderer).write()
	      /home/chlunde/src/bubbletea/renderer.go:195 +0x13c
	  github.com/charmbracelet/bubbletea.(*Program).Start()
	      /home/chlunde/src/bubbletea/tea.go:330 +0xbbb
	  main.main()
	      /home/chlunde/src/bubbletea/examples/spinner/main.go:27 +0x229

Fixes #54
2021-02-25 10:56:48 -05:00
Christian Muehlhaeuser 92a795256a go mod tidy 2021-02-25 10:49:33 -05:00
Christian Rocha 91bd232fe2 Add example illustrating how to send messages via channels in realtime 2021-02-10 00:01:37 +00:00
Christian Rocha dd6a0a092e Bump deps in examples 2021-02-06 19:21:40 +00:00
Christian Rocha d3267e8ce0 Remove logging in text input example 2021-02-06 19:21:40 +00:00
Christian Rocha 133a315b2c Remove double import in textinput example + make a var name less weird 2021-02-06 19:21:40 +00:00
Christian Rocha 479a1ceb35 Add space after prefix if one doesn't exist 2021-02-03 15:30:54 -05:00
Ani Channarasappa ef8a6895a1 docs: Added ticker to list of things built with Bubble Tea 2021-01-30 12:13:42 -05:00
Christian Rocha 88e11cf709
Add tasktimer and STTG to list of things built with Bubble Tea 2021-01-19 11:21:42 -05:00
Carlos Alexandro Becker a0c6074bbb Add a tea.Sequentially command
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-01-17 13:14:40 -05:00
Carlos Alexandro Becker b65205a7e5 Unused params
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-01-17 15:58:50 +01:00
Carlos Alexandro Becker b2d948b53c Fixed a couple of typos
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-01-17 15:58:50 +01:00
Christian Rocha e9efdf841b
Bump reflow for updated go-runewidth 2021-01-15 12:36:59 -05:00
Christian Rocha 0e32261508
Improve README in dark mode 2021-01-15 12:36:08 -05:00
Christian Rocha 1f6191c671 Automatically trim lines wider than the window width 2021-01-14 20:14:39 -05:00
Christian Rocha 505b826b8a
Add fork-cleaner to list of projects using Bubble Tea 2021-01-14 17:52:10 -05:00
Christian Rocha cb8e9023eb
Update Bubble dependecy in examples 2021-01-13 18:27:49 -05:00
Christian Rocha 98f449bb08
List a couple more tools built with Bubble Tea 2021-01-13 18:06:22 -05:00
Christian Rocha df0da42954
Add progressbar example 2021-01-12 18:13:29 -05:00
Christian Rocha 9f04c936da Always listen for SIGINT 2021-01-11 18:11:28 -05:00
Christian Rocha 64da3bcf7a Use correct output when enabling ANSI colors on Windows (see #39) 2020-12-30 22:23:19 -05:00
Christian Rocha c4aeadd762 Generalize output from an *os.File to an io.Writer 2020-12-30 17:59:00 -05:00
Christoph Hartmann e84314c622 allow custom input and handle eof for os.input properly
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2020-12-30 17:59:00 -05:00
Christian Rocha bc06e8d2e0
Fix wording in, and generally improve, a comment 2020-12-14 20:24:17 -05:00
Christian Rocha 01cb02ddd1
Correct help in spinners demo (see #38) 2020-12-07 17:38:44 -05:00
Christian Rocha 8e01f5f58a Add command for hiding the cursor 2020-12-03 13:56:37 -05:00
Christian Rocha 6d70abd7d5 When showing/hiding the cursor operate on the program's io.Writer
Previously we were operating on io.Stdout.
2020-12-03 13:56:37 -05:00
Richard Cooper f5fde56af0 Fix adding prefix to file logs 2020-11-22 21:45:29 -05:00
Christian Rocha ec67f23001 Add spinner browser to examples 2020-11-12 11:35:23 -05:00
Christian Rocha fce5ce7782 Update spinner demo for Bubbles v0.7.5 2020-11-12 11:35:23 -05:00
Christian Rocha 454d198b0a
Update examples for Bubbles v0.7.4 2020-11-08 21:29:04 -05:00
Christian Rocha 28db8b465a
The q key also quits in the pager example 2020-11-08 21:25:52 -05:00
Christian Rocha 5d34c88692
Update examples for Bubbles v0.8.0 2020-11-08 21:22:39 -05:00
Aleksandr Krivoshchekov 02a0509e34
Simplify code and add tests for `mouse.go` (#30) 2020-11-07 06:43:12 +01:00
Kyosuke Fujimoto 3aa00243ff Fix links in documents 2020-11-03 23:26:24 -05:00