diff --git a/nixcfgs/users/js0ny/programs/darwin/alt-tab.nix b/nixcfgs/users/js0ny/programs/darwin/alt-tab.nix new file mode 100644 index 0000000..b0fa096 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/darwin/alt-tab.nix @@ -0,0 +1,76 @@ +# brew install alt-tab +{...}: let + hideList = [ + "com.apple.finder" + "com.apple.Preview" + ]; + ignoreList = [ + "com.microsoft.rdc.macos" + "com.teamviewer.TeamViewer" + "org.virtualbox.app.VirtualBoxVM" + "com.parallels." + "com.citrix.XenAppViewer" + "com.citrix.receiver.icaviewer.mac" + "com.nicesoftware.dcvviewer" + "com.apple.ScreenSharing" + ]; + mkHideApps = identifier: { + "hide" = "2"; + "bundleIdentifier" = identifier; + "ignore" = "0"; + }; + mkIgnoreApps = identifier: { + "bundleIdentifier" = identifier; + "hide" = "0"; + "ignore" = "2"; + }; + blocklist = builtins.toJSON (map mkHideApps hideList ++ map mkIgnoreApps ignoreList); +in { + targets.darwin.defaults = { + "com.lwouis.alt-tab-macos" = { + # 0: Small + # 1: Medium + # 2: Large + appearanceSize = 1; + # 0: Thumbnails (Recording permission required) + # 1: App Icons + # 2: Titles + appearanceStyle = 0; + # 0: Normal + # 1: High + # 2: Highest + appearanceVisibility = 2; + # 0: Light + # 1: Dark + # 2: System + appearanceTheme = 2; + + # Shortcut 1: Cmd-Tab - Mimic Alt-Tab in Windows + # U+2318 + holdShortcut = "⌘"; + # U+21e5 + nextWindowShortcut = "⇥"; + # TODO: Shortcut 2: + holdShortcut2 = "⌘"; + + previewFocusedWindow = true; + showTabsAsWindows = false; + hideAppBadges = false; + # 0: Leading + # 1: Center + alignThumbnails = 1; + menubarIcon = 0; + menubarIconShown = false; + # 0: Don't check for update + # 1: Check for update + # 2: Auto Update + updatePolicy = 0; + # 0: Never send crash report + # 1: Ask + # 2: Always send + crashPolicy = 0; + vimKeysEnabled = true; + blacklist = toString blocklist; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/duti.nix b/nixcfgs/users/js0ny/programs/darwin/duti.nix similarity index 100% rename from nixcfgs/users/js0ny/programs/duti.nix rename to nixcfgs/users/js0ny/programs/darwin/duti.nix diff --git a/nixcfgs/users/js0ny/zen.nix b/nixcfgs/users/js0ny/zen.nix index e9b782b..119af80 100644 --- a/nixcfgs/users/js0ny/zen.nix +++ b/nixcfgs/users/js0ny/zen.nix @@ -33,7 +33,8 @@ ./programs/anki.nix ./programs/sioyek.nix # ./programs/retroarch.nix # Package broken on macOS - ./programs/duti.nix + ./programs/darwin/duti.nix + ./programs/darwin/alt-tab.nix ../../modules/home/do-not-track.nix ../../modules/home/darwin.nix