Why manjaro zsh setting is so complicated?

Yes, this is exactly how I approach to it. And this needs some time of trial and error.

But if I find some more time for it, I will document the exact steps. For now it seems only to be clear, that the way is anywhere out there :slight_smile:

Another confirmation of the topics heading. When noone can point out the exact steps for a simple task as changing the first part of the prompt, but only point to a bunch of wiki, links and files, then it is definitevly kind of complicated.

Not that there were not good tips. I think the “character” tip is the one I will approach to, if I will get into it again.

I wouldn’t have believed all those rumours about some smartasses in the manjaro forum. But with wordings like that you don’t make them hard to believe.

To clearify this for you, I wasn’t complaining at all. But I see more and more, that the zsh seems to be such complicated, that you rather discuss about my brains size.

Now I can understand why a walk to the library for someone seems to be a survival task.

1 Like

Not really - the script was built up from small ideas so the end is something that’s really complicated.

But many of the steps are really very simple. Some require advanced knowledge (i.e. simple for devs, not for most users).

It takes people years to just be able to see a zsh script and understand what’s on there - my brain melts when it’s faced with REGEX.

For the first year, the only thing I really grasped were the ‘alias’ commands. I also copied and pasted a few things, with functions I understand - but which I couldn’t read or understand myself…

Example 1:

# Make and Enter directory
mkcd(){ mkdir "$1" && cd "$1" ; }

I wouldn’t have been able to write it myself… What’s the point of the silly brackets? Who cares? It works!

#-------- Global Alias {{{
globalias() {
  if [[ $LBUFFER =~ '[a-zA-Z0-9]+$' ]]; then
    zle _expand_alias
    zle expand-word
  fi
  zle self-insert
}

Also above my pay grade - but then that’s not important.

Also, about changing your icon on a p10k prompt - how hard is it to open the p10k file (which is named, strangely, .p10k.zsh) and then finding the word ‘ICON’

  # Custom icon.
 typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'

There, now Manjaro icon is gone and we have a star instead.

I found that easy - but then (despite my small brain) I’ve had enough experience to fumble around and find quite a few things. For new users, it’s sometimes too much - so like I said. BABY STEPS.

People use Windows for years and years and never really understand it. What’s the big deal? Manjaro has it laid out - you can find it all even if you can’t understand it.

As a project, I suggest you develop a CPU which is easy to understand, then write an easy operating system with an easy language.

Forget BASIC - despite the ‘simplicity’ of it, I still had some trouble getting programs to work.

Then, after 20 years working on the project, come back and explain why some things are left ‘complicated’. Because simplifying things often takes a great deal more work - and that’s not usually necessary for things which are basically ‘under the hood’.

What’s the need? Couldn’t we simply OPEN the terminal and never go into the ZSH settings? Doesn’t it JUST WORK???

It works because of the configuration - you don’t need to do anything with the configuration if it’s too complicated - just use it. However, the fact that you made a sentence asking why ‘manjaro zsh setting is so complicated’ implies that there’s something wrong with this.

Now your question will get WORSE when you decide to try FISH terminal, because to include even MORE functionality and magic abilities, it’s obviously not going to be any simpler.

That was not my aim. I just wanted to look, if I was able to change some colors (and icon if it would be taken from a jpg or png file).

The only thing I now can do is changing the color of the manjaro “M” in adding this line to my .zshrc

  typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=27

But didn’t found out yet how to change other colors there. But don’t get me wrong, I don’t complain about it, I’m just curious what I’m able to customize myself.

This is what I did, if this doesn’t add “…and shut up.” The only reason I looked into it again today was some tips in this thread. Otherwise I don’t even care about the configuration.

I didn’t. Maybe it’s hard to understand, but I just said that I first used zsh two days ago, looked into the configuration and compared to bash found it more complicated. I think you are relating to the OPs heading, more than to anything I said.

I only answered to this thread, because of my first experience one day earlier. Again, it doesn’t bother me, that it is complicated. And it doesn’t bother me, that the logo is green. I only am curious, nothing else. Maybe this is a sign my brain is still growing??? :smile:

