Skip to content

Add configuration to disable checking for updates at startup, including checking for theme updates #6602

Description

@WangJincheng4869

Code of Conduct

  • I agree to follow this project's Code of Conduct

What would you like to see added?

Automatically checking for updates is a great feature, but due to network issues, the startup speed can be slow, usually exceeding 5 seconds. This problem almost always occurs after restarting the computer, so I can quickly access the terminal by turning off the update detection function during startup, just like opening it for the second time.

Image

I tried using the following configuration, but still encountered slow loading issues.

{
  "upgrade": {
    "notice": false,
    "interval": "87600h",
    "auto": false,
    "source": "cdn"
  },
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "alignment": "right",
      "segments": [
        {
          "background": "#003543",
          "foreground": "#ffffff",
          "style": "plain",
          "template": " \ue641 {{ .CurrentDate | date .Format }} ",
          "type": "time"
        },
        {
          "background": "#83769c",
          "foreground": "#ffffff",
          "properties": {
            "always_enabled": true
          },
          "style": "plain",
          "template": " \ueba2 {{ .FormattedMs }} ",
          "type": "executiontime"
        }
      ],
      "type": "rprompt"
    },
    {
      "alignment": "left",
      "segments": [
        {
          "background": "#61AFEF",
          "foreground": "#ffffff",
          "properties": {
            "display_host": false
          },
          "style": "diamond",
          "template": "{{if .Root}} \uf0e7 {{end}}",
          "trailing_diamond": "\ue0b0",
          "type": "session"
        },
        {
          "background": "#C678DD",
          "foreground": "#ffffff",
          "powerline_symbol": "\ue0b0",
          "properties": {
            "folder_icon": "\uf115",
            "folder_separator_icon": " \ue0b1 ",
            "max_depth": 2,
            "style": "agnoster_short"
          },
          "style": "powerline",
          "template": " {{ .Path }} ",
          "type": "path"
        },
        {
          "background": "#95ffa4",
          "foreground": "#193549",
          "powerline_symbol": "\ue0b0",
          "style": "powerline",
          "template": " {{ .HEAD }} ",
          "type": "git"
        }
      ],
      "type": "prompt"
    }
  ],
  "final_space": true,
  "version": 3
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions