ahrm / sioyek

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

Documents open, but no keys work #1102

Closed khumarahn closed 3 months ago

khumarahn commented 3 months ago

Hi. I'm trying the git version of sioyek. I'm on gentoo, using the ebuild from guru overlay. I'm running wayland, sway, if this makes a difference.

My pdf files open and display, scrolling with a mouse works, but keyboard keys have no effect. In console I see:

Warning: invalid command (key:); resetting to root
Warning: invalid command (key:a); resetting to root
Warning: invalid command (key:); resetting to root
Warning: invalid command (key:w); resetting to root
Warning: invalid command (key:e); resetting to root

Also, on startup I see a message I don't understand: "Do you want to update from 2.0.0 to iv>" image

khumarahn commented 3 months ago

Ah, here's something I didn't read:

$ /opt/sioyek/sioyek paper.pdf 
default_config_path: /opt/sioyek/prefs.config
Error: default_config_path: /opt/sioyek/prefs.config doesn't exist!
default_keys_path: /opt/sioyek/keys.config
Error: default_keys_path: /opt/sioyek/keys.config doesn't exist!

So sioyek does not pick up the default config. The ebuild installs the config to /usr/share/sioyek:

insinto /usr/share/sioyek && doins tutorial.pdf pdf_viewer/keys.config pdf_viewer/prefs.config
# ls -alh /usr/share/sioyek/
total 176K
drwxr-xr-x 1 root root   70 Jun  5 13:45 .
drwxr-xr-x 1 root root 4.4K Jun  5 13:45 ..
-rw-r--r-- 1 root root  14K Jun  7 09:07 keys.config
-rw-r--r-- 1 root root  11K Jun  7 09:07 prefs.config
-rw-r--r-- 1 root root 148K Jun  7 09:07 tutorial.pdf
ahrm commented 3 months ago

git version of sioyek

You mean you built it from source?

Also, on startup I see a message I don't understand:

This is an old check for update feature which no longer works because github has changed its format. It should be disabled by default but if it is not you can disable it by adding check_for_updates_on_startup 0 to your prefs_user.config.

The issue with the keys is indicative that sioyek has not recognized prefs.config and keys.config files. You can copy them to the location printed when sioyek starts up.

khumarahn commented 3 months ago

Yeap, building from source. This is automated of course in gentoo.

I copied the config files to ~/.config/sioyek, keys work now. Yet vimtex now does not even open sioyek. (before it opened the window even if the keys didn't work)

khumarahn commented 3 months ago

Ah, I'm sorry. Sioyek opens. It just opens in the same window where I had a different file open, in a different workspace. So I didn't even notice.

This is still rough: reverse search with vimtex doesn't work with the config as in vimtex's manual, and I need to figure out how to keep many windows open as the same time

khumarahn commented 3 months ago

With the configuration files in the right place, this issue seems done. I created a trivial PR to fix it for everyone.