-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delay on startup #8
Comments
@fossfreedom thank you dude! I'm working on it... I have been doing some proofs of concept and they have concluded successfully. I have to think a way to include the initial startup of LightPad along with the system boot. Can you think of something? I estimate that with a systemd unit it can be solved, but I'm not sure. |
Hmm. I was thinking more along the lines of a regular auto start file (/etc/xdg/autostart) E.g. in the autostart .desktop file Exec=com.github.libredeb.lightpad --autostart Thus lightpad will start but when it sees the autostart 1st parameter it would not create the desktop overlay (or will but immediately hide it). It would then setup a dbus session listening. Then when a regular com.github.libredeb.lightpad is run via the shortcut key it will look to see if another process of the same name is running. If it detects another process it sends a dbus message before exiting. The hidden process that is listening will make the desktop overlay window visible. When an app is run or esc is pressed, instead of the app closing, the overlay window is hidden. |
same here. is there any way to make it run on start up yet ? |
@fossfreedom yes... I need to practice and do some proof of concept with dbus. The solution is in that way! Also I thinking in migrate LightPad to LibHandy to add a more natural touch screen support. |
Quick example of dbus here So you set up dbus with a given session name and own it. From the client side you can call a dbus method (e.g. ResetLayout) as per https://github.com/UbuntuBudgie/budgie-extras/blob/master/budgie-extras-daemon/src/invoke.py Just note - methods are case sensitive - so whether you are using python or vala - make sure you define & call methods with their case-sensitive name. |
@fossfreedom thanks for the links and documentation. Yes, i know how to develop in both languages... I'll be careful of what you say. Let me try to code something functional first. Regards! |
I personally use a Raspberry Pi 4 and the app can take up to 10 seconds to start. I was thinking of doing a background preload with Python before seeing this issue. So I currently have a script which generate a json file like this:
|
My python script(only 1 sec to run it):
|
There is a slight but notable delay on each startup of the app.
EDIT: On a much slower laptop the app takes 1-2 seconds to start.
This is because the whole menu has to be reread and displayed.
Suggested enhancement is to have lightpad run via an autostart file - initially hidden.
Then when lightpad is run via the keybinding - lightpad is made visible rather than starting from scratch.
The text was updated successfully, but these errors were encountered: