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

Can't chain multiple shell commands #3

Closed
al-ce opened this issue Apr 8, 2023 · 3 comments
Closed

Can't chain multiple shell commands #3

al-ce opened this issue Apr 8, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@al-ce
Copy link
Owner

al-ce commented Apr 8, 2023

e.g.

/base/:
  <gahr-8>: shell(open ~/.config/) + shell(open ~/Applications/)
  <gahr-8>: shell(mkdir ~/.qutebrowser/testing) + shell(open ~/.qutebrowser/)
  <gahr-8>: shell(open ~/.config/) + shnotify(hello, world)

The first of those commands opens the Applications folder but not .config, the second opens the .qutebrowser folder but doesn't create testing/, etc.No error messages in the Karabiner-Elements GUI Log.

The 'workaround' (which is what one would probably do anyway is the obvious, e.g.

<gahr-8>: shell(mkdir ~/.qutebrowser/testing && touch ~/.qutebrowser/testing/test.txt)

But it would be nice to compartmentalize the wrapped shell pseudo-funcs like shnotify(), open(), etc.

Potential fixes:

  • see if this has been addressed already in KE
  • when creating the keymap, check if there are multiple shell-based pseudo-funcs and chain them
@al-ce al-ce added the bug Something isn't working label Apr 8, 2023
@al-ce
Copy link
Owner Author

al-ce commented Apr 9, 2023

Other hacky idea:

Add a 'cmd' key to the shnotify dict and then chain the commands in shnotify() with &&.

@al-ce
Copy link
Owner Author

al-ce commented Apr 10, 2023

pqrs-org/Karabiner-Elements#2833 (comment)

This is intended behavior.

al-ce added a commit that referenced this issue Apr 10, 2023
Addresses issue #3

Change 'command' to 'cmd' in translate_events() for tidying up
al-ce added a commit that referenced this issue Apr 10, 2023
Tests the functions added to address issue #3
@al-ce
Copy link
Owner Author

al-ce commented Apr 10, 2023

Addressed by chaining all the shell-based pseudo funcs into one to.shell_command event

@al-ce al-ce closed this as completed Apr 10, 2023
al-ce added a commit that referenced this issue Apr 10, 2023
Cross off 'multiple-shell commands' issue #3. Addressed in 2127d4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant