Closed zhmiao closed 8 years ago
Technically, you can. Problem is, the entire program is written in bash, and there are no failsafes. If you press a button that isn't caught, it just crashes :D
If you open a simple pdf (only text), and press "enter" to go forward, then it works without any problems. I.e. termpdf /path/to/pdf
Worked fine for me.
I am a big fan of this, it just needs to be written in a proper language, with proper failsafes.
Agree 100% AhmedAA.
If you are on OS X using iTerm, you might try the new version. I've removed the dependency on Bash 4.x, so it should now work on Bash 3.2. If you want support for marks, you'll still need to install Bash 4.x: brew install bash
.
Thank you so much! Now it is really cool. I have a question. I opened the pdf file, the white part is not shown. you can see from the picture:
the pdf background has the same color with the terminal background, which I don't know why
Yep. Some PDF files have transparent backgrounds, and some don't. The previous version was converting everything into PNG, and took the opportunity to "flatten" all the images---i.e., add white backgrounds. The current version is displaying each page of the PDF without converting to PNG. This is a side-effect.
The work-around is to use a light colored theme: then it is kinda cool that the background color matches your theme, when it happens.
The solution would be to find a tool, or a setting on the tools I'm already using, that adds the white background.
great! what tool can be used to set the background? or is there a command in the terminal that can change the theme to background? so I can do termpdf xx.pdf && change background
? Since all my console applications are based on a dark color theme, to change time all would be pain.
iTerm: Preferences --> Profiles --> Colors
Yes. I though you were saying that there is some tools can be used to set background temporally.
That would be neat. I just tried tmux select-pane -P 'bg=white'
, which temporarily changes the background of the current pane to white. But for reasons I don't understand, that background color fails to show through, so it doesn't fix the problem.
I started a new issue on the transparency problem. I do have some functions and aliases that make switching between dark and light themes easier, which I posted there.
it shows error:
and goes back to bash, which I don't use. I use zsh.
What is going on?