-
Notifications
You must be signed in to change notification settings - Fork 207
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
Same shortcut for two different actions #334
Comments
One option would be to use # in a script file somewhere (I keep mine in ~/.config/skhd/scripts)
# -- topmost.sh -- #
#!/usr/bin/env bash
# queries sketchybar's bar element and returns a JSON object with properties
# jq filters for the "topmost" property in the object and returns true if the value of topmost is "on"
if $(sketchybar --query bar | jq '.topmost == "on"'); then
# if topmost is on, turn off
sketchybar --bar topmost=off
else
# vice versa
sketchybar --bar topmost=on
fi Then in skhdrc: fn - m : ~/.config/skhd/scripts/topmost.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have set up a shortcut in skhdrc to toggle the
topmost
of sketchybar using two different key combinations:Is it possible to toggle the
topmost
with just one combination? Iftopmost
is "on", turn it "off", and vice versa?The text was updated successfully, but these errors were encountered: