Skip to content

Commit

Permalink
Disable show-on-hover when showing with hotkey
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbaird committed Feb 3, 2024
1 parent 7cca887 commit e9181b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Ice/MenuBar/MenuBarSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ final class MenuBarSection: ObservableObject {
/// Enables the hotkey associated with the section.
func enableHotkey() {
listener = hotkey?.onKeyDown { [weak self] in
self?.toggle()
guard let self else {
return
}
toggle()
// prevent the section from automatically rehiding
// after mouse movement
menuBarManager?.showOnHoverPreventedByUserInteraction = !isHidden
}
}

Expand Down

0 comments on commit e9181b0

Please sign in to comment.