Skip to content
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

Swift/SwiftUI rewrite #139

Draft
wants to merge 140 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
8271ec1
Wipe the slate clean
numist Aug 7, 2020
f00ea92
More dependency management shenanigans
numist Aug 8, 2020
3b592a0
Improve behaviour when called from an outside directory
numist Aug 8, 2020
5397b0a
Keyboard/EventTap works, LongCmdQ service PoC works, service manageme…
numist Aug 9, 2020
e0bcee8
LICENSE
numist Aug 9, 2020
f5ad2b6
Pasteboard history stuff seems like it'll be reasonably straightforward
numist Aug 9, 2020
072bef1
prototyping SQLite backing for pasteboard history
numist Aug 9, 2020
e493e28
Initial swiftlinting
numist Aug 9, 2020
2f384d5
Get db work off the main thread, clean up a bit
numist Aug 9, 2020
7465601
Minor administrivia
numist Aug 10, 2020
456f170
CGWindowInfo wrapper and list getter
numist Aug 10, 2020
31e77d0
Factor PasteboardHistory init a bit
numist Aug 10, 2020
6edf614
Fall back to Haxcessibility for window titles when constructing [Wind…
numist Aug 10, 2020
1bebc04
Add title, fullscreen, Quartz frame, and display ID properties to Win…
numist Aug 10, 2020
9e650d7
Activation potential provided by NSRunningApplication
numist Aug 10, 2020
745d659
Comments
numist Aug 10, 2020
8069065
WindowInfo : Hashable
numist Aug 11, 2020
fac3ab5
disambiguate TODOs from dependencies'
numist Aug 11, 2020
a473767
rev Haxcessibility
numist Aug 11, 2020
bd4b884
Initial implementation of WindowInfoGroup
numist Aug 11, 2020
bc77a46
rev Haxcessibility
numist Aug 11, 2020
7f1bd26
Really promising progress for pasteboard history viewer using SwiftUI
numist Aug 11, 2020
3245cfe
This'll come in handy later
numist Aug 11, 2020
7187374
More improvements to PasteboardHistory SwiftUI stuff
numist Aug 11, 2020
47544e9
No need to specify a delay here, .async will work just fine
numist Aug 11, 2020
c644517
Quiet the linter
numist Aug 11, 2020
cf994d8
Should have used Core Data to begin with
numist Aug 12, 2020
8958f76
pitfalls
numist Aug 12, 2020
eeefd0c
Reintegrate the relaunch target into the new Switch.xcodeproj
numist Aug 12, 2020
f314e5b
Clean up some SwiftUI
numist Aug 13, 2020
836613e
Typing in the pasteboard history's text field filters the results
numist Aug 14, 2020
f96c0dd
First hints of success getting a window info list publisher to power …
numist Aug 14, 2020
0f4711a
Fix a crash when `items` shrinks to become smaller than `selection` i…
numist Sep 6, 2020
8c581d2
Event tap uses a dedicated thread for event callbacks. Introduces at …
numist Sep 12, 2020
bd2c911
Fix at least one threading bug.
numist Sep 12, 2020
da8e293
Bump Haxcessibility
numist Sep 13, 2020
781758c
Switcher state machine and make window info dicts more testable
numist Sep 13, 2020
a16958e
SwitcherState tests, WindowInfo simplication and Swift-pasteable desc…
numist Sep 13, 2020
612ba6f
Real window info in tests, refine window info description
numist Sep 13, 2020
fe232d4
Fix retain cycle in EventTap
numist Sep 13, 2020
072343c
Factor set extension into its own file
numist Sep 13, 2020
f678faf
Don't do the AX dance for unit tests
numist Sep 13, 2020
868624d
Use WindowInfoGroup.list in tests and add test for nil selection (pre…
numist Sep 13, 2020
9d14cc8
Don't leak CGEvents when returning the event parameter back to the ca…
numist Sep 13, 2020
21a6f6d
Disable event tap before removing from runloop
numist Sep 13, 2020
8ca4202
More bumpback tests (and a bugfix) for SwitcherState
numist Sep 13, 2020
97eace2
Initial import of Switcher service
numist Sep 13, 2020
da697f0
Total embracing of functional core/imperative shell. Switcher has no …
numist Sep 13, 2020
7ef7da2
Alphabetize
numist Sep 13, 2020
1f5c4b6
Log prefix string and cleanup in PasteboardHistory
numist Sep 13, 2020
4c5ea2c
Minor logging improvement in AX poller, no functional changes
numist Sep 13, 2020
4b909cc
Minor refinements in switcher shell
numist Sep 13, 2020
1e0c3c4
Fix a crash when creating an EventTap after AX permission have been r…
numist Sep 13, 2020
22867ac
Use prefix when logging
numist Sep 13, 2020
924f666
More documentation and testing for switcher state machine
numist Sep 13, 2020
4737cdf
Odds and ends
numist Sep 13, 2020
008b8fa
Log the raise
numist Sep 14, 2020
49d99ca
structify SwitcherState
numist Sep 14, 2020
8e757c5
Fix docs
numist Sep 14, 2020
babf8e5
Reclassify SwitcherState and make some progress with SwitcherView
numist Sep 14, 2020
d5a0a0c
Remove superfluous linter directive
numist Sep 14, 2020
fea088d
Don't shunt the flagsChanged event showing option was released
numist Sep 14, 2020
8630dfb
Fix a rare crash caused by a race between running the runloop and add…
numist Sep 14, 2020
6233a29
Dimensional spec for SwitcherView
numist Sep 14, 2020
6d53a17
SwitcherView layout (and previewing) progress
numist Sep 15, 2020
a2af116
Preview different colour schemes simultaneously, when available
numist Sep 15, 2020
b6137bf
Speed up the preview by cropping the background image before drawing
numist Sep 16, 2020
87d5eee
Present the switcher interface when told by the state machine!
numist Sep 16, 2020
44f0d8c
Set the stage for multimon even though I'm currently using a setup wi…
numist Sep 16, 2020
f516ea2
That's all it takes to animate?? Damn.
numist Sep 16, 2020
198a853
Stopwatch telemetry for slow ops
numist Sep 25, 2020
8034bef
Use stopwatch on calls to CGWindowListCopyWindowInfo
numist Sep 25, 2020
5ebd544
Poll window list while switcher is active
numist Sep 25, 2020
0cda1bd
Don't re-enable event taps while debugging
numist Sep 25, 2020
7637973
Add logic to SwitcherState to support absolute indexing (needed to su…
numist Sep 25, 2020
6f82336
Organization and documentation
numist Sep 25, 2020
98644db
Support closing windows using ⌥W
numist Sep 25, 2020
c771123
Concede to Hyrum's Law
numist Sep 25, 2020
72b3938
Add windows to SwitcherState fuzzer, fix resulting bugs
numist Sep 26, 2020
9e5ff56
Add Chrome quirk testing and factor SwitcherState tests. All test cas…
numist Sep 27, 2020
e15d19e
README updates
numist Sep 27, 2020
f5d75b1
Reorganize supporting files
numist Sep 27, 2020
d3c29cd
Update Haxcessibility and make better use of its new nullability anno…
numist Sep 27, 2020
cdfbb64
Xcode 12 GM fallout
numist Sep 27, 2020
669a97c
Minor window list polling improvements
numist Sep 27, 2020
40a8885
Interface animations
numist Sep 27, 2020
8e4d4ae
Experiments with SwiftUI `.onHover` have not gone especially well
numist Sep 27, 2020
1277f52
Pretty printing for WindowInfoGroup
numist Sep 27, 2020
2bccfc6
Pragma marks
numist Sep 27, 2020
97ef7e5
Update deps readme
numist Sep 27, 2020
bad5a84
Support switcher cancellation
numist Sep 28, 2020
df1669c
Don't post unwanted window list updates to the state object
numist Sep 28, 2020
c840a20
Give the fuzzer some more time to do its thing
numist Sep 28, 2020
da64812
Refactor Keyboard, move enum subtypes into a separate file
numist Sep 28, 2020
3e156ba
Remove unnecessary linter directive
numist Sep 28, 2020
93596a0
expose ownerPID at the window group level
numist Sep 28, 2020
aee9c7c
Factor hotkeys up to Switcher properties so they can someday be custo…
numist Sep 28, 2020
bf3f60e
Simplify HAX callsites/logging to take advantage of recent WindowInfo…
numist Sep 28, 2020
d21b518
Remove some logging
numist Sep 28, 2020
6244010
Add a prefix for easy identification of stopwatch logs
numist Sep 28, 2020
22216b8
Fade out interface on dismissal
numist Sep 28, 2020
5d13fce
Add some paranoid assertions to testSelectionResetsOnRelease (no fail…
numist Sep 28, 2020
64d8b87
Add/adopt dependencies LetsMove, Sparkle
numist Sep 29, 2020
3762659
Add copy frameworks step for LetsMove and Haxcessibility, public DSA …
numist Sep 29, 2020
82ce3fb
Add public DSA key from Switch 0.0.10
numist Sep 29, 2020
70ecc96
Set proper semantic versioning string for CFBundleVersion
numist Sep 29, 2020
d25c3cb
Stopwatch always requires threshold, simplify dictionary type convers…
numist Sep 29, 2020
08b340c
Subscriber-based window list publisher
numist Sep 29, 2020
0894831
Rename window info publisher
numist Sep 29, 2020
fdbfc89
Move accessibility dance into app delegate
numist Sep 29, 2020
adaf39b
TODO attribution
numist Sep 29, 2020
52968a9
Refactor services implementation in preparation for status bar item s…
numist Sep 29, 2020
da898e0
Organize common code based on whether the file extends system types o…
numist Sep 29, 2020
c942a2b
Add Defaults dependency and adoption
numist Sep 29, 2020
7ded003
New subscriber-counting publisher for composition in expensive pollin…
numist Sep 29, 2020
c14e664
New version 0.0.11
numist Sep 29, 2020
316c5ef
Add Defaults, LetsMove, and Sparkle to README
numist Sep 29, 2020
dd0039f
Add README to workspace
numist Sep 29, 2020
c3f34ae
firstLaunch plumbing
numist Sep 29, 2020
b18d5dc
Line wrapping
numist Sep 29, 2020
604c3cb
Initial implementation of status item
numist Sep 30, 2020
5ca0002
Use NSBundle's object(forInfoDictionaryKey:) instead of infoDictionary[]
numist Sep 30, 2020
ac40563
Scope debug menu items for readability
numist Sep 30, 2020
5201c44
Update Sparkle to 1.24.0
numist Dec 9, 2020
6834f89
Center switcher interface in window (more) properly
numist Dec 12, 2020
f1507c4
Generalize SwitcherWindow in prep for multimon support
numist Dec 12, 2020
11e98bb
Fix padding and preview for pasteboard history view
numist Dec 12, 2020
0de0cb4
Clean up some builder chaining
numist Dec 12, 2020
0afa0dc
Update switcher view to more accurately reflect 0.0.10
numist Dec 18, 2020
85ecfcb
Rev docs
numist Dec 20, 2020
2ca4016
Improve layout computation when geometry is not square
numist Mar 19, 2021
3168677
Factor preview background and fix layout issues
numist Mar 19, 2021
5bfc780
Bump deployment to macOS 11.0
numist Oct 26, 2021
94d28e7
Docs updates, NFC
numist Oct 26, 2021
e65d9fa
Stash pasteboard history WIP
numist Oct 26, 2021
74941a0
Bump Haxcessibility
numist Mar 16, 2022
3e48cb5
Prevent key repeat from quitting multiple apps after the timer fires
numist Apr 11, 2022
b359cb7
That assertion turned out to be quite possible!
numist Apr 22, 2022
6cf36b0
Add support for mouse hover selection
numist Dec 10, 2022
ea95dff
Bump deployment target to macOS 13 and fix a couple resulting depreca…
numist Dec 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Dependencies/Defaults.gitcheckout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
master:93fbdf7f09a0887ca49d35752ebc31735f987c7a
1 change: 1 addition & 0 deletions Dependencies/Defaults.giturl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[email protected]:sindresorhus/Defaults.git
8 changes: 8 additions & 0 deletions Dependencies/Defaults/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
1 change: 1 addition & 0 deletions Dependencies/Defaults/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
4 changes: 4 additions & 0 deletions Dependencies/Defaults/.github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github: sindresorhus
open_collective: sindresorhus
patreon: sindresorhus
custom: https://sindresorhus.com/donate
4 changes: 4 additions & 0 deletions Dependencies/Defaults/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.build
/Packages
xcuserdata
project.xcworkspace

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Dependencies/Defaults/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: swift
osx_image: xcode11.4
script: xcodebuild test -project Defaults.xcodeproj -scheme Defaults-macOS
22 changes: 22 additions & 0 deletions Dependencies/Defaults/Configs/Defaults.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>MIT License © Sindre Sorhus</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>net.numist.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<string>0.0.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
17 changes: 17 additions & 0 deletions Dependencies/Defaults/Defaults.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Pod::Spec.new do |s|
s.name = 'Defaults'
s.version = '4.1.0'
s.summary = 'Swifty and modern UserDefaults'
s.license = 'MIT'
s.homepage = 'https://github.com/sindresorhus/Defaults'
s.social_media_url = 'https://twitter.com/sindresorhus'
s.authors = { 'Sindre Sorhus' => '[email protected]' }
s.source = { :git => 'https://github.com/sindresorhus/Defaults.git', :tag => "v#{s.version}" }
s.source_files = 'Sources/**/*.swift'
s.swift_version = '5.3'
s.macos.deployment_target = '10.12'
s.ios.deployment_target = '10.0'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '3.0'
s.weak_framework = 'Combine'
end
Loading