diff --git a/config/nvim/plugins/colorscheme.lua b/config/nvim/plugins/colorscheme.lua index 28c0feb..958de19 100644 --- a/config/nvim/plugins/colorscheme.lua +++ b/config/nvim/plugins/colorscheme.lua @@ -1,7 +1,12 @@ -- Configure rose-pine and gruvbox-material colorschemes. return { { "rose-pine/neovim" }, - { "sainnhe/gruvbox-material" }, + { + "sainnhe/gruvbox-material", + opts = function() + vim.g.gruvbox_material_foreground = "original" + end, + }, { -- Set default colorscheme. "LazyVim/LazyVim", diff --git a/enter.sh b/enter.sh index 6ffc350..4b9a27a 100755 --- a/enter.sh +++ b/enter.sh @@ -10,6 +10,7 @@ # configurable mount directories # # =============================================== # set -e +log() { printf '\e[%sm%s\e[0m %s\n' "${3:-36}" "${2:-○}" "$1"; } # run_args returns the arguments required for the podman run # command. @@ -49,7 +50,7 @@ run_args() { ### MAIN ### name="dev" image="git.plabble.org/job79/dev:latest" -recreate=false +fetch=false while test $# -gt 0; do case "$1" in @@ -61,22 +62,24 @@ while test $# -gt 0; do shift name="$1" ;; - --recreate | -r) - recreate=true + --fetch | -f) + fetch=true ;; - *) echo "unknown argument '$1'" ;; + *) log "unknown argument '$1'" 'x' 31 ;; esac shift done -if - [ "$recreate" = true ] || - { [ "$(podman container inspect "$name" -f {{.State.Running}})" = 'false' ] && - [ "$(podman pull -q "$image")" != "$(podman container inspect "$name" -f {{.Image}})" ]; } -then - podman container rm -f -t 1 "$name" 1>/dev/null - podman run -it $(run_args) "$image" -else - podman start "$name" 1>/dev/null - podman exec -it "$name" bash -l +if "$fetch" = true ] || [ "$(podman container inspect "$name" -f {{.State.Running}})" = 'false' ]; then + log "fetching updates..." + if [ "$(podman pull -q "$image")" != "$(podman container inspect "$name" -f {{.Image}})" ]; then + log "new container image downloaded" '✓' 32 + podman container rm -f -t 1 "$name" 1>/dev/null + podman run -it $(run_args) "$image" + exit + fi + log "no updates available" '✓' 32 fi + +podman start "$name" 1>/dev/null +podman exec -it "$name" bash -l