aaronjanse / 3mux Goto Github PK
View Code? Open in Web Editor NEWTerminal multiplexer inspired by i3
License: MIT License
Terminal multiplexer inspired by i3
License: MIT License
$ 3mux
$ nvim
results in
Error during: pane.go (vt.ProcessStream)
runtime error: index out of range [0] with length 0
Tiling state: Universe[0](Workspace(HSplit[0](Term[104x56]*)))
goroutine 12 [running]:
runtime/debug.Stack(0x55efe8509bc0, 0xc000010018, 0xc000043ac0)
runtime/debug/stack.go:24 +0x9f
main.fatalShutdownNow(0xc0001be000, 0x4e)
github.com/aaronjanse/3mux/main.go:125 +0x16e
main.newTerm.func4.1()
github.com/aaronjanse/3mux/pane.go:112 +0xb5
panic(0x55efe84f5860, 0xc0001a20e0)
runtime/panic.go:969 +0x16a
github.com/aaronjanse/3mux/vterm.(*VTerm).handleSGR(0xc00021e160, 0xc00001cb34, 0xc)
github.com/aaronjanse/3mux/vterm/sgr.go:19 +0x8b0
github.com/aaronjanse/3mux/vterm.(*VTerm).DispatchCsi(0xc00021e160)
github.com/aaronjanse/3mux/vterm/states.go:316 +0xf51
github.com/aaronjanse/3mux/vterm.(*VTerm).StateCsiParam(0xc00021e160, 0x6d)
github.com/aaronjanse/3mux/vterm/states.go:139 +0x12e
github.com/aaronjanse/3mux/vterm.(*VTerm).Anywhere(0xc00021e160, 0x10000006d)
github.com/aaronjanse/3mux/vterm/states.go:73 +0x264
github.com/aaronjanse/3mux/vterm.(*VTerm).ProcessStream(0xc00021e160)
github.com/aaronjanse/3mux/vterm/states.go:39 +0x3d
main.newTerm.func4(0xc00021e160)
github.com/aaronjanse/3mux/pane.go:115 +0x4f
created by main.newTerm
github.com/aaronjanse/3mux/pane.go:109 +0x1f7
Please submit a bug report with this stack trace to https://github.com/aaronjanse/3mux/issues
$ nvim --version
NVIM v0.4.3
$ kitty --version
kitty 0.17.2
$ sway --version
sway version 1.4
3mux version r223.f233c25
By default, the shell binary is hardcoded to zsh
.
Line 23 in 9068500
I don't have zsh
installed on my machine, resulting in a silent failure. Or, if logging to a file is enabled:
2020/04/11 18:27:11 exec: "zsh": executable file not found in $PATH
Might I suggest that the current shell is read via the $SHELL
environment variable?
Things like arrow keys and delete button don't seem to work correct in either st
or xterm
. I suspect this is probably related to an incorrect TERM
(?) But I couldn't find what the correct one should be? Would be helpful if this was documented instead of trying a few until one works!
This would greatly help in maintaining packages for 3mux
in repositories like AUR and nixpkgs
(see my PR to NixOS/nixpkgs
.
v0.1
would do. Thank you for your work!
Tmux supports several users viewing the same tmux session.
I suggest implementing this too, but taking the feature one step further, allowing several seats(users) working in different panes / workspaces at the same time.
Use cases could be:
side by side teaching. The teacher enters commands in the pane on the right side and the student replicates the commands in the left pane
3mux as service management tool. In several tabs/workspaces different services are run. Several admins can work in different workspaces at the same time.
Thanks a lot for writing 3mux. I once considered implementing such functionality myself in tmux. With the much cleaner codebase of 3mux, adding this feature should take a lot less effort.
go get github.com/aaronjanse/3mux
completes okay
but 3mux
[enter] gives the following...
Stack trace...
Error during: pane.go (shell death)
runtime error: index out of range [0] with length 0
Tiling state: Universe[0](Workspace(HSplit[0](Term[160x49]*)))
goroutine 51 [running]:
runtime/debug.Stack(0x1180c60, 0xc00000e018, 0xc0000a6cf8)
/usr/local/go/src/runtime/debug/stack.go:24 +0x9d
main.fatalShutdownNow(0xc000016140, 0x49)
/Users/carlca/Code/go/src/github.com/aaronjanse/3mux/main.go:126 +0x16c
main.newTerm.func2.1()
/Users/carlca/Code/go/src/github.com/aaronjanse/3mux/pane.go:68 +0xb3
panic(0x1144500, 0xc0001a8040)
/usr/local/go/src/runtime/panic.go:967 +0x166
main.newTerm.func2(0xc00007e000)
/Users/carlca/Code/go/src/github.com/aaronjanse/3mux/pane.go:74 +0x230
created by main.newTerm
/Users/carlca/Code/go/src/github.com/aaronjanse/3mux/pane.go:65 +0x167
Please submit a bug report with this stack trace to https://github.com/aaronjanse/3mux/issues
~ go get github.com/aaronjanse/3mux
# github.com/aaronjanse/3mux
go/src/github.com/aaronjanse/3mux/shell.go:96:11: undefined: pty.Setsize
go/src/github.com/aaronjanse/3mux/shell.go:96:32: undefined: pty.Winsize
Ctrl+b %
to split verticallySuper+Upper Arrow
to maximize gnome-terminalGetting:
Error during: bad file descriptor
Tiling state: Universe[0](Workspace(HSplit[0](VSplit[1](Term[82x12], Term[82x12]*))))
goroutine 15 [running]:
runtime/debug.Stack(0x547ee0, 0xc000098008, 0xc000091f28)
/usr/lib64/go/1.12/src/runtime/debug/stack.go:24 +0x9d
main.fatalShutdownNow(0x527d80, 0x13)
/home/michael/.golang/src/github.com/aaronjanse/3mux/main.go:123 +0x169
main.(*Shell).resize.func1(0xc000058300, 0xc0000a4218, 0x19, 0x28)
/home/michael/.golang/src/github.com/aaronjanse/3mux/shell.go:101 +0xd3
created by main.(*Shell).resize
/home/michael/.golang/src/github.com/aaronjanse/3mux/shell.go:94 +0xc9
Please submit a bug report with this stack trace to https://github.com/aaronjanse/3mux/issues
I'll probably do this today or tomorrow, unless someone wants to make a PR.
Some ideas:
On iTerm, I had a single panel open in 3mux and did an ls
directory listing on a folder with about 2 dozen files. I then searched in the panel using alt+/ and typed "package.json". 3mux panel highlighted the file, but then become non-responsive. I couldn't exit search or even ctrl-c.
https://vt100.net/emu/dec_ansi_parser
This should fix a lot of bugs.
It would be nice to have a keybinding that creates a new pane, that has the readme/manpage for 3mux open.
Additionally it would be nice to have a bar showing the most common needed keybindings at the bottom, like nano. The visibility of this bar should be configurable.
Currently support keybindings:
%
"
{
}
o
;
If anyone wants more, please comment below.
Are you using a different terminology compared to tmux or is this a bug? Do you plan to implement "tab-like" windows like tmux with panes inside them? (and group them into sessions, which you already have an issue open here?)
It might be useful to have an environment variable for 3mux, similar to $TMUX so scripts can know if they're running inside 3mux:
I've added one here:
https://github.com/flipcoder/3mux/blob/master/shell.go#L25
Ideally you'd want it to be some path or number of the current pane/window, but for now I just made it 1.
I tried running a instance of vim inside of 3mux. I just opened a simple bash file and all that got displayed was a bunch of jibberish.
I use neovim with a theme and airline inside of kitty. In alacritty I can atleast see some colors, but a places where they shouldnt be. So far I havent found a terminal where everything looks fine with my neovim setup. The same for vim.
I'm curious, I have a couple of tools which could benefit from a comprehensive virtual terminal.
Thanks!
Error logs should be presented to the user when they exit 3mux
Screen bindings would be nice to have.
neovim here we come!
The goal of fuzzing is the find bugs that cause panics during a process that should be non-fatal.
Things currently fuzzed:
Error during: pane.go (vt.ProcessStream)
runtime error: index out of range [-1]
Tiling state: Universe[0](Workspace(HSplit[0](Term[181x48]*, Term[-1x48])))
goroutine 38 [running]:
runtime/debug.Stack(0x1183000, 0xc00000e018, 0xc000144a88)
/usr/local/Cellar/go/1.14/libexec/src/runtime/debug/stack.go:24 +0x9d
main.fatalShutdownNow(0xc001c64140, 0x41)
/Users/ghazni/go/src/github.com/aaronjanse/3mux/main.go:125 +0x16c
main.newTerm.func4.1()
/Users/ghazni/go/src/github.com/aaronjanse/3mux/pane.go:112 +0xb3
panic(0x11463e0, 0xc000ef2380)
/usr/local/Cellar/go/1.14/libexec/src/runtime/panic.go:967 +0x15d
github.com/aaronjanse/3mux/vterm.(*VTerm).handleEraseInDisplay(0xc0001b2000, 0x0, 0x0)
/Users/ghazni/go/src/github.com/aaronjanse/3mux/vterm/csi.go:171 +0x38c
github.com/aaronjanse/3mux/vterm.(*VTerm).handleCSISequence(0xc0001b2000)
/Users/ghazni/go/src/github.com/aaronjanse/3mux/vterm/csi.go:87 +0x6e7
github.com/aaronjanse/3mux/vterm.(*VTerm).handleEscapeCode(0xc0001b2000)
/Users/ghazni/go/src/github.com/aaronjanse/3mux/vterm/stream.go:130 +0x158
github.com/aaronjanse/3mux/vterm.(*VTerm).ProcessStream(0xc0001b2000)
/Users/ghazni/go/src/github.com/aaronjanse/3mux/vterm/stream.go:80 +0x35f
main.newTerm.func4(0xc0001b2000)
/Users/ghazni/go/src/github.com/aaronjanse/3mux/pane.go:115 +0x4d
created by main.newTerm
/Users/ghazni/go/src/github.com/aaronjanse/3mux/pane.go:109 +0x1f5
Line 15 in 433d7db
FYI, termbox is no longer maintained, see nsf/termbox-go@ed2200f , tcell is a recommended replacement.
Really neat project! Any thoughts on dwm-style layouts like dvtm does it?
I find i3 is kind of finicky for rearranging tiles, and tmux is a bit too complex in general.
How do I restore the session? 3mux ls
and 3mux attach
doesn't seems to work.
This week, I'll try to refactor 3mux so that it uses ncurses for both keypress handling and rendering. I'm disappointed because this would make 3mux's codebase more boring, but boring is best long-term.
It's silly to think that a parsing bug should crash the entire multiplexer. It would be better to just tell the user something is weird is happening and to submit logs.
Do you have any plans to add another set of keybindings, that doesn't interfere with the default i3 keybindings? Because this is pretty much unusable out of the box on i3....
Very well done - you brought both functionality and usability to a next-generation terminal multiplexer, I was a long term tmux user, 3mux works far better out of the box!
By the way, a minor suggestion - alt+b and alt+f are used by readline for moving cursor between words, they're very handy as many terminal emulators out there don't correctly handle ctrl+left/right for the same feature. Would you consider using a different default key for making a panel full screen?
Another odd one, I'm using fish on Ubuntu 18.04, this happens to fish when I repeatedly press enter in 3mux:
Visible after using fish
directory autocomplete.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.