mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-10-16 06:17:34 +00:00
Compare commits
3 commits
e9395c3787
...
1269191e0d
Author | SHA1 | Date | |
---|---|---|---|
1269191e0d | |||
1be4fe9a77 | |||
526504fe0c |
4 changed files with 37 additions and 1 deletions
|
@ -1,4 +1,18 @@
|
|||
function fish_right_prompt
|
||||
if [ -n "$VIRTUAL_ENV_PROMPT" ]
|
||||
set_color white
|
||||
echo -n -- "{venv:"
|
||||
set_color reset
|
||||
|
||||
set_color brcyan
|
||||
echo -n -- " $VIRTUAL_ENV_PROMPT"
|
||||
set_color reset
|
||||
|
||||
set_color white
|
||||
echo -n -- "}"
|
||||
set_color reset
|
||||
end
|
||||
|
||||
if [ -f "compose.yml" ]
|
||||
set --local docker_pod_name (docker compose config --format="json" | jq --raw-output '.name')
|
||||
set --local docker_pod_states_output (docker compose ps --format="json" --all | jq --slurp --raw-output '.[].State')
|
||||
|
@ -10,7 +24,7 @@ function fish_right_prompt
|
|||
set --local docker_pod_dead_count (echo "$docker_pod_states_output" | grep --only-matching 'dead' - | wc --lines)
|
||||
|
||||
set_color white
|
||||
echo -n -- "{"
|
||||
echo -n -- "{compose:"
|
||||
set_color reset
|
||||
|
||||
if [ "$docker_pod_dead_count" -gt 0 ]
|
||||
|
|
10
functions/pad-image.fish
Normal file
10
functions/pad-image.fish
Normal file
|
@ -0,0 +1,10 @@
|
|||
which magick --skip-functions >/dev/null 2>/dev/null
|
||||
if [ $status -eq 0 ]
|
||||
function pad-image
|
||||
log-t "Creating" "Images padded to $argv[1]" "directory..."
|
||||
command mkdir --parents "Images padded to $argv[1]"
|
||||
log-d "Padding" "$argv[3]" "to $argv[1]..."
|
||||
command magick -background "$argv[2]" "$argv[3]" -resize "$argv[1]" -gravity "center" -extent "$argv[1]" $argv[4..-1] "Images padded to $argv[1]/$argv[3]"
|
||||
log-t "Done! Emoji added to the" "Images padded to $argv[1]" "directory!"
|
||||
end
|
||||
end
|
6
functions/python-build.fish
Normal file
6
functions/python-build.fish
Normal file
|
@ -0,0 +1,6 @@
|
|||
which uvx --skip-functions >/dev/null 2>/dev/null
|
||||
if [ $status -eq 0 ]
|
||||
function python-build
|
||||
uvx --from build pyproject-build --installer uv
|
||||
end
|
||||
end
|
6
functions/python-publish.fish
Normal file
6
functions/python-publish.fish
Normal file
|
@ -0,0 +1,6 @@
|
|||
which uvx --skip-functions >/dev/null 2>/dev/null
|
||||
if [ $status -eq 0 ]
|
||||
function python-publish
|
||||
uvx twine upload --non-interactive --verbose --username "Steffo" dist/*
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue