Giter Site home page Giter Site logo

Comments (10)

dritter avatar dritter commented on May 16, 2024

@keirlawson Thanks for the report. Yes, you are right. The home icon is always shown, regardless of being in the home directory or not. When I implemented it, I haven't thought about it that way. The reason why this is an home icon is really profane: I just like icons 😀
Almost all other segments in awesome mode have icons and I find the home icon quite fitting for the directory segment.

It wouldn't be much work to show the home icon only if we are under the home directory. But I think there should be another icon for the case of being outside of the home folder. Do you have any idea which icon that could be?

from powerlevel9k.

rjorgenson avatar rjorgenson commented on May 16, 2024

@dritter I had a similar thought to @keirlawson when I started using powerlevel9k, I ended up adding POWERLEVEL9K_HOME_ICON="\ue818 " to my zshrc which is a folder icon. Looks like
screen shot 2015-11-25 at 3 52 05 pm

from powerlevel9k.

bhilburn avatar bhilburn commented on May 16, 2024

I don't use the awesome icons, so I've actually never experienced this. That said, if I did use the awesome icons, I actually would want this behavior:

  1. If in the home directory, instead of printing the directory, just show the home icon.
  2. In all other directories, print the directory, without an icon.

@dritter - How hard would it be to implement the following:

  1. If awesome fonts are in use, and we are in the home directory, print the home icon instead of the string directory.
  2. Have another config env variable that enables / disables an icon for all other directories - perhaps the folder icon suggested by @rjorgenson?

from powerlevel9k.

dritter avatar dritter commented on May 16, 2024

@rjorgenson Great icon! Must have overseen that one. 👍

@bhilburn Frankly I don't like the idea of have special code for the different modes. That would clutter up the code quite a bit (too bad that we have to do that for different OS).
Disabling the not-home directory would be rather easy, as users could just set the according icon variable to an empty string.

So, my favorite behavior would be:

  1. if in the home directory (or deeper), print the home-icon and the path (even if it is just ~)
  2. In all other directories print the folder icon (thx @rjorgenson ) and the path

from powerlevel9k.

bhilburn avatar bhilburn commented on May 16, 2024

@dritter - I actually didn't think we would need conditionalized code for separate modes - I was thinking we could do it purely with icon settings, but now I realize that's not possible. I agree, that would be very ugly.

I like your suggestion, as long as we add #3:

  1. if in the home directory (or deeper), print the home-icon and the path (even if it is just ~)
  2. In all other directories print the folder icon (thx @rjorgenson ) and the path
  3. Add variable that allows you to disable printing icons in the dir segment (so it would disable #1 and #2).

from powerlevel9k.

dritter avatar dritter commented on May 16, 2024

@bhilburn I still don't understand why there is a need for that extra "disable all icons" variable:

  1. This could be reached by setting the icon variables to an empty string. I.e. POWERLEVEL9K_HOME_ICON=''
  2. We would need some ternary expressions here which could be avoided..

Also, I would want to wait how many people complain about wanting to disable that icons. I think if users enable the awesome mode icons is exactly what they want..

from powerlevel9k.

bhilburn avatar bhilburn commented on May 16, 2024

@dritter - Using the awesome icon set gives you access to glyphs you don't otherwise have, but I don't think that means people will necessarily want to use all of them. For example, someone might want to use the awesome-mode font to replace the 'normal' git glyph with the Github glyph, but perhaps doesn't want additional icons inserted into other segments he/she is already using. This would actually be the use case that applies to me, for what it's worth.

Ternary expressions suck, so yes, let's not do that. If that's the only other option, then I'm okay having the icons default to on. I would like to be sure that the dir segment docs are updated, though, so that people can easily figure out how to turn it off =)

from powerlevel9k.

keirlawson avatar keirlawson commented on May 16, 2024
If in the home directory, instead of printing the directory, just show the home icon.
In all other directories, print the directory, without an icon.

FWIW this would also be my preferred behaviour, but appreciate as discussed this would be a pain to implement.

from powerlevel9k.

dritter avatar dritter commented on May 16, 2024

@bhilburn IMHO it would be hard to tell which icons are printed and which are not.
Your example sounds like an idea of icons as "visual identifiers" (from the discussion in #157 ). If we distinguish between primary icons and others, that would be clear (but it would have other implications).

In my mind, we would either display the home icon or the folder icon, but never both at once. So an "disable other icons" won't be necessary. Or do you want to show the folder icon always, and the home icon only if the user is somewhere underneath of the home directory?

from powerlevel9k.

bhilburn avatar bhilburn commented on May 16, 2024

Fixed by merge of #160.

from powerlevel9k.

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.