Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sideways split support for Irssi #697

Merged
merged 4 commits into from Jan 8, 2018
Merged

sideways split support for Irssi #697

merged 4 commits into from Jan 8, 2018

Conversation

@ailin-nemui
Copy link
Contributor

@ailin-nemui ailin-nemui commented May 1, 2017

warning:

  • may be buggy

This commit adds support for sideways splits into Irssi. To that regard,
there are a number of new commands available

the "R" commands:

/window new rsplit - make a new sideways split
/window rshow - show an existing window to the right
/window rgrow/rshrink/rsize/rbalance
 - manipulate the size of your sideways split windows

the "D" commands:

/window dup/ddown/dleft/dright
 - navigate the windows directionally, as an alternative to
   /window up/down that you can bind to some key
/window move dleft/dright - the same for moving

Enjoy!

@ailin-nemui
Copy link
Contributor Author

@ailin-nemui ailin-nemui commented May 1, 2017

Hi,

I am posting this here so it can be potentially discussed. The code is based on work done by LemonBoy in #431

I won't have much time so I'm looking for other people who can help out

That said it seems to be working fine, but there are some general trade-offs implemented in this current approach which may need to be decided upon

@ailin-nemui
Copy link
Contributor Author

@ailin-nemui ailin-nemui commented May 1, 2017

If you need some help debugging I have a commit in https://github.com/ailin-nemui/irssi/tree/rsplit-debug-code that will print the window sizes to stderr. With that patch applied, you can do irssi 2>windowsizes.log to inspect the screen layout during the resize progress. That may help in better understanding some issues visually

@ailin-nemui ailin-nemui force-pushed the ailin-nemui:rsplit branch 3 times, most recently from 36917dc to ae5fbdf May 4, 2017
@ailin-nemui ailin-nemui changed the title [wip] sideways split support for Irssi sideways split support for Irssi May 5, 2017
@ailin-nemui ailin-nemui force-pushed the ailin-nemui:rsplit branch from ae5fbdf to e2a639c May 8, 2017
@ailin-nemui
Copy link
Contributor Author

@ailin-nemui ailin-nemui commented Jul 26, 2017

one thing that has come up in discussions is the increase in bandwidth which is caused by sideways splits.

  • Irssi updates visible buffers immediately, there is no delayed refresh implemented
  • Irssi refuses to start on terminals without DECSTBM support
  • For full width buffers, adding a line to a buffer requires ~line-length bytes
  • So width×height bytes to fill the screen

For sideways splits we have a problem:

  • Most terminals do not support DECSLRM :-(
  • Thus, the whole split needs to be redrawn
  • That requires ~width×height bytes - per line
  • i.e width×height² bytes to fill the screen!
@vvug
Copy link

@vvug vvug commented Oct 5, 2017

This has been for years the most needed feature in irssi, especially to have a nicklist/chanlist bar on the side. Thanks for implementing it! I wouldn't care too much about the increased bandwidth: in a constrained environment one could chose not to use splits. Or you could enable the feature only in terminals that support DECSLRM.

ailin-nemui added 3 commits May 5, 2017
warning:

* may be buggy

This commit adds support for sideways splits into Irssi. To that regard,
there are a number of new commands available

the "R" commands:
	/window new rsplit - make a new sideways split
	/window rshow - show an existing window to the right
	/window rgrow/rshrink/rsize/rbalance
	 - manipulate the size of your sideways split windows

the "D" commands:
	/window dup/ddown/dleft/dright
	 - navigate the windows directionally, as an alternative to
	   /window up/down that you can bind to some key
	/window move dleft/dright - the same for moving

Enjoy!
@ailin-nemui ailin-nemui force-pushed the ailin-nemui:rsplit branch from fc3dfe8 to 63d8e88 Jan 5, 2018
@irssi irssi deleted a comment Jan 5, 2018
@irssi irssi deleted a comment from dequis Jan 5, 2018
@ailin-nemui
Copy link
Contributor Author

@ailin-nemui ailin-nemui commented Jan 6, 2018

@ailin-nemui ailin-nemui merged commit a6663c5 into irssi:master Jan 8, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
ailin-nemui added a commit to ailin-nemui/irssi that referenced this pull request Jan 8, 2018
This change from 0 -> 4 was introduced by irssi#697 and is thus expected
@ailin-nemui ailin-nemui deleted the ailin-nemui:rsplit branch Feb 15, 2018
@ailin-nemui ailin-nemui added this to the 1.2.0 milestone Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.