Starship Prompt: Building Custom Modules

  Рет қаралды 16,982

Andrew Burgess

Andrew Burgess

Күн бұрын

Пікірлер: 21
@argonjs
@argonjs 2 жыл бұрын
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!
@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 }'
@DV-ml4fm
@DV-ml4fm 7 ай бұрын
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.
@moneyfr
@moneyfr 2 жыл бұрын
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 2 жыл бұрын
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 Жыл бұрын
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)
@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.
@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.
@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!
@oak-d6w
@oak-d6w 2 жыл бұрын
great!
@moneyfr
@moneyfr 2 жыл бұрын
Could you share your config ?
@andrew-burgess
@andrew-burgess 2 жыл бұрын
Sure, check it out here: github.com/andrew8088/dotfiles/blob/main/starship/starship.toml
@Deiha-z4d
@Deiha-z4d 6 ай бұрын
To speed up, maybe: ps -e -o comm -t | grep nano | grep -v grep
@Samonitari
@Samonitari 7 ай бұрын
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 2 жыл бұрын
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 2 жыл бұрын
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
Рет қаралды 11 М.
Building Fluent Interfaces in TypeScript
16:15
Andrew Burgess
Рет қаралды 17 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Your shell prompt, ON STEROIDS // Starship
9:09
DevOps Toolbox
Рет қаралды 49 М.
Make Windows Terminal look amazing!
18:24
Christian Lempa
Рет қаралды 555 М.
Tmux will SKYROCKET your productivity - here’s how
10:02
typecraft
Рет қаралды 115 М.
Level Up Your macOS Terminal with WezTerm, Starship and eza
12:36
Marco Peluso
Рет қаралды 10 М.
The Starship Prompt Offers Infinite Possibilities
16:38
DistroTube
Рет қаралды 84 М.
Write beautiful shell scripts with Gum! [Terminal Velocity 4]
13:23
Andrew Burgess
Рет қаралды 22 М.
How I Use Wezterm & Zsh For An Amazing Terminal Setup On My Mac
16:00
Josean Martinez
Рет қаралды 109 М.
We may have killed p10k, so I found the perfect replacement.
19:48
Dreams of Autonomy
Рет қаралды 189 М.
Prettify Your BASH Prompt
14:23
The Linux Cast
Рет қаралды 24 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН