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

Add AppleScript Support #5

Open
amiantos opened this issue May 19, 2020 · 1 comment
Open

Add AppleScript Support #5

amiantos opened this issue May 19, 2020 · 1 comment
Labels
enhancement New feature or request macOS Issue pertains to macOS version of PiBar

Comments

@amiantos
Copy link
Owner

  • it'd be nice if the ability to toggle pi-holes on and off was scriptable via AppleScript. More info here.
@amiantos amiantos added the enhancement New feature or request label May 19, 2020
@amiantos amiantos added this to the Version 2.0 milestone May 20, 2020
@BrianAMartin221
Copy link

BrianAMartin221 commented May 24, 2020

Hey I know some of you may be like me and use your own global keyboard shortcuts. (In my case PiBars uses one I had open. But I figured I'd throw together an AppleScript for disabling by AppleScript.
I have a slight delay in mine so someone smarter than me might be able to fix that but I figured I would include.

This script just Ques up the Disable Time options instead of disabling all together.

tell application "System Events" to quit
tell application "System Events" to tell process "PiBar"
	click menu bar item 1 of menu bar 2
end tell
do shell script "killall System\\ Events"
delay 0.1
tell application "System Events" to tell process "PiBar"
	tell menu bar item 1 of menu bar 2
		key code 125
		key code 76
	end tell
end tell

@amiantos amiantos added the macOS Issue pertains to macOS version of PiBar label Jun 4, 2020
@amiantos amiantos removed this from the macOS 2.0 milestone Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request macOS Issue pertains to macOS version of PiBar
Projects
None yet
Development

No branches or pull requests

2 participants