diff --git a/.bashrc b/.bashrc index 3cea62016142bcc78a074928533cc2a76f5fac4b..2e252c6f3839df5a10481e32e9be09c819441af0 100644 --- a/.bashrc +++ b/.bashrc @@ -265,11 +265,11 @@ toux () { } wb () { - toolbox run --container workbench -- /bin/sh -ic 'if tmux ls >/dev/null 2>&1; then tmux a; else tmux; fi;' + toolbox run --container workbench -- tmux -L workbench new-session -As workbench } wbr () { - ssh -t ns4.shore.co.il toolbox run --container workbench -- /bin/sh -ic "'if tmux ls >/dev/null 2>&1; then tmux a; else tmux; fi;'" + ssh -t ns4.shore.co.il toolbox run --container workbench -- tmux -L workbench new-session -As workbench } __prompt () { diff --git a/.tmux.conf b/.tmux.conf index 5fa2a04eeadd109e5344d550c7f87d67e1c6191a..ad05793ea659bfc8e028dce7b2d2766618e04ec2 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,6 +1,7 @@ bind-key b send-prefix set -g set-titles on set -g set-titles-string '#T' +set -g status-left-length 12 # Copied from https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-dark.conf #### COLOUR (Solarized dark) diff --git a/Documents/bin/update-wb b/Documents/bin/update-wb index a2bc3863c6adefcd6f498e91c61b3d4c26051db4..9d79d01acbe4b1b7001b62ade4fe4ae0754eccf5 100755 --- a/Documents/bin/update-wb +++ b/Documents/bin/update-wb @@ -14,15 +14,20 @@ is_latest() { } update() { + if [ -S "/tmp/tmux-$(id -u)/workbench" ] + then + toolbox run --container workbench -- tmux -L workbench kill-server + fi toolbox rm --force "$CONTAINER" 2>/dev/null || true - yes | podman image prune --filter 'label=com.github.containers.toolbox=true' - killall tmux || true + podman image prune --filter 'label=com.github.containers.toolbox=true' --force toolbox create --image "$IMAGE" } if [ "$(hostname)" = 'toolbox' ] then - /usr/libexec/flatpak-xdg-utils/flatpak-spawn --host "$0" "$@" + printf '\e[1;91m%s\e[0m\n' \ + 'Cannot update the workbench container from inside the workbench container.' >&2 + exit 1 elif [ "${1:-}" = "-d" ] || [ "${1:-}" = "--dry-run" ] || [ -n "${DRY_RUN:-}" ] then podman image pull "$IMAGE" > /dev/null