No video

Starship Prompt: Building Custom Modules

  Рет қаралды 15,482

Andrew Burgess

Andrew Burgess

Күн бұрын

Starship (starship.rs/) is a terminal prompt customizer that's easy to use and incredibly powerful. It has many built in modules that give you a ton of information, but it's also incredibly easy to create your own modules to show your own info in your prompt. In this video, we'll look at how to do it!
shaky.sh

Пікірлер: 21
@argonjs
@argonjs Жыл бұрын
Recently discovered the channel and its good content. Keep up the excellent work!
@a_maxed_out_handle_of_30_chars
@a_maxed_out_handle_of_30_chars Жыл бұрын
simple and to the point, thank you :)
@davemeech
@davemeech Жыл бұрын
You had me at stack overflow driven development. I didn't know that I was on Kent Beck's youtube channel.
@PRonYouTube
@PRonYouTube Жыл бұрын
This was an awesome and helpful walkthrough. Thanks!
@DV-ml4fm
@DV-ml4fm 3 ай бұрын
I used crontab to run a command and output the result it to a file. Then I create a custom command to read the file with detect_files option.
@fahadahaf
@fahadahaf Жыл бұрын
You could have probably optimized the performance a little bit by getting rid of the two repeated grep calls and filtering using awk instead, or using pgrep instead of using ps to begin with pgrep vim or even ps aux | awk '/vim/ && !/awk/ { print $2 }' instead of ps aux | grep vim | grep -v grep | awk '{ print $2 }'
@auntiecarol
@auntiecarol Жыл бұрын
When I was tooling around with various shells I'd use a module to check $0 and write the prompt accordingly, a φ (fish) β (bash) ζ (zsh) τ (tcsh) etc., because I'd forget which shell I happened to be using. Since deleted as I've gone back to bash. Well, actually, 😘Emacs' eshell , so not much time in a terminal these days.
@joselima7655
@joselima7655 Жыл бұрын
Wow this is awesome I use starship but didn’t think that it could do all this. What colorscheme are you using in vim ?
@andrew-burgess
@andrew-burgess Жыл бұрын
Thanks! It’s Tokyo Night.
@user-pr7zo5lr7u
@user-pr7zo5lr7u 2 ай бұрын
To speed up, maybe: ps -e -o comm -t | grep nano | grep -v grep
@moneyfr
@moneyfr Жыл бұрын
I downloaded yesterday thanks to your video but i don't see for a basic use what could i do more than oh-my-zsh , p10k. I couldn't install plugins on it for history entries But i ll still keep an eye on it and maybe install for my powershell
@andrew-burgess
@andrew-burgess Жыл бұрын
Yeah, I’d consider it an alternative to OMZ or p10k. Can you say more about the history entries? What would you want that plug-in to do?
@shlokbhakta2893
@shlokbhakta2893 10 ай бұрын
I like it because of the windows Linux compatibility, now I can use the same toml file and have similar prompts on windows and wsl (also docker containers)
@osmanakar2507
@osmanakar2507 Жыл бұрын
great!
@HawaiiMacAddict
@HawaiiMacAddict Жыл бұрын
I was attempting to add a custom module to include the date as well as the time, but was unable to display it. Do you have any suggestions as to how that may be accomplished?
@andrew-burgess
@andrew-burgess Жыл бұрын
If you can share a link to the code, we can take a look!
@moneyfr
@moneyfr Жыл бұрын
Could you share your config ?
@andrew-burgess
@andrew-burgess Жыл бұрын
Sure, check it out here: github.com/andrew8088/dotfiles/blob/main/starship/starship.toml
@Samonitari
@Samonitari 3 ай бұрын
At this point, you could just throw out zsh, one less sh*t to maintain, I definitely did left zsh and never looked back! I always hated the bazillion frikin' knobs to tweak, and the whole oh-my-zsh project. I mean why do I have to have a plugin manager for my shell? Luckily starship is quite cross-shell! On a similar note, I left nvim for helix. Unfortunately I cannot install it to all of our servers. But the environment on the workstations I use have become leaner, and less of a beautiful-only-for-me-and-brittle-AF snowflakes...
@JACOBSAYONO
@JACOBSAYONO Жыл бұрын
thank you!! i got .cpp and .ino extensions to work. i want to customize for folders too since that would be visually convenient when working with ROS. is it possible to see the state of the terminal when you've sourced something? e.g `source .bashrc` (trying to see if i can use starship to show which version of ROS i've sourced on the terminal since i usually switch back and forth between ROS1 noetic and ROS2 foxy) how did you get the +8 -1 git line stuff btw? i have git_branch, git_commit, git_status, git_state already in my format (idk what git_state is?). can i start tmux automatically when opening a new terminal? i tried putting "tmux" in my .bashrc, which works but always gives me a warning about recursive tmux stuff. is there a workaround or even on starship.toml? thanks and here's how my ubuntu terminal is looking right now! (: imgur(dot)com/ONLqSJP
@andrew-burgess
@andrew-burgess Жыл бұрын
Your terminal looks great! love those colours! For the git: you can see my whole git prompt config in my starship.toml: github.com/andrew8088/dotfiles/blob/main/starship/starship.toml. the git status stuff is for stateful operations like rebasing and merging (starship.rs/config/#git-state). hmm, not sure about tmux. The problem with adding `tmux` to your `bashrc` is that then, when you open a terminal, you start a bash process, which starts a tmux process, which starts a bash process, which starts a tmux process ... not sure I understand your question about state when sourcing something, but I think you can create a custom module to check any env var, command version, or whatever you need!
Host your own git server with Soft Serve!
8:50
Andrew Burgess
Рет қаралды 10 М.
Switching to Starship for my Bash Prompt
20:48
Mischa van den Burg
Рет қаралды 7 М.
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 21 МЛН
天使救了路飞!#天使#小丑#路飞#家庭
00:35
家庭搞笑日记
Рет қаралды 85 МЛН
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 51 МЛН
UNO!
00:18
БРУНО
Рет қаралды 4,8 МЛН
The Starship Prompt Offers Infinite Possibilities
16:38
DistroTube
Рет қаралды 78 М.
Tmux will SKYROCKET your productivity - here’s how
10:02
typecraft
Рет қаралды 88 М.
New *incredible* mac OS terminal! (warp + starship + zsh)
15:11
Christian Lempa
Рет қаралды 392 М.
What's the ultimate terminal emulator? // Warp vs Wave
20:56
Christian Lempa
Рет қаралды 72 М.
Dotfiles! Here's how I organize them.
9:37
Andrew Burgess
Рет қаралды 42 М.
Your shell prompt, ON STEROIDS // Starship
9:09
DevOps Toolbox
Рет қаралды 35 М.
zoxide has forever improved the way I navigate in the terminal.
9:53
Dreams of Autonomy
Рет қаралды 450 М.
Write beautiful shell scripts with Gum! [Terminal Velocity 4]
13:23
Andrew Burgess
Рет қаралды 21 М.
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 21 МЛН