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

Passing arguments to commands. #102

Closed
hewhocannotbetamed opened this issue Jan 22, 2024 · 7 comments
Closed

Passing arguments to commands. #102

hewhocannotbetamed opened this issue Jan 22, 2024 · 7 comments

Comments

@hewhocannotbetamed
Copy link

switch_systeminformer >> $(start wscript.exe C:\lazysys\scripts\powershell\utilities\window-management\switch.vbs 'System Informer')

This should, in my opinion just-work™. Alas, it does not. I've written powershell and batch scripts, but 2slow. wscript.exe + Windows API shenanigans seems to be the fastest means of "activating" a window per its title.

If you have another solution you use, feel free to let me know. I'm also curious if/how I can just feed whatever command I want to invoke arguments. On Windows.

@hewhocannotbetamed
Copy link
Author

lol screw it wrote a binary in C. thank you for this rather inspiring codebase.

@houmain
Copy link
Owner

houmain commented Jan 23, 2024

It should definitely work. Maybe you can give me your script so I can try it out myself?

@ristomatti
Copy link
Contributor

I think this should be reopened. I've been thinking about making a feature request about this. My current workaround is to define part of the command as an alias but it's somewhat of an ugly hack. E.g. I do this:

notify = notify-send -t 5000 keymapper

Control{A} >> $(notify 'some notification')

# or
Control{B} >> do_something
do_something >> $(notify 'did something')

It would be nicer to be able to do something like this but AFAIK the config is not valid.

Control{B} >> do_something 'did something'

@ristomatti

This comment was marked as off-topic.

@houmain

This comment was marked as off-topic.

@ristomatti

This comment was marked as off-topic.

@houmain
Copy link
Owner

houmain commented Jan 24, 2024

Maybe you can give me your script so I can try it out myself?

No longer needed. I found the problem and fixed it in 3.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants