Skip to content
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

[Request]Force Shell script to run #76

Closed
ericlovesmath opened this issue Apr 27, 2021 · 1 comment
Closed

[Request]Force Shell script to run #76

ericlovesmath opened this issue Apr 27, 2021 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@ericlovesmath
Copy link

With release of 1.3.0, I can test out shell scripts on spacebar.

The first thing I tried is to make a keyboard layout script, but then I realized it only updated every 5 seconds, causing massive delay.

It would be nice to have some function like spacebar -m config --force-update right_shell

Maybe this could be supported in the future?

@ericlovesmath ericlovesmath changed the title Force Shell script to run [Request]Force Shell script to run Apr 27, 2021
@cmacrae
Copy link
Owner

cmacrae commented Apr 27, 2021

Hey @ericlovesmath 👋 Thanks for the request.
At the moment, I'm taking a break from implementing features/fixes on spacebar as I'm in the middle of a complete rewrite.

The good news is that I've already implemented per module refresh timers in the new version. For example, here's the clock module redrawing every second:
module_refresh

That said, you don't need a --force-update flag to achieve what you want in this manner (calling a command to update the shell output more frequently as a work around). The shell outputs are refreshed on a 5 second timer, but also when they are set. So, as a hack, you can do something like this:

while sleep 1 ; do spacebar -m config left_shell_command "date" ; done

current_refresh

Hopefully this is a satisfactory workaround until the new version is released :)

@cmacrae cmacrae closed this as completed Apr 27, 2021
@cmacrae cmacrae added enhancement New feature or request question Further information is requested labels Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants