Comments (10)
@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.
@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
from powerlevel9k.
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:
- 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.
@dritter - How hard would it be to implement the following:
- If awesome fonts are in use, and we are in the home directory, print the home icon instead of the string directory.
- Have another config env variable that enables / disables an icon for all other directories - perhaps the folder icon suggested by @rjorgenson?
from powerlevel9k.
@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:
- if in the home directory (or deeper), print the home-icon and the path (even if it is just
~
) - In all other directories print the folder icon (thx @rjorgenson ) and the path
from powerlevel9k.
@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:
- if in the home directory (or deeper), print the home-icon and the path (even if it is just ~)
- In all other directories print the folder icon (thx @rjorgenson ) and the path
- Add variable that allows you to disable printing icons in the
dir
segment (so it would disable #1 and #2).
from powerlevel9k.
@bhilburn I still don't understand why there is a need for that extra "disable all icons" variable:
- This could be reached by setting the icon variables to an empty string. I.e.
POWERLEVEL9K_HOME_ICON=''
- 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.
@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.
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.
@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.
Fixed by merge of #160.
from powerlevel9k.
Related Issues (20)
- [Performance] PL9K is terribly slow HOT 2
- history command times bug HOT 3
- warning at startup: command not found: prompt_vcsi HOT 2
- go_version doesn't work with go modules directory
- Why does the prompt on the right overflow to the next line? HOT 8
- Expanding on custom directory icons HOT 2
- Theme not applying properly [Ghostwheel] HOT 2
- Does this theme also manage the colors of files and directories from ls -G? HOT 4
- No icons with Nerd Fonts HOT 13
- how to reference another virtualenv plugin? HOT 3
- [Performance] HOT 2
- Disable/Hide all icons HOT 3
- Does make sense to have POWERLEVEL9K__[plugin_name]_[BG|FG]_COLOR variables? HOT 3
- Is it possible to only add a newline if vcs is present? HOT 2
- Hide a part of current working directory HOT 5
- POWERLEVEL9K_DIR_BACKGROUND not affecting prompt HOT 3
- Add modifications in different file HOT 1
- Unable to change theme in .zshrc file HOT 1
- git background when repository has changes not showing HOT 6
- Readme img is 404
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerlevel9k.