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

hs.execute window opens in background #3593

Open
hegga opened this issue Jan 25, 2024 · 1 comment
Open

hs.execute window opens in background #3593

hegga opened this issue Jan 25, 2024 · 1 comment

Comments

@hegga
Copy link

hegga commented Jan 25, 2024

Hi!

First, thank you very much for an incredible piece of software!

I have a keybinding which opens the Alacritty terminal and executes a script, my problem is that often the Alacritty window opens in the background of for example the browser which has focus when I press the keybinding. Is there any way I can avoid this? This makes me having to Cmd+Tab to focus the Alacritty window.

The keybinding looks like this:

hs.hotkey.bind({ "cmd" }, "P", function()
  hs.execute("/Applications/Alacritty.app/Contents/MacOS/alacritty --command ~/bin/fuzzy_pass.sh")
end)
@dreness
Copy link

dreness commented Mar 31, 2024

Try adding the following after the execute statement:

hs.application.launchOrFocus("Alacritty")

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

2 participants