Code Monkey home page Code Monkey logo

Comments (20)

griiid avatar griiid commented on June 25, 2024 105

Hi, u can edit agnoster.zsh-theme

  • search prompt_end()
  • modify print -n "%{%f%}" as print -n "\n%{%f%}" (just add \n )
  • save it and re-open ur terminal

from agnoster-zsh-theme.

griiid avatar griiid commented on June 25, 2024 18

Maybe u can find it in this path: ~/.oh-my-zsh/custom/themes/ or ~/.oh-my-zsh/themes
I'm not really sure.

from agnoster-zsh-theme.

WencesLlobet avatar WencesLlobet commented on June 25, 2024 14

If you are not seeing any change maybe you are using the 'robyrussell' theme (it was my default). You can check that at the beginning of .zshrc:
If that is your case substitute this line in the file ~/oh-my-zsh/themes/robbyrussell.zsh-theme :
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
for this one.
PROMPT+=$' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)\n'

We sometimes get tired of configuring many times all the linux set up, for that reason you can move the config fimes .vimrc .zshrc ... to a repo, commit them often and make the system reach them at that place by creating hard links.

from agnoster-zsh-theme.

uyo-obong avatar uyo-obong commented on June 25, 2024 11

Hi, u can edit agnoster.zsh-theme

  • search prompt_end()
  • modify print -n "%{%f%}" as print -n "\n%{%f%}" (just add \n )
  • save it and re-open ur terminal

Thanks buddy.

in case you don't see print again in agnoster, they have change to echo, so you will modify like this
echo -n "\n%{%f%}"

from agnoster-zsh-theme.

griiid avatar griiid commented on June 25, 2024 7

I've carried this out and additionally added a little prompt because it felt better echo -n "\n>%{%f%}" so it places a > character on the newline before the cursor. However that character inherits the colour of whatever the main prompt line ends with (e.g. blue for directories, green or yellow for git). Is there a way I can force it to always be white?

Hi @M1ke, you can use this: echo -n "\e[m\n>%{%f%}"

which added \e[m before \n

from agnoster-zsh-theme.

cristianMeli avatar cristianMeli commented on June 25, 2024 2

Hi, u can edit agnoster.zsh-theme

  • search prompt_end()
  • modify print -n "%{%f%}" as print -n "\n%{%f%}" (just add \n )
  • save it and re-open ur terminal

Thank you!

from agnoster-zsh-theme.

SwiftWinds avatar SwiftWinds commented on June 25, 2024 2

Does anyone get this visual issue or know how to solve it?:

image

My prompt_end():

# End the prompt, closing any open segments
prompt_end() {
  if [[ -n $CURRENT_BG ]]; then
    echo -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR"
  else
    echo -n "%{%k%}"
  fi
  CURRENT_BG=''
  echo -n "\e[m\nāžœ%{%f%}"
}

from agnoster-zsh-theme.

zorzysty avatar zorzysty commented on June 25, 2024 1

Does anyone get this visual issue or know how to solve it?:

image

A bit late to the party, but if anybody else is experiencing the above, I've replaced the last two lines and it seems to be working fine:

  echo -n "\e[m\nāžœ%{%f%}"
  CURRENT_BG=''
}  

from agnoster-zsh-theme.

shiroamada avatar shiroamada commented on June 25, 2024

Hi may I know where is agnoster.zsh-theme located?

from agnoster-zsh-theme.

shiroamada avatar shiroamada commented on June 25, 2024

Thanks @griiid !

from agnoster-zsh-theme.

jamesg1 avatar jamesg1 commented on June 25, 2024

Cheers @griiid !!

from agnoster-zsh-theme.

Nagha51 avatar Nagha51 commented on June 25, 2024

Many thanks <3 ! @griiid

from agnoster-zsh-theme.

paul1994 avatar paul1994 commented on June 25, 2024

Thanks @griiid ! Something this simple is not always that obvious.

from agnoster-zsh-theme.

nickBlack4 avatar nickBlack4 commented on June 25, 2024

~/.oh-my-zsh/themes/agnoster.zsh-theme

from agnoster-zsh-theme.

daveseco7 avatar daveseco7 commented on June 25, 2024

Thanks @griiid šŸ˜„

from agnoster-zsh-theme.

M1ke avatar M1ke commented on June 25, 2024

I've carried this out and additionally added a little prompt because it felt better echo -n "\n>%{%f%}" so it places a > character on the newline before the cursor. However that character inherits the colour of whatever the main prompt line ends with (e.g. blue for directories, green or yellow for git). Is there a way I can force it to always be white?

from agnoster-zsh-theme.

harsh-singh-rathore avatar harsh-singh-rathore commented on June 25, 2024

Hi, u can edit agnoster.zsh-theme

* search `prompt_end()`

* modify `print -n "%{%f%}"` as `print -n "\n%{%f%}"` (just add `\n` )

* save it and re-open ur terminal

I did this procedure and it works fine but many times my zsh misbehaves in a random way.
Some times while I'm typing the first letter just vanishes and the virual thing just messes up if you guys are also facing this problem how did you all solve this?

from agnoster-zsh-theme.

Emily-Herndon avatar Emily-Herndon commented on June 25, 2024

So I'm currently using af-magic and I like the look but I hate how it's all on the initial line and cuts things off to go to the next line. I tried adding
prompt_end() { if [[ -n $CURRENT_BG ]]; then echo -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR" else echo -n "%{%k%}" fi echo -n "\n%{%f%}" CURRENT_BG='' }
from agnoster but I don't see a difference. Is there something else I need to add or am I going about this totally wrong?

from agnoster-zsh-theme.

M1ke avatar M1ke commented on June 25, 2024

I've carried this out and additionally added a little prompt because it felt better echo -n "\n>%{%f%}" so it places a > character on the newline before the cursor. However that character inherits the colour of whatever the main prompt line ends with (e.g. blue for directories, green or yellow for git). Is there a way I can force it to always be white?

Hi @M1ke, you can use this: echo -n "\e[m\n>%{%f%}"

which added \e[m before \n

I am 3 years late to addressing this, but thanks, have done this and it worked!

from agnoster-zsh-theme.

vikas-chinchansur avatar vikas-chinchansur commented on June 25, 2024

@griiid Thanks griid

from agnoster-zsh-theme.

Related Issues (20)

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.