From 5c4db94f78f7f682e57d470cb5cb93d843f46f6f Mon Sep 17 00:00:00 2001 From: Takeshi Sone Date: Sun, 29 Aug 2021 15:49:22 +0900 Subject: [PATCH 01/31] 1.10.3 --- BLEUnlock/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BLEUnlock/Info.plist b/BLEUnlock/Info.plist index 98420c0..52c4cf8 100644 --- a/BLEUnlock/Info.plist +++ b/BLEUnlock/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.10.3-rc4 + 1.10.3 CFBundleVersion 741 LSApplicationCategoryType From 7fc5bab4324debcf0beb939f695a73115f30cc18 Mon Sep 17 00:00:00 2001 From: Takeshi Sone Date: Sun, 12 Sep 2021 17:20:38 +0900 Subject: [PATCH 02/31] 1.11 --- BLEUnlock/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BLEUnlock/Info.plist b/BLEUnlock/Info.plist index beb5606..d539024 100644 --- a/BLEUnlock/Info.plist +++ b/BLEUnlock/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.10.3 + 1.11 CFBundleVersion 764 LSApplicationCategoryType From 80c59418ad99ba528e972c6c36797dfd2829f441 Mon Sep 17 00:00:00 2001 From: Takeshi Sone Date: Thu, 30 Sep 2021 21:40:49 +0900 Subject: [PATCH 03/31] Update Apple device names from Device Support Update --- BLEUnlock/appleDeviceNames.swift | 12 ++++++++++ apple-device-names | 40 ++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/BLEUnlock/appleDeviceNames.swift b/BLEUnlock/appleDeviceNames.swift index f60522c..04d3823 100644 --- a/BLEUnlock/appleDeviceNames.swift +++ b/BLEUnlock/appleDeviceNames.swift @@ -150,4 +150,16 @@ let appleDeviceNames = [ "AudioAccessory1,1": "HomePod", "AudioAccessory1,2": "HomePod", "AudioAccessory5,1": "HomePod mini", + "iPad12,1": "iPad (9th generation)", + "iPad12,2": "iPad (9th generation)", + "iPad14,1": "iPad mini (6th generation)", + "iPad14,2": "iPad mini (6th generation)", + "Watch6,6": "Apple Watch Series 7", + "Watch6,7": "Apple Watch Series 7", + "Watch6,8": "Apple Watch Series 7", + "Watch6,9": "Apple Watch Series 7", + "iPhone14,2": "iPhone 13 Pro", + "iPhone14,3": "iPhone 13 Pro Max", + "iPhone14,4": "iPhone 13 mini", + "iPhone14,5": "iPhone 13", ] diff --git a/apple-device-names b/apple-device-names index 12237d5..c2d1db9 100755 --- a/apple-device-names +++ b/apple-device-names @@ -1,26 +1,32 @@ #!/usr/bin/env python3 import re, json +from glob import glob from subprocess import Popen, PIPE -p = Popen([ - 'plutil', - '-convert', 'json', - '/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/MobileDevices.bundle/Contents/Info.plist', - '-o', '-' -], stdout=PIPE) - -data = json.load(p.stdout) mapping = {} -for item in data['UTExportedTypeDeclarations']: - if 'UTTypeTagSpecification' not in item: continue - for code in item['UTTypeTagSpecification']['com.apple.device-model-code']: - if re.match(r'^[a-zA-Z]+\d+,\d+$', code): - name = item['UTTypeDescription'] - name = re.sub(r'Model A?\d+(, A?\d+)*', '', name) - name = re.sub(r' *?\)', ')', name) - name = re.sub(r' \(\)', '', name) - mapping[code] = name +def parse_info(filename): + p = Popen([ + 'plutil', + '-convert', 'json', + f, + '-o', '-' + ], stdout=PIPE) + + data = json.load(p.stdout) + + for item in data['UTExportedTypeDeclarations']: + if 'UTTypeTagSpecification' not in item: continue + for code in item['UTTypeTagSpecification']['com.apple.device-model-code']: + if re.match(r'^[a-zA-Z]+\d+,\d+$', code): + name = item['UTTypeDescription'] + name = re.sub(r'Model A?\d+(, A?\d+)*', '', name) + name = re.sub(r' *?\)', ')', name) + name = re.sub(r' \(\)', '', name) + mapping[code] = name + +for f in glob('/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/MobileDevices*.bundle/Contents/Info.plist'): + parse_info(f) print('let appleDeviceNames = [') for code, name in mapping.items(): From 25ea94dcae1bf3ee2ca61768d69138bda9889301 Mon Sep 17 00:00:00 2001 From: Klaus-J <95517970+cyberclaus@users.noreply.github.com> Date: Tue, 7 Dec 2021 17:17:25 +0100 Subject: [PATCH 04/31] Add files via upload --- BLEUnlock/da.lproj/AboutBox.strings | 15 +++++++++++ BLEUnlock/da.lproj/Localizable.strings | 36 +++++++++++++++++++++++++ BLEUnlock/de.lproj/AboutBox.strings | 4 +++ BLEUnlock/de.lproj/Localizable.strings | 37 ++++++++++++++++++++++++++ BLEUnlock/nb.lproj/AboutBox.strings | 15 +++++++++++ BLEUnlock/nb.lproj/Localizable.strings | 36 +++++++++++++++++++++++++ BLEUnlock/sv.lproj/AboutBox.strings | 16 +++++++++++ BLEUnlock/sv.lproj/Localizable.strings | 37 ++++++++++++++++++++++++++ 8 files changed, 196 insertions(+) create mode 100644 BLEUnlock/da.lproj/AboutBox.strings create mode 100644 BLEUnlock/da.lproj/Localizable.strings create mode 100644 BLEUnlock/de.lproj/AboutBox.strings create mode 100644 BLEUnlock/de.lproj/Localizable.strings create mode 100644 BLEUnlock/nb.lproj/AboutBox.strings create mode 100644 BLEUnlock/nb.lproj/Localizable.strings create mode 100644 BLEUnlock/sv.lproj/AboutBox.strings create mode 100644 BLEUnlock/sv.lproj/Localizable.strings diff --git a/BLEUnlock/da.lproj/AboutBox.strings b/BLEUnlock/da.lproj/AboutBox.strings new file mode 100644 index 0000000..63cc51b --- /dev/null +++ b/BLEUnlock/da.lproj/AboutBox.strings @@ -0,0 +1,15 @@ + +/* Class = "NSTextFieldCell"; title = "Copyright © 2019-2021 Takeshi Sone"; ObjectID = "GN4-8z-o8I"; */ +"GN4-8z-o8I.title" = "Copyright © 2019-2021 Takeshi Sone"; + +/* Class = "NSTextFieldCell"; title = "BLEUnlock version #{version}"; ObjectID = "VLW-23-BX0"; */ +"VLW-23-BX0.title" = "BLEUnlock version #{version}"; + +/* Class = "NSButtonCell"; title = "Check Releases"; ObjectID = "WIg-Gy-UeI"; */ +"WIg-Gy-UeI.title" = "Tjek opdateringer"; + +/* Class = "NSButtonCell"; title = "Visit Homepage"; ObjectID = "fPY-L3-Edh"; */ +"fPY-L3-Edh.title" = "Besøg hjemmesiden"; + +/* Class = "NSWindow"; title = "About BLEUnlock"; ObjectID = "hgX-Z1-8qq"; */ +"hgX-Z1-8qq.title" = "Om BLEUnlock"; diff --git a/BLEUnlock/da.lproj/Localizable.strings b/BLEUnlock/da.lproj/Localizable.strings new file mode 100644 index 0000000..8b008b0 --- /dev/null +++ b/BLEUnlock/da.lproj/Localizable.strings @@ -0,0 +1,36 @@ +"about" = "Om BLEUnlock"; +"bluetooth_power_warn" = "Bluetooth er slået fra. Du skal slå den til for at få BLEUnlock til at virke."; +"cancel" = "Annuller"; +"closer" = "⬆Nærmere"; +"device" = "Enhed"; +"device_not_set" = "Enheden er ikke valgt"; +"disabled" = "Deaktivere"; +"enter_password" = "Indtast adgangskode for at låse låseskærmen op."; +"enter_rssi_threshold" = "Indtast mindste RSSI"; +"enter_rssi_threshold_info" = "Enheder, hvis RSSI er mindre end denne værdi, vil blive ignoreret under scanningen."; +"farther" = "⬇Længere væk"; +"launch_at_login" = "Start ved login"; +"lock_delay" = "Forsinkelse til låsning"; +"lock_now" = "Lås skærm nu"; +"lock_rssi" = "Lås RSSI"; +"minute" = "minut"; +"minutes" = "minutter"; +"not_detected" = "Signal ikke fundet"; +"notification_device_away" = "Enheden er væk"; +"notification_locked" = "Denne computer er blevet låst af BLEUnlock"; +"notification_lost_signal" = "Signalet er tabt"; +"notification_update_available" = "Opdatering er tilgængelig."; +"ok" = "OK"; +"passive_mode" = "Passiv tilstand"; +"password_info" = "Din adgangskode vil blive gemt sikkert i nøglering."; +"password_not_set" = "Der er ikke indstillet et kodeord."; +"pause_now_playing" = "Pause \"Afspilning nu\", mens den er låst"; +"quit" = "Afslut BLEUnlock"; +"scanning" = "Scanning…"; +"seconds" = "seconder"; +"set_password" = "Indstil adgangskode…"; +"set_rssi_threshold" = "Indstil mindste RSSI…"; +"timeout" = "Timeout for manglende signal"; +"unlock_rssi" = "Låse op RSSI"; +"use_screensaver_to_lock" = "Brug screensaver til at låse"; +"wake_on_proximity" = "Vågn op på nærhed"; diff --git a/BLEUnlock/de.lproj/AboutBox.strings b/BLEUnlock/de.lproj/AboutBox.strings new file mode 100644 index 0000000..515dfef --- /dev/null +++ b/BLEUnlock/de.lproj/AboutBox.strings @@ -0,0 +1,4 @@ +"VLW-23-BX0.title" = "BLEUnlock Version #{version}"; +"hgX-Z1-8qq.title" = "Über BLEUnlock"; +"fPY-L3-Edh.title" = "Homepage"; +"WIg-Gy-UeI.title" = "Versionen"; diff --git a/BLEUnlock/de.lproj/Localizable.strings b/BLEUnlock/de.lproj/Localizable.strings new file mode 100644 index 0000000..9e9904a --- /dev/null +++ b/BLEUnlock/de.lproj/Localizable.strings @@ -0,0 +1,37 @@ +"about" = "Über BLEUnlock"; +"bluetooth_power_warn" = "Bluetooth ist ausgeschalten. Muss eingeschalten sein, damit BLEUnlock funktioniert."; +"cancel" = "Abbruch"; +"closer" = "⬆näher"; +"device" = "Gerät"; +"device_not_set" = "Kein Gerät ausgewählt"; +"disabled" = "Ausgeschalten"; +"enter_password" = "Passwort eingeben, um den Sperrschirm zu entsperren."; +"enter_rssi_threshold" = "Minimum RSSI eingeben"; +"enter_rssi_threshold_info" = "Gerät mit geringerem RSSI als diesem Wert wird beim Scannen ignoriert."; +"farther" = "⬇weiter"; +"launch_at_login" = "Beim Login starten"; +"lock_delay" = "Sperrverzögerung"; +"lock_now" = "Jetzt sperren"; +"display_off" = "Display ausschalten"; +"lock_rssi" = "RSSI Sperren"; +"minute" = "Minute"; +"minutes" = "Minuten"; +"not_detected" = "Kein Signal entdeckt"; +"notification_device_away" = "Gerät ist entfernt"; +"notification_locked" = "Dieses Gerät wurde durch BLEUnlock gesperrt"; +"notification_lost_signal" = "Signal ging verloren"; +"notification_update_available" = "Update verfügbar"; +"ok" = "OK"; +"passive_mode" = "Passiver Modus"; +"password_info" = "Das Passwort wurde sicher am Schlüsselbund gespeichert."; +"password_not_set" = "Kein Passwort gesetzt."; +"pause_now_playing" = "Pause \"Spielt jetzt\" während der Sperre"; +"quit" = "BLEUnlock beenden"; +"scanning" = "Scanning"; +"seconds" = "seconds"; +"set_password" = "Passwort setzen…"; +"set_rssi_threshold" = "Setze Minimum RSSI…"; +"timeout" = "Kein-Signal Zeitablauf"; +"unlock_rssi" = "RSSI entsperren"; +"use_screensaver_to_lock" = "Den Bildschirmschoner verwenden zum Sperren"; +"wake_on_proximity" = "Aufwachen bei Annäherung"; diff --git a/BLEUnlock/nb.lproj/AboutBox.strings b/BLEUnlock/nb.lproj/AboutBox.strings new file mode 100644 index 0000000..a1e7bdd --- /dev/null +++ b/BLEUnlock/nb.lproj/AboutBox.strings @@ -0,0 +1,15 @@ + +/* Class = "NSTextFieldCell"; title = "Copyright © 2019-2021 Takeshi Sone"; ObjectID = "GN4-8z-o8I"; */ +"GN4-8z-o8I.title" = "Copyright © 2019-2021 Takeshi Sone"; + +/* Class = "NSTextFieldCell"; title = "BLEUnlock version #{version}"; ObjectID = "VLW-23-BX0"; */ +"VLW-23-BX0.title" = "BLEUnlock version #{version}"; + +/* Class = "NSButtonCell"; title = "Check Releases"; ObjectID = "WIg-Gy-UeI"; */ +"WIg-Gy-UeI.title" = "Sjekk utgivelser"; + +/* Class = "NSButtonCell"; title = "Visit Homepage"; ObjectID = "fPY-L3-Edh"; */ +"fPY-L3-Edh.title" = "Besøk hjemmesiden"; + +/* Class = "NSWindow"; title = "About BLEUnlock"; ObjectID = "hgX-Z1-8qq"; */ +"hgX-Z1-8qq.title" = "Om BLEUnlock"; diff --git a/BLEUnlock/nb.lproj/Localizable.strings b/BLEUnlock/nb.lproj/Localizable.strings new file mode 100644 index 0000000..941e080 --- /dev/null +++ b/BLEUnlock/nb.lproj/Localizable.strings @@ -0,0 +1,36 @@ +"about" = "Om BLEUnlock"; +"bluetooth_power_warn" = "Bluetooth er slått av. Slå den på for at BLEUnlock skal fungere."; +"cancel" = "Annullere"; +"closer" = "⬆Nærmere"; +"device" = "Enhet"; +"device_not_set" = "Enheten er ikke valgt"; +"disabled" = "Deaktivere"; +"enter_password" = "Skriv inn passord for å låse opp låseskjermen."; +"enter_rssi_threshold" = "Angi minimum RSSI"; +"enter_rssi_threshold_info" = "Enhet der RSSI er mindre enn denne verdien, ignoreres under skanning."; +"farther" = "⬇Lenger unna"; +"launch_at_login" = "Start ved innlogging"; +"lock_delay" = "Forsinkelse for låsing"; +"lock_now" = "Lås skjerm nå"; +"lock_rssi" = "Lås RSSI"; +"minute" = "minutt"; +"minutes" = "minutn"; +"not_detected" = "Finner ikke signal"; +"notification_device_away" = "Enheten er borte"; +"notification_locked" = "Denne datamaskinen er låst av BLEUnlock"; +"notification_lost_signal" = "Signalet går tapt"; +"notification_update_available" = "Oppdatering er tilgjengelig."; +"ok" = "OK"; +"passive_mode" = "Passiv Modus"; +"password_info" = "Passordet lagres sikkert i nøkkelringen."; +"password_not_set" = "Passord er ikke angitt."; +"pause_now_playing" = "Stans \"Avspilling nå\" mens den er låst"; +"quit" = "Slutte BLEUnlock"; +"scanning" = "kcanning…"; +"seconds" = "seconder"; +"set_password" = "Angi passord…"; +"set_rssi_threshold" = "Angi minimum RSSI…"; +"timeout" = "Tidsavbrudd uten signal"; +"unlock_rssi" = "Låse opp RSSI"; +"use_screensaver_to_lock" = "Bruke skjermsparer til å låse"; +"wake_on_proximity" = "Vekk ved nærhet"; diff --git a/BLEUnlock/sv.lproj/AboutBox.strings b/BLEUnlock/sv.lproj/AboutBox.strings new file mode 100644 index 0000000..64c3d13 --- /dev/null +++ b/BLEUnlock/sv.lproj/AboutBox.strings @@ -0,0 +1,16 @@ + +/* Class = "NSTextFieldCell"; title = "Copyright © 2019-2021 Takeshi Sone"; ObjectID = "GN4-8z-o8I"; */ +"GN4-8z-o8I.title" = "Copyright © 2019-2021 Takeshi Sone"; + +/* Class = "NSTextFieldCell"; title = "BLEUnlock version #{version}"; ObjectID = "VLW-23-BX0"; */ +"VLW-23-BX0.title" = "BLEUnlock version #{version}"; + +/* Class = "NSButtonCell"; title = "Check Releases"; ObjectID = "WIg-Gy-UeI"; */ +"WIg-Gy-UeI.title" = "Observera updateringar"; + +/* Class = "NSButtonCell"; title = "Visit Homepage"; ObjectID = "fPY-L3-Edh"; */ +"fPY-L3-Edh.title" = "Besök hemsida"; + +/* Class = "NSWindow"; title = "About BLEUnlock"; ObjectID = "hgX-Z1-8qq"; */ +"hgX-Z1-8qq.title" = "Om BLEUnlock"; + diff --git a/BLEUnlock/sv.lproj/Localizable.strings b/BLEUnlock/sv.lproj/Localizable.strings new file mode 100644 index 0000000..2016e0b --- /dev/null +++ b/BLEUnlock/sv.lproj/Localizable.strings @@ -0,0 +1,37 @@ +"about" = "Om BLEUnlock"; +"bluetooth_power_warn" = "Bluetooth är avstängt. För att BLEUnlock ska fungera måste du slå på den."; +"cancel" = "Avbryta"; +"closer" = "⬆Närmare"; +"device" = "Enhet"; +"device_not_set" = "Enhet inte valts"; +"disabled" = "Inaktivera"; +"enter_password" = "Ange lösenord för att låsa upp skärmen."; +"enter_rssi_threshold" = "Ange minsta RSSI värde"; +"enter_rssi_threshold_info" = "Enheter vars RSSI-värde är lägre än detta värde kommer att ignoreras vid skanning."; +"farther" = "⬇Längre bort"; +"launch_at_login" = "Starta vid inloggning"; +"lock_delay" = "Fördröjning till låsning"; +"lock_now" = "Låsa skärmen nu"; +"lock_rssi" = "Lås RSSI"; +"minute" = "minut"; +"minutes" = "minuter"; +"not_detected" = "Signalen har inte upptäckts"; +"notification_device_away" = "Enhet är borta"; +"notification_locked" = "Den här datorn har låsts av BLEUnlock"; +"notification_lost_signal" = "Signalen är förlorad"; +"notification_update_available" = "Updateting finns tillgänglig."; +"ok" = "OK"; +"passive_mode" = "Passivt läge"; +"password_info" = "Ditt lösenord lagras säkert i nyckelknippan."; +"password_not_set" = "Lösenordet har inte angetts."; +"pause_now_playing" = "Pausa \"Spela nu\" när den är låst"; +"quit" = "Avsluta BLEUnlock"; +"scanning" = "Skanning…"; +"seconds" = "seconder"; +"set_password" = "Ange lösenord…"; +"set_rssi_threshold" = "Ange lägsta RSSI…"; +"timeout" = "Ingen-signal tidsgräns"; +"unlock_rssi" = "Lås upp RSSI"; +"use_screensaver_to_lock" = "Använd skärmsläckare för att låsa"; +"wake_on_proximity" = "Väckning om in närheten"; + From 77828404d361ec549a201df011f5858a0a809bbc Mon Sep 17 00:00:00 2001 From: Takeshi Sone Date: Sun, 12 Dec 2021 18:34:47 +0900 Subject: [PATCH 05/31] Support for sleep display on lock (WIP) --- BLEUnlock/AppDelegate.swift | 21 +++++++++++---------- BLEUnlock/Info.plist | 2 +- BLEUnlock/lowlevel.c | 11 +++++++---- BLEUnlock/lowlevel.h | 3 ++- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/BLEUnlock/AppDelegate.swift b/BLEUnlock/AppDelegate.swift index a1aa4e4..5059dc3 100644 --- a/BLEUnlock/AppDelegate.swift +++ b/BLEUnlock/AppDelegate.swift @@ -209,12 +209,17 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa } } - func lockOrSaveScreen() -> Bool { + func lockOrSaveScreen() { if prefs.bool(forKey: "screensaver") { NSWorkspace.shared.launchApplication("ScreenSaverEngine") - return true // Really!? } else { - return lockScreen() + if SACLockScreenImmediate() != 0 { + print("Failed to lock screen") + } + if prefs.bool(forKey: "sleepDisplay") { + print("sleep display") + sleepDisplay() + } } } @@ -238,12 +243,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa } else { if (!isScreenLocked() && ble.lockRSSI != ble.LOCK_DISABLED) { pauseNowPlaying() - if lockOrSaveScreen() { - notifyUser(reason) - runScript(reason) - } else { - print("Failed to lock") - } + notifyUser(reason) + runScript(reason) } manualLock = false } @@ -537,7 +538,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa guard !isScreenLocked() else { return } manualLock = true pauseNowPlaying() - _ = lockOrSaveScreen() + lockOrSaveScreen() } @objc func showAboutBox() { diff --git a/BLEUnlock/Info.plist b/BLEUnlock/Info.plist index d539024..218b641 100644 --- a/BLEUnlock/Info.plist +++ b/BLEUnlock/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.11 CFBundleVersion - 764 + 781 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/BLEUnlock/lowlevel.c b/BLEUnlock/lowlevel.c index 2f70ccb..add5e5b 100644 --- a/BLEUnlock/lowlevel.c +++ b/BLEUnlock/lowlevel.c @@ -1,5 +1,6 @@ #include "lowlevel.h" #include +#include void wakeDisplay(void) { @@ -7,9 +8,11 @@ void wakeDisplay(void) IOPMAssertionDeclareUserActivity(CFSTR("BLEUnlock"), kIOPMUserActiveLocal, &assertionID); } -bool lockScreen(void) +void sleepDisplay(void) { - // Go to lock screen by private API. Doesn't work in Sandbox. - extern int SACLockScreenImmediate(void); - return SACLockScreenImmediate() == 0; + io_registry_entry_t reg = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/IOResources/IODisplayWrangler"); + if (reg) { + IORegistryEntrySetCFProperty(reg, CFSTR("IORequestIdle"), kCFBooleanTrue); + IOObjectRelease(reg); + } } diff --git a/BLEUnlock/lowlevel.h b/BLEUnlock/lowlevel.h index eec0625..af1127e 100644 --- a/BLEUnlock/lowlevel.h +++ b/BLEUnlock/lowlevel.h @@ -2,7 +2,8 @@ #define lowlevel_h #include +void sleepDisplay(void); void wakeDisplay(void); -bool lockScreen(void); +int SACLockScreenImmediate(void); #endif /* lowlevel_h */ From 07ff0d57549c4a4ba67b00cbcd2e43e22a06881c Mon Sep 17 00:00:00 2001 From: Takeshi Sone Date: Sun, 12 Dec 2021 18:50:22 +0900 Subject: [PATCH 06/31] Add localizations into project --- BLEUnlock.xcodeproj/project.pbxproj | 20 +++++ .../xcshareddata/xcschemes/BLEUnlock.xcscheme | 78 +++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 BLEUnlock.xcodeproj/xcshareddata/xcschemes/BLEUnlock.xcscheme diff --git a/BLEUnlock.xcodeproj/project.pbxproj b/BLEUnlock.xcodeproj/project.pbxproj index b1f5563..62a1d1d 100644 --- a/BLEUnlock.xcodeproj/project.pbxproj +++ b/BLEUnlock.xcodeproj/project.pbxproj @@ -42,6 +42,14 @@ /* Begin PBXFileReference section */ 3D2CF85A255102B300157996 /* MediaRemote.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaRemote.framework; path = ../../../../System/Library/PrivateFrameworks/MediaRemote.framework; sourceTree = ""; }; 3D2FCF07226C99CB007A06E7 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 3D43D0112765FCCB00D15991 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/AboutBox.strings; sourceTree = ""; }; + 3D43D0122765FCCB00D15991 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; + 3D43D0132765FCFD00D15991 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/AboutBox.strings; sourceTree = ""; }; + 3D43D0142765FCFD00D15991 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = ""; }; + 3D43D0152765FD1600D15991 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/AboutBox.strings; sourceTree = ""; }; + 3D43D0162765FD1600D15991 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Localizable.strings; sourceTree = ""; }; + 3D43D0172765FD2800D15991 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/AboutBox.strings; sourceTree = ""; }; + 3D43D0182765FD2800D15991 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; 3D4EE40F2279E55A00AF9E93 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 3D4EE4102279E55A00AF9E93 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 3D4EE4122279E56900AF9E93 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -242,6 +250,10 @@ Base, ja, "zh-Hans", + de, + da, + nb, + sv, ); mainGroup = 3DD4B647226C1C3200451B7B; productRefGroup = 3DD4B651226C1C3200451B7B /* Products */; @@ -329,6 +341,10 @@ 3D600A36226CC1A40068FB7B /* Base */, 3D600A38226CC1AA0068FB7B /* ja */, B1EFF91622E010F50010DB0A /* zh-Hans */, + 3D43D0122765FCCB00D15991 /* de */, + 3D43D0142765FCFD00D15991 /* da */, + 3D43D0162765FD1600D15991 /* nb */, + 3D43D0182765FD2800D15991 /* sv */, ); name = Localizable.strings; sourceTree = ""; @@ -339,6 +355,10 @@ 3D953798227853E20017D8B9 /* Base */, 3D95379B227853EC0017D8B9 /* ja */, B1EFF91422E010F50010DB0A /* zh-Hans */, + 3D43D0112765FCCB00D15991 /* de */, + 3D43D0132765FCFD00D15991 /* da */, + 3D43D0152765FD1600D15991 /* nb */, + 3D43D0172765FD2800D15991 /* sv */, ); name = AboutBox.xib; sourceTree = ""; diff --git a/BLEUnlock.xcodeproj/xcshareddata/xcschemes/BLEUnlock.xcscheme b/BLEUnlock.xcodeproj/xcshareddata/xcschemes/BLEUnlock.xcscheme new file mode 100644 index 0000000..0227bea --- /dev/null +++ b/BLEUnlock.xcodeproj/xcshareddata/xcschemes/BLEUnlock.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 43243a91fefb58372f30ad961c5218d00782b171 Mon Sep 17 00:00:00 2001 From: alonewolfx2 Date: Thu, 23 Dec 2021 23:41:40 +0300 Subject: [PATCH 07/31] Turkish language added --- BLEUnlock.xcodeproj/project.pbxproj | 5 ++++ BLEUnlock/tr.lproj/AboutBox.strings | 15 +++++++++++ BLEUnlock/tr.lproj/Localizable.strings | 36 ++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 BLEUnlock/tr.lproj/AboutBox.strings create mode 100644 BLEUnlock/tr.lproj/Localizable.strings diff --git a/BLEUnlock.xcodeproj/project.pbxproj b/BLEUnlock.xcodeproj/project.pbxproj index 62a1d1d..c7befb8 100644 --- a/BLEUnlock.xcodeproj/project.pbxproj +++ b/BLEUnlock.xcodeproj/project.pbxproj @@ -77,6 +77,8 @@ 3DD4B668226C1E3700451B7B /* login.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = login.framework; path = ../../../../System/Library/PrivateFrameworks/login.framework; sourceTree = ""; }; B1EFF91422E010F50010DB0A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/AboutBox.strings"; sourceTree = ""; }; B1EFF91622E010F50010DB0A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + F749D28C277515C600C78C28 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/AboutBox.strings; sourceTree = ""; }; + F749D28D277515C600C78C28 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Localizable.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -254,6 +256,7 @@ da, nb, sv, + tr, ); mainGroup = 3DD4B647226C1C3200451B7B; productRefGroup = 3DD4B651226C1C3200451B7B /* Products */; @@ -345,6 +348,7 @@ 3D43D0142765FCFD00D15991 /* da */, 3D43D0162765FD1600D15991 /* nb */, 3D43D0182765FD2800D15991 /* sv */, + F749D28D277515C600C78C28 /* tr */, ); name = Localizable.strings; sourceTree = ""; @@ -359,6 +363,7 @@ 3D43D0132765FCFD00D15991 /* da */, 3D43D0152765FD1600D15991 /* nb */, 3D43D0172765FD2800D15991 /* sv */, + F749D28C277515C600C78C28 /* tr */, ); name = AboutBox.xib; sourceTree = ""; diff --git a/BLEUnlock/tr.lproj/AboutBox.strings b/BLEUnlock/tr.lproj/AboutBox.strings new file mode 100644 index 0000000..b4cbe5a --- /dev/null +++ b/BLEUnlock/tr.lproj/AboutBox.strings @@ -0,0 +1,15 @@ + +/* Class = "NSTextFieldCell"; title = "Copyright © 2019-2021 Takeshi Sone"; ObjectID = "GN4-8z-o8I"; */ +"GN4-8z-o8I.title" = "Copyright © 2019-2021 Takeshi Sone"; + +/* Class = "NSTextFieldCell"; title = "BLEUnlock version #{version}"; ObjectID = "VLW-23-BX0"; */ +"VLW-23-BX0.title" = "BLEUnlock versiyon #{version}"; + +/* Class = "NSButtonCell"; title = "Check Releases"; ObjectID = "WIg-Gy-UeI"; */ +"WIg-Gy-UeI.title" = "Sürüm Kontrol et"; + +/* Class = "NSButtonCell"; title = "Visit Homepage"; ObjectID = "fPY-L3-Edh"; */ +"fPY-L3-Edh.title" = "Anasayfayı ziyaret et"; + +/* Class = "NSWindow"; title = "About BLEUnlock"; ObjectID = "hgX-Z1-8qq"; */ +"hgX-Z1-8qq.title" = "BLEUnlock Hakkında"; diff --git a/BLEUnlock/tr.lproj/Localizable.strings b/BLEUnlock/tr.lproj/Localizable.strings new file mode 100644 index 0000000..71c4624 --- /dev/null +++ b/BLEUnlock/tr.lproj/Localizable.strings @@ -0,0 +1,36 @@ +"about" = "BLEUnlock Hakkında"; +"bluetooth_power_warn" = "Bluetooth Kapalı. BLEUnlock çalışması için Bluetooth u açın"; +"cancel" = "İptal"; +"closer" = "⬆Yakın"; +"device" = "Aygıt"; +"device_not_set" = "Aygıt seçilmedi"; +"disabled" = "Devredışı"; +"enter_password" = "Kilit ekranı açmak için şifrenizi girin"; +"enter_rssi_threshold" = "Minimum RSSI belirle"; +"enter_rssi_threshold_info" = "Eğer aygıt RSSI değeri bu değerin altında ise arama sırasında yok sayılacaktır."; +"farther" = "⬇Uzak"; +"launch_at_login" = "Başlangıçta çalıştır"; +"lock_delay" = "Kilitleme gecikmesi"; +"lock_now" = "Ekranı şimdi kilitle"; +"lock_rssi" = "Kilitleme RSSI değeri"; +"minute" = "dakika"; +"minutes" = "dakika"; +"not_detected" = "Sinyal tespit edilemedi"; +"notification_device_away" = "Aygıt uzakta"; +"notification_locked" = "Bu bilgisayar BLEUnlock tarafından kilitlenmiştir"; +"notification_lost_signal" = "Sinyal kayboldu"; +"notification_update_available" = "Güncelleme var"; +"ok" = "TAMAM"; +"passive_mode" = "Passif Mod"; +"password_info" = "Şifreniz güvenli bir şekilde anahtar zincirinde saklanacaktır."; +"password_not_set" = "Şifre belirlenmedi."; +"pause_now_playing" = "Kilitliyken \"Now Playing\" beklet"; +"quit" = "BLEUnlock'tan çıkış"; +"scanning" = "Taranıyor…"; +"seconds" = "saniye"; +"set_password" = "Şifre belirle…"; +"set_rssi_threshold" = "Minimum RSSI belirle"; +"timeout" = "Sinyal yok Zaman Aşımı"; +"unlock_rssi" = "Kilit açma RSSI"; +"use_screensaver_to_lock" = "Kilit ekranı için ekran kuruyucu kullan"; +"wake_on_proximity" = "Uyandırma yakınlığı"; From 3923fbcb9255229fa669825ba43efdbf4f23b54f Mon Sep 17 00:00:00 2001 From: Wern Jie Lim Date: Wed, 5 Jan 2022 16:11:16 +0800 Subject: [PATCH 08/31] add 'wake without unlocking' functionality --- BLEUnlock/AppDelegate.swift | 15 ++++++++++++++- BLEUnlock/Base.lproj/Localizable.strings | 1 + BLEUnlock/Info.plist | 2 +- BLEUnlock/da.lproj/Localizable.strings | 1 + BLEUnlock/de.lproj/Localizable.strings | 1 + BLEUnlock/ja.lproj/Localizable.strings | 1 + BLEUnlock/nb.lproj/Localizable.strings | 1 + BLEUnlock/sv.lproj/Localizable.strings | 2 +- BLEUnlock/tr.lproj/Localizable.strings | 1 + BLEUnlock/zh-Hans.lproj/Localizable.strings | 1 + README.md | 1 + 11 files changed, 24 insertions(+), 3 deletions(-) diff --git a/BLEUnlock/AppDelegate.swift b/BLEUnlock/AppDelegate.swift index a1aa4e4..3cb8e7f 100644 --- a/BLEUnlock/AppDelegate.swift +++ b/BLEUnlock/AppDelegate.swift @@ -297,6 +297,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa CGEvent(keyboardEventSource: src, virtualKey: 0x35, keyDown: false)?.post(tap: .cghidEventTap) } + guard !self.prefs.bool(forKey: "wakeWithoutUnlocking") else { return } + Timer.scheduledTimer(withTimeInterval: 0.5, repeats: false, block: { _ in guard self.isScreenLocked() else { return } guard let password = self.fetchPassword(warn: true) else { return } @@ -533,6 +535,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa ble.setPassiveMode(passiveMode) } + @objc func toggleWakeWithoutUnlocking(_ menuItem: NSMenuItem) { + let wakeWithoutUnlocking = !prefs.bool(forKey: "wakeWithoutUnlocking") + prefs.set(wakeWithoutUnlocking, forKey: "wakeWithoutUnlocking") + menuItem.state = wakeWithoutUnlocking ? .on : .off + } + @objc func lockNow() { guard !isScreenLocked() else { return } manualLock = true @@ -605,6 +613,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa item.state = .on } + item = mainMenu.addItem(withTitle: t("wake_without_unlocking"), action: #selector(toggleWakeWithoutUnlocking), keyEquivalent: "") + if prefs.bool(forKey: "wakeWithoutUnlocking") { + item.state = .on + } + item = mainMenu.addItem(withTitle: t("pause_now_playing"), action: #selector(togglePauseNowPlaying), keyEquivalent: "") if prefs.bool(forKey: "pauseItunes") { item.state = .on @@ -691,7 +704,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa dnc.addObserver(self, selector: #selector(onScreensaverStart), name: NSNotification.Name(rawValue: "com.apple.screensaver.didstart"), object: nil) dnc.addObserver(self, selector: #selector(onScreensaverStop), name: NSNotification.Name(rawValue: "com.apple.screensaver.didstop"), object: nil) - if ble.unlockRSSI != ble.UNLOCK_DISABLED && fetchPassword() == nil { + if ble.unlockRSSI != ble.UNLOCK_DISABLED && !prefs.bool(forKey: "wakeWithoutUnlocking") && fetchPassword() == nil { askPassword() } checkAccessibility() diff --git a/BLEUnlock/Base.lproj/Localizable.strings b/BLEUnlock/Base.lproj/Localizable.strings index 0d16039..58c7c83 100644 --- a/BLEUnlock/Base.lproj/Localizable.strings +++ b/BLEUnlock/Base.lproj/Localizable.strings @@ -34,3 +34,4 @@ "unlock_rssi" = "Unlock RSSI"; "use_screensaver_to_lock" = "Use Screensaver to Lock"; "wake_on_proximity" = "Wake on Proximity"; +"wake_without_unlocking" = "Wake without Unlocking"; diff --git a/BLEUnlock/Info.plist b/BLEUnlock/Info.plist index d539024..c3a4885 100644 --- a/BLEUnlock/Info.plist +++ b/BLEUnlock/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.11 CFBundleVersion - 764 + 766 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/BLEUnlock/da.lproj/Localizable.strings b/BLEUnlock/da.lproj/Localizable.strings index 8b008b0..fddcd28 100644 --- a/BLEUnlock/da.lproj/Localizable.strings +++ b/BLEUnlock/da.lproj/Localizable.strings @@ -34,3 +34,4 @@ "unlock_rssi" = "Låse op RSSI"; "use_screensaver_to_lock" = "Brug screensaver til at låse"; "wake_on_proximity" = "Vågn op på nærhed"; +"wake_without_unlocking" = "Vågn op uden at låse op"; diff --git a/BLEUnlock/de.lproj/Localizable.strings b/BLEUnlock/de.lproj/Localizable.strings index 9e9904a..0b3340e 100644 --- a/BLEUnlock/de.lproj/Localizable.strings +++ b/BLEUnlock/de.lproj/Localizable.strings @@ -35,3 +35,4 @@ "unlock_rssi" = "RSSI entsperren"; "use_screensaver_to_lock" = "Den Bildschirmschoner verwenden zum Sperren"; "wake_on_proximity" = "Aufwachen bei Annäherung"; +"wake_without_unlocking" = "Aufwachen ohne Entsperren"; diff --git a/BLEUnlock/ja.lproj/Localizable.strings b/BLEUnlock/ja.lproj/Localizable.strings index 9a4f6cf..c00312a 100644 --- a/BLEUnlock/ja.lproj/Localizable.strings +++ b/BLEUnlock/ja.lproj/Localizable.strings @@ -34,3 +34,4 @@ "unlock_rssi" = "アンロック信号強度"; "use_screensaver_to_lock" = "スクリーンセーバーでロック"; "wake_on_proximity" = "画面スリープから復帰"; +"wake_without_unlocking" = "ロックを解除せずに目を覚ます"; diff --git a/BLEUnlock/nb.lproj/Localizable.strings b/BLEUnlock/nb.lproj/Localizable.strings index 941e080..2b1957a 100644 --- a/BLEUnlock/nb.lproj/Localizable.strings +++ b/BLEUnlock/nb.lproj/Localizable.strings @@ -34,3 +34,4 @@ "unlock_rssi" = "Låse opp RSSI"; "use_screensaver_to_lock" = "Bruke skjermsparer til å låse"; "wake_on_proximity" = "Vekk ved nærhet"; +"wake_without_unlocking" = "Våkne uten å låse opp"; diff --git a/BLEUnlock/sv.lproj/Localizable.strings b/BLEUnlock/sv.lproj/Localizable.strings index 2016e0b..ea07c22 100644 --- a/BLEUnlock/sv.lproj/Localizable.strings +++ b/BLEUnlock/sv.lproj/Localizable.strings @@ -34,4 +34,4 @@ "unlock_rssi" = "Lås upp RSSI"; "use_screensaver_to_lock" = "Använd skärmsläckare för att låsa"; "wake_on_proximity" = "Väckning om in närheten"; - +"wake_without_unlocking" = "Vakna utan att låsa upp"; diff --git a/BLEUnlock/tr.lproj/Localizable.strings b/BLEUnlock/tr.lproj/Localizable.strings index 71c4624..d746607 100644 --- a/BLEUnlock/tr.lproj/Localizable.strings +++ b/BLEUnlock/tr.lproj/Localizable.strings @@ -34,3 +34,4 @@ "unlock_rssi" = "Kilit açma RSSI"; "use_screensaver_to_lock" = "Kilit ekranı için ekran kuruyucu kullan"; "wake_on_proximity" = "Uyandırma yakınlığı"; +"wake_without_unlocking" = "Kilidi açmadan uyanın"; diff --git a/BLEUnlock/zh-Hans.lproj/Localizable.strings b/BLEUnlock/zh-Hans.lproj/Localizable.strings index ae958fa..ca1f718 100644 --- a/BLEUnlock/zh-Hans.lproj/Localizable.strings +++ b/BLEUnlock/zh-Hans.lproj/Localizable.strings @@ -34,3 +34,4 @@ "unlock_rssi" = "解锁 RSSI"; "use_screensaver_to_lock" = "用屏保来锁定它"; "wake_on_proximity" = "靠近唤醒"; +"wake_without_unlocking" = "唤醒时不需解锁"; diff --git a/README.md b/README.md index 6d8341b..19802d7 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Lock RSSI | Bluetooth signal strength to lock. Smaller value indicates that the Delay to Lock | Duration of time before it locks the Mac when it detects that the BLE device is away. If the BLE device comes closer within that time, no lock will occur. No-Signal Timeout | Time between last signal reception and locking. If you experience frequent "Signal is lost" locking, increase this value. Wake on Proximity | Wakes up the display from sleep when the BLE device approaches while locking. +Wake without Unlocking | BLEUnlock will not unlock the Mac when the display wakes up from sleep, whether automatically via "Wake on Proximity" or manually. This allows for compatibility with the macOS built-in unlock with Apple Watch feature (which can operate immediately after BLEUnlock wakes the screen), or if you just prefer the lock screen to appear more quickly but don't want it to auto-unlock. Pause "Now Playing" while Locked | On lock/unlock, BLEUnlock pauses/unpauses playback of music or video (including Apple Music, QuickTime Player and Spotify) that is controlled by *Now Playing* widget or the ⏯ key on the keyboard. Use Screensaver to Lock | If this option is set, BLEUnlock launches screensaver instead of locking. For this option to work properly, you need to set *Require password **immediately** after sleep or screen saver begins* option in *Security & Privacy* preference pane. Set Password... | If you changed your login password, use this. From 63ebe34c0df1e07d1086c078547e36e20893e3e8 Mon Sep 17 00:00:00 2001 From: Takeshi Sone Date: Sat, 8 Jan 2022 17:30:28 +0900 Subject: [PATCH 09/31] Fix Japanese --- BLEUnlock/ja.lproj/Localizable.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BLEUnlock/ja.lproj/Localizable.strings b/BLEUnlock/ja.lproj/Localizable.strings index c00312a..230b39d 100644 --- a/BLEUnlock/ja.lproj/Localizable.strings +++ b/BLEUnlock/ja.lproj/Localizable.strings @@ -34,4 +34,4 @@ "unlock_rssi" = "アンロック信号強度"; "use_screensaver_to_lock" = "スクリーンセーバーでロック"; "wake_on_proximity" = "画面スリープから復帰"; -"wake_without_unlocking" = "ロックを解除せずに目を覚ます"; +"wake_without_unlocking" = "アンロックせずに画面復帰"; From be07dc6aa2d3db7700da19dabcb3d6c5e299d958 Mon Sep 17 00:00:00 2001 From: Klaus-J <95517970+cyberclaus@users.noreply.github.com> Date: Thu, 6 Jan 2022 08:28:36 +0100 Subject: [PATCH 10/31] Add files via upload --- BLEUnlock/de.lproj/Localizable.strings | 1 - 1 file changed, 1 deletion(-) diff --git a/BLEUnlock/de.lproj/Localizable.strings b/BLEUnlock/de.lproj/Localizable.strings index 0b3340e..ed7b26e 100644 --- a/BLEUnlock/de.lproj/Localizable.strings +++ b/BLEUnlock/de.lproj/Localizable.strings @@ -12,7 +12,6 @@ "launch_at_login" = "Beim Login starten"; "lock_delay" = "Sperrverzögerung"; "lock_now" = "Jetzt sperren"; -"display_off" = "Display ausschalten"; "lock_rssi" = "RSSI Sperren"; "minute" = "Minute"; "minutes" = "Minuten"; From 82faf73ac655883d1e6e7914e91037604d678263 Mon Sep 17 00:00:00 2001 From: Takeshi Sone Date: Sat, 8 Jan 2022 17:42:23 +0900 Subject: [PATCH 11/31] Don't run "intruded" script if unlock is disabled --- BLEUnlock/AppDelegate.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BLEUnlock/AppDelegate.swift b/BLEUnlock/AppDelegate.swift index 3cb8e7f..e8463d2 100644 --- a/BLEUnlock/AppDelegate.swift +++ b/BLEUnlock/AppDelegate.swift @@ -341,7 +341,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa @objc func onUnlock() { if Date().timeIntervalSince1970 >= unlockedAt + 10 { - runScript("intruded") + if ble.unlockRSSI != ble.UNLOCK_DISABLED && !prefs.bool(forKey: "wakeWithoutUnlocking") { + runScript("intruded") + } self.playNowPlaying() } manualLock = false From e7876bbc95ac23f20e1daa5b75f49231316b561b Mon Sep 17 00:00:00 2001 From: Takeshi Sone Date: Sat, 8 Jan 2022 18:19:08 +0900 Subject: [PATCH 12/31] New year --- BLEUnlock/Base.lproj/AboutBox.xib | 20 ++++++++++---------- BLEUnlock/Info.plist | 4 ++-- BLEUnlock/da.lproj/AboutBox.strings | 4 ---- BLEUnlock/nb.lproj/AboutBox.strings | 3 --- BLEUnlock/sv.lproj/AboutBox.strings | 3 --- BLEUnlock/tr.lproj/AboutBox.strings | 3 --- 6 files changed, 12 insertions(+), 25 deletions(-) diff --git a/BLEUnlock/Base.lproj/AboutBox.xib b/BLEUnlock/Base.lproj/AboutBox.xib index 4c4cbe8..3434e16 100644 --- a/BLEUnlock/Base.lproj/AboutBox.xib +++ b/BLEUnlock/Base.lproj/AboutBox.xib @@ -1,8 +1,8 @@ - + - + @@ -17,7 +17,7 @@ - + @@ -36,16 +36,16 @@ - + - + - + @@ -53,7 +53,7 @@ - + @@ -404,12 +404,12 @@ Included icons are derived from SVGs downloaded from materialdesignicons.com. Th - +