qw3rtty / neix

neix - a RSS/Atom feed reader for your terminal.
GNU General Public License v3.0
200 stars 12 forks source link

Optimize for termux #28

Closed DhruvaSambrani closed 2 years ago

DhruvaSambrani commented 2 years ago

Commits in order

Changes

Make Layout reflow

Layout now reflows to a vertical orientation if COLS < REFLOW_LIMIT. For this,

  1. Each window has its own height along with its width
  2. Dimensions and positions are set according to orientation
  3. prefresh call is changed to accommodate for placement in other locations
  4. date not displayed in feed view on small screens

QoL changes for Termux

Additional Keybindings

Termux by default displays the PGDN and PGUP keys along with <- and -> keys. Keybindings are added to facilitate easier navigation in termux without a keyboard.

Ideally, these keys should be configurable as according to #18, but a quick fix for now as I do not know enough about the config system to make requisite changes.

Unicode Control hints

In order to reduce width of the control hints, Unicode symbols are used which reduce the space needed. This may however break on ncurses without unicode support.

Added KEY_R binding

Some ncurses versions/compilations do not implement the resize signal, and hence the screen will not refresh as expected. Keybinding R is added to perform a force refresh.

DhruvaSambrani commented 2 years ago

Linked issue #23

qw3rtty commented 2 years ago

@DhruvaSambrani Thanks for your work! I really appreciate it!