Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/563942cd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
bump: patch
---

Animate overlay tiles between their grid positions and each window's real screen frame for smoother show and dismiss transitions.
5 changes: 5 additions & 0 deletions .changeset/a9c08663.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
bump: patch
---

Add an animationSpeed config option and Settings slider to adjust overlay animation speed.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Right-click the `⌘ ⌘` Dock icon and pick **Open Config…** — that opens `
```json
{
"animations": true,
"animationSpeed": 1.0,
"trigger": "cmd-cmd",
"bindings": {
"h": "move-left",
Expand All @@ -71,6 +72,8 @@ Right-click the `⌘ ⌘` Dock icon and pick **Open Config…** — that opens `

`animations: false` skips the show / pick zoom transitions.

`animationSpeed` is a multiplier for animated transitions: `1.0` is normal, `2.0` is twice as fast, and `0.5` is half speed.

`trigger` chooses what summons the overlay. Default `"cmd-cmd"` is the both-Command-keys chord. Anything else is treated as a regular hotkey spec — e.g. `"cmd+shift+space"` or `"f13"` (uses the same shortcut grammar as `bindings`). Hotkeys other than the chord require Accessibility permission to be globally observable.

Binding spec — modifier tokens: `cmd`, `shift`, `opt` (or `option`/`alt`), `ctrl`. Special keys: `esc`, `space`, `return`, `delete`, `left`, `right`, `up`, `down`. Anything else is a single character.
Expand Down Expand Up @@ -131,7 +134,7 @@ Sources/cmdcmd/
Overlay.swift # overlay window, tile grid, selection, animations
OverlayView.swift # NSWindow + NSView event router for the overlay
HintPill.swift # bottom-center mode-hint label
Config.swift # JSON config loader (animations, trigger, bindings)
Config.swift # JSON config loader (animations, speed, trigger, bindings)
Keymap.swift # default shortcuts + override resolver
HotkeyMonitor.swift # global hotkey trigger (alternative to CmdChord)
Tile.swift # per-window SCStream preview layer
Expand Down
11 changes: 10 additions & 1 deletion Sources/cmdcmd/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ enum TilePicks: String, Codable, CaseIterable {

struct Config: Codable {
var animations: Bool
var animationSpeed: Double?
var trigger: String?
var bindings: [String: Action]
var livePreviews: Bool?
Expand All @@ -21,14 +22,18 @@ struct Config: Codable {
var usageOrdering: Bool?
var tilePicks: TilePicks?

var animationSpeedOrDefault: Double {
guard let animationSpeed, animationSpeed.isFinite else { return 1.0 }
return min(4.0, max(0.25, animationSpeed))
}
var triggerSpec: String { trigger ?? "cmd-cmd" }
var livePreviewsEnabled: Bool { livePreviews ?? true }
var displayModeOrDefault: DisplayMode { displayMode ?? .dock }
var letterJumpEnabled: Bool { letterJump ?? true }
var usageOrderingEnabled: Bool { usageOrdering ?? false }
var tilePicksMode: TilePicks { tilePicks ?? .letters }

static let `default` = Config(animations: true, trigger: nil, bindings: [:], livePreviews: nil, displayMode: nil, letterJump: nil, usageOrdering: nil, tilePicks: nil)
static let `default` = Config(animations: true, animationSpeed: nil, trigger: nil, bindings: [:], livePreviews: nil, displayMode: nil, letterJump: nil, usageOrdering: nil, tilePicks: nil)

static var fileURL: URL {
URL(fileURLWithPath: NSHomeDirectory())
Expand Down Expand Up @@ -357,6 +362,10 @@ struct Config: Codable {
lines.append(" // Animate the show / pick zoom transitions. Set to false for instant.")
lines.append(" \"animations\": true,")
lines.append("")
lines.append(" // Animation speed multiplier. 1.0 is normal, 2.0 is twice as fast,")
lines.append(" // 0.5 is half speed. Values are clamped from 0.25 to 4.0.")
lines.append(" \"animationSpeed\": 1.0,")
lines.append("")
lines.append(" // Live tile previews. Set to false for static screenshots only —")
lines.append(" // faster and lighter, especially with many windows open.")
lines.append(" \"livePreviews\": true,")
Expand Down
Loading
Loading