Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.73 KB

share-theme.mdx

File metadata and controls

56 lines (42 loc) · 1.73 KB
id title sidebar_label
share
Share theme
📸 Share theme

import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem";

You can export your prompt to an image which you can share online. You have the ability to align it correctly and add your name for credits too.

:::warning Some glyphs aren't rendered correctly, that's not you but the limitations of the renderer. Depending on your config, you might have to tweak the output a little bit. :::

<Tabs defaultValue="powershell" values={[ { label: 'powershell', value: 'powershell', }, { label: 'others', value: 'others', }, ] }>

You can make use of the Export-PoshImage function to export your current theme configuration.

Export-PoshImage -CursorPadding 50

There are a couple of parameters you can use to tweak the image rendering:

  • CursorPadding: spaces to add after the cursor indication (_)
  • RPromptOffset: spaces to add before a block that's right aligned
  • Author: the name of the creator, added after https://ohmyposh.dev
  • BGColor: the hex background color to use (e.g. #222222)

The oh-my-posh executable has the --export-png switch to export your current theme configuration.

oh-my-posh --config ~/.mytheme.omp.json --export-png --cursor-padding 50

There are a couple of additional switches you can use to tweak the image rendering:

  • --cursor-padding: spaces to add after the cursor indication (_)
  • --rprompt-offset: spaces to add before a block that's right aligned
  • --author: the name of the creator, added after https://ohmyposh.dev
  • --bg-color: the hex background color to use (e.g. #222222)