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

a few pager problems #129

Open
deathtrip opened this issue May 26, 2022 · 6 comments
Open

a few pager problems #129

deathtrip opened this issue May 26, 2022 · 6 comments

Comments

@deathtrip
Copy link

Describe the bug

  1. In kitty, only the bottom row is visible while in the pager, the rest of the screen is black. Alacritty and WezTerm work fine, so not sure if it's kitty's or clifm's problem.
  2. Mouse scrolling doesn't work when in the pager, only when you exit it, you can scroll a bit upward.
  3. You cannot switch workspaces while in the pager.
  4. When you re-enter a workspace, you automatically get put back into the pager, even if you previously scrolled to the bottom and were back in the cli.

Expected behavior

  1. Mouse scrolling should work just like when not using the pager.
  2. Workspaces should be switchable while in the pager.
  3. When the user re-enters a workspace, continue where they left off, either in the cli or the pager.

Desktop:

  • OS: Arch Linux
  • Terminal: kitty 0.25, alacritty, wezterm
  • CliFM version: clifm-git 1.5.1.r387.gd87c838a
  • Installation source: AUR
@leo-arch
Copy link
Owner

Hi @deathtrip. Thanks for reporting. I'll take a look at it.

The built-in pager (Mas) is very basic, true. Maybe writing a plugin, using a full-blown pager like less, could be a good idea.

@deathtrip
Copy link
Author

Seems like a good idea. Using an external pager would certainly mean less code to maintain.

@leo-arch
Copy link
Owner

Well, I wrote a simple plugin to pipe the current list of files through a pager (either $PAGER or less). It's bound to the gg action.

To use the plugin you can either remove/rename your actions file ($HOME/.config/clifm/plugins/actions.cfm), in which case it will be regenerated by CliFM on startup, or add the line yourself using the actions edit command:

gg=pager.sh

For the time being, it only does this, paging files, though it solves all the problems you highlighted (except 3: switching workspaces while in the pager). Give it a try and let me know what you think.

@deathtrip
Copy link
Author

Just tried it and as you said it solves three of the four problems. Could you make it an option to use the plugin as the default pager?

@leo-arch
Copy link
Owner

Just need to figure out the best way to implement this, namely, setting a plugin as default pager. I'll let you know.

@leo-arch
Copy link
Owner

Hey @deathtrip, I've been revisiting this issue: as far as I can tell, 3/4 issues you describe are now solved using clifm's native pager:

  1. The pager properly display all rows in Kitty.
  2. Mouse scrolling does work.
  3. The pager (if invoked via Alt-0 or the pg command), is not reexecuted when changing directory/workspace or updating the current list of files. By default, it runs only once.

However, switching workspaces while in the pager isn't possible yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants