Compare commits

..
5 Commits
Author SHA1 Message Date
toxblh 002af40756 upd roadmap 2018-04-09 15:37:30 +01:00
toxblh 285fb1fb85 added sleep button 2018-04-09 15:26:04 +01:00
toxblh 1e07deedae a bit fix for Icons 2018-04-09 14:25:34 +01:00
toxblh a86d31b0ac Added Icon for DockBar 2018-04-09 14:22:30 +01:00
toxblh 0a0b393fb7 fix brithness keys 2018-04-09 12:38:05 +01:00
11 changed files with 50 additions and 14 deletions
@@ -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"
}
],
Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

+2 -2
View File
@@ -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
}
+12
View File
@@ -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)
+16 -2
View File
@@ -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?)