geometry-zsh / geometry

geometry is a minimal, fully customizable and composable zsh prompt theme
ISC License
920 stars 94 forks source link

Adding Node and Exec Time to the terminal #183

Closed designMoreWeb closed 6 years ago

designMoreWeb commented 6 years ago

I am still confused how to add the node and exec_time plugins to the terminal so it displays them.

frm commented 6 years ago

You can simply add GEOMETRY_PROMPT_PLUGINS=(node exec_time) to your .zshrc before sourcing geometry.

Note that this will override the set of default plugins (exec_time, git, hg, jobs). You can add the ones you like through that variable (e.g. GEOMETRY_PROMPT_PLUGINS=(node exec_time git))

designMoreWeb commented 6 years ago

i added that but its still not showing in the terminal

Set name of the theme to load.

export PATH="/Users/Divster/anaconda/bin:$PATH"

Look in ~/.oh-my-zsh/themes/

Optionally, if you set this to "random", it'll load a random theme each

time that oh-my-zsh is loaded.

GEOMETRY_PROMPT_PLUGINS=(node exec_time git)

ZSH_THEME="obraun"

ZSH_THEME="cobalt2"

ZSH_THEME="agnoster" # (this is one of the fancy ones)

ZSH_THEME="honukai"

ZSH_THEME="lambda-pure"

ZSH_THEME="geometry/geometry"

frm commented 6 years ago

Can you try with export before the variable?

designMoreWeb commented 6 years ago

i put export before GEOMETRY_PROMPT_PLUGINS=(node exec_time git) it doesnt work though

desyncr commented 6 years ago

Try with geometry_plugin_list to check if the plugin is registered. Example output:

 ▲ ~ geometry_plugin_list 
exec_time
jobs
git
node

Remember node plugin only shows when you're in a node/yarn project. See here.

designMoreWeb commented 6 years ago
screen shot 2017-11-19 at 12 59 31 pm

it says its there but it doesn't display it which is confusing

jedahan commented 6 years ago

exec_time has a minimum time before it displays, try something like sleep 31 && echo 'do we see it? ->'

designMoreWeb commented 6 years ago

that runs i want to see the node version which is not working

desyncr commented 6 years ago

Are you inside a node project? This plugin check for package.json or yarn.lock in order to display the node/npm/yarn versions.

desyncr commented 6 years ago

@designMoreWeb Also you could try with the following configuration:

GEOMETRY_PROMPT_PLUGINS=(+node exec_time git)

The + prefix makes a plugin fixed (ie, it always shows up).

designMoreWeb commented 6 years ago

@desyncr let me try that out hopefully it works

designMoreWeb commented 6 years ago

Okay the good news is i got it working now it shows up as a transparent symbol (node symbol) how do i get it to be a green filled up symbol?

desyncr commented 6 years ago

Take a look at the readme. There's a color configuration variable. https://github.com/geometry-zsh/geometry/blob/master/plugins/node/README.md

designMoreWeb commented 6 years ago

Should you put that configuration variable in the .zshrc file or it would be somewhere else? Also where do i get a filled up node symbol from the one in the readme is "⬡" which is empty

So quick update i put the GEOMETRY_COLOR_NODE_NPM_VERSION ="green" in my .zshrc file and i am getting this error when i refresh the terminal.

screen shot 2017-11-20 at 7 55 02 pm
designMoreWeb commented 6 years ago

NVM i figured it all out thanks a lot :)

desyncr commented 6 years ago

Which configuration worked out?

designMoreWeb commented 6 years ago

export GEOMETRY_PROMPT_PLUGINS=(+node virtualenv exec_time git hg)