diff --git a/scripts/backup.sh b/scripts/backup.sh index 44cc526..94da88d 100755 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -5,8 +5,9 @@ ########################################## set -o pipefail -source "$XDG_CONFIG_HOME"/zsh/secrets.sh export XDG_RUNTIME_DIR=/run/user/1000 +export XDG_CONFIG_HOME=/home/server/.config +source "$XDG_CONFIG_HOME"/zsh/secrets.sh ########################################## # Create sqlite3 backup for Vaultwarden # diff --git a/scripts/start_viewer.sh b/scripts/start_viewer.sh new file mode 100755 index 0000000..2cb5d51 --- /dev/null +++ b/scripts/start_viewer.sh @@ -0,0 +1,2 @@ +#!/bin/sh +virt-viewer -c qemu:///system Riva --attach -k diff --git a/scripts/sync_vault.sh b/scripts/sync_vault.sh index 0d02061..7f371e6 100755 --- a/scripts/sync_vault.sh +++ b/scripts/sync_vault.sh @@ -1,5 +1,6 @@ #!/bin/bash +export XDG_CONFIG_HOME=/home/server/.config source "$XDG_CONFIG_HOME"/zsh/secrets.sh for _ in {1..2}; do diff --git a/zsh/.zshrc b/zsh/.zshrc index 6da9896..29058b1 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,6 +1,4 @@ -if [[ -z "${XDG_CONFIG_HOME}" ]]; then - source ~/.profile -fi +source ~/.profile # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc. # Initialization code that may require console input (password prompts, [y/n] @@ -162,7 +160,7 @@ function zvm_after_init() { if [ "$REMOTE_PATH" != "" ]; then cd "$REMOTE_PATH" elif [ "$PREVIOUS_SESSION_ID" != "" ]; then - cd $(readlink -e /proc/$(cat /tmp/ssh_sessions/$PREVIOUS_SESSION_ID)/cwd) + cd "$(readlink -e /proc/$(cat /tmp/ssh_sessions/$PREVIOUS_SESSION_ID)/cwd)" fi }