And again, I think all the answers here in this thread are proving me right, configuring zsh is much more complicated than configuring bash.

And in my eyes, the amount of words written is an indicator for how less this configuration is understood.

Aha, that’s true!!!

Anyway, for sure brain will grow - very slowly and surely over time.
To get the configuration of a bash is not so hard, but zsh can do much more.
I’m mostly using FISH now - which is both better (though not ‘posix’ compliant, meaning if you wanna paste some script the chances are you must type zsh first…).
And much much more complex… dozens of functions not pasted as text in the config, but pasted as separate files in folders.

And the syntax - well, I really wanna figure out something simple like changing the Manjaro icon, but I can’t work that out.

But try fish, because simple things (like ‘alias’) are so much nicer… I don’t use ‘alias’ now, if I type something like abbr upgrade 'pamac upgrade --enable-downgrade --aur --devel' then the next time I type upgrade it expands to display that command. Alias is possible, and unlike zsh (type \ls for un-alias command ls) you type ‘command ls’.

The best feature is the man page magic… like this, type pacman -Q and hit tab…

Hopefully not to the point when a walk to the library will become a threat.

I got this.

I don’t even need zsh. I do amlost nothing but using pacman, cd, cat and those base commands in it. I just looked into zsh because it’s default in manjaro (so I was curious about it), because I am valuating which kind of autocompletion I like more (zsh or bash) and people seem to make some hype about it. Maybe because apple uses it, I don’t know, but I was curious after the first thing post manjaro installation was to set bash as my default shell again.

But this is no great difference to what zsh does now:

pacman -Q (hitting tab)                                                                       ✔ 
-b  -- Alternate database location
-c  -- List package changelog
-d  -- List packages installed as dependencies
-e  -- List packages explicitly installed
-g  -- View all members of a package group
-h  -- Display syntax for the given operation
-i  -- View package information
-k  -- Check package files
-l  -- List package contents
-m  -- List installed packages not found in sync db(s)
-n  -- List installed packages found in sync db(s)
-o  -- Query the package that owns a file
-p  -- Package file to query
-q  -- Show less information for query and search
-r  -- Set alternate installation root
-s  -- Search package names and descriptions
-t  -- List packages not required by any package
-u  -- List packages that can be upgraded
-v  -- Be more verbose

As I said, for my use all shells are over the top of my use, even bash. And I ever try to get to know the actual defaults. I watched a video about fish a few weeks ago. And maybe I take another look on it. Thank you for this tip.

So, for now I was able to change the colors I wanted to be able to change, through adding following lines to my existing ~/.zshrc

# OS identifier colors
  typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=27
  typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=255
  # directory colors
  typeset -g POWERLEVEL9K_DIR_FOREGROUND=255
  typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255
  typeset -g POWERLEVEL9K_DIR_BACKGROUND=30

And this lines could give some other configuration, as to display the os identifier or hide it or add a second line, and so on:

## Left prompt segments.
  typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
#   =========================[ Line #1 ]=========================
    os_icon                   # os identifier
    #context                   # user@host
    dir                       # current directory
    #vcs                       # git status
    #command_execution_time    # previous command duration
#   =========================[ Line #2 ]=========================
    #newline                   # \n
    #virtualenv                # python virtual environment
    #prompt_char               # prompt symbol
  )

Uncommenting context seems to not add user@host. I still don’t know why.

This command (as outcommented in one of the many configure-files) does print a full color-table with the numbers label.

for i in {0..255}; do print -Pn "%K{$i}  %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done

In my opinion it would be much better to create a table of parameters like that, than to have a configuring script like p10k configure
This is what I have to add. Maybe other users do find out some configuration lines for their needs. Then a wiki-site maybe could be created or it could be added to an existing one.

1 Like

Again, if you actually read or searched github readme, you’d know why.

This is also mentioned on github readme.

You can always open a new issue on author’s github page and write your suggestions. Or fork the repo.

What wiki-site? They probably have the biggest readme page on entire github and it’s not enough?

Yes, I found out. Again, I took only a quick look into it.

This is also mentioned in the file ~/.p10k.zsh itself, that is created by the script p10k configure. Just wanted to add this for people that search this forum for help.

