mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
add apply cursor type
make it focus the terminal when spawning fix step in the scrollback slider
This commit is contained in:
@@ -27,7 +27,7 @@ struct SettingsView: View {
|
|||||||
Slider(
|
Slider(
|
||||||
value: $hostsManager.settings.scrollback,
|
value: $hostsManager.settings.scrollback,
|
||||||
in: 100...10_000,
|
in: 100...10_000,
|
||||||
step: 1_000.0
|
step: 100
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
|
|||||||
}
|
}
|
||||||
applySelectedTheme()
|
applySelectedTheme()
|
||||||
applyScrollbackLength()
|
applyScrollbackLength()
|
||||||
|
applyCursorType()
|
||||||
startFeedLoop()
|
startFeedLoop()
|
||||||
|
self.becomeFirstResponder()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,6 +71,11 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
|
|||||||
applyTheme(hostsManager.selectedTheme)
|
applyTheme(hostsManager.selectedTheme)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func applyCursorType() {
|
||||||
|
guard let hostsManager else { return }
|
||||||
|
getTerminal().setCursorStyle(hostsManager.settings.cursorType.stCursorStyle)
|
||||||
|
}
|
||||||
|
|
||||||
func applyTheme(_ theme: Theme) {
|
func applyTheme(_ theme: Theme) {
|
||||||
getTerminal().installPalette(colors: theme.ansi)
|
getTerminal().installPalette(colors: theme.ansi)
|
||||||
getTerminal().foregroundColor = theme.foreground
|
getTerminal().foregroundColor = theme.foreground
|
||||||
|
|||||||
Reference in New Issue
Block a user