diff --git a/ShhShell Blueprint.pxd b/ShhShell Blueprint.pxd new file mode 100644 index 0000000..0a25506 Binary files /dev/null and b/ShhShell Blueprint.pxd differ diff --git a/ShhShell/Views/Settings/SettingsView.swift b/ShhShell/Views/Settings/SettingsView.swift index 8e24c7e..cd68585 100644 --- a/ShhShell/Views/Settings/SettingsView.swift +++ b/ShhShell/Views/Settings/SettingsView.swift @@ -56,15 +56,26 @@ struct SettingsView: View { Section("App Icon") { HStack { ForEach(AppIcon.allCases, id: \.self) { icon in - VStack(alignment: .center) { - icon.image - .resizable().scaledToFit() - .frame(maxWidth: 50) - .clipShape(RoundedRectangle(cornerRadius: 11)) - Text("\(icon)").tag(icon) + let isSelected = hostsManager.settings.appIcon == icon + ZStack { + RoundedRectangle(cornerRadius: 21.5) + .foregroundStyle(.gray.opacity(0.5)) + .opacity(isSelected ? 1 : 0) + VStack(alignment: .center) { + icon.image + .resizable().scaledToFit() + .frame(maxWidth: 85) + .clipShape(RoundedRectangle(cornerRadius: 16.5)) + .padding(5) + Spacer(minLength: 10) + Text("\(icon)").tag(icon) + .font(.caption) + .padding(5) + } } + .frame(maxWidth: 85) .onTapGesture { - hostsManager.settings.appIcon = icon + withAnimation { hostsManager.settings.appIcon = icon } } } } diff --git a/ShhShell/Views/Terminal/SSHTerminalDelegate.swift b/ShhShell/Views/Terminal/SSHTerminalDelegate.swift index 26e4786..d05aab7 100644 --- a/ShhShell/Views/Terminal/SSHTerminalDelegate.swift +++ b/ShhShell/Views/Terminal/SSHTerminalDelegate.swift @@ -79,9 +79,20 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina // TODO: selectedtext and cursor colors } + func applyScrollbackLength() { + guard let scrollback = hostsManager?.settings.scrollback else { + print("hey!") + print("scrollback not found, setting to 1,000") + getTerminal().options.scrollback = 1_000 + return + } + getTerminal().options.scrollback = Int(scrollback) + print("set scrollback to \(Int(scrollback))") + } + public override init(frame: CGRect) { super.init(frame: frame) - getTerminal().options.scrollback = 10_0000 + applyScrollbackLength() terminalDelegate = self }