GithubHelp home page GithubHelp logo

ffcmdshow's Introduction

ffcmdshow

Add some feline flair to the Powerlevel10k and Spaceship Prompt command line theme using emojis and nerd-fonts.

Powerlevel10k

Changes need to be made in the p10k.zsh config file, which is automatically created in the user's home directory during the p10k installation, e.g. /Users/$username/.p10k.zsh.

Positions

All positions

Before prompt

Add an emoji or unicode character to the left side of the prompt. Don't forget to add a space after the icon.

typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='๐Ÿˆ '
typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=$'\uf61a '

os_icon replacement

Replace the default os-icon (apple) with an emoji or unicode character.

typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION=$'๐Ÿˆ'
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION=$'\uf61a'

user defined prompt

Create an entire new custom section that contains the icon. In order to do that one needs to create a helper function. The helper function needs to start with prompt_. b and i-parameters are used for defining the colours. The -i parameter is necessary, so that the unicode variable is correctly parsed.

function prompt_cat() {
  p10k segment -b 255 -f 0 -t '๐Ÿˆ'
}
function prompt_cat() {
  p10k segment -b 255 -f 0 -i $'\uf61a'
}

In order to actually show the new custom section in the prompt it is necessary to add the function to the prompt list. The prompt_-part of the function name needs to be omitted.

typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
  os_icon                 # os identifier
  cat                     # cat section
  whoami                  # whoami
  dir                     # current directory
  vcs                     # git status
)

Spaceship Prompt

Changes need to be made in the .spaceshiprc.zsh config file, which needs to be created in the user's home directory, e.g. /Users/$username/.spaceshiprc.zsh.

 screenshot of spaceship prompt

SPACESHIP_CHAR_SYMBOL="\uf61a"
SPACESHIP_CHAR_SUFFIX=" "

ffcmdshow's People

Contributors

maurer2 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.