I have no issue. I just had a statement “Configuring zsh is more complicated than bash”. And what does the author of the script have to do with it? He just did the script because he saw there would be help required for configuration.
My questions just got solved. But anyway, a good documentation of parameters may emerge over time. Now I had to make a p10k configure to then look into the ~/.p10k.zsh to find some parameters and copy them into my old backuped ~/.zshrc.

But again, I just looked into it for one day, before. Maybe there is more documentation that I don’t have found yet.

Yes, with a table of parameters. What’s wrong with that? I have seen they got a lot documentation on their github site. But a table is better, in my opinion. Like these ones, for bash. Don’t you think? It does not feel this much like searching books in a library, than reading the entire readme on github does.

Did you see the few lines above, that now are added to my ~/.zshrc? The script does not do soo much more, for the average user. And you said it, “They probably have the biggest readme page on entire github”.

But this wasn’t even the point. Thanks to the author of the script I only got to the parameters. This is why I think a table of parameters would be a nice idea. But for now, people can read the github site. Or they search the forum and maybe find these lines above :slight_smile:

You said this second time already. This isn’t a valid excuse. And as you noticed, taking some time to read things actually solved all your problems. :stuck_out_tongue:

No, you didn’t have to. File is provided by manjaro-zsh-config (take another “quick look” at those files :stuck_out_tongue:). It’s not sourced directly in ~/.zshrc but you can follow the trail of sourced files/scripts and then you’ll get the bigger picture how and where settings come from.

Anyhow, my point is: everything is complicated until we learn it. And it takes some time and dedication.

1 Like

Thought you still don’t understand, because you’re repeating also.

Never said the opposite.

Yes, a good tip for an optional wiki. [EDIT: no, you will not find the parameters provided by the ~/.p10k.zsh file created by p10k configure.

Yeah, enjoy the simplicity. Thanks for your help.

So, now you agree.

Like I also said before, the amount of words only indicate how less it’s just understood.

Yes, for the second time. To be honest, info was always there.

I think you are misunderstanding that phrase. If something is simple to use it doesn’t mean it’s simple under the hood. It’s opposite usually. If you want that kind of simplicity then install arch.

No, you’re missing the point again.

Anyway, I’m done here.

Read the EDIT. The file doesn’t provide the needed parameter.

Then you also can install Windows or MacOS.

Like you repeatedly want to do. I just said configuration of zsh is more complicated than bash. What are you trying to defend? Did you develop zsh? Are you pissed because someone could say something so horrible?

Really, or want you one more time tell me how simple the configuration of zsh is? For what reason ever.

You can install TempleOS for all I care.

And you don’t know what you are talking about. This has nothing to do with zsh. This is powerlevel10k theme or more specifically manjaro’s implementation of it.
And I’d like to see your configuration of bash that includes 3% of stuff that powerlevel10k does.

No and no. I just feel the need to tell entitled people what they are. The problem is in you and not in developers that put actual work into something that you can freely enjoy. Instead of writing these fruitless comments you could already put together a table of parameters or whatever and post it somewhere for others.

:man_facepalming:

@moderators please close this useless topic.

Ok.

Yes, but you do.

To change the prompts color? Open another thread and I explain it to you.

What a problem? Do you have a problem, that I answered to the thread and said, that I found it complicated also? That’s obviously your problem.

I did, although I had to answer your fruitless comments.

Hope that helps.

Agreed.

Have a nice sunday.

EDIT: The only one with a condition or unable to read is you. I solved all my questions, while you’re still guessing and complaining that I asked. What’s wrong with you?

You still don’t even understand I finished my configuration two days ago? You’re trolling, right?

I did. Try to read again. Good luck!

Seems like you have some condition that makes you unable to read.

Please remove every package that has word ‘zsh’ in it, except zsh. Then remove .zshrc (Actually, it’s enough to just delete .zshrc AKA remove all the lines that source all the complicated things.) Then google how to customize prompt in actual zsh. And only then come back here, and tell me how it’s more complicated than bash.

Likewise. :slight_smile:

1 Like

We agree that the thread is moving in circles, and that it best be closed.

2 Likes