Zathura-Pywal icon indicating copy to clipboard operation
Zathura-Pywal copied to clipboard

just straight up does not work

Open sudo-ghost opened this issue 4 years ago • 8 comments

i have been sitting here for like 3 hours trying to figure out why it wont work and im just stumped. ive deleted and reinstalled zathura, pywal, and zathura pywal. i have rewrote config files. ive tried different terminals and shells. i just have no idea why it is not working.

sudo-ghost avatar May 20 '20 21:05 sudo-ghost

I had the same experience but a simple restart did it for me.

Make sure you modify your PATH variable correctly so that it contains /home/<your_username>/.local/bin:

Assuming you have bash

  1. Paste export PATH="/home/<your_username>/.local/bin:$PATH" on your .bash_profile
  2. Source both .bashrc and .bash_profile
  3. Run echo $PATH | grep --color /home/<your_username>/.local/bin: If nothing shows up then you did something wrong.
  4. Run wal -i <your-desired-wallpaper + whaterver option you want>
  5. Restart your computer

I hope this helps!

EDIT: So I also noticed when i delete the cloned repo, zathura loses its theming.

It seems like it only works when the cloned repo exists on my computer. After i deleted the repo i got this error when i tried to open zathrua from terminal bash: /home/jim/.local/bin/zathura: No such file or directory

dimpram avatar May 23 '20 09:05 dimpram

I have the same problem. It worked for a brief moment after installing but after I deleted the originally cloned repo I never got it to work again even after downloading it again and removing .local/bin/ files and re-running the bash script. Zathura works fine, but it's just in black and white. No colors to be found anywhere. I use urxvt and arch, btw.

Ostropol avatar Mar 03 '21 17:03 Ostropol

Just confirming the same issue. Installed originally, realized I didn't want it right in my home folder, then deleted it. It didn't work after that. I downloaded it to a different directory when cloning from git, then it didn't work until I moved the folder back where it was originally. I think some symlink things broke the first time and no matter if I installed it the second time and followed the process the same way, things won't work. I will subscribe to this thread, hope someone explains / fixes this. :(

hermesjpappas avatar Mar 18 '21 22:03 hermesjpappas

I was having the same issue that when I deleted the cloned repo it stopped working. I looked at the install script and it does seem that it is making symbolic links rather than copying. I was able to get it working by manually copying genzathurarc and zathura to ~/.local/bin/. I then ran chmod u+x on both of the files and that worked. I'm not sure if this is the best way to do this but it works.

Edit: You still have to follow the install instructions and add them to the path in order for them to work this way.

Reeperto avatar Mar 21 '21 02:03 Reeperto

Having the same issue. Reeperto's tip did not work for me. Any update on why this might be happening?

Protocol2 avatar Mar 22 '21 09:03 Protocol2

I think the issue is that the original zathura binary is being launched instead of the ./zathura script. After copying both scripts to my .local/bin and opening zathura by running the zathura script, everything works fine. When I run the install script, I follow the instructions outputted to my terminal and add PATH="/home/<user_name>/.local/bin:$PATH to my .bashrc. This makes the theme work when I open zathura using the terminal, but the theme does not work if I open a pdf using nautilus, since nautilus is still using the original binary.

I think a different approach is needed, or an update to the readme showing how to make this work with different applications.

Edit: Restarting my pc fixed this. Now everything works as intended.

MisterChief53 avatar Mar 26 '21 14:03 MisterChief53

I found a solution, though not actually a solution. If you run this bash script:

#!/bin/sh

# Generate zathurarc with pywal colours

. $HOME/.cache/wal/colors.sh

cat <<CONF
set guioptions ""
set adjust-open "best-fit"
set recolor "true"
set recolor-keephue
set completion-bg "$background"
set completion-fg "$foreground"
set completion-group-bg "$background"
set completion-group-fg "$color2"
set completion-highlight-bg "$foreground"
set completion-highlight-fg "$background"
set recolor-lightcolor "$background"
set recolor-darkcolor "$foreground"
set default-bg "$background"
set inputbar-bg "$background"
set inputbar-fg "$foreground"
set notification-bg "$background"
set notification-fg "$foreground"
set notification-error-bg "$color1"
set notification-error-fg "$foreground"
set notification-warning-bg "$color1"
set notification-warning-fg "$foreground"
set statusbar-bg "$background"
set statusbar-fg "$foreground"
set index-bg "$background"
set index-fg "$foreground"
set index-active-bg "$foreground"
set index-active-fg "$background"
set render-loading-bg "$background"
set render-loading-fg "$foreground"
set smooth-scroll true
set window-title-home-tilde true
set statusbar-basename true
set selection-clipboard clipboard
CONF

It generates a new zathurarc with the pywal colours. Let's say you call this walthura and put it in /bin/ you can run:

walthura > ~/.config/zathura/zathurarc

Now it should work. I use ranger for my file management so I made a custom keybind that runs this every time I change my wallpaper, but there is most likely a more efficient way to do this. I don't know enough about shell scripting to make walthura output to the zathura config automatically, but that would make it cleaner.

Protocol2 avatar Mar 30 '21 08:03 Protocol2

I had the same issue, here is what I did:

  1. Install the script as instructed by README.md (probably not necessary for this)
  2. confirmed ~/.local/bin/ was in my $PATH: $ echo export PATH="home/{usrname}/.local/bin:$PATH" > ~/.zshrc (usrname being your username) confirm that it worked: $ $PATH
  3. replaced the links in ~/.local/bin/ with the actual files for zahtura and genzathurarc out of the repo and made them execetuable (this is so that you don't have to keep the cloned repo folder):
$ rm ~/.local/bin/zathura
$ rm ~/.local/bin/genzathurarc
$ cp /repofolder/zathura ~/.local/bin/zathura
$ cp /repofolder/zathura ~/.local/bin/genzathurarc
$ chmod u+x ~/.local/bin/zathura 
$ chmod u+x ~/.local/bin/genzathurarc
  1. edit line 15 of zathura so it begins with /home/{usrnname}/.local/bin/genzathurarc instead of just genzathurarc (else it would not run the script). It should read: /home/{usrnanme}/.local/bin/genzathurarc >> "$zathura_tmp/zathurarc"
  2. At this stage you confirm that ti works by running ~/.local/bin/zathura /path/to/doc
  3. Add an alias to your zshrc/bashrc so you can run it more conveniently: $ echo alias zathura="~/.local/bin/zathura" > .zshrc

Now running $ zathura /path/to/file should work as intended from any directory and you should be able to delete the cloned repo.

Kaiton121 avatar Apr 08 '22 12:04 Kaiton121