[LINUX] Hey people! I "created" with the help of chatgpt another way to graphically use this application #246
PrajwalS1234
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey fellow Linux users. I don't have much knowledge about Linux systems and packages and all, but turns out chatgpt does and I combined two commands to create my own interface (sorta) to use this application like I use Mathpix
So, you would need few packages to use this simple command
The command is as given below:
xfce4-screenshooter --region --save /home/bob/Pictures/Screenshots/a.png && pix2tex /home/bob/Pictures/Screenshots/a.png | sed 's/.*: //' | xclip -selection c &
Now, I opened my settings and assigned this to a key combination 'Ctrl + Alt + N' and now whenever I want to read math text, I just use it.edit: I had to create a shell script as for some reason the command didn't work as intended when I assigned the command to a key.
Now, it has gotten slightly more complex, but bear with me,
Although the paths above refer to /Pictures/Screenshots we would be saving our mathsnip.sh to the home folder
So, save it to /home/$USER/ folder
Open a terminal and enter
chmod 777 mathsnip.sh
(gives execution permission to our shell script mathsnip.sh)Now Open Settings> Keyboard> Keyboard Shortcuts> Custom Shortcuts and create a shortcut and in the command column, enter
./mathsnip.sh
and choose the key combination you would want to use.Save it.
Use the desired key combination to now select any math equation you want and get it copied to your freaking clipboard! Just like Mathsnip! PS: You have to wait a few seconds for it to get copied to clipboard (sorry, I can't do nothing about this)
Turns out it was easier to do this than to explain it. You are welcome pepoll!
https://imgur.com/a/T4wmbm2
Is there an easier way? Maybe. Do I prefer my way? Always!
Beta Was this translation helpful? Give feedback.
All reactions