-
Notifications
You must be signed in to change notification settings - Fork 371
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
Ability to Toggle Control Strip Using Keybind similar to fn key for Function Keys #57
Comments
Just want to expound that if you set the fn key to show the full control strip while it is "hidden" in Pock, you can't expand the control strip because Pock takes priority. Plus I also want to keep the fn key to show the function keys and bind another key to show and the hide the control strip and or the persistent items. |
I was able to hack this behavior using the following code segment in the app delegate /// Finish launching
func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
NSApp.isAutomaticCustomizeTouchBarMenuItemEnabled = true
var isHoldingFunction = false;
NSEvent.addGlobalMonitorForEvents(matching: .flagsChanged) {
switch $0.modifierFlags.intersection(.deviceIndependentFlagsMask) {
case [.function]:
if (defaults[.hideControlStrip]) {
isHoldingFunction = true;
defaults[.hideControlStrip] = false
NSWorkspace.shared.notificationCenter.post(name: .shouldReloadPock, object: nil)
}
default:
if (isHoldingFunction) {
isHoldingFunction = false;
defaults[.hideControlStrip] = true
NSWorkspace.shared.notificationCenter.post(name: .shouldReloadPock, object: nil)
}
}
} |
Introduced in the latest release! https://pock.dev |
Worth mentioning that double press requires application restart (at least that was the case for me) |
Ability to key bind (hopefully one key) to show partial and full control strip layout similar to how the fn key works for function keys. May also include toggles, key bind or shortcut for persistent items etc. (other hidden items). Sometimes you just need to access these items quickly without going through the pock menu but want to display your beautiful well organised dock unobstructed by default.
The text was updated successfully, but these errors were encountered: