Skip to content

Instantly share code, notes, and snippets.

@duckcantcode
Created October 28, 2023 02:22
Show Gist options
  • Select an option

  • Save duckcantcode/b83ee4cbc02e27e3a1d8412edcf4f25e to your computer and use it in GitHub Desktop.

Select an option

Save duckcantcode/b83ee4cbc02e27e3a1d8412edcf4f25e to your computer and use it in GitHub Desktop.
omp-theme

My first nushell script to apply and list oh-my-posh themes! Made in my first day with nushell.

def omp-theme [
theme?: string
--list
] {
if $list {
ls -s $"($env.POSH_THEMES_PATH)" | select name
} else {
^oh-my-posh init nu --config $"\"($env.POSH_THEMES_PATH)/($theme).omp.json\""
"Restart nu to apply theme."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment