From e42dcfd45f1cd20e9830df257e2af4f1565cc8da Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Wed, 29 Oct 2025 22:17:45 +0100 Subject: [PATCH] feat(config): Improve config script for screen To follow the approach used for the tmux config script. --- config.d/screen.bash | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/config.d/screen.bash b/config.d/screen.bash index 2cf584e..afc5dd6 100644 --- a/config.d/screen.bash +++ b/config.d/screen.bash @@ -1,9 +1,12 @@ #!/bin/bash -# Configuration SCREEN +git_repo="https://gitea.cloud.logerais.com/xavier/config-screen.git" +git_branch="master" +config_dir=${XDG_CONFIG_HOME:-$HOME/.config}/screen -if [[ ! -d ~/.screen ]] -then - git clone --recursive https://gitea.logerais.com/xavier/config-screen.git ~/.screen - bash ~/.screen/create-links.bash +if [[ ! -d "${config_dir}" ]]; then + git clone "${git_repo}" --branch "${git_branch}" --recursive "${config_dir}" +else + cd "${config_dir}" && git pull fi +ln -sf "${config_dir}/screenrc" "${HOME}/.screenrc"