leehblue/texpander

Persistence

Closed this issue ยท 10 comments

Good Day,
I am new to Linux/Raspberry and came across your program - which is most excellent. Having a similar program on my Windows computer, one feature I find missing is - persistence. Meaning, when I open texpander and select a text to fill, texpander then closes and I have to open again to use it.
How can texpander be made to stay open on my screen...vice having to open each time I want to use it? (which I find is very frequent.)
Many thanks in advance for your help.
Dave

Actually keeping texpander open is probably not possible at the moment. This is because it uses zenity to display the selection window, but looking through man zenity, it seems like there is no option for the persistent behaviour you describe.
One could, however, reopen the window anytime it is closed. A primitive solution would be the following command:

while true; do ~/path/to/your/texpander.sh; done

Since you said you're new to Linux, do ask for clarification if needed. :)

Many thanks for the quick reply. Yes - I am new to Linux/Raspberry. Many thansk for the code - easy to copy paste...but where do I copy past to? Yup, newbie.

You can execute it in a terminal of your choice. But I'd suggest putting it in a script file.
Create a new file persistent-texpander.sh, paste

#!/bin/bash
while true; do ~/path/to/your/texpander.sh; done

and make it executable, e.g. by opening the terminal in the directory where you put the file and running chmod +x persistent-texpander.sh.
Then, depending on your distro, you might run the file by double-clicking or maybe bind it to a keyboard shortcut.

I made some words italic โ€“ these should be fairly straightforward to google if you don't know them. :)

Created the persistent-texpander.sh, made executable - all works. Many Thanks.
A couple more questions:
How would I get the min / max buttons to work so texpander could be minimized to the Task Bar?
How do I recommend this feature(s) be incorporated into this program/script?

Many, many thanks!
Dave

Glad to hear it works! ๐ŸŽ‰

I don't see why the minimize/maximize buttons shouldn't work with this. Do they work with the regular texpander? What distro and DE are you using? Try posting the output of running inxi -S (in your terminal).

For a beginner who doesn't want to suggest concrete changes to the code itself (i.e. did them theirselves), creating an Issue like this one is usually the way to go. However, there's also the relatively new Discussions feature on GitHub, which might be preferred by some repositories.

The OS is Raspberry Bullseye with - I think - Mutter replacing Openbox LXDE for PI.

inxi -S in my terminal produces "bash: inxi: command not found". Appears it is a program not installed in Raspberry Pi Bullseye.

When I run regular texpander, the min/max buttons do not work.

I have another Raspberry Pi running Buster and Openbox LXDE (if I understand DE correctly) and the min/max buttons work when I run texpander in a regular fashion and when I run via the script you provided.

So....this has something to do with the new Display interface: Mutter?

Good job narrowing down the scope like that. I can't really help you since I don't use or know much about Mutter, but you could try creating an Issue in the zenity GitLab repo (and linking it here, for future reference). They can probably help you more. Good luck!

Many thanks for all your help. I also learned the from this post: https://forums.raspberrypi.com/viewtopic.php?t=326654&sid=3387a01c69807a143ff983114e210ff3 it appears there is a larger issue. And yes - you are no doubt correct in the direction to zenty GitLab repo.

Many thanks for all your help - I am much further than I was and while there is the min/max not working issue, the script you provided is most beneficial!

Many thanks ! (Issue here - closed.)

You're very welcome.
By the way, your link is somehow broken, maybe because of bad Markdown formatting. Here is a working one, for future reference ๐Ÿ˜„
https://forums.raspberrypi.com/viewtopic.php?t=326654&sid=3387a01c69807a143ff983114e210ff3