From e85be32a76d30162a5d0a54d84cf2f0bba6cbdf1 Mon Sep 17 00:00:00 2001 From: Anna Rose Wiggins Date: Wed, 30 Jul 2025 12:58:30 -0400 Subject: [PATCH] Better docker config. --- bash/docker-remote.sh | 11 +++++------ starship/starship.toml | 28 +++++++--------------------- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/bash/docker-remote.sh b/bash/docker-remote.sh index d7ddc4a..b9df60c 100644 --- a/bash/docker-remote.sh +++ b/bash/docker-remote.sh @@ -1,13 +1,12 @@ -# A simple aliasing tool for performing remote docker operations over ssh -# Usage: dcontrol -# Assumes you have key-based root login +# Convenience tool for setting DOCKER_HOST for remote docker operations over ssh. +# +# Enable: dcontrol +# Disable: dcontrol off function dcontrol() { if [ -z $1 ] || [ $1 == "off" ]; then - unalias docker 2> /dev/null unset DOCKER_HOST return fi - export DOCKER_HOST=$1 - alias docker="docker -H ssh://root@${DOCKER_HOST}" + export DOCKER_HOST=ssh://root@$1 } diff --git a/starship/starship.toml b/starship/starship.toml index 17154e5..f52584b 100644 --- a/starship/starship.toml +++ b/starship/starship.toml @@ -4,15 +4,6 @@ # Inserts a blank line between shell prompts add_newline = true -format = """ -$username\ -$hostname\ -$directory\ -${custom.dcontrol}\ -$all -""" - -# Replace the '❯' symbol in the prompt with '➜' [character] # The name of the module we are configuring is 'character' success_symbol = '[\$](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green' error_symbol = '[\$](bold red)' @@ -20,23 +11,21 @@ error_symbol = '[\$](bold red)' [cmd_duration] disabled = true -[custom.dcontrol] -format='[\[$symbol $output\]]($style) ' -command = "echo $DOCKER_HOST" -symbol=' ' -style="bold red" -when = '[ "$DOCKER_HOST" != "" ]' - [directory] truncation_length = 0 format = '[$path]($style)[$read_only]($read_only_style)\] ' +[docker_context] +symbol = ' ' +format = '[\[$symbol$context\]]($style) ' +style = 'bold red' + [git_branch] -format = '[\[$symbol $branch\]]($style) ' +format = '[\[$symbol$branch\]]($style) ' symbol = ' ' [golang] -format = '[$symbol]($style)' +format = '[\[$symbol$version\]]($style) ' [hostname] format = '[@$hostname$ssh_symbol:]($style)' @@ -46,9 +35,6 @@ ssh_only = false [package] disabled = true -[ruby] -format = '[$symbol]($style)' - [username] format = '\[[$user]($style)' style_user = 'yellow'