Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MinUnsignedInteger minimum unsigned integer MinUnsignedInteger uint = 0 // MaxUnsignedInteger maximum unsigned integer MaxUnsignedInteger = ^MinUnsignedInteger // MaxInteger maximum integer MaxInteger = int(MaxUnsignedInteger >> 1) )
Variables ¶
View Source
var ( DefaultConfigPath = []string{".config", "powerline-go"} ConfigFileName = "config.json" )
View Source
var DefaultThemes = map[string]Theme{ "default": { Reset: 0xFF, DefaultFg: 250, DefaultBg: 240, UsernameFg: 250, UsernameBg: 240, UsernameRootBg: 124, HostnameFg: 250, HostnameBg: 238, HomeSpecialDisplay: true, HomeFg: 15, HomeBg: 31, AliasFg: 15, AliasBg: 31, PathFg: 250, PathBg: 237, CwdFg: 254, SeparatorFg: 244, ReadonlyFg: 254, ReadonlyBg: 124, SSHFg: 254, SSHBg: 166, DockerMachineFg: 177, DockerMachineBg: 55, KubeClusterFg: 117, KubeClusterBg: 26, KubeNamespaceFg: 170, KubeNamespaceBg: 17, WSLMachineFg: 250, WSLMachineBg: 238, DotEnvFg: 15, DotEnvBg: 55, AWSFg: 15, AWSBg: 172, RepoCleanFg: 0, RepoCleanBg: 148, RepoDirtyFg: 15, RepoDirtyBg: 161, JobsFg: 39, JobsBg: 238, CmdPassedFg: 15, CmdPassedBg: 236, CmdFailedFg: 15, CmdFailedBg: 161, SvnChangesFg: 22, SvnChangesBg: 148, GCPFg: 117, GCPBg: 26, GitAheadFg: 250, GitAheadBg: 240, GitBehindFg: 250, GitBehindBg: 240, GitStagedFg: 15, GitStagedBg: 22, GitNotStagedFg: 15, GitNotStagedBg: 130, GitUntrackedFg: 15, GitUntrackedBg: 52, GitConflictedFg: 15, GitConflictedBg: 9, GitStashedFg: 15, GitStashedBg: 20, GoenvBg: 38, GoenvFg: 220, VirtualEnvFg: 0o0, VirtualEnvBg: 35, VirtualGoFg: 220, VirtualGoBg: 38, PerlbrewFg: 0o0, PerlbrewBg: 20, PlEnvFg: 0o0, PlEnvBg: 32, TFWsFg: 15, TFWsBg: 26, TimeFg: 15, TimeBg: 236, ShellVarFg: 52, ShellVarBg: 11, ShEnvFg: 15, ShEnvBg: 130, NodeFg: 15, NodeBg: 40, NodeVersionFg: 40, NodeVersionBg: 15, RvmFg: 255, RvmBg: 160, LoadFg: 15, LoadBg: 22, LoadHighBg: 161, LoadAvgValue: 5, LoadThresholdBad: 1.0, NixShellFg: 15, NixShellBg: 69, DurationFg: 250, DurationBg: 237, HostnameColorizedFg: []uint8{ 250, 250, 120, 228, 250, 250, 123, 238, 0, 0, 0, 0, 250, 0, 0, 242, 250, 250, 250, 189, 254, 250, 83, 87, 117, 188, 254, 0, 120, 122, 123, 159, 255, 0, 157, 158, 159, 159, 195, 0, 194, 194, 195, 195, 195, 0, 0, 0, 0, 0, 0, 0, 250, 250, 250, 189, 254, 250, 227, 253, 255, 0, 233, 17, 192, 255, 195, 232, 233, 17, 193, 232, 232, 232, 234, 236, 194, 235, 235, 235, 235, 237, 0, 237, 237, 237, 237, 237, 250, 250, 250, 189, 254, 0, 222, 255, 255, 232, 233, 17, 228, 15, 232, 233, 17, 18, 229, 232, 234, 234, 236, 54, 230, 235, 22, 237, 238, 238, 0, 237, 22, 23, 23, 23, 252, 252, 189, 189, 254, 0, 223, 232, 232, 232, 233, 17, 229, 232, 233, 234, 53, 18, 229, 232, 234, 236, 17, 19, 230, 235, 238, 22, 23, 24, 0, 237, 22, 2, 29, 6, 254, 254, 254, 254, 254, 0, 255, 233, 233, 234, 234, 235, 230, 234, 52, 235, 53, 53, 230, 235, 236, 52, 53, 55, 230, 235, 238, 58, 240, 20, 0, 238, 58, 64, 35, 66, 0, 0, 0, 0, 0, 0, 0, 235, 235, 235, 235, 53, 0, 236, 52, 237, 53, 53, 0, 236, 238, 1, 89, 5, 0, 237, 58, 95, 131, 126, 0, 238, 58, 3, 143, 242, 250, 250, 250, 250, 250, 250, 251, 252, 188, 254, 254, 255, 0, 232, 233, 234, 235, 236, 237, 238, 239, 240, 242, 243, }, ViModeCommandFg: 0, ViModeCommandBg: 250, ViModeInsertFg: 22, ViModeInsertBg: 70, }, "low-contrast": { Reset: 0xFF, DefaultFg: 234, DefaultBg: 250, UsernameFg: 234, UsernameBg: 250, UsernameRootBg: 198, HostnameFg: 234, HostnameBg: 252, HomeSpecialDisplay: true, HomeFg: 30, HomeBg: 15, AliasFg: 30, AliasBg: 15, PathFg: 234, PathBg: 254, CwdFg: 236, SeparatorFg: 244, ReadonlyFg: 124, ReadonlyBg: 253, SSHFg: 166, SSHBg: 254, DockerMachineFg: 55, DockerMachineBg: 177, KubeClusterFg: 117, KubeClusterBg: 26, KubeNamespaceFg: 170, KubeNamespaceBg: 17, DotEnvFg: 15, DotEnvBg: 55, RepoCleanFg: 232, RepoCleanBg: 230, RepoDirtyFg: 232, RepoDirtyBg: 223, JobsFg: 238, JobsBg: 39, CmdPassedFg: 18, CmdPassedBg: 7, CmdFailedFg: 254, CmdFailedBg: 124, SvnChangesFg: 148, SvnChangesBg: 22, GitAheadFg: 240, GitAheadBg: 250, GitBehindFg: 240, GitBehindBg: 251, GitStagedFg: 22, GitStagedBg: 15, GitNotStagedFg: 130, GitNotStagedBg: 15, GitUntrackedFg: 52, GitUntrackedBg: 15, GitConflictedFg: 9, GitConflictedBg: 15, GitStashedFg: 15, GitStashedBg: 20, GoenvBg: 38, GoenvFg: 220, VirtualEnvFg: 35, VirtualEnvBg: 254, VirtualGoFg: 220, VirtualGoBg: 38, PerlbrewFg: 20, PerlbrewBg: 15, PlEnvFg: 20, PlEnvBg: 15, TimeFg: 236, TimeBg: 15, ShEnvFg: 130, ShEnvBg: 15, LoadFg: 15, LoadBg: 22, LoadHighBg: 161, LoadAvgValue: 5, LoadThresholdBad: 1.0, RvmFg: 255, RvmBg: 160, NixShellFg: 69, NixShellBg: 254, HostnameColorizedFg: []uint8{ 250, 250, 120, 228, 250, 250, 123, 238, 0, 0, 0, 0, 250, 0, 0, 242, 250, 250, 250, 189, 254, 250, 83, 87, 117, 188, 254, 0, 120, 122, 123, 159, 255, 0, 157, 158, 159, 159, 195, 0, 194, 194, 195, 195, 195, 0, 0, 0, 0, 0, 0, 0, 250, 250, 250, 189, 254, 250, 227, 253, 255, 0, 233, 17, 192, 255, 195, 232, 233, 17, 193, 232, 232, 232, 234, 236, 194, 235, 235, 235, 235, 237, 0, 237, 237, 237, 237, 237, 250, 250, 250, 189, 254, 0, 222, 255, 255, 232, 233, 17, 228, 15, 232, 233, 17, 18, 229, 232, 234, 234, 236, 54, 230, 235, 22, 237, 238, 238, 0, 237, 22, 23, 23, 23, 252, 252, 189, 189, 254, 0, 223, 232, 232, 232, 233, 17, 229, 232, 233, 234, 53, 18, 229, 232, 234, 236, 17, 19, 230, 235, 238, 22, 23, 24, 0, 237, 22, 2, 29, 6, 254, 254, 254, 254, 254, 0, 255, 233, 233, 234, 234, 235, 230, 234, 52, 235, 53, 53, 230, 235, 236, 52, 53, 55, 230, 235, 238, 58, 240, 20, 0, 238, 58, 64, 35, 66, 0, 0, 0, 0, 0, 0, 0, 235, 235, 235, 235, 53, 0, 236, 52, 237, 53, 53, 0, 236, 238, 1, 89, 5, 0, 237, 58, 95, 131, 126, 0, 238, 58, 3, 143, 242, 250, 250, 250, 250, 250, 250, 251, 252, 188, 254, 254, 255, 0, 232, 233, 234, 235, 236, 237, 238, 239, 240, 242, 243, }, ViModeCommandFg: 0, ViModeCommandBg: 250, ViModeInsertFg: 22, ViModeInsertBg: 70, }, "solarized-dark16": { Reset: 8, DefaultFg: 15, DefaultBg: 4, UsernameFg: 15, UsernameBg: 4, UsernameRootBg: 1, HostnameFg: 15, HostnameBg: 0, HomeSpecialDisplay: false, HomeFg: 15, HomeBg: 4, PathFg: 15, PathBg: 10, CwdFg: 15, SeparatorFg: 15, ReadonlyFg: 8, ReadonlyBg: 1, SSHFg: 8, SSHBg: 9, DockerMachineFg: 13, DockerMachineBg: 55, DotEnvFg: 15, DotEnvBg: 55, RepoCleanFg: 15, RepoCleanBg: 3, RepoDirtyFg: 15, RepoDirtyBg: 5, JobsFg: 4, JobsBg: 0, CmdPassedFg: 15, CmdPassedBg: 0, CmdFailedFg: 15, CmdFailedBg: 5, SvnChangesFg: 2, SvnChangesBg: 3, GitAheadFg: 14, GitAheadBg: 10, GitBehindFg: 14, GitBehindBg: 10, GitStagedFg: 15, GitStagedBg: 2, GitNotStagedFg: 15, GitNotStagedBg: 9, GitUntrackedFg: 15, GitUntrackedBg: 1, GitConflictedFg: 15, GitConflictedBg: 1, GitStashedFg: 15, GitStashedBg: 4, GoenvBg: 38, GoenvFg: 220, VirtualEnvFg: 8, VirtualEnvBg: 6, PerlbrewFg: 8, PerlbrewBg: 4, PlEnvFg: 8, PlEnvBg: 4, TimeFg: 15, TimeBg: 0, ShellVarFg: 1, ShellVarBg: 11, ShEnvFg: 15, ShEnvBg: 9, NodeFg: 15, NodeBg: 40, NodeVersionFg: 40, NodeVersionBg: 15, LoadFg: 15, LoadBg: 2, LoadHighBg: 5, LoadAvgValue: 5, LoadThresholdBad: 1.0, RvmFg: 8, RvmBg: 6, NixShellFg: 0, NixShellBg: 4, HostnameColorizedFg: []uint8{ 14, 14, 120, 228, 14, 14, 123, 0, 8, 8, 8, 8, 14, 8, 8, 242, 14, 14, 14, 189, 8, 14, 83, 87, 117, 188, 8, 8, 120, 122, 123, 159, 8, 8, 157, 158, 159, 159, 195, 8, 194, 194, 195, 195, 195, 8, 8, 8, 8, 8, 8, 8, 14, 14, 14, 189, 8, 14, 227, 253, 8, 8, 233, 17, 192, 8, 195, 232, 233, 17, 193, 232, 232, 232, 8, 0, 194, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 14, 14, 14, 189, 8, 8, 222, 8, 8, 232, 233, 17, 228, 15, 232, 233, 17, 18, 229, 232, 8, 8, 0, 54, 15, 0, 2, 0, 0, 0, 8, 0, 2, 23, 23, 23, 252, 252, 189, 189, 8, 8, 223, 232, 232, 232, 233, 17, 229, 232, 233, 8, 53, 18, 229, 232, 8, 0, 17, 19, 15, 0, 0, 2, 23, 24, 8, 0, 2, 2, 29, 6, 8, 8, 8, 8, 8, 8, 8, 233, 233, 8, 8, 0, 15, 8, 1, 0, 53, 53, 15, 0, 0, 1, 53, 55, 15, 0, 0, 58, 10, 4, 8, 0, 58, 2, 35, 66, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 53, 8, 0, 1, 0, 53, 53, 8, 0, 0, 1, 89, 5, 8, 0, 58, 95, 131, 126, 8, 0, 58, 3, 143, 242, 14, 14, 14, 14, 14, 14, 251, 252, 188, 8, 8, 8, 8, 232, 233, 8, 0, 0, 0, 0, 239, 10, 242, 243, }, ViModeCommandFg: 0, ViModeCommandBg: 250, ViModeInsertFg: 22, ViModeInsertBg: 70, }, "solarized-light16": { Reset: 0, DefaultFg: 15, DefaultBg: 4, UsernameFg: 15, UsernameBg: 4, UsernameRootBg: 1, HostnameFg: 15, HostnameBg: 7, HomeSpecialDisplay: false, HomeFg: 15, HomeBg: 4, PathFg: 15, PathBg: 10, CwdFg: 15, SeparatorFg: 15, ReadonlyFg: 8, ReadonlyBg: 1, SSHFg: 8, SSHBg: 9, DockerMachineFg: 13, DockerMachineBg: 55, DotEnvFg: 15, DotEnvBg: 55, RepoCleanFg: 15, RepoCleanBg: 3, RepoDirtyFg: 15, RepoDirtyBg: 5, JobsFg: 4, JobsBg: 0, CmdPassedFg: 10, CmdPassedBg: 7, CmdFailedFg: 15, CmdFailedBg: 5, SvnChangesFg: 2, SvnChangesBg: 3, GitAheadFg: 14, GitAheadBg: 10, GitBehindFg: 14, GitBehindBg: 10, GitStagedFg: 15, GitStagedBg: 2, GitNotStagedFg: 15, GitNotStagedBg: 9, GitUntrackedFg: 15, GitUntrackedBg: 1, GitConflictedFg: 15, GitConflictedBg: 1, GitStashedFg: 15, GitStashedBg: 4, GoenvBg: 38, GoenvFg: 220, VirtualEnvFg: 8, VirtualEnvBg: 6, PerlbrewFg: 8, PerlbrewBg: 4, PlEnvFg: 8, PlEnvBg: 4, TimeFg: 15, TimeBg: 0, ShellVarFg: 1, ShellVarBg: 11, ShEnvFg: 15, ShEnvBg: 9, NodeFg: 15, NodeBg: 40, NodeVersionFg: 40, NodeVersionBg: 15, LoadFg: 15, LoadBg: 2, LoadHighBg: 5, LoadAvgValue: 5, LoadThresholdBad: 1.0, RvmFg: 8, RvmBg: 6, NixShellFg: 0, NixShellBg: 7, HostnameColorizedFg: []uint8{ 14, 14, 120, 228, 14, 14, 123, 0, 8, 8, 8, 8, 14, 8, 8, 242, 14, 14, 14, 189, 8, 14, 83, 87, 117, 188, 8, 8, 120, 122, 123, 159, 8, 8, 157, 158, 159, 159, 195, 8, 194, 194, 195, 195, 195, 8, 8, 8, 8, 8, 8, 8, 14, 14, 14, 189, 8, 14, 227, 253, 8, 8, 233, 17, 192, 8, 195, 232, 233, 17, 193, 232, 232, 232, 8, 0, 194, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 14, 14, 14, 189, 8, 8, 222, 8, 8, 232, 233, 17, 228, 15, 232, 233, 17, 18, 229, 232, 8, 8, 0, 54, 15, 0, 2, 0, 0, 0, 8, 0, 2, 23, 23, 23, 252, 252, 189, 189, 8, 8, 223, 232, 232, 232, 233, 17, 229, 232, 233, 8, 53, 18, 229, 232, 8, 0, 17, 19, 15, 0, 0, 2, 23, 24, 8, 0, 2, 2, 29, 6, 8, 8, 8, 8, 8, 8, 8, 233, 233, 8, 8, 0, 15, 8, 1, 0, 53, 53, 15, 0, 0, 1, 53, 55, 15, 0, 0, 58, 10, 4, 8, 0, 58, 2, 35, 66, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 53, 8, 0, 1, 0, 53, 53, 8, 0, 0, 1, 89, 5, 8, 0, 58, 95, 131, 126, 8, 0, 58, 3, 143, 242, 14, 14, 14, 14, 14, 14, 251, 252, 188, 8, 8, 8, 8, 232, 233, 8, 0, 0, 0, 0, 239, 10, 242, 243, }, ViModeCommandFg: 0, ViModeCommandBg: 250, ViModeInsertFg: 22, ViModeInsertBg: 70, }, "gruvbox": { Reset: 0, DefaultFg: gruvbox_light0, DefaultBg: gruvbox_dark0, UsernameFg: gruvbox_bright_purple, UsernameBg: gruvbox_dark2, UsernameRootBg: gruvbox_faded_red, HostnameFg: gruvbox_bright_purple, HostnameBg: gruvbox_dark1, HomeSpecialDisplay: true, HomeFg: gruvbox_light2, HomeBg: gruvbox_neutral_blue, PathFg: gruvbox_light3, PathBg: gruvbox_dark3, CwdFg: gruvbox_light2, SeparatorFg: gruvbox_dark_gray, ReadonlyFg: gruvbox_light0, ReadonlyBg: gruvbox_bright_red, SSHFg: gruvbox_light0, SSHBg: gruvbox_faded_purple, DockerMachineFg: gruvbox_light0, DockerMachineBg: gruvbox_faded_purple, DotEnvFg: gruvbox_light0, DotEnvBg: gruvbox_faded_purple, RepoCleanFg: gruvbox_dark1, RepoCleanBg: gruvbox_faded_green, RepoDirtyFg: gruvbox_light0, RepoDirtyBg: gruvbox_faded_orange, JobsFg: gruvbox_neutral_aqua, JobsBg: gruvbox_dark1, CmdPassedFg: gruvbox_light4, CmdPassedBg: gruvbox_dark1, CmdFailedFg: gruvbox_light0, CmdFailedBg: gruvbox_neutral_red, SvnChangesFg: gruvbox_light0, SvnChangesBg: gruvbox_faded_orange, GitAheadFg: gruvbox_light3, GitAheadBg: gruvbox_dark2, GitBehindFg: gruvbox_light3, GitBehindBg: gruvbox_dark2, GitStagedFg: gruvbox_light0, GitStagedBg: gruvbox_neutral_green, GitNotStagedFg: gruvbox_light0, GitNotStagedBg: gruvbox_neutral_orange, GitUntrackedFg: gruvbox_light0, GitUntrackedBg: gruvbox_faded_red, GitConflictedFg: gruvbox_light0, GitConflictedBg: gruvbox_neutral_red, GitStashedFg: gruvbox_dark0, GitStashedBg: gruvbox_neutral_yellow, GoenvBg: gruvbox_faded_blue, GoenvFg: gruvbox_light1, VirtualEnvFg: gruvbox_light0, VirtualEnvBg: gruvbox_faded_green, PerlbrewFg: gruvbox_light0, PerlbrewBg: gruvbox_faded_green, PlEnvFg: gruvbox_light0, PlEnvBg: gruvbox_faded_green, TimeFg: gruvbox_light2, TimeBg: gruvbox_dark4, ShellVarFg: gruvbox_light0, ShellVarBg: gruvbox_faded_purple, NodeFg: gruvbox_light0, NodeBg: gruvbox_faded_green, NodeVersionFg: gruvbox_faded_green, NodeVersionBg: gruvbox_light0, RvmFg: gruvbox_light0, RvmBg: gruvbox_neutral_red, LoadFg: gruvbox_light0, LoadBg: gruvbox_faded_purple, LoadHighBg: gruvbox_neutral_red, LoadAvgValue: gruvbox_light0, LoadThresholdBad: 1.0, NixShellFg: gruvbox_light0, NixShellBg: gruvbox_faded_purple, HostnameColorizedFg: []uint8{ 14, 14, 120, 228, 14, 14, 123, 0, 8, 8, 8, 8, 14, 8, 8, 242, 14, 14, 14, 189, 8, 14, 83, 87, 117, 188, 8, 8, 120, 122, 123, 159, 8, 8, 157, 158, 159, 159, 195, 8, 194, 194, 195, 195, 195, 8, 8, 8, 8, 8, 8, 8, 14, 14, 14, 189, 8, 14, 227, 253, 8, 8, 233, 17, 192, 8, 195, 232, 233, 17, 193, 232, 232, 232, 8, 0, 194, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 14, 14, 14, 189, 8, 8, 222, 8, 8, 232, 233, 17, 228, 15, 232, 233, 17, 18, 229, 232, 8, 8, 0, 54, 15, 0, 2, 0, 0, 0, 8, 0, 2, 23, 23, 23, 252, 252, 189, 189, 8, 8, 223, 232, 232, 232, 233, 17, 229, 232, 233, 8, 53, 18, 229, 232, 8, 0, 17, 19, 15, 0, 0, 2, 23, 24, 8, 0, 2, 2, 29, 6, 8, 8, 8, 8, 8, 8, 8, 233, 233, 8, 8, 0, 15, 8, 1, 0, 53, 53, 15, 0, 0, 1, 53, 55, 15, 0, 0, 58, 10, 4, 8, 0, 58, 2, 35, 66, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 53, 8, 0, 1, 0, 53, 53, 8, 0, 0, 1, 89, 5, 8, 0, 58, 95, 131, 126, 8, 0, 58, 3, 143, 242, 14, 14, 14, 14, 14, 14, 251, 252, 188, 8, 8, 8, 8, 232, 233, 8, 0, 0, 0, 0, 239, 10, 242, 243, }, ViModeCommandFg: 0, ViModeCommandBg: 250, ViModeInsertFg: 22, ViModeInsertBg: 70, }, }
Functions ¶
func ConfigPath ¶
func ConfigPath() string
Types ¶
type Config ¶
type Config struct { logging.LoggingConfig `json:"-"` SaveConfig bool `help:"Save default config and exit" default:"false" json:"-"` CwdMode string `help:"How to display the current directory" default:"fancy" json:"cwdMode"` CwdMaxDepth int `help:"Maximum number of directories to show in path" default:"5" json:"cwdMaxDepth"` CwdMaxDirSize int `help:"Maximum number of letters displayed for each directory in the path" default:"-1" json:"cwdMaxDirSize"` ColorizeHostname bool `` /* 174-byte string literal not displayed */ HostnameOnlyIfSsh bool `help:"Show hostname only for SSH connections" default:"false" json:"hostnameOnlyIfSsh"` SshAlternateIcon bool `help:"Show the older, original icon for SSH connections" default:"false" json:"sshAlternateIcon"` EastAsianWidth bool `help:"Use East Asian Ambiguous Widths" default:"false" json:"eastAsianWidth"` Newline bool `help:"Show the prompt on a new line" default:"false" json:"newline"` StaticPromptIndicator bool `` /* 135-byte string literal not displayed */ VenvNameSizeLimit int `` /* 155-byte string literal not displayed */ Jobs int `help:"Number of jobs currently running" default:"0" json:"jobs"` GitAssumeUnchangedSize int64 `` /* 184-byte string literal not displayed */ GitDisableStats []string `` /* 168-byte string literal not displayed */ GitMode string `help:"How to display git status, (valid choices: fancy, compact, simple)" default:"fancy" json:"gitMode"` GithubToken string `help:"Github PAT (classic) that has access to notifications" default:"fancy" env:"GH_TOKEN" json:"ghToken"` Mode string `` /* 136-byte string literal not displayed */ Theme string `` /* 161-byte string literal not displayed */ Shell string `` /* 137-byte string literal not displayed */ Modules []string `` /* 318-byte string literal not displayed */ ModulesRight []string `` /* 284-byte string literal not displayed */ Priority []string `` /* 228-byte string literal not displayed */ MaxWidthPercentage int `` /* 160-byte string literal not displayed */ TruncateSegmentWidth int `` /* 171-byte string literal not displayed */ PrevError int `help:"Exit code of previously executed command" default:"0" json:"prevError"` NumericExitCodes bool `help:"Shows numeric exit codes for errors." default:"false" json:"numericExitCodes"` IgnoreRepos []string `help:"A list of git repos to ignore. Separate with ','. Repos are identified by their root directory." json:"ignoreRepos"` ShortenGkeNames bool `help:"Shortens names for GKE Kube clusters." default:"false" json:"shortenGKENames"` ShortenEksNames bool `help:"Shortens names for EKS Kube clusters." default:"false" json:"shortenEKSNames"` ShortenOpenshiftNames bool `help:"Shortens names for Openshift Kube clusters." default:"false" json:"shortenOpenshiftNames"` ShellVar string `help:"A shell variable to add to the segments." json:"shellVar"` ShellVarNoWarnEmpty bool `help:"Disables warning for empty shell variable." default:"false" json:"shellVarNoWarnEmpty"` TrimAdDomain bool `helP:"Trim the Domainname from the AD username." default:"false" json:"trimAdDomain"` Duration string `help:"The elapsed clock-time of the previous command" json:"duration"` DurationMin string `help:"The minimal time a command has to take before the duration segment is shown" default:"0" json:"durationMin"` DurationLowPrecision bool `` /* 128-byte string literal not displayed */ Eval bool `help:"Output prompt in 'eval' format." default:"false" json:"eval"` Condensed bool `help:"Remove spacing between segments" default:"false" json:"condensed"` TimeFormat string `` /* 250-byte string literal not displayed */ ViMode string `help:"The current vi-mode (eg. KEYMAP for zsh) for vi-module module" json:"viMode"` PathAliases map[string]string `` /* 317-byte string literal not displayed */ Version cli.VersionFlag `short:"V" help:"Display version."` }
type State ¶
type State struct { CwdMode string CwdMaxDepth int CwdMaxDirSize int ColorizeHostname bool HostnameOnlyIfSsh bool SshAlternateIcon bool EastAsianWidth bool PromptOnNewLine bool StaticPromptIndicator bool VenvNameSizeLimit int Jobs int GitAssumeUnchangedSize int64 GitDisableStats []string GitMode string GithubToken string Mode string Theme Theme Shell string Modules []string ModulesRight []string Priority []string MaxWidthPercentage int TruncateSegmentWidth int PrevError int NumericExitCodes bool IgnoreRepos []string ShortenGkeNames bool ShortenEksNames bool ShortenOpenshiftNames bool ShellVar string ShellVarNoWarnEmpty bool TrimAdDomain bool Duration string DurationMin string DurationLowPrecision bool Eval bool Condensed bool TimeFormat string ViMode string PathAliases map[string]string Modes map[string]SymbolTemplate `json:"-"` Shells map[string]shellinfo.ShellInfo `json:"-"` Userinfo *user.User `json:"-"` Hostname string `json:"-"` Cwd string `json:"-"` ThemeName string `json:"-"` }
func NewStateFromConfig ¶
func (*State) CurrentShell ¶
func (*State) Symbols ¶
func (cfg *State) Symbols() SymbolTemplate
type SymbolTemplate ¶
type SymbolTemplate struct { Lock string Network string NetworkAlternate string Separator string SeparatorThin string SeparatorReverse string SeparatorReverseThin string RepoDetached string RepoBranch string RepoAhead string RepoBehind string RepoStaged string RepoNotStaged string RepoUntracked string RepoConflicted string RepoStashed string VenvIndicator string NodeIndicator string RvmIndicator string }
Symbols of the theme
func (*SymbolTemplate) UnmarshalJSON ¶
func (mode *SymbolTemplate) UnmarshalJSON(data []byte) error
type Theme ¶
type Theme struct { BoldForeground bool Reset uint8 DefaultFg uint8 DefaultBg uint8 UsernameFg uint8 UsernameBg uint8 UsernameRootBg uint8 HostnameFg uint8 HostnameBg uint8 // The foreground-background mapping is precomputed and stored in a map for improved performance // The old script used to brute-force this at runtime HostnameColorizedFg []uint8 HomeSpecialDisplay bool HomeFg uint8 HomeBg uint8 AliasFg uint8 AliasBg uint8 PathFg uint8 PathBg uint8 CwdFg uint8 SeparatorFg uint8 ReadonlyFg uint8 ReadonlyBg uint8 SSHFg uint8 SSHBg uint8 DockerMachineFg uint8 DockerMachineBg uint8 KubeClusterFg uint8 KubeClusterBg uint8 KubeNamespaceFg uint8 KubeNamespaceBg uint8 WSLMachineFg uint8 WSLMachineBg uint8 DotEnvFg uint8 DotEnvBg uint8 AWSFg uint8 AWSBg uint8 RepoCleanFg uint8 RepoCleanBg uint8 RepoDirtyFg uint8 RepoDirtyBg uint8 JobsFg uint8 JobsBg uint8 CmdPassedFg uint8 CmdPassedBg uint8 CmdFailedFg uint8 CmdFailedBg uint8 SvnChangesFg uint8 SvnChangesBg uint8 GCPFg uint8 GCPBg uint8 GitAheadFg uint8 GitAheadBg uint8 GitBehindFg uint8 GitBehindBg uint8 GitStagedFg uint8 GitStagedBg uint8 GitNotStagedFg uint8 GitNotStagedBg uint8 GitUntrackedFg uint8 GitUntrackedBg uint8 GitConflictedFg uint8 GitConflictedBg uint8 GitStashedFg uint8 GitStashedBg uint8 GoenvFg uint8 GoenvBg uint8 VirtualEnvFg uint8 VirtualEnvBg uint8 VirtualGoFg uint8 VirtualGoBg uint8 PerlbrewFg uint8 PerlbrewBg uint8 PlEnvFg uint8 PlEnvBg uint8 TFWsFg uint8 TFWsBg uint8 TimeFg uint8 TimeBg uint8 ShellVarFg uint8 ShellVarBg uint8 ShEnvFg uint8 ShEnvBg uint8 NodeFg uint8 NodeBg uint8 NodeVersionFg uint8 NodeVersionBg uint8 RvmFg uint8 RvmBg uint8 LoadFg uint8 LoadBg uint8 LoadHighBg uint8 LoadAvgValue byte LoadThresholdBad float64 NixShellFg uint8 NixShellBg uint8 DurationFg uint8 DurationBg uint8 ViModeCommandFg uint8 ViModeCommandBg uint8 ViModeInsertFg uint8 ViModeInsertBg uint8 }
Theme definitions
func ThemeFromFile ¶
Click to show internal directories.
Click to hide internal directories.