 So I've been playing around a little bit with my Shell Prompt. I've been playing around a little bit with the Starship Prompt. You guys know I've been using Starship for a couple of years. I made a video about the Starship Prompt two or three years back. Starship is a Cross Shell Prompt, meaning it works on multiple shells. It works on all of the popular shells available on Linux. So I'm talking about Bash Fish, ZSH, New Shell, Power Shell, Ion. It works on everything. And the fact that Starship works on so many different shells is the main reason I use it is because I'm often using multiple shells. I switch between Bash and Fish and ZSH all the time. And it's nice that I have the same prompt that looks exactly the same in every shell regardless. That being said, I've never really configured the Starship Prompt. I've never really spent a lot of time hacking on Starship because by default the Starship Prompt is really good. So I really haven't played a lot with the configuration, but that's what I'm going to do today. Let me switch over to my desktop here. I've got a terminal open. We're in the Fish Shell, but again the Prompt, the Starship Prompt will look the same whether I'm in Fish or Bash or ZSH. So it really doesn't matter what shell I'm in. You can see the standard Starship Prompt is nice because it's minimal. We get the working directory. So I'm in home. Obviously the Tilda symbol signifies my home directory. And then the prompt itself is this right-pointing chevron, the greater than sign, right? But basically a right-pointing arrow. And that is my prompt. And of course the prompt will change a little bit depending on what kind of directory I'm in by CD into my Qtile directory, which Qtile is a window manager written in Python. You can see now we get a little more information. Once again, we get the working directory and then it says via and then the snake symbol. The snake symbol signifies I'm in a Python project basically. Then we get the version of Python. And once again, we get the right-pointing arrow for our prompt. And of course that right-pointing arrow that is green, that is the standard prompt. There's a different prompt for errors. So if I enter something that's not a real command, I get an error. For example, this command here, ddd, not a real command, right? If I hit Enter, you can see the prompt now is again a right-pointing arrow. But now it's orange rather than that blue color that it was before, letting me know, hey, that last command you just tried was an error. Now again, this default prompt is good. I really have never felt the need to change it. But if I switch workspaces here and go to my browser, I could go look at the documentation on how to customize the prompt a little bit. If you go to starship.rs, that is the website for this starship cross-shell prompt. And if you go into configuration, you will find this massive configuration page. And I mean it is absolutely massive. Basically, this is all the values, all the variables, all the settings that you can add to your starship config file. So your starship config file in your home directory slash .config slash starship.toml. That's the file, right? That's going to be your config file that tells you the very first line here of the configuration page exactly where to place this config file. So let me show you this config file. Let me open up a doom emacs here. And if I look up my starship.toml here, and I'll zoom in here, this is what my starship.toml looks like. There's nothing in it really. I mean, this is really, I have a starship.toml, I guess just to have one because I haven't added any custom configurations. Pretty much I'm just using all of the default settings. But what I could do, I could go out there on the internet and I could go find somebody's starship.toml. You know, typically that's what we often do when we're exploring new things, whether it be new window managers or whatever it happens to be. You go and borrow somebody else's .files and you see what they're doing and you take what you like from their .files and you throw away the rest. But there's also some preset configuration files. So if you go here in the configuration page, if you scroll down there is presets here. So there's not a lot of presets here for the configuration. You have this nerd font symbols configuration, which I believe is the default. It just gives you these fancy nerd font Unicode characters. I believe that's what the default prompt just defaults to. You have bracketed segments and where it looks like each section of the prompt is wrapped in brackets. And if you wanted to see how easy it is to change these, I just click on bracketed segments preset and it will give you a command. This right here starship preset bracketed segments and then a redirect symbol, right? So that's a greater than sign and it redirects into starship.toml. It overwrites your starship.toml. So what I'm going to do is I'm going to copy that. I'm going to go back to this workspace where I had a terminal CD back into the home directory. It doesn't matter what directory we're in when we run this command though. It's going to take that bracketed segments configuration, one of the default configurations that's available and it's going to overwrite your existing starship.toml. If I hit enter, we're actually using that new bracketed segments starship prompt, but there's no sections to bracket, right? We don't have any sections yet. But let me cd into .config slash qtl and you can see now the information about python in the version is bracketed. So that's the only difference there. And if I go back to some of the other presets here, let me back up a page other than the bracketed segments. We have plain text symbols. I guess if you didn't want some of the fancy Unicode stuff, you just use normal standard characters and that would be important, especially if you didn't have like the nerd fonts available because it's the nerd font packages that really give you the fancy symbols and everything. You also have a no runtime version and then you have pure prompt, which this emulates the look and behavior of pure, which is another prompt, a popular prompt available. And you have pastel power line. Now that could be interesting. A lot of people like the power line look. I don't mind power line and things like Vim or even in my panels for my window managers, but power line at the shell, I'm not a huge fan of, but let's try it out. So I'm going to once again, click on the power line preset and then get the starship preset command. Go back to the terminal and let's paste that to do the pastel power line preset. And that actually is a pretty cool prompt. Looks like it's slightly wonky here at the beginning, but I'm zoomed in pretty far here. I bet if I zoom back out, the prompt might correct itself. Yeah, it looks fine at a normal font size, but when I zoom way in that very first rounded cliff is just a little weird, but that's, that's a very minor gripe on that. I actually quite like that prompt. So what I typically do when I want to see somebody's pre existing configs, I want to borrow somebody's dot files, whether it be a window manager or a terminal emulator or in this case, the shell prompt, I type in the name of the config file I'm searching for starship.toml space, GitHub, because GitHub, of course, is the largest get hosting platform. So I found this existing starship.toml on GitHub. Now, if you do a search for starship.toml space, GitHub, you're going to get a bunch of results, right? I grabbed this one just because it was one of the first ones I clicked on. And it's rather lengthy. It's not terribly long, but it's got a lot of stuff in it gives me some idea of some of the options I can play with. So I copied this basically, and then I put this in my starship.toml. And now that I've pasted this into the starship.toml, let me write that. Let me go back to the workspace where I have my terminal open. And if I do a clear, you know, we'll get our new prompt here. Now, I quite like this prompt. There's some things I like about it. There's also some things I'm not crazy about. One thing I'm not crazy about DT, which is my username on hostname, but his hostname, I guess he just hard coded it to always be MacBook Pro 14. I'm not on a MacBook Pro, right? I would actually want that to be the actual hostname of my computer. Then we've got the working directory. He italicized the font for the working directory. I think that's a nice touch via and then he's using the Python logo for the Python symbol rather than a snake. And then Python, the version of Python and then took 116 milliseconds. So he's also adding the time it took to execute the command as part of the prompt. And then the prompt is not on the same line as all of that. He actually has a new line. And then this arrow, this Unicode arrow, which I'm not crazy about that particular Unicode character because it's kind of smallish, right? I'm typically used to some of the bigger Unicode stuff like that right pointing arrow that I was using as the fault prompt. It's almost like it's more than a standard space character, right? Because it's a little bigger, it's a little easier. So I may change that as well. So I'm going to get back into this config. And the first thing I'm going to do is this section here, hostname, where he actually just hardcodes the hostname to be MacBook Pro 14. I actually want that to actually be the output of the hostname command. So let me colon W to write that. Let's get back to the terminal, clear the screen. And now you can see I actually get the real hostname of my computer. The hostname of this computer is Arco Linux, so DT on Arco Linux. So that is good. Now let me see if I can fix this arrow because I would rather this arrow be something different. And that's actually the next section of the config. We have this comment, replace the greater than symbol. And he's replacing it with an arrow, but he's not replacing it with this arrow. But I like that arrow because it's a bigger Unicode symbol. So what I'm going to do is, you know what, I'm just going to yank that. So I'm going to get into a visual block mode here. So if I do control V in evil mode here in EMAX or in film, you could do the same thing. I'm in visual mode here. I'm just going to do a wide and yank, right? And then I'm going to go down to where he has this symbol here. And I'm just going to paste the new arrow and get rid of the old. And now colon W to write, let me get back to the terminal and clear the screen and see if I like this new prompt. Yes, I like that arrow much better. Yeah, that's a lot easier to read because it's a little thicker, you know, it stands out a little more. So let me get back to the config and see what else I want to play with here. I noticed in his config at the very top, he has this commented section here, format equals and then user system project command all on their own separate lines. It looks like he experimented with this particular format, but then he decided against it and he commented it out. So let me actually uncomment this and actually see what this format would do. So let's write that. I doubt I'm going to like this because I don't like multi-line prompts. I don't mind the two line prompt that we're working with here, but when you're getting in three lines or four lines is what his look like it was going to be. You know, that's a little bit too much. I like fancy prompts, but that thing, well, yeah, I don't hate it though. I like user and the user's DT system and it points to the host name, right? Project and it points to our working directory. And then in command, it points to what should be the command we enter. That's not a bad prompt actually. That could grow on me, but it's a little bit too much bling for me. So I'm going to comment that back out. And you can see, you know, you have sections for various things, username, for example, and you could set the color and the font style, whether it be bold or tall, like same thing with the host name. Do you want the host name to be bold yellow or whatever color? Actually, let me change this so you can see it. So clear the screen. So we'll get back to this prompt here and you can see host name, Arco Linux, right? That is the color. It's this orange-ish color right now. Well, we could change that. Go down to host name. You can see on host name, bold yellow. Well, I could change this to, you know, any color I wanted to. How about bold purple? Let's write that and then clear the screen and now Arco Linux should be, yeah, DT on Arco Linux. You see now we've changed the color. So it was real easy to play around with the style of the prompt here. And getting back to the section character here. So the character, of course, is the prompt. We changed the success symbol, the standard prompt to this arrow here. We did not change the error symbol, which he's using at x. And I like that because in the standard prompt, I was using a right-pointing chevron as both the success symbol and the error symbol. And the only difference was the color changed on an error. But now we're actually going to have a different symbol for the prompt if I enter something that's errors out. So this command here, once again, you can see now the prompt is an x, not an arrow. So kind of a neat little effect. You have the directory section here. And when a directory is read, only we get the little lock symbol here, which I believe is the standard for the default prompt as well. So I don't think he's doing anything fancy here. And I like that. That's very easy because I often get into read-only directories as the standard user. You go into the root directory, and it's really easy to realize, hey, I don't have privileges to do something in this directory because it has that lock symbol as part of the prompt. And then you have this massive section here where you get fancy symbols for directories, depending on what kind of project they are. So you can see stuff about AWS and Kanda, Dart, Docker, you know, various programming languages, the Nix shell, got the little snowflake for that. If you were doing like Nix packages, I guess, PHP, Python, he changed the Python prompt from being the Python symbol or the snake to this here. I don't know what that is, a disc stacked on each other. I actually quite like the snake symbol. So what I'm going to do is I'm actually going to copy this from my old config because I want the snake symbol back. Let's verify that actually works. So clear the screen. We're already in my Qtile config. So, yeah, we get the snake symbol back now. And while I'm thinking about it, let's actually check and see because I do so much with Xmonad and Haskell stuff. Do we get a Haskell logo? We get a Lambda symbol. Okay. So there was no Haskell section here. So that's just what it defaults to. But if you wanted to, you could change it to anything. I actually could create a section here. You know, I could make a Haskell section here and have the symbol be anything by default. It defaults to a Lambda, which makes sense. That's the symbol for Haskell, right? But if you wanted to change it to something else, of course, you could. And that's the thing with the Starship prompt. You can customize this thing. You can basically change every aspect of the prompt. So I'm actually pretty happy with this prompt. What I got from this guy's GitHub, I basically stole his config, right? I made three or four very minor changes. For example, the host name, which didn't make any sense for me to have my host name as MacBook Pro, made some color changes as well, and made one minor change to the logo for Python. But it's essentially his prompt. So that's just a little bit of what you can do with the Starship prompt config file. And of course, I borrowed this guy's config off of GitHub. That's the great thing about GitHub, GitLab, and people sharing their configs, their .files, free and open source software, right? I can take what this guy is doing. I can take his config. I can tweak it to my needs. What I'm going to do is I'm going to push my Starship .toml to my GitLab over on my .files repository. You guys can take the config that I pass along as well. You can change what you want. Again, tweak it to your needs. It's what makes the free and open source software community so great. Now, before I go, I need to thank a few special people. I need to thank the producers of this episode. Gabe James, Matt Maxim, Mement, Mitchell Paul, S. Y. Ybald, Homie Alex, Armored Dragon, Chuck Commander, Rangary, Dayoka, George Lee, Marstram, Nader, Yon, Alexander, Paul, Peace, Archon, Fedora, Polytech, Crealite, T. Sverlust, Rip Profit, Roland, Steven, Tools, Devler, and Willie, these guys. They're my highest tier patrons over on Patreon without these guys. This episode about the Starship prompt would not have been possible. The show is also brought to you by each and every one of these fine ladies and gentlemen, all these names you're seeing on the screen right now. These are all my supporters over on Patreon because I don't have any corporate sponsors. I'm sponsored by you guys, the community. If you like my work and want to see more videos about Linux and free and open source software, subscribe to DistroTube over on Patreon. Peace, guys. I didn't see support for Emacs and the E-Shell, though.