Add support for full-screen rendering

This commit is contained in:
David Dworken
2024-10-19 09:47:08 -07:00
parent 5996b832a3
commit 393428cf9a
9 changed files with 246 additions and 11 deletions

View File

@ -262,6 +262,19 @@ var setLogLevelCmd = &cobra.Command{
},
}
var setFullScreenCmd = &cobra.Command{
Use: "full-screen",
Short: "Configure whether or not hishtory is configured to run in full-screen mode",
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
ValidArgs: []string{"true", "false"},
Run: func(cmd *cobra.Command, args []string) {
ctx := hctx.MakeContext()
config := hctx.GetConf(ctx)
config.FullScreenRendering = args[0] == "true"
lib.CheckFatalError(hctx.SetConfig(config))
},
}
func init() {
rootCmd.AddCommand(configSetCmd)
configSetCmd.AddCommand(setEnableControlRCmd)
@ -277,6 +290,7 @@ func init() {
configSetCmd.AddCommand(setAiCompletionEndpoint)
configSetCmd.AddCommand(compactMode)
configSetCmd.AddCommand(setLogLevelCmd)
configSetCmd.AddCommand(setFullScreenCmd)
setColorSchemeCmd.AddCommand(setColorSchemeSelectedText)
setColorSchemeCmd.AddCommand(setColorSchemeSelectedBackground)
setColorSchemeCmd.AddCommand(setColorSchemeBorderColor)