ahrm / sioyek

Sioyek is a PDF viewer with a focus on textbooks and research papers
https://sioyek.info/
GNU General Public License v3.0
6.99k stars 229 forks source link

[Enhancement] – Please could you Add a keyboard shortcut with something and Arrow’s Down and Up to move the attention line in the mouse attention mode. #178

Closed joaocarvalhoopen closed 2 years ago

joaocarvalhoopen commented 2 years ago

Hello again Ahrm,

Not trying to abuse of your good will, but I found one simple thing that would be really nice. When reading a PDF, one person can click on the text with the right mouse button and then move the reading line (normal text vs dimmed text) by scroolling the mouse wheel. But that over long periods od reading, that can strain you hand because that repetitive movement is complex. Can you please add a keyboard shortcut to call the down and up wheel mouse function or method? To be used in the long periods of reading. The attention mode is a really nice mode for everyone but especially for the dyslexic, because there is less light in the screen and less text to call the attention.

Thank you very much,

The very best regards, João

ahrm commented 2 years ago

We already have that. It is the move_visual_mark_down and move_visual_mark_up commands. I have something like this in my keys_user.config:

move_visual_mark_down j
move_visual_mark_up k
joaocarvalhoopen commented 2 years ago

Thank you so much Ahrm,

I didn’t associate that keys tag name with the functionality, because I searched in the prefs_keys file. That keys “J” and “K” on a QWERTY keyboard are even better then the arrow keys, less strain on the hand and wrist.

Like I said, Sioyek is the best Linux PDF Reader for technical reading and for non technical reading, but above all that, it’s the best PDF reader that I know of, and I tried a lot, for Dyslexic and or Daltonic people.

You are making a really ground breaking Open Source software!

Only one more thing, please put proudly, the name Sioyek at the left of the file name, above the PDF view. But don’t put it in the full screen mode. This will make everyone that uses the Sioyek program, never forget the name of the program, even if the name Sioyek is not a familiar name in his native speaking language or in English, like my self, I’m Portuguese.

Thank you!

The very best regards, João

joaocarvalhoopen commented 2 years ago

I have wrote even more, extensively, about Sioyek, some Tips in Portuguese

https://lusorobotica.com/index.php?topic=9921.0

Best regards, João

ahrm commented 2 years ago

Awesome, thank you!

ahrm commented 2 years ago

By the way, I added a "ruler mode" in 31e1f1f095f77b41c7a6a66723bb9072dbc32d83 which highlights a single line at a time. It looks like this:

https://user-images.githubusercontent.com/6392321/161815414-a6c58cc6-4012-4ff4-873b-2c51dff2fbb8.mp4

I don't know if it is any better but I added it as an experiment. You can enable it by adding this to your prefs_user.config:

ruler_mode 1
joaocarvalhoopen commented 2 years ago

Hello again,

That’s really nice! I think that will be very good in custom _colors.

I like your implementation of just one line, just so you know there are several different algorithms, for example you can see Zettlr – The MarkDown Editor and Note taking program, it has several different algorithms in the Mardown View attention mode.

  1. Dale-Chall
  2. Gunning-Fog
  3. Coleman/Liau
  4. Automated Readability Index (ARI)

The code of Zettlr is also really good and easy to follow, it’s in Javascript/TypeScript.

Zettlr - GitHub https://github.com/Zettlr/Zettlr

Just curious, when will the new version come out?

The very best regards, João

ahrm commented 2 years ago

The new version won't be out soon but experimental verison of latest build is available here: https://github.com/hexomancer/sioyek/releases/tag/v0.31.213

joaocarvalhoopen commented 2 years ago

Hello again,

I installed the last version and I can give you the following feedback.

1. rule_mode 1 - is a winner, it’s really good with my scheme of custom_colors! And one can really use it to read books I tested while reading one page of a book with J and K.

2. The drag and drop to open file, doesn’t work on Linux Ubuntu 20.04 I tested with several different files, with the simplest filename a.pdf and tested even putting the file in the some directory of the AppImage and it always independently of the directory gave me the following error message:

Could not open file: /home/joao/sioyek_pdf/experimental/sioyek-release-linux-portable/home/joao/sioyek_pdf/experimental/sioyek-release-linux-portable/a.pdf

I think that it is trying to open the wrong path.

Thank you for your work and for the care!

The very best regards, João

joaocarvalhoopen commented 2 years ago

With my custom_color it looks like this, and is reallly good, because one uses it in Full-Screen mode F11.

with_custom_color

So without the white of the screen, all black, one can really see this well.

Best regards, João

ahrm commented 2 years ago

Drag and drop should be fixed in the latest commit. Experimental builds are here: https://github.com/hexomancer/sioyek/releases/tag/v0.31.214

joaocarvalhoopen commented 2 years ago

Good morning Ahrm,

I downloaded the new version and tested it with my configurations files settings.

  1. Drag and drop Like you said, now works well, I have tested it on Linux Ubuntu 20.04.

  2. Previous implemented Visual_aid vs Ruler_mode 1 . Today I tested reading 15 pages with the previous mode that dimmed the lower part of the page and it is really good, but then I tested reading other 15 pages with the ruler_mode 1 and the later was even better. Maintain both modes, but you have a winner with the ruler_mode 1, Please just give it a mode as a key binding to enable the normal visual aid mode vs the ruler_mode 1 so that you can move between them in the same document, while you reading a page if you need it, without the need to edit the prefs_user.config file.

With my prefs_user settings for a Dislexic is a incomparable better experience with the normal white version and is really better then the normal dark mode.

A leave here my preferences files.

prefs_user.config

/* START OF MY CUSTOMIZATION */

# The color with which the screen is cleared before rendering the pdf
background_color    1.0 1.0 1.0
dark_mode_background_color    0.0 0.0 0.0

# Showing full white text on black background can be irritating for the eye, we can dim the whites a little bit using the contrast option
dark_mode_contrast      0.6

# Application colors background color and text color.
custom_background_color  0.01 0.01 0.01
# custom_text_color        0.3 0.5 0.1
custom_text_color        0.086 0.5 0.25

# Commands that run at startup.
startup_commands      toggle_custom_color;toggle_visual_scroll

# Highlight color when text is selected using mouse
text_highlight_color    1.0 1.0 0.0

# The color of highlight bar which is displayed when right click is pressed
vertical_line_color    0.0 0.0 0.0 0.4

# Use dark mode by default
default_dark_mode   1

/* ruler_mode 1 - In visual atention mode it only shows one line */
/* https://github.com/ahrm/sioyek/issues/178 */
ruler_mode 1

/* END OF MY CUSTOMIZATION */ 

keys_user.config

# zoom
zoom_in             +      /* This one */
zoom_out            =
zoom_out            -

# command the move the visual mark to the next/previous line
# move_visual_mark_up    k
# move_visual_mark_down  j
move_visual_mark_up    .
move_visual_mark_down  ,

I will be using the current dev built because of the drag and drop and the ruler_mode 1 features, they are really fantastic and really important.

Thank you very much Ahrm,

The very best regards, João

ahrm commented 2 years ago

I just created a discussion for sharing config files here: https://github.com/ahrm/sioyek/discussions/182. Maybe you can share your configs there?