mirror of
https://github.com/danbee/dotfiles-local
synced 2025-03-04 08:49:07 +00:00
Starship in ZSH with OS custom prompt
This commit is contained in:
parent
acbedc62bb
commit
a8143ba043
21
bin/lib/os.rb
Normal file
21
bin/lib/os.rb
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
class OS
|
||||||
|
ICONS = {
|
||||||
|
"Darwin" => "",
|
||||||
|
"Linux" => "",
|
||||||
|
"FreeBSD" => "",
|
||||||
|
}
|
||||||
|
|
||||||
|
def os
|
||||||
|
"#{icon} #{name}"
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def name
|
||||||
|
@os ||= `uname -s`.strip
|
||||||
|
end
|
||||||
|
|
||||||
|
def icon
|
||||||
|
ICONS[name]
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -1,5 +1,5 @@
|
|||||||
require_relative "tools_file"
|
require_relative "tools/file"
|
||||||
require_relative "tool_icons"
|
require_relative "tools/icons"
|
||||||
|
|
||||||
class Tools
|
class Tools
|
||||||
include ToolIcons
|
include ToolIcons
|
||||||
5
bin/os
Executable file
5
bin/os
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
require_relative "lib/os"
|
||||||
|
|
||||||
|
puts OS.new.os
|
||||||
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
require_relative "tools_lib/tools"
|
require_relative "lib/tools"
|
||||||
|
|
||||||
tools = Tools.new
|
tools = Tools.new
|
||||||
tools.list_tools
|
tools.list_tools
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
fish_add_path /opt/homebrew/bin
|
||||||
|
fish_add_path /opt/homebrew/sbin
|
||||||
|
|
||||||
starship init fish | source
|
starship init fish | source
|
||||||
|
|
||||||
source (brew --prefix)/opt/asdf/libexec/asdf.fish
|
source (brew --prefix)/opt/asdf/libexec/asdf.fish
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
format="$all$directory$character"
|
format="$all$custom$jobs$directory$character"
|
||||||
|
|
||||||
[character]
|
[character]
|
||||||
success_symbol = "[](bold cyan)"
|
success_symbol = "[](bold cyan)"
|
||||||
@ -13,6 +13,21 @@ symbol = " "
|
|||||||
[aws]
|
[aws]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
|
[python]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[elixir]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[custom.os]
|
||||||
|
disabled = false
|
||||||
|
command = "os"
|
||||||
|
style = "bold white"
|
||||||
|
format = "[$symbol($output )]($style)"
|
||||||
|
symbol = ""
|
||||||
|
when = "true"
|
||||||
|
shell = ["bash", "--noprofile", "--norc"]
|
||||||
|
|
||||||
[git_branch]
|
[git_branch]
|
||||||
format = "[$symbol$branch]($style) "
|
format = "[$symbol$branch]($style) "
|
||||||
|
|
||||||
|
|||||||
@ -56,3 +56,5 @@ if (( $+commands[thefuck] )); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
export PATH="$HOME/.bin:$PATH"
|
export PATH="$HOME/.bin:$PATH"
|
||||||
|
|
||||||
|
eval "$(starship init zsh)"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user