mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 05:19:13 +00:00
hardcoded a wip jellycursor
This commit is contained in:
@@ -81,6 +81,7 @@
|
|||||||
A98554632E0587DF009051BD /* HostsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98554622E0587DF009051BD /* HostsView.swift */; };
|
A98554632E0587DF009051BD /* HostsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98554622E0587DF009051BD /* HostsView.swift */; };
|
||||||
A98CAB442E4229F7005E4C42 /* HostSymbolPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98CAB432E4229F7005E4C42 /* HostSymbolPicker.swift */; };
|
A98CAB442E4229F7005E4C42 /* HostSymbolPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98CAB432E4229F7005E4C42 /* HostSymbolPicker.swift */; };
|
||||||
A9921DE12E5F5710009F72A8 /* WelcomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9921DE02E5F5710009F72A8 /* WelcomeView.swift */; };
|
A9921DE12E5F5710009F72A8 /* WelcomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9921DE02E5F5710009F72A8 /* WelcomeView.swift */; };
|
||||||
|
A9921FFF2E61D537009F72A8 /* libssh2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9921FFE2E61D537009F72A8 /* libssh2.xcframework */; };
|
||||||
A994D64A2E5C94E200672395 /* ShaderTestingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A994D6492E5C94E200672395 /* ShaderTestingView.swift */; };
|
A994D64A2E5C94E200672395 /* ShaderTestingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A994D6492E5C94E200672395 /* ShaderTestingView.swift */; };
|
||||||
A9A2F4F62E3001D300D0AE9B /* AddSnippetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A2F4F52E3001D300D0AE9B /* AddSnippetView.swift */; };
|
A9A2F4F62E3001D300D0AE9B /* AddSnippetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A2F4F52E3001D300D0AE9B /* AddSnippetView.swift */; };
|
||||||
A9B1E5852E5F8E86009309E5 /* WelcomeChunk.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B1E5842E5F8E86009309E5 /* WelcomeChunk.swift */; };
|
A9B1E5852E5F8E86009309E5 /* WelcomeChunk.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B1E5842E5F8E86009309E5 /* WelcomeChunk.swift */; };
|
||||||
@@ -224,6 +225,7 @@
|
|||||||
A98554622E0587DF009051BD /* HostsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HostsView.swift; sourceTree = "<group>"; };
|
A98554622E0587DF009051BD /* HostsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HostsView.swift; sourceTree = "<group>"; };
|
||||||
A98CAB432E4229F7005E4C42 /* HostSymbolPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HostSymbolPicker.swift; sourceTree = "<group>"; };
|
A98CAB432E4229F7005E4C42 /* HostSymbolPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HostSymbolPicker.swift; sourceTree = "<group>"; };
|
||||||
A9921DE02E5F5710009F72A8 /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = "<group>"; };
|
A9921DE02E5F5710009F72A8 /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = "<group>"; };
|
||||||
|
A9921FFE2E61D537009F72A8 /* libssh2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libssh2.xcframework; path = ../blink/xcfs/.build/artifacts/xcfs/libssh2/libssh2.xcframework; sourceTree = SOURCE_ROOT; };
|
||||||
A994D6492E5C94E200672395 /* ShaderTestingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShaderTestingView.swift; sourceTree = "<group>"; };
|
A994D6492E5C94E200672395 /* ShaderTestingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShaderTestingView.swift; sourceTree = "<group>"; };
|
||||||
A9A2F4F52E3001D300D0AE9B /* AddSnippetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddSnippetView.swift; sourceTree = "<group>"; };
|
A9A2F4F52E3001D300D0AE9B /* AddSnippetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddSnippetView.swift; sourceTree = "<group>"; };
|
||||||
A9B1E5842E5F8E86009309E5 /* WelcomeChunk.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeChunk.swift; sourceTree = "<group>"; };
|
A9B1E5842E5F8E86009309E5 /* WelcomeChunk.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeChunk.swift; sourceTree = "<group>"; };
|
||||||
@@ -261,6 +263,7 @@
|
|||||||
A95FAA542DF4B62900DE2F5A /* LibSSH.xcframework in Frameworks */,
|
A95FAA542DF4B62900DE2F5A /* LibSSH.xcframework in Frameworks */,
|
||||||
A9E78F422E58BD770079F3CC /* SwiftTerm in Frameworks */,
|
A9E78F422E58BD770079F3CC /* SwiftTerm in Frameworks */,
|
||||||
A93143BE2DF4D0B300FCD5DB /* libpthread.tbd in Frameworks */,
|
A93143BE2DF4D0B300FCD5DB /* libpthread.tbd in Frameworks */,
|
||||||
|
A9921FFF2E61D537009F72A8 /* libssh2.xcframework in Frameworks */,
|
||||||
A9083E402DF2226F0042906E /* libz.tbd in Frameworks */,
|
A9083E402DF2226F0042906E /* libz.tbd in Frameworks */,
|
||||||
A95FAA562DF4B62A00DE2F5A /* openssl.xcframework in Frameworks */,
|
A95FAA562DF4B62A00DE2F5A /* openssl.xcframework in Frameworks */,
|
||||||
);
|
);
|
||||||
@@ -630,6 +633,7 @@
|
|||||||
A9083E3F2DF2225A0042906E /* libz.tbd */,
|
A9083E3F2DF2225A0042906E /* libz.tbd */,
|
||||||
A95FAA502DF4B62100DE2F5A /* LibSSH.xcframework */,
|
A95FAA502DF4B62100DE2F5A /* LibSSH.xcframework */,
|
||||||
A95FAA512DF4B62100DE2F5A /* openssl.xcframework */,
|
A95FAA512DF4B62100DE2F5A /* openssl.xcframework */,
|
||||||
|
A9921FFE2E61D537009F72A8 /* libssh2.xcframework */,
|
||||||
);
|
);
|
||||||
name = Frameworks;
|
name = Frameworks;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import LibSSH
|
import LibSSH
|
||||||
|
import libssh2
|
||||||
import OSLog
|
import OSLog
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import SwiftTerm
|
import SwiftTerm
|
||||||
|
|||||||
@@ -52,9 +52,18 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func showCursor(source: Terminal) {
|
||||||
|
super.showCursor(source: source)
|
||||||
|
print("showcursor called")
|
||||||
|
}
|
||||||
|
|
||||||
|
override func hideCursor(source: Terminal) {
|
||||||
|
super.hideCursor(source: source)
|
||||||
|
print("hide cursor called")
|
||||||
|
}
|
||||||
|
|
||||||
override func cursorStyleChanged(source: Terminal, newStyle: CursorStyle) {
|
override func cursorStyleChanged(source: Terminal, newStyle: CursorStyle) {
|
||||||
super.cursorStyleChanged(source: source, newStyle: newStyle)
|
super.cursorStyleChanged(source: source, newStyle: newStyle)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func startFeedLoop() {
|
func startFeedLoop() {
|
||||||
|
|||||||
@@ -148,10 +148,7 @@ Hostkey fingerprint is \(handler.getHostkey() ?? "nil")
|
|||||||
handler.writeToChannel(hostsManager.snippets.first(where: { $0.id == handler.host.startupSnippetID })?.content)
|
handler.writeToChannel(hostsManager.snippets.first(where: { $0.id == handler.host.startupSnippetID })?.content)
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
Label(
|
Label("Connect", systemImage: "power")
|
||||||
handler.connected ? "Disconnect" : "Connect",
|
|
||||||
systemImage: handler.connected ? "xmark.app.fill" : "power"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
.disabled(handler.hostInvalid())
|
.disabled(handler.hostInvalid())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,11 @@ import AudioToolbox
|
|||||||
struct ShellView: View {
|
struct ShellView: View {
|
||||||
@ObservedObject var handler: SSHHandler
|
@ObservedObject var handler: SSHHandler
|
||||||
@ObservedObject var hostsManager: HostsManager
|
@ObservedObject var hostsManager: HostsManager
|
||||||
|
|
||||||
@ObservedObject var container = TerminalViewContainer.shared
|
@ObservedObject var container = TerminalViewContainer.shared
|
||||||
|
|
||||||
|
@State var jellyLoc: (x: Int, y: Int) = (0, 0)
|
||||||
|
@State var jellyShow: Bool = true
|
||||||
|
|
||||||
@Environment(\.dismiss) var dismiss
|
@Environment(\.dismiss) var dismiss
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
@@ -22,10 +24,31 @@ struct ShellView: View {
|
|||||||
hostsManager.selectedTheme.background.suiColor
|
hostsManager.selectedTheme.background.suiColor
|
||||||
.ignoresSafeArea(.all)
|
.ignoresSafeArea(.all)
|
||||||
|
|
||||||
ZStack {
|
ZStack(alignment: .topLeading) {
|
||||||
TerminalController(handler: handler, hostsManager: hostsManager)
|
TerminalController(handler: handler, hostsManager: hostsManager)
|
||||||
// .colorMultiply(Color(red: 0.95, green: 1, blue: 0.95, opacity: 1))
|
|
||||||
.brightness(hostsManager.settings.filter == .crt ? 0.2 : 0.0)
|
.brightness(hostsManager.settings.filter == .crt ? 0.2 : 0.0)
|
||||||
|
.onAppear {
|
||||||
|
let timer = Timer(timeInterval: 0.1, repeats: true) { timer in
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
let terminalView = container.sessions[handler.sessionID ?? UUID()]?.terminalView
|
||||||
|
terminalView?.getTerminal().hideCursor()
|
||||||
|
jellyLoc = terminalView?.getTerminal().getCursorLocation() ?? (0,0)
|
||||||
|
jellyShow = terminalView?.getTerminal().buffer.isCursorInViewPort ?? true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RunLoop.main.add(timer, forMode: .common)
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle()
|
||||||
|
.frame(width: 4.3, height: 12)
|
||||||
|
.offset(
|
||||||
|
x: CGFloat(jellyLoc.x)*4.3,
|
||||||
|
y: CGFloat(jellyLoc.y)*8.66
|
||||||
|
)
|
||||||
|
.opacity(jellyShow ? 1 : 0)
|
||||||
|
.animation(.spring, value: jellyLoc.x)
|
||||||
|
.animation(.spring, value: jellyLoc.y)
|
||||||
|
|
||||||
if hostsManager.settings.filter == .crt {
|
if hostsManager.settings.filter == .crt {
|
||||||
CRTView()
|
CRTView()
|
||||||
.opacity(0.75)
|
.opacity(0.75)
|
||||||
|
|||||||
Reference in New Issue
Block a user