Skip to content

Commit

Permalink
Feat: Add python support to starship
Browse files Browse the repository at this point in the history
Summary
----

Typically users have python with a `.venv` folder in the project they're
working on.

This adds python support to the starship prompt.

Example:
```
 starship explain

 Here's a breakdown of your prompt:
 " " (<1ms)                        -  A character (usually an arrow) beside where the text is entered in your terminal
 " ~/personal/python-test " (<1ms)  -  The current working directory
 "🍭 " (31ms)                       -  The current operating system
 " .venv v3.11.3 " (1ms)           -  The currently installed version of Python
 " user " (<1ms)                    -  The active user's username
```
  • Loading branch information
vihu committed Jul 26, 2024
1 parent d3e8b1a commit 3a5c7f5
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
5 changes: 4 additions & 1 deletion extra/carbonfox/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $git_status\
$nodejs\
$rust\
$golang\
$python\
[](fg:lang_bg bg:background)\
\n$character"""

Expand Down Expand Up @@ -133,7 +134,9 @@ format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
[python]
symbol = ""
style = "bg:lang_bg"
format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
format = '[[ $symbol($virtualenv )($version) ](fg:lang_fg bg:lang_bg)]($style)'
python_binary = ['.venv/bin/python']
detect_extensions = ['py']

[character]
disabled = false
Expand Down
5 changes: 4 additions & 1 deletion extra/dawnfox/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $git_status\
$nodejs\
$rust\
$golang\
$python\
[](fg:lang_bg bg:background)\
\n$character"""

Expand Down Expand Up @@ -133,7 +134,9 @@ format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
[python]
symbol = ""
style = "bg:lang_bg"
format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
format = '[[ $symbol($virtualenv )($version) ](fg:lang_fg bg:lang_bg)]($style)'
python_binary = ['.venv/bin/python']
detect_extensions = ['py']

[character]
disabled = false
Expand Down
5 changes: 4 additions & 1 deletion extra/dayfox/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $git_status\
$nodejs\
$rust\
$golang\
$python\
[](fg:lang_bg bg:background)\
\n$character"""

Expand Down Expand Up @@ -133,7 +134,9 @@ format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
[python]
symbol = ""
style = "bg:lang_bg"
format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
format = '[[ $symbol($virtualenv )($version) ](fg:lang_fg bg:lang_bg)]($style)'
python_binary = ['.venv/bin/python']
detect_extensions = ['py']

[character]
disabled = false
Expand Down
5 changes: 4 additions & 1 deletion extra/duskfox/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $git_status\
$nodejs\
$rust\
$golang\
$python\
[](fg:lang_bg bg:background)\
\n$character"""

Expand Down Expand Up @@ -133,7 +134,9 @@ format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
[python]
symbol = ""
style = "bg:lang_bg"
format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
format = '[[ $symbol($virtualenv )($version) ](fg:lang_fg bg:lang_bg)]($style)'
python_binary = ['.venv/bin/python']
detect_extensions = ['py']

[character]
disabled = false
Expand Down
5 changes: 4 additions & 1 deletion extra/nightfox/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $git_status\
$nodejs\
$rust\
$golang\
$python\
[](fg:lang_bg bg:background)\
\n$character"""

Expand Down Expand Up @@ -133,7 +134,9 @@ format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
[python]
symbol = ""
style = "bg:lang_bg"
format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
format = '[[ $symbol($virtualenv )($version) ](fg:lang_fg bg:lang_bg)]($style)'
python_binary = ['.venv/bin/python']
detect_extensions = ['py']

[character]
disabled = false
Expand Down
5 changes: 4 additions & 1 deletion extra/nordfox/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $git_status\
$nodejs\
$rust\
$golang\
$python\
[](fg:lang_bg bg:background)\
\n$character"""

Expand Down Expand Up @@ -133,7 +134,9 @@ format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
[python]
symbol = ""
style = "bg:lang_bg"
format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
format = '[[ $symbol($virtualenv )($version) ](fg:lang_fg bg:lang_bg)]($style)'
python_binary = ['.venv/bin/python']
detect_extensions = ['py']

[character]
disabled = false
Expand Down
5 changes: 4 additions & 1 deletion extra/terafox/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $git_status\
$nodejs\
$rust\
$golang\
$python\
[](fg:lang_bg bg:background)\
\n$character"""

Expand Down Expand Up @@ -133,7 +134,9 @@ format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
[python]
symbol = ""
style = "bg:lang_bg"
format = '[[ $symbol( $version) ](fg:lang_fg bg:lang_bg)]($style)'
format = '[[ $symbol($virtualenv )($version) ](fg:lang_fg bg:lang_bg)]($style)'
python_binary = ['.venv/bin/python']
detect_extensions = ['py']

[character]
disabled = false
Expand Down

0 comments on commit 3a5c7f5

Please sign in to comment.