this post was submitted on 21 Oct 2023
104 points (96.4% liked)

Linux

48315 readers
679 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi. I've been using powerlevel10k for a long time, but a few days ago, I decided I wanted to customize it a bit. I opened the .p10k.zsh file, and I was shocked. It's really massive, with TONS of options. I've been digging through for a few hours already, and it's absolutely amazing how much you can customize it without actually programming anything. I was wondering what other people are using. So my questions are:

  • Do you customize your shell prompt?
  • If yes, do you use some framework or pre-made theme, or do you just configure it the vanilla way in your bashrc/zshrc/...
  • How is your experiences with it so far?
  • Share screenshot of your prompts, please (Sadly, my prompt is currently half done, so I can't really share it)
(page 2) 35 comments
sorted by: hot top controversial new old
[–] owsei@lemmy.world 2 points 1 year ago

I made two go programas to make my prompt

It's a pwd with user customization, like colors and names, an inline git status and then the exit code of the last command

inline git status

customizable pwd

I'm in the process of remaking them tho, since they used a shitty go preprocessor that I no longer maintain.

[–] mikesailin@lemmy.ml 2 points 1 year ago

Color green for normal users and red for root. then date, hostname. and finally time of day

[–] z3rOR0ne@lemmy.ml 2 points 1 year ago* (last edited 1 year ago)

Custom PROMPT variable in my .zshrc. Similar format in .bashrc, but uses PS1 instead.

Prompt shows git branch, italics and custom colors/characters. Shows a hanging arrow on a newline (i know, wasted newlines are blasphemy to some, but I like it).

Renders nicely in my custom compiled suckless terminal using monospace font.

PROMPT='%B%F{blue}[  %B%F{white}$(tput sitm)'%1~'$(tput sgr0)$(tput bold)%B%F{blue}]$(tput sitm)$ %B%F{white}$(tput setaf 5)${vcs_info_msg_0_}%B%F$(tput sgr0)$(tput setaf 4)$(tput bold)
└─>%B%F{white} '
[–] esm@beehaw.org 2 points 1 year ago (1 children)

There are two usability tweaks that I would find it hard to live without: (1) red prompt on last-command failure, and (2) highlight what I type, dehighlight output:

Reason for 1 is obvious, 2 is more subtle: it helps my eye scan scrollback and identify what I've typed, which is what I'm scanning for 90% of the time.

Implementations vary, here's how I do it in zsh:

  1. PS1='%(?.%K{cyan}%F{white}.%B%K{red}%F{white})XX%b%k%f %(?.%F{cyan}.%F{red})yyy%k%b%F{yellow}%(!.#.$)%f '. Duplication is evil, but AFAIK necessary because the conditional (error check) is %(? and I highlight both parts of my two-part prompt. Suggestions welcome for removing the duplication.
  2. zle_highlight=("default:fg=white") (on a Solarized Dark term, where the default fg color is light gray. Adjust to fit your needs).
[–] stepanzak@iusearchlinux.fyi 2 points 1 year ago

Thanks for your detailed explanation! It's minimal, yet it looks very well usable.

[–] nordring12@lemmy.ml 1 points 1 year ago

Fish + OMF.... Work flawlessly

[–] doomkernel@sopuli.xyz 1 points 1 year ago

I use oh-my-posh (on a windows machine) with a custom theme that tells me some git info and a few other things. But when I'm in my Linux machine its a vanilla zsh

[–] Turbo@lemmy.ml 1 points 1 year ago (1 children)

I'm using guake

I like that it's just the F12 key away then F11 to expand to full window. Supports multiple tabs.

Anyone using guake?

[–] thenextguy@lemmy.world 1 points 1 year ago (1 children)

I think you misunderstood the question.

load more comments (1 replies)
[–] aquasteel@lemmygrad.ml 0 points 1 year ago (1 children)

I've been using zsh with "oh my zsh". I started using it as it sounded silly and fun compared to bash. Realistically it doesn't really male mich difference. I like the auto complete, but I couldn't say for sure whether it's the shell, oh-my-zsh or what. But I like it.

[–] LinuxSBC@lemm.ee 0 points 1 year ago (1 children)

It's great, but that's not the prompt. The prompt is the thing that shows up before you type a command, usually with a $ or # and the current path.

[–] aquasteel@lemmygrad.ml 1 points 1 year ago

I guess I only glanced and assumed they were talking about shells 🐚. I'll shut up and pay more attention in furure 🤣

[–] iortega@lemmy.eus 0 points 1 year ago

I use budspencer theme on fish. https://github.com/oh-my-fish/oh-my-fish/blob/master/docs/Themes.md#budspencer-theme It looks cool and yellow, which I like. I prints the path on the far right and parent folders are printed only with initial letter, so it doesn't take 2 lines in the shell and it ends up pretty short. It also has git integration and some budspencer exclusive commands to perform some cools actions, I don't care about and I have never used. Also, I like that command errors are displayed as ✔ or ✘ on the next prompt. It also prints the time the last command has been running. I use vi keybidings, so prompt color changes when I change the mode feel cool. I would also like to have the execution time for every command, but I have another theme for that I don't remember the name of on my work machine.

load more comments
view more: ‹ prev next ›