ai-battery 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +30 -14
  2. package/bin/ai-battery-macos-rail.applescript +227 -0
  3. package/bin/ai-battery-macos-status.applescript +5 -12
  4. package/bin/ai-battery-run +701 -31
  5. package/bin/ai-battery-tmux.js +17 -0
  6. package/bin/terminal-compositor.js +111 -0
  7. package/docs/REFERENCE.md +23 -3
  8. package/docs/RELEASING.md +30 -7
  9. package/docs/WINDOWS-TERMINAL-SHARED-BAR.md +74 -0
  10. package/docs/hud-preview.svg +75 -20
  11. package/docs/terminal-vertical-preview.svg +73 -0
  12. package/lib/cli.js +1148 -240
  13. package/lib/core/atomic-rename.js +18 -0
  14. package/lib/core/cli-help.js +57 -12
  15. package/lib/core/cli-messages.js +45 -1
  16. package/lib/core/cli-output.js +277 -72
  17. package/lib/core/cli-wrappers.js +410 -0
  18. package/lib/core/config-editor.js +194 -29
  19. package/lib/core/display-config.js +45 -0
  20. package/lib/core/integration-files.js +32 -3
  21. package/lib/core/shared-bar.js +603 -0
  22. package/lib/core/statusline-git.js +179 -15
  23. package/lib/core/terminal.js +25 -7
  24. package/lib/core/tmux-status.js +172 -0
  25. package/lib/core/uninstall.js +20 -7
  26. package/lib/core/usage-store.js +85 -0
  27. package/lib/hud/launcher.js +32 -33
  28. package/lib/platforms/linux/gnome-extension/extension.js +7 -6
  29. package/lib/platforms/linux/hud.js +157 -42
  30. package/lib/platforms/linux/panel.js +16 -3
  31. package/lib/platforms/linux/rail.js +412 -0
  32. package/lib/platforms/macos/hud.js +152 -44
  33. package/lib/platforms/process-scanner.js +77 -29
  34. package/lib/platforms/windows/autostart-cleanup.js +1 -1
  35. package/lib/platforms/windows/codex-runner.js +178 -21
  36. package/lib/platforms/windows/hud/controls.ps1 +65 -15
  37. package/lib/platforms/windows/hud/main.ps1 +715 -54
  38. package/lib/platforms/windows/hud/rendering.ps1 +1284 -2
  39. package/lib/platforms/windows/hud/snapshot.ps1 +26 -46
  40. package/lib/platforms/windows/hud-launcher.js +234 -81
  41. package/lib/platforms/windows/shared-bar-platform.js +972 -0
  42. package/lib/platforms/windows/terminal-compositor.js +210 -25
  43. package/lib/platforms/windows/wt-bar.js +729 -0
  44. package/lib/platforms/windows/wt-fragment.js +665 -0
  45. package/lib/platforms/windows/wt-keybinding.js +300 -0
  46. package/lib/providers/antigravity.js +155 -8
  47. package/package.json +6 -2
  48. package/vendor/PaneContext.cs +875 -0
package/README.md CHANGED
@@ -59,22 +59,36 @@ agy
59
59
 
60
60
  창을 좁히면 **10칸·전체 정보 → 5칸·전체 정보 → 5칸·5h 리셋 시각 → 10칸·잔량만 → 5칸·잔량만 → 4칸·잔량만** 순서로 줄어듭니다. 한 칸은 각각 10%·20%·25%이며, 숫자 퍼센트는 그대로 표시합니다.
61
61
 
62
- Codex는 내장 statusline, Claude·Gemini는 hook으로 첫 행을 그립니다. `setup`만 실행해도 공통 첫 행이 설정되며, 이전 설정은 `reset`으로 복원할 수 있도록 저장합니다. Windows의 Claude는 기본적으로 헤더와 연동 HUD를 사용하며, 터미널에도 배터리 행을 표시하려면 다음처럼 설정합니다.
62
+ Codex는 내장 statusline, Claude·Gemini는 hook으로 첫 행을 그립니다. `setup`만 실행해도 공통 첫 행이 설정되며, 이전 설정은 `reset`으로 복원할 수 있도록 저장합니다. Windows의 Claude도 기본적으로 터미널 안에 두 행을 표시합니다.
63
+
64
+ Gemini(agy)는 기본 인라인 모드와 `/config`의 전체 화면 모드 모두 자체 statusline에 첫 행과 사용량 행을 표시합니다. `setup gemini`는 렌더링 모드를 유지하며 터미널 연동 HUD를 추가하지 않습니다. [agy 렌더링 모드](https://antigravity.google/docs/settings?tab=cli)
65
+
66
+ ### 상태바 위치 · 분할 화면 통합 바
67
+
68
+ 터미널 상태바는 **`bottom` · `top`**(가로 1줄)과 **`left` · `right`**(세로 배터리 레일) 4방향을 모두 지원합니다.
69
+
70
+ <img src="docs/terminal-vertical-preview.svg" alt="세로 TUI 상태바(left/right) 및 Windows Terminal 분할 화면 창 전체 통합 바 예시" width="1100">
71
+
72
+ Windows Terminal에서는 Windows·WSL에서 `ai-battery setup` 후 **분할 화면에서 AI(`codex`·`claude`·`agy`)가 하나라도 실행 중이면 창 전체 가장자리에 통합 바가 자동으로 표시**됩니다. 반대쪽 분할 pane이 일반 셸이거나 Windows와 WSL을 함께 사용해도 창 전체 기준으로 깔끔하게 통합되며, 실행 중인 AI를 모두 종료하거나 분할을 닫아 단일 화면으로 돌아가면 통합 바가 자동으로 닫히고 입력 포커스와 개별 표시를 복원합니다.
63
73
 
64
74
  ```bash
65
- ai-battery setup claude --usage-row
75
+ ai-battery config --position right # 상태바 위치: bottom / top / left / right
76
+ ai-battery split # 분할 화면 통합 바 상태 확인
77
+ ai-battery split top # 통합 바 위치만 별도 지정
78
+ ai-battery split manual # 자동 표시 끄기 (수동 전환)
79
+ ai-battery split off # 통합 바 끄기 (각 pane 개별 표시)
66
80
  ```
67
81
 
68
- Gemini(agy)는 기본 인라인 모드와 `/config`의 전체 화면 모드 모두 자체 statusline에 첫 행과 사용량 행을 표시합니다. `setup gemini`는 렌더링 모드를 유지하며 터미널 연동 HUD를 추가하지 않습니다. [agy 렌더링 모드](https://antigravity.google/docs/settings?tab=cli)
82
+ 위치 변경은 새 AI 세션부터 적용됩니다(실행 중인 통합 바는 자동으로 새 위치에 다시 표시됩니다). Linux·macOS·WSL의 tmux 공통 행은 상·하단 위치를 지원합니다.
69
83
 
70
84
  ## 운영체제별 UI
71
85
 
72
86
  | 환경 | 터미널 안 | 데스크톱 HUD |
73
87
  | --- | --- | --- |
74
- | Windows | Codex 하단 고정 배터리 행, Claude·Gemini 내장 statusline | 이동 가능한 투명 floating HUD, 또는 작업 표시줄 tray |
75
- | WSL | 터미널 하단 배터리 행·statusline, tmux 공통 행 | Windows 데스크톱에 같은 floating HUD |
76
- | Linux | 터미널 하단 배터리 행·statusline, tmux 공통 행 | GNOME 상단 패널과 상세 메뉴. 다른 데스크톱은 StatusNotifier 패널 |
77
- | macOS | 터미널 하단 배터리 행·statusline, tmux 공통 행 | 상단 메뉴바에 로고·짧은 배터리·퍼센트, 클릭하면 상세 메뉴 |
88
+ | Windows | 4방향 상태바(가로·세로 레일) · Windows Terminal 분할 통합 바 | 투명 **icon HUD**(기본) · 세로 **rail** · 상세 **stack** · 작업 표시줄 **tray** |
89
+ | WSL | 4방향 상태바(가로·세로 레일) · Windows Terminal 통합 바 · tmux 공통 행 | Windows 데스크톱에 같은 icon / rail / stack HUD |
90
+ | Linux | 4방향 상태바 · tmux 공통 행 | GNOME 상단 패널과 상세 메뉴. 다른 데스크톱은 StatusNotifier 패널 |
91
+ | macOS | 4방향 상태바 · tmux 공통 행 | 상단 메뉴바에 로고·짧은 배터리·퍼센트, 클릭하면 상세 메뉴 |
78
92
 
79
93
  ## HUD
80
94
 
@@ -82,18 +96,18 @@ Gemini(agy)는 기본 인라인 모드와 `/config`의 전체 화면 모드 모
82
96
  ai-battery hud
83
97
  ```
84
98
 
85
- <img src="docs/hud-preview.svg" alt="macOS와 Linux의 로고·배터리 패널 및 상세 메뉴, Windows와 WSL의 Codex·Claude·Gemini floating HUD 예시" width="1100">
99
+ <img src="docs/hud-preview.svg" alt="macOS와 Linux의 로고·배터리 패널 및 상세 메뉴, Windows와 WSL의 기본 icon HUD와 stack·rail 모드 예시" width="1100">
86
100
 
87
- macOS·Linux는 Codex·Claude·Gemini 로고와 잔량을 패널에 표시합니다. 상세 메뉴에서는 배터리, 5h 리셋 시각, 7d 잔량을 확인합니다. Windows·WSL은 세 도구를 세로로 표시하는 투명 HUD를 사용하며, 드래그한 위치를 기억합니다.
101
+ macOS·Linux는 Codex·Claude·Gemini 로고와 잔량을 패널에 표시하고, 클릭 시 상세 메뉴를 엽니다. Windows·WSL은 기본 **icon HUD**(로고·배터리·잔량)와 함께 세로 **rail**, 상세 **stack**, 작업 표시줄 **tray** 모드를 지원하며 드래그한 위치를 기억합니다.
88
102
 
89
103
  그림은 표시 예시입니다. 글꼴과 배치는 터미널·데스크톱 환경에 따라 달라질 수 있습니다.
90
104
 
91
105
  | 작업 | 명령 |
92
106
  | --- | --- |
93
107
  | HUD 시작·상태 확인·종료 | `ai-battery hud` · `ai-battery hud status` · `ai-battery hud stop` |
94
- | 로그인 시 자동 실행 | `ai-battery hud autostart on` |
95
- | 자동 실행 해제 | `ai-battery hud autostart off` |
108
+ | Windows HUD 레이아웃 | `ai-battery hud icon` · `ai-battery hud rail` · `ai-battery hud stack` |
96
109
  | Windows tray 모드 | `ai-battery hud -Mode tray` |
110
+ | 로그인 시 자동 실행 | `ai-battery hud autostart on` · `ai-battery hud autostart off` |
97
111
  | Windows 밝은·어두운 작업 표시줄 | `ai-battery hud light` · `ai-battery hud dark` |
98
112
 
99
113
  Linux에서 패널 구성 요소가 없다면 `sudo apt install gjs gir1.2-dbusmenu-glib-0.4`로 설치하세요. GNOME 표시 확장을 처음 설치한 뒤에는 로그아웃·로그인이 필요할 수 있습니다.
@@ -108,7 +122,9 @@ ai-battery config
108
122
 
109
123
  터미널 안에 설정창이 열립니다. **↑↓ 선택 · ←→ 순서 이동 · Space 표시/숨김 · Enter 저장 · Esc 취소**로 조작합니다. 체크된 도구만 표시되며, 미리보기에 선택한 순서와 표시 여부가 바로 반영됩니다. Enter를 누르면 TUI와 HUD에 함께 적용됩니다.
110
124
 
111
- 분할창에서 공통 배터리 행을 한 번만 보려면 tmux를 사용하세요. 각 pane에는 모델·추론 수준 등의 첫 행이 남습니다. `--usage-row`로 행을 강제한 설정이 있다면 두 번째 명령으로 자동 표시 방식으로 되돌립니다.
125
+ Linux·macOS·WSL에서 분할창의 공통 행을 사용하려면 tmux를 설정하세요. 각 pane에는 모델·추론 수준 등의 첫 행이 남습니다. Windows Terminal 기본 분할은 AI가 하나 이상 실행 중이면 창 전체 통합 바가 자동 표시됩니다.
126
+
127
+ tmux는 기존 상태줄을 유지하고 **해당 세션에서 AI가 실행 중일 때만 두 번째 행에 배터리**를 표시합니다. AI가 모두 종료되면 추가 행을 접습니다. 다른 tmux 세션이나 터미널에서 실행 중인 AI는 표시 조건에 포함하지 않습니다.
112
128
 
113
129
  ```bash
114
130
  ai-battery setup tmux
@@ -148,7 +164,7 @@ ai-battery setup
148
164
  ai-battery reset
149
165
  ```
150
166
 
151
- AI Battery가 추가한 연동을 복원하고 전용 캐시를 정리합니다. 일부만 해제하려면 `reset claude`, `reset gemini`, `reset codex`, `reset hud`, `reset tmux`처럼 대상을 지정합니다. 사용자가 수정한 설정과 관련 없는 파일은 보존합니다.
167
+ AI Battery가 추가한 연동을 복원하고 전용 캐시를 정리합니다. 일부만 해제하려면 `reset claude`, `reset gemini`, `reset codex`, `reset hud`, `reset tmux`, `reset wt`처럼 대상을 지정합니다. 사용자가 수정한 설정과 관련 없는 파일은 보존합니다.
152
168
 
153
169
  패키지까지 삭제하려면 복원이 완료된 뒤 실행하세요.
154
170
 
@@ -156,6 +172,6 @@ AI Battery가 추가한 연동을 복원하고 전용 캐시를 정리합니다.
156
172
  npm uninstall -g ai-battery
157
173
  ```
158
174
 
159
- 사용량은 로컬 Codex 로그와 Claude·Gemini가 마지막으로 전달한 hook 정보를 기준으로 합니다. 첫 데이터 수신 전에는 `--%`로 표시되며, 공식 사용량 화면보다 갱신이 늦을 수 있습니다.
175
+ 각 TUI·HUD는 갱신 시 같은 최신 수신 사용량을 사용하며, Windows·WSL도 사용량 데이터를 공유합니다. HUD의 기본 갱신 간격은 2초입니다. Codex는 로그의 사용량 이벤트 시각, Claude·Gemini는 전달받은 hook 정보를 기준으로 합니다. 첫 수신 전이나 리셋 후 새 데이터가 없으면 `--%`로 표시됩니다. 도구가 새 정보를 보내기 전에는 공식 사용량 화면보다 갱신이 늦을 수 있습니다.
160
176
 
161
177
  [상세 설정·플랫폼별 참고](docs/REFERENCE.md) · [릴리스·검증](docs/RELEASING.md) · [문제 제보](https://github.com/hojin-v/ai-battery/issues)
@@ -0,0 +1,227 @@
1
+ use framework "AppKit"
2
+ use framework "Foundation"
3
+ use scripting additions
4
+
5
+ property railPanel : missing value
6
+ property railView : missing value
7
+ property refreshTimer : missing value
8
+ property railCommand : ""
9
+ property tooltipCommand : ""
10
+ property stateCommand : ""
11
+ property refreshInterval : 2
12
+ property activeRefreshInterval : 2
13
+ property readyRefreshInterval : 2
14
+ property idleRefreshInterval : 2
15
+ property fastRefreshInterval : 2
16
+ property fastUntilDate : missing value
17
+ property lastHudState : ""
18
+ property hasPositioned : false
19
+ property railScale : 1.0
20
+ property lastImagePath : ""
21
+
22
+ on run argv
23
+ if (count of argv) < 1 then error "ai-battery macOS rail requires rail image command"
24
+
25
+ set railCommand to item 1 of argv
26
+ if (count of argv) is greater than or equal to 2 then set tooltipCommand to item 2 of argv
27
+ if (count of argv) is greater than or equal to 3 then
28
+ try
29
+ set refreshInterval to (item 3 of argv) as real
30
+ end try
31
+ end if
32
+ if (count of argv) is greater than or equal to 4 then set stateCommand to item 4 of argv
33
+ if (count of argv) is greater than or equal to 5 then
34
+ try
35
+ set railScale to (item 5 of argv) as real
36
+ end try
37
+ end if
38
+ if railScale < 0.5 then set railScale to 0.5
39
+ if railScale > 3.0 then set railScale to 3.0
40
+ my configureIntervals_()
41
+
42
+ current application's NSApplication's sharedApplication()
43
+ current application's NSApp's setActivationPolicy:(current application's NSApplicationActivationPolicyAccessory)
44
+
45
+ set initialFrame to current application's NSMakeRect(0, 0, 44, 130)
46
+ set styleMask to (current application's NSWindowStyleMaskBorderless) + (current application's NSWindowStyleMaskNonactivatingPanel) + (current application's NSWindowStyleMaskResizable)
47
+ set railPanel to current application's NSPanel's alloc()'s initWithContentRect:initialFrame styleMask:styleMask backing:(current application's NSBackingStoreBuffered) defer:false
48
+ railPanel's setLevel:(current application's NSStatusWindowLevel)
49
+ railPanel's setOpaque:false
50
+ railPanel's setBackgroundColor:(current application's NSColor's clearColor())
51
+ railPanel's setHasShadow:false
52
+ railPanel's setMovableByWindowBackground:true
53
+ railPanel's setHidesOnDeactivate:false
54
+ railPanel's setCollectionBehavior:((current application's NSWindowCollectionBehaviorCanJoinAllSpaces) + (current application's NSWindowCollectionBehaviorStationary))
55
+
56
+ set railView to current application's NSImageView's alloc()'s initWithFrame:(current application's NSMakeRect(0, 0, 44, 130))
57
+ railView's setAutoresizingMask:((current application's NSViewWidthSizable) + (current application's NSViewHeightSizable))
58
+ railView's setImageScaling:(current application's NSImageScaleProportionallyUpOrDown)
59
+ railView's setToolTip:"AI Battery"
60
+
61
+ set contextMenu to current application's NSMenu's alloc()'s initWithTitle:"AI Battery"
62
+ set largerItem to current application's NSMenuItem's alloc()'s initWithTitle:"Larger (+)" action:"scaleUp:" keyEquivalent:"+"
63
+ largerItem's setTarget:me
64
+ contextMenu's addItem:largerItem
65
+
66
+ set smallerItem to current application's NSMenuItem's alloc()'s initWithTitle:"Smaller (-)" action:"scaleDown:" keyEquivalent:"-"
67
+ smallerItem's setTarget:me
68
+ contextMenu's addItem:smallerItem
69
+
70
+ set resetSizeItem to current application's NSMenuItem's alloc()'s initWithTitle:"Reset Size (100%)" action:"scaleReset:" keyEquivalent:"0"
71
+ resetSizeItem's setTarget:me
72
+ contextMenu's addItem:resetSizeItem
73
+
74
+ contextMenu's addItem:(current application's NSMenuItem's separatorItem())
75
+
76
+ set refreshItem to current application's NSMenuItem's alloc()'s initWithTitle:"Refresh" action:"refresh:" keyEquivalent:"r"
77
+ refreshItem's setTarget:me
78
+ contextMenu's addItem:refreshItem
79
+
80
+ set quitItem to current application's NSMenuItem's alloc()'s initWithTitle:"Quit AI Battery" action:"quit:" keyEquivalent:"q"
81
+ quitItem's setTarget:me
82
+ contextMenu's addItem:quitItem
83
+
84
+ railView's setMenu:contextMenu
85
+ railPanel's setContentView:railView
86
+ my refresh_(missing value)
87
+ railPanel's orderFrontRegardless()
88
+ current application's NSApp's |run|()
89
+ end run
90
+
91
+ on configureIntervals_()
92
+ set activeRefreshInterval to refreshInterval
93
+ set readyRefreshInterval to refreshInterval
94
+ set idleRefreshInterval to refreshInterval
95
+
96
+ set fastRefreshInterval to 2
97
+ if refreshInterval is less than 2 then set fastRefreshInterval to refreshInterval
98
+ end configureIntervals_
99
+
100
+ on scheduleRefresh_(secondsUntilRefresh)
101
+ try
102
+ refreshTimer's invalidate()
103
+ end try
104
+ set refreshTimer to current application's NSTimer's scheduledTimerWithTimeInterval:secondsUntilRefresh target:me selector:"refresh:" userInfo:(missing value) repeats:false
105
+ current application's NSRunLoop's currentRunLoop()'s addTimer:refreshTimer forMode:(current application's NSRunLoopCommonModes)
106
+ end scheduleRefresh_
107
+
108
+ on fastWindowActive_()
109
+ if fastUntilDate is missing value then return false
110
+ try
111
+ set secondsLeft to (fastUntilDate's timeIntervalSinceNow()) as real
112
+ if secondsLeft is greater than 0 then return true
113
+ end try
114
+ return false
115
+ end fastWindowActive_
116
+
117
+ on startFastWindow_(secondsToRun)
118
+ set fastUntilDate to current application's NSDate's dateWithTimeIntervalSinceNow:(secondsToRun)
119
+ end startFastWindow_
120
+
121
+ on refreshIntervalForState_(hudState)
122
+ if (my fastWindowActive_()) then return fastRefreshInterval
123
+ if hudState is "background-running" then return fastRefreshInterval
124
+ if hudState is "foreground-running" then return activeRefreshInterval
125
+ if hudState is "background-ready" then return readyRefreshInterval
126
+ return idleRefreshInterval
127
+ end refreshIntervalForState_
128
+
129
+ on updateFastWindowForState_(hudState)
130
+ if hudState is "" then return
131
+ if lastHudState is "" then
132
+ set lastHudState to hudState
133
+ return
134
+ end if
135
+ if hudState is not lastHudState then
136
+ set lastHudState to hudState
137
+ my startFastWindow_(45)
138
+ end if
139
+ end updateFastWindowForState_
140
+
141
+ on refresh_(sender)
142
+ if sender is not missing value then my startFastWindow_(30)
143
+ set imagePath to ""
144
+ set tooltipText to "AI Battery"
145
+ set hudState to ""
146
+ set railImage to missing value
147
+
148
+ try
149
+ set imagePath to (do shell script (railCommand as text))
150
+ end try
151
+
152
+ if tooltipCommand is not "" then
153
+ try
154
+ set tooltipText to (do shell script (tooltipCommand as text))
155
+ end try
156
+ end if
157
+
158
+ if stateCommand is not "" then
159
+ try
160
+ set hudState to (do shell script (stateCommand as text))
161
+ end try
162
+ end if
163
+
164
+ if imagePath is not "" then set lastImagePath to imagePath
165
+ my applyRailImage_(lastImagePath)
166
+
167
+ my updateFastWindowForState_(hudState)
168
+ my scheduleRefresh_(my refreshIntervalForState_(hudState))
169
+ end refresh_
170
+
171
+ on applyRailImage_(imagePath)
172
+ if imagePath is "" then return
173
+ set railImage to missing value
174
+ try
175
+ set railImage to current application's NSImage's alloc()'s initWithContentsOfFile:imagePath
176
+ end try
177
+ if railImage is not missing value then
178
+ set imageSize to railImage's |size|()
179
+ set baseW to width of imageSize
180
+ set baseH to height of imageSize
181
+ set nextW to baseW * railScale
182
+ set nextH to baseH * railScale
183
+ if nextW < 24 then set nextW to 24
184
+ if nextH < 32 then set nextH to 32
185
+ railPanel's setContentAspectRatio:(current application's NSMakeSize(baseW, baseH))
186
+ railPanel's setMinSize:(current application's NSMakeSize(baseW * 0.5, baseH * 0.5))
187
+ railPanel's setMaxSize:(current application's NSMakeSize(baseW * 3.0, baseH * 3.0))
188
+ railImage's setSize:(current application's NSMakeSize(nextW, nextH))
189
+ if not hasPositioned then
190
+ set screenFrame to current application's NSScreen's mainScreen()'s visibleFrame()
191
+ set originX to (originX of screenFrame) + (width of screenFrame) - nextW - 14
192
+ set originY to (originY of screenFrame) + (height of screenFrame) - nextH - 14
193
+ set hasPositioned to true
194
+ else
195
+ set currentFrame to railPanel's frame()
196
+ set originX to (originX of currentFrame) + (width of currentFrame) - nextW
197
+ set originY to (originY of currentFrame) + (height of currentFrame) - nextH
198
+ end if
199
+ railPanel's setFrame:(current application's NSMakeRect(originX, originY, nextW, nextH)) display:true
200
+ railView's setFrame:(current application's NSMakeRect(0, 0, nextW, nextH))
201
+ railView's setImage:railImage
202
+ end if
203
+ end applyRailImage_
204
+
205
+ on scaleUp_(sender)
206
+ set railScale to railScale + 0.15
207
+ if railScale > 3.0 then set railScale to 3.0
208
+ my applyRailImage_(lastImagePath)
209
+ end scaleUp_
210
+
211
+ on scaleDown_(sender)
212
+ set railScale to railScale - 0.15
213
+ if railScale < 0.5 then set railScale to 0.5
214
+ my applyRailImage_(lastImagePath)
215
+ end scaleDown_
216
+
217
+ on scaleReset_(sender)
218
+ set railScale to 1.0
219
+ my applyRailImage_(lastImagePath)
220
+ end scaleReset_
221
+
222
+ on quit_(sender)
223
+ try
224
+ refreshTimer's invalidate()
225
+ end try
226
+ current application's NSApp's terminate:me
227
+ end quit_
@@ -10,10 +10,10 @@ property titleCommand : ""
10
10
  property detailCommand : ""
11
11
  property tooltipCommand : ""
12
12
  property stateCommand : ""
13
- property refreshInterval : 10
14
- property activeRefreshInterval : 10
15
- property readyRefreshInterval : 10
16
- property idleRefreshInterval : 30
13
+ property refreshInterval : 2
14
+ property activeRefreshInterval : 2
15
+ property readyRefreshInterval : 2
16
+ property idleRefreshInterval : 2
17
17
  property fastRefreshInterval : 2
18
18
  property fastUntilDate : missing value
19
19
  property lastHudState : ""
@@ -69,15 +69,8 @@ end run
69
69
 
70
70
  on configureIntervals_()
71
71
  set activeRefreshInterval to refreshInterval
72
- if activeRefreshInterval is greater than 10 then set activeRefreshInterval to 10
73
-
74
72
  set readyRefreshInterval to refreshInterval
75
- if readyRefreshInterval is less than 10 then set readyRefreshInterval to 10
76
- if readyRefreshInterval is greater than 15 then set readyRefreshInterval to 15
77
-
78
- set idleRefreshInterval to refreshInterval * 3
79
- if idleRefreshInterval is less than 30 then set idleRefreshInterval to 30
80
- if idleRefreshInterval is greater than 60 then set idleRefreshInterval to 60
73
+ set idleRefreshInterval to refreshInterval
81
74
 
82
75
  set fastRefreshInterval to 2
83
76
  if refreshInterval is less than 2 then set fastRefreshInterval to refreshInterval