diff --git a/bin/lib/os.rb b/bin/lib/os.rb new file mode 100644 index 0000000..f66c913 --- /dev/null +++ b/bin/lib/os.rb @@ -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 diff --git a/bin/tools_lib/tools.rb b/bin/lib/tools.rb similarity index 92% rename from bin/tools_lib/tools.rb rename to bin/lib/tools.rb index 68dc6cf..a6c2095 100644 --- a/bin/tools_lib/tools.rb +++ b/bin/lib/tools.rb @@ -1,5 +1,5 @@ -require_relative "tools_file" -require_relative "tool_icons" +require_relative "tools/file" +require_relative "tools/icons" class Tools include ToolIcons diff --git a/bin/tools_lib/tools_file.rb b/bin/lib/tools/file.rb similarity index 100% rename from bin/tools_lib/tools_file.rb rename to bin/lib/tools/file.rb diff --git a/bin/tools_lib/tool_icons.rb b/bin/lib/tools/icons.rb similarity index 100% rename from bin/tools_lib/tool_icons.rb rename to bin/lib/tools/icons.rb diff --git a/bin/os b/bin/os new file mode 100755 index 0000000..e78e86f --- /dev/null +++ b/bin/os @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby + +require_relative "lib/os" + +puts OS.new.os diff --git a/bin/tools b/bin/tools index a538889..3f1a984 100755 --- a/bin/tools +++ b/bin/tools @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require_relative "tools_lib/tools" +require_relative "lib/tools" tools = Tools.new tools.list_tools diff --git a/config/fish/config.fish b/config/fish/config.fish index 88b025b..8d570ea 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -1,3 +1,6 @@ +fish_add_path /opt/homebrew/bin +fish_add_path /opt/homebrew/sbin + starship init fish | source source (brew --prefix)/opt/asdf/libexec/asdf.fish diff --git a/config/starship.toml b/config/starship.toml index 6364bca..4e801e9 100644 --- a/config/starship.toml +++ b/config/starship.toml @@ -1,4 +1,4 @@ -format="$all$directory$character" +format="$all$custom$jobs$directory$character" [character] success_symbol = "[](bold cyan)" @@ -13,6 +13,21 @@ symbol = " " [aws] 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] format = "[$symbol$branch]($style) " diff --git a/zshrc.local b/zshrc.local index 7ed33f0..f171484 100644 --- a/zshrc.local +++ b/zshrc.local @@ -56,3 +56,5 @@ if (( $+commands[thefuck] )); then fi export PATH="$HOME/.bin:$PATH" + +eval "$(starship init zsh)"