diff --git a/ShhShell.xcodeproj/project.pbxproj b/ShhShell.xcodeproj/project.pbxproj index d180d69..09052d8 100644 --- a/ShhShell.xcodeproj/project.pbxproj +++ b/ShhShell.xcodeproj/project.pbxproj @@ -43,6 +43,7 @@ A9485C762E1AF59F00209824 /* FontManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9485C752E1AF59F00209824 /* FontManagerView.swift */; }; A9485C782E1BFA5000209824 /* ThemeEditorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9485C772E1BFA5000209824 /* ThemeEditorView.swift */; }; A94B832F2E5B929C00EBA09C /* Backgrounder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A94B832E2E5B929C00EBA09C /* Backgrounder.swift */; }; + A94B83312E5C79EE00EBA09C /* CRT.metal in Sources */ = {isa = PBXBuildFile; fileRef = A94B83302E5C79EE00EBA09C /* CRT.metal */; }; A95FAA472DF3884B00DE2F5A /* Config.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = A95FAA462DF3884B00DE2F5A /* Config.xcconfig */; }; A95FAA542DF4B62900DE2F5A /* LibSSH.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A95FAA502DF4B62100DE2F5A /* LibSSH.xcframework */; }; A95FAA552DF4B62900DE2F5A /* LibSSH.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A95FAA502DF4B62100DE2F5A /* LibSSH.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -78,6 +79,7 @@ A98554612E058433009051BD /* HostsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98554602E058433009051BD /* HostsManager.swift */; }; A98554632E0587DF009051BD /* HostsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98554622E0587DF009051BD /* HostsView.swift */; }; A98CAB442E4229F7005E4C42 /* HostSymbolPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98CAB432E4229F7005E4C42 /* HostSymbolPicker.swift */; }; + A994D64A2E5C94E200672395 /* ShaderTestingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A994D6492E5C94E200672395 /* ShaderTestingView.swift */; }; A9A2F4F62E3001D300D0AE9B /* AddSnippetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A2F4F52E3001D300D0AE9B /* AddSnippetView.swift */; }; A9BA1D192E1D9AE1005BDCEF /* SwiftTerm.Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9BA1D182E1D9AE1005BDCEF /* SwiftTerm.Color.swift */; }; A9BA1D1E2E1EAD51005BDCEF /* SF-Mono-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = A9BA1D1C2E1EAD51005BDCEF /* SF-Mono-Bold.otf */; }; @@ -180,6 +182,7 @@ A9485C752E1AF59F00209824 /* FontManagerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontManagerView.swift; sourceTree = ""; }; A9485C772E1BFA5000209824 /* ThemeEditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeEditorView.swift; sourceTree = ""; }; A94B832E2E5B929C00EBA09C /* Backgrounder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Backgrounder.swift; sourceTree = ""; }; + A94B83302E5C79EE00EBA09C /* CRT.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = CRT.metal; sourceTree = ""; }; A95FAA462DF3884B00DE2F5A /* Config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = SOURCE_ROOT; }; A95FAA502DF4B62100DE2F5A /* LibSSH.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = LibSSH.xcframework; path = Frameworks/LibSSH.xcframework; sourceTree = ""; }; A95FAA512DF4B62100DE2F5A /* openssl.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = openssl.xcframework; path = Frameworks/openssl.xcframework; sourceTree = ""; }; @@ -216,6 +219,7 @@ A98554602E058433009051BD /* HostsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HostsManager.swift; sourceTree = ""; }; A98554622E0587DF009051BD /* HostsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HostsView.swift; sourceTree = ""; }; A98CAB432E4229F7005E4C42 /* HostSymbolPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HostSymbolPicker.swift; sourceTree = ""; }; + A994D6492E5C94E200672395 /* ShaderTestingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShaderTestingView.swift; sourceTree = ""; }; A9A2F4F52E3001D300D0AE9B /* AddSnippetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddSnippetView.swift; sourceTree = ""; }; A9BA1D182E1D9AE1005BDCEF /* SwiftTerm.Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftTerm.Color.swift; sourceTree = ""; }; A9BA1D1C2E1EAD51005BDCEF /* SF-Mono-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Mono-Bold.otf"; sourceTree = ""; }; @@ -586,6 +590,8 @@ A923172C2E07138000ECE1E6 /* SSHTerminalDelegate.swift */, A96BE6A92E116EC000C0FEE9 /* TerminalViewContainer.swift */, A92317292E07113100ECE1E6 /* TerminalController.swift */, + A94B83302E5C79EE00EBA09C /* CRT.metal */, + A994D6492E5C94E200672395 /* ShaderTestingView.swift */, ); path = Terminal; sourceTree = ""; @@ -838,6 +844,7 @@ A9CC786B2E4E681400FAEE58 /* RecentsView.swift in Sources */, A9CC786D2E4F534600FAEE58 /* History.swift in Sources */, A90B38342E3EA046002B56FC /* Bundle.swift in Sources */, + A994D64A2E5C94E200672395 /* ShaderTestingView.swift in Sources */, A9FD376B2E16DABF005319A8 /* AnsiPickerView.swift in Sources */, A9C060ED2E3FBCD000CA9374 /* SnippetPicker.swift in Sources */, A91D27C72E54B97E00620B29 /* SettingsView.swift in Sources */, @@ -856,6 +863,7 @@ A96C90A12E12B87A00724253 /* TextBox.swift in Sources */, A98CAB442E4229F7005E4C42 /* HostSymbolPicker.swift in Sources */, A9FD37652E169937005319A8 /* AuthType.swift in Sources */, + A94B83312E5C79EE00EBA09C /* CRT.metal in Sources */, A96BE6A82E116E2B00C0FEE9 /* SessionsListView.swift in Sources */, A96C90A32E12D53B00724253 /* KeyType.swift in Sources */, A98554612E058433009051BD /* HostsManager.swift in Sources */, @@ -1065,7 +1073,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 16; + IPHONEOS_DEPLOYMENT_TARGET = 17; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1109,7 +1117,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 16; + IPHONEOS_DEPLOYMENT_TARGET = 17; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ShhShell/Terminal/CRT.metal b/ShhShell/Terminal/CRT.metal new file mode 100644 index 0000000..e34bc89 --- /dev/null +++ b/ShhShell/Terminal/CRT.metal @@ -0,0 +1,22 @@ +// +// CRT.metal +// ShhShell +// +// Created by neon443 on 25/08/2025. +// + +#include +using namespace metal; + +//learning shaders stuff here +[[ stitchable ]] half4 opacityInvert(float2 position, half4 color) { + return half4(1, 0, 0, color.a); +} + +[[ stitchable ]] half4 redify(float2 pos, half4 color) { + return half4(1, 0, 0, 0.1); +} + +[[ stitchable ]] half4 passthrough(float2 position, half4 color) { + return color; +} diff --git a/ShhShell/Terminal/ShaderTestingView.swift b/ShhShell/Terminal/ShaderTestingView.swift new file mode 100644 index 0000000..b205c8c --- /dev/null +++ b/ShhShell/Terminal/ShaderTestingView.swift @@ -0,0 +1,21 @@ +// +// ShaderTestingView.swift +// ShhShell +// +// Created by neon443 on 25/08/2025. +// + +import SwiftUI + +struct ShaderTestingView: View { + var body: some View { + Image(systemName: "figure.walk.circle") + .font(.system(size: 300)) + .foregroundStyle(.blue) + .colorEffect(ShaderLibrary.redify()) + } +} + +#Preview { + ShaderTestingView() +} diff --git a/ShhShell/Views/Settings/SettingsView.swift b/ShhShell/Views/Settings/SettingsView.swift index e0eb0c8..07a19e2 100644 --- a/ShhShell/Views/Settings/SettingsView.swift +++ b/ShhShell/Views/Settings/SettingsView.swift @@ -39,6 +39,11 @@ struct SettingsView: View { .ignoresSafeArea(.all) List { Section("Terminal") { + Image(systemName: "figure.walk.circle") + .font(.system(size: 300)) + .foregroundStyle(.blue) + .colorEffect(ShaderLibrary.redify()) + VStack(alignment: .leading) { HStack { Label("Scrollback", systemImage: "scroll")