diff --git a/Resources/themes/0x96f.plist b/Resources/themes/0x96f.plist index 54cebc9..15a8cf9 100644 --- a/Resources/themes/0x96f.plist +++ b/Resources/themes/0x96f.plist @@ -3,9 +3,9 @@ id - 0x96f + BF34203A-CD73-45F3-B46F-F209B8A8E5D1 name - 28093A65-866F-42F7-9CB0-49D1D1097A1E + 0x96f Ansi 0 Color Alpha Component diff --git a/Resources/themes/catppuccinFrappe.plist b/Resources/themes/catppuccinFrappe.plist index c265be0..c65b30e 100644 --- a/Resources/themes/catppuccinFrappe.plist +++ b/Resources/themes/catppuccinFrappe.plist @@ -3,9 +3,9 @@ id - catppuccinFrappe + 4DB15A11-5996-409D-9196-2233576E5437 name - 130DF195-4925-45E6-A251-7602E53DB1F4 + catppuccinFrappe Ansi 0 Color Alpha Component diff --git a/Resources/themes/catppuccinMocha.plist b/Resources/themes/catppuccinMocha.plist index 9c42f49..3af0fd4 100644 --- a/Resources/themes/catppuccinMocha.plist +++ b/Resources/themes/catppuccinMocha.plist @@ -3,9 +3,9 @@ id - catppuccinMocha + 194ECC91-03A8-4A8F-9B41-C0F4E8D0A63F name - D7CCC116-0AFA-49CD-8E4C-BDFADE06877C + catppuccinMocha Ansi 0 Color Alpha Component diff --git a/Resources/themes/defaultTheme.plist b/Resources/themes/defaultTheme.plist index 1168d5f..62163c8 100644 --- a/Resources/themes/defaultTheme.plist +++ b/Resources/themes/defaultTheme.plist @@ -3,9 +3,9 @@ id - defaultTheme + CF4964F1-2F0D-4388-9C83-8594E3F17989 name - 907AC82C-F31D-4625-BE99-539ABA97C7E7 + defaultTheme Ansi 0 Color Red Component diff --git a/Resources/themes/dracula.plist b/Resources/themes/dracula.plist index 5f1a4b2..1f15da9 100644 --- a/Resources/themes/dracula.plist +++ b/Resources/themes/dracula.plist @@ -3,9 +3,9 @@ id - dracula + 6A65000B-E8C9-4691-A2EB-3E3981AE0BCB name - 41FD85F7-2129-4494-930A-BAE08D51F517 + dracula Ansi 0 Color Alpha Component diff --git a/Resources/themes/gruvboxDark.plist b/Resources/themes/gruvboxDark.plist index 7250da0..b54c601 100644 --- a/Resources/themes/gruvboxDark.plist +++ b/Resources/themes/gruvboxDark.plist @@ -3,9 +3,9 @@ id - gruvboxDark + 94BCC2DD-8F77-4C1C-85C0-D391A74324A9 name - EDAB6C07-3244-495D-8773-FDF3B8777139 + gruvboxDark Ansi 0 Color Alpha Component diff --git a/Resources/themes/iTerm2SolarizedDark.plist b/Resources/themes/iTerm2SolarizedDark.plist index c075f41..56ab13d 100644 --- a/Resources/themes/iTerm2SolarizedDark.plist +++ b/Resources/themes/iTerm2SolarizedDark.plist @@ -3,9 +3,9 @@ id - iTerm2SolarizedDark + 67A5D068-DC42-4C24-8058-775D7D24F8FE name - 92F1B72C-221F-4780-906C-4498D6C7EEC5 + iTerm2SolarizedDar Ansi 0 Color Alpha Component diff --git a/Resources/themes/iTerm2SolarizedLight.plist b/Resources/themes/iTerm2SolarizedLight.plist index b41fd6a..9feb1b3 100644 --- a/Resources/themes/iTerm2SolarizedLight.plist +++ b/Resources/themes/iTerm2SolarizedLight.plist @@ -3,9 +3,9 @@ id - iTerm2SolarizedLight + 262CB71A-C253-4A78-959E-6E080A458EBB name - 3B37ACD2-C3CF-49B4-9B9D-27E76244E108 + iTerm2SolarizedLight Ansi 0 Color Alpha Component diff --git a/Resources/themes/tomorrowNight.plist b/Resources/themes/tomorrowNight.plist index 6263949..dae9236 100644 --- a/Resources/themes/tomorrowNight.plist +++ b/Resources/themes/tomorrowNight.plist @@ -3,9 +3,9 @@ id - tomorrowNight + 18AF7BA2-F401-4F48-A7A9-9CBA5534643B name - FC93B1E7-BB8B-4F73-B6AA-DEF2AF201B61 + tomorrowNight Ansi 0 Color Blue Component diff --git a/Resources/themes/ubuntu.plist b/Resources/themes/ubuntu.plist index e4fe1a7..3da7562 100644 --- a/Resources/themes/ubuntu.plist +++ b/Resources/themes/ubuntu.plist @@ -3,9 +3,9 @@ id - ubuntu + 97679C4F-6617-43EB-B622-F9F86A2DD929 name - 7B93836A-54AE-4AB0-A41D-7473D72A5419 + ubuntu Ansi 0 Color Blue Component diff --git a/Resources/themes/xcodedark.plist b/Resources/themes/xcodeDark.plist similarity index 99% rename from Resources/themes/xcodedark.plist rename to Resources/themes/xcodeDark.plist index e8db3bb..38d12b8 100644 --- a/Resources/themes/xcodedark.plist +++ b/Resources/themes/xcodeDark.plist @@ -3,9 +3,9 @@ id - xcodedark + E30BF6AF-AA6C-4E85-AE0B-42D576790669 name - 0D6242BB-8961-4A1D-BD08-81BCC1B24528 + xcodeDark Ansi 0 Color Alpha Component diff --git a/Resources/themes/xcodedarkhc.plist b/Resources/themes/xcodeDarkHC.plist similarity index 98% rename from Resources/themes/xcodedarkhc.plist rename to Resources/themes/xcodeDarkHC.plist index 8c1caa4..a2c49a4 100644 --- a/Resources/themes/xcodedarkhc.plist +++ b/Resources/themes/xcodeDarkHC.plist @@ -3,9 +3,9 @@ id - xcodedarkhc + 57AD52E8-C995-4A3C-ABEF-8A50757FA146 name - C95378B5-F183-4E40-B8F8-3CDD681E6B9A + xcodeDarkHC Ansi 0 Color Alpha Component diff --git a/Resources/themes/xcodewwdc.plist b/Resources/themes/xcodeWWDC.plist similarity index 99% rename from Resources/themes/xcodewwdc.plist rename to Resources/themes/xcodeWWDC.plist index 6d344f1..802385b 100644 --- a/Resources/themes/xcodewwdc.plist +++ b/Resources/themes/xcodeWWDC.plist @@ -3,9 +3,9 @@ id - xcodewwdc + E34D7B03-8E07-4F3A-B250-9D3714299B16 name - 884DB359-9154-4038-AD54-C15001FA59BA + xcodeWWDC Ansi 0 Color Alpha Component diff --git a/ShhShell.xcodeproj/project.pbxproj b/ShhShell.xcodeproj/project.pbxproj index 886fddb..5416bab 100644 --- a/ShhShell.xcodeproj/project.pbxproj +++ b/ShhShell.xcodeproj/project.pbxproj @@ -29,15 +29,15 @@ A96BE6972E10846B00C0FEE9 /* catppuccinMocha.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE68D2E10846B00C0FEE9 /* catppuccinMocha.plist */; }; A96BE6982E10846B00C0FEE9 /* ubuntu.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6932E10846B00C0FEE9 /* ubuntu.plist */; }; A96BE6992E10846B00C0FEE9 /* iTerm2SolarizedDark.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6902E10846B00C0FEE9 /* iTerm2SolarizedDark.plist */; }; - A96BE69A2E10846B00C0FEE9 /* xcodedark.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6942E10846B00C0FEE9 /* xcodedark.plist */; }; + A96BE69A2E10846B00C0FEE9 /* xcodeDark.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6942E10846B00C0FEE9 /* xcodeDark.plist */; }; A96BE69B2E10846B00C0FEE9 /* iTerm2SolarizedLight.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6912E10846B00C0FEE9 /* iTerm2SolarizedLight.plist */; }; A96BE69C2E10846B00C0FEE9 /* 0x96f.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE68B2E10846B00C0FEE9 /* 0x96f.plist */; }; A96BE69D2E10846B00C0FEE9 /* gruvboxDark.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE68F2E10846B00C0FEE9 /* gruvboxDark.plist */; }; - A96BE69E2E10846B00C0FEE9 /* xcodedarkhc.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6952E10846B00C0FEE9 /* xcodedarkhc.plist */; }; + A96BE69E2E10846B00C0FEE9 /* xcodeDarkHC.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6952E10846B00C0FEE9 /* xcodeDarkHC.plist */; }; A96BE69F2E10846B00C0FEE9 /* tomorrowNight.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6922E10846B00C0FEE9 /* tomorrowNight.plist */; }; A96BE6A02E10846B00C0FEE9 /* dracula.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE68E2E10846B00C0FEE9 /* dracula.plist */; }; A96BE6A12E10846B00C0FEE9 /* catppuccinFrappe.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE68C2E10846B00C0FEE9 /* catppuccinFrappe.plist */; }; - A96BE6A22E10846B00C0FEE9 /* xcodewwdc.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6962E10846B00C0FEE9 /* xcodewwdc.plist */; }; + A96BE6A22E10846B00C0FEE9 /* xcodeWWDC.plist in Resources */ = {isa = PBXBuildFile; fileRef = A96BE6962E10846B00C0FEE9 /* xcodeWWDC.plist */; }; A96BE6A42E113D9400C0FEE9 /* ThemeCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96BE6A32E113D9400C0FEE9 /* ThemeCodable.swift */; }; A96BE6A62E113DB000C0FEE9 /* ColorCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96BE6A52E113DB000C0FEE9 /* ColorCodable.swift */; }; A96C6A8A2E0C0B1100F377FE /* SSHState.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96C6A892E0C0B1100F377FE /* SSHState.swift */; }; @@ -128,9 +128,9 @@ A96BE6912E10846B00C0FEE9 /* iTerm2SolarizedLight.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = iTerm2SolarizedLight.plist; sourceTree = ""; }; A96BE6922E10846B00C0FEE9 /* tomorrowNight.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = tomorrowNight.plist; sourceTree = ""; }; A96BE6932E10846B00C0FEE9 /* ubuntu.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = ubuntu.plist; sourceTree = ""; }; - A96BE6942E10846B00C0FEE9 /* xcodedark.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = xcodedark.plist; sourceTree = ""; }; - A96BE6952E10846B00C0FEE9 /* xcodedarkhc.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = xcodedarkhc.plist; sourceTree = ""; }; - A96BE6962E10846B00C0FEE9 /* xcodewwdc.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = xcodewwdc.plist; sourceTree = ""; }; + A96BE6942E10846B00C0FEE9 /* xcodeDark.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = xcodeDark.plist; sourceTree = ""; }; + A96BE6952E10846B00C0FEE9 /* xcodeDarkHC.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = xcodeDarkHC.plist; sourceTree = ""; }; + A96BE6962E10846B00C0FEE9 /* xcodeWWDC.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = xcodeWWDC.plist; sourceTree = ""; }; A96BE6A32E113D9400C0FEE9 /* ThemeCodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeCodable.swift; sourceTree = ""; }; A96BE6A52E113DB000C0FEE9 /* ColorCodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorCodable.swift; sourceTree = ""; }; A96C6A892E0C0B1100F377FE /* SSHState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSHState.swift; sourceTree = ""; }; @@ -275,9 +275,9 @@ isa = PBXGroup; children = ( A92DDDE12E104CB300A87DB2 /* defaultTheme.plist */, - A96BE6942E10846B00C0FEE9 /* xcodedark.plist */, - A96BE6952E10846B00C0FEE9 /* xcodedarkhc.plist */, - A96BE6962E10846B00C0FEE9 /* xcodewwdc.plist */, + A96BE6942E10846B00C0FEE9 /* xcodeDark.plist */, + A96BE6952E10846B00C0FEE9 /* xcodeDarkHC.plist */, + A96BE6962E10846B00C0FEE9 /* xcodeWWDC.plist */, A96BE6922E10846B00C0FEE9 /* tomorrowNight.plist */, A96BE68B2E10846B00C0FEE9 /* 0x96f.plist */, A96BE6902E10846B00C0FEE9 /* iTerm2SolarizedDark.plist */, @@ -510,15 +510,15 @@ A96BE6972E10846B00C0FEE9 /* catppuccinMocha.plist in Resources */, A96BE6982E10846B00C0FEE9 /* ubuntu.plist in Resources */, A96BE6992E10846B00C0FEE9 /* iTerm2SolarizedDark.plist in Resources */, - A96BE69A2E10846B00C0FEE9 /* xcodedark.plist in Resources */, + A96BE69A2E10846B00C0FEE9 /* xcodeDark.plist in Resources */, A96BE69B2E10846B00C0FEE9 /* iTerm2SolarizedLight.plist in Resources */, A96BE69C2E10846B00C0FEE9 /* 0x96f.plist in Resources */, A96BE69D2E10846B00C0FEE9 /* gruvboxDark.plist in Resources */, - A96BE69E2E10846B00C0FEE9 /* xcodedarkhc.plist in Resources */, + A96BE69E2E10846B00C0FEE9 /* xcodeDarkHC.plist in Resources */, A96BE69F2E10846B00C0FEE9 /* tomorrowNight.plist in Resources */, A96BE6A02E10846B00C0FEE9 /* dracula.plist in Resources */, A96BE6A12E10846B00C0FEE9 /* catppuccinFrappe.plist in Resources */, - A96BE6A22E10846B00C0FEE9 /* xcodewwdc.plist in Resources */, + A96BE6A22E10846B00C0FEE9 /* xcodeWWDC.plist in Resources */, A95FAA472DF3884B00DE2F5A /* Config.xcconfig in Resources */, A92538CA2DEE0742007E0A18 /* Assets.xcassets in Resources */, A92DDDE22E104CB300A87DB2 /* defaultTheme.plist in Resources */, diff --git a/ShhShell/Host/HostsManager.swift b/ShhShell/Host/HostsManager.swift index 797a13f..2710cb9 100644 --- a/ShhShell/Host/HostsManager.swift +++ b/ShhShell/Host/HostsManager.swift @@ -10,7 +10,7 @@ import LocalAuthentication import SwiftUI class HostsManager: ObservableObject, @unchecked Sendable { - private let userDefaults = UserDefaults.standard + private let userDefaults = NSUbiquitousKeyValueStore.default @Published var hosts: [Host] = [] @Published var themes: [Theme] = [] diff --git a/ShhShell/Themes/Theme.swift b/ShhShell/Themes/Theme.swift index 9111be1..acb089f 100644 --- a/ShhShell/Themes/Theme.swift +++ b/ShhShell/Themes/Theme.swift @@ -66,10 +66,7 @@ struct Theme: Hashable, Equatable, Identifiable { static func decodeLocalTheme(fileName: String) -> Theme? { guard let path = Bundle.main.url(forResource: fileName, withExtension: "plist") else { return nil } - let themeName = path.lastPathComponent.replacingOccurrences(of: ".plist", with: "") - guard let fileContents = try? Data(contentsOf: path) else { return nil } - return Theme.decodeTheme(data: fileContents) } @@ -95,9 +92,9 @@ struct Theme: Hashable, Equatable, Identifiable { enum ThemesBuiltin: String, CaseIterable, Hashable, Equatable { case defaultTheme = "defaultTheme" - case xcodedark = "xcodedark" - case xcodedarkhc = "xcodedarkhc" - case xcodewwdc = "xcodewwdc" + case xcodeDark = "xcodeDark" + case xcodeDarkHC = "xcodeDarkHC" + case xcodeWWDC = "xcodeWWDC" case tomorrowNight = "tomorrowNight" case zeroXNineSixF = "0x96f" case iTerm2SolarizedDark = "iTerm2SolarizedDark" diff --git a/ShhShell/Themes/ThemeCodable.swift b/ShhShell/Themes/ThemeCodable.swift index 7e61065..01dead3 100644 --- a/ShhShell/Themes/ThemeCodable.swift +++ b/ShhShell/Themes/ThemeCodable.swift @@ -74,7 +74,7 @@ extension ThemeCodable { extension ThemeCodable { func toTheme() -> Theme { return Theme( - id: id ?? UUID().uuidString, + id: self.id ?? UUID().uuidString, name: self.name ?? "", ansi: self.ansi, foreground: self.foreground.stColor,