Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
002af40756 | ||
|
|
285fb1fb85 | ||
|
|
1e07deedae | ||
|
|
a86d31b0ac | ||
|
|
0a0b393fb7 |
@@ -1,53 +1,63 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-16.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-32.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-32.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-64.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-128.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-256.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-256.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-512.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-512.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "logo-1024.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
|
||||
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
@@ -30,11 +30,11 @@ struct ESCKeyPress: KeyPress {
|
||||
}
|
||||
|
||||
struct BrightnessUpPress: KeyPress {
|
||||
let keyCode: CGKeyCode = 107
|
||||
let keyCode: CGKeyCode = 113
|
||||
}
|
||||
|
||||
struct BrightnessDownPress: KeyPress {
|
||||
let keyCode: CGKeyCode = 113
|
||||
let keyCode: CGKeyCode = 107
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -61,6 +61,13 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
|
||||
NSTouchBar.minimizeSystemModalFunctionBar(touchBar)
|
||||
}
|
||||
|
||||
@objc func goToSleep() {
|
||||
let task = Process()
|
||||
task.launchPath = "/usr/bin/pmset"
|
||||
task.arguments = ["sleepnow"]
|
||||
task.launch()
|
||||
}
|
||||
|
||||
func touchBar(_ touchBar: NSTouchBar, makeItemForIdentifier identifier: NSTouchBarItem.Identifier) -> NSTouchBarItem? {
|
||||
switch identifier {
|
||||
case .escButton:
|
||||
@@ -84,6 +91,11 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
|
||||
let url = Bundle.main.url(forResource: "weather", withExtension: "scpt")!
|
||||
let script = try! String.init(contentsOf: url)
|
||||
return AppleScriptTouchBarItem(identifier: identifier, appleScript: script, interval: 600)
|
||||
|
||||
case .sleep:
|
||||
let item = NSCustomTouchBarItem(identifier: identifier)
|
||||
item.view = NSButton(title: "☕️", target: self, action: #selector(goToSleep))
|
||||
return item
|
||||
|
||||
case .prev:
|
||||
return CustomButtonTouchBarItem(identifier: identifier, title: "⏪", HIDKeycode: NX_KEYTYPE_PREVIOUS)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<img src="Resources/TouchBar-v0.3.png">
|
||||
</p>
|
||||
|
||||
My the idea is to create the program like a platform for plugins for customization TouchBar. I very like BTT and a full custom TouchBar. And I want to create it. And it's my the first Swift project for MacOS :)
|
||||
My the idea is to create the program like a platform for plugins for customization TouchBar. I very like BTT and a full custom TouchBar (my [BTT preset](https://github.com/Toxblh/btt-touchbar-preset)). And I want to create it. And it's my the first Swift project for MacOS :)
|
||||
|
||||
### Roadmap
|
||||
- [x] Create the first prototype with TouchBar in Storyboard
|
||||
@@ -17,6 +17,20 @@ My the idea is to create the program like a platform for plugins for customizati
|
||||
- [x] Time in touchbar!
|
||||
- [x] First the weather plugin
|
||||
- [x] Find how to open full-screen TouchBar without the cross and stripe menu
|
||||
- [ ] Create the same panel like in my [BTT preset](https://github.com/Toxblh/btt-touchbar-preset)
|
||||
- [ ] Find how to add haptic feedback
|
||||
- [ ] JSON or another approch for save preset and plugins maybe in `~/mtmr`
|
||||
- [ ] Layout: [always left, NSSliderView for center, always right]
|
||||
- [ ] Custom buttons size, actions by click in settings
|
||||
- [ ] Add icon and menu in StatusBar
|
||||
- [ ] Hide from Dock
|
||||
- [ ] Status menu: "preferences", "quit"
|
||||
|
||||
Settings:
|
||||
- [ ] Intarface for plugins and export like presets
|
||||
- [ ] Startup at login
|
||||
- [ ] Show on/off in Dock
|
||||
- [ ] Show on/off in StatusBar
|
||||
- [ ] On/off Haptic Feedback
|
||||
|
||||
Maybe:
|
||||
- [ ] Refactoring the application on packages (AppleScript, JavaScript? and Swift?)
|
||||
|
||||