From a71137b23480eeffb0d029561abad7abb3bcd232 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Wed, 7 Jun 2023 09:45:55 +0200 Subject: [PATCH] feat: split configuration --- config.bash | 23 ++++------------------- config.d/git.bash | 8 ++++++++ config.d/screen.bash | 9 +++++++++ config.d/tmux.bash | 9 +++++++++ 4 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 config.d/git.bash create mode 100644 config.d/screen.bash create mode 100644 config.d/tmux.bash diff --git a/config.bash b/config.bash index d03415e..63b713c 100644 --- a/config.bash +++ b/config.bash @@ -1,9 +1,10 @@ #!/bin/bash -# Configuration GIT -git config --global user.name "Xavier Logerais" -git config --global user.email "xavier@logerais.com" +for file in config.d/*.bash +do + bash $file +done # Configuration BASH @@ -28,19 +29,3 @@ then git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim nvim +PackerSync fi - -# Configuration SCREEN - -if [[ ! -d ~/.screen ]] -then - git clone --recursive https://github.com/xlogerais/config-screen.git ~/.screen - bash ~/.screen/create-links.bash -fi - -# Configuration TMUX - -if [[ ! -d ~/.tmux ]] -then - git clone --recursive https://github.com/xlogerais/config-tmux.git ~/.tmux - bash ~/.tmux/create-links.bash -fi diff --git a/config.d/git.bash b/config.d/git.bash new file mode 100644 index 0000000..683c479 --- /dev/null +++ b/config.d/git.bash @@ -0,0 +1,8 @@ +#!/bin/bash + +# Configuration GIT + +git config --global user.name "Xavier Logerais" +git config --global user.email "xavier@logerais.com" +git config --global rerere.enabled 1 +git config --global merge.conflictstyle diff3 diff --git a/config.d/screen.bash b/config.d/screen.bash new file mode 100644 index 0000000..f00e28b --- /dev/null +++ b/config.d/screen.bash @@ -0,0 +1,9 @@ +#!/bin/bash + +# Configuration SCREEN + +if [[ ! -d ~/.screen ]] +then + git clone --recursive https://github.com/xlogerais/config-screen.git ~/.screen + bash ~/.screen/create-links.bash +fi diff --git a/config.d/tmux.bash b/config.d/tmux.bash new file mode 100644 index 0000000..ab3caef --- /dev/null +++ b/config.d/tmux.bash @@ -0,0 +1,9 @@ +#!/bin/bash + +# Configuration TMUX + +if [[ ! -d ~/.tmux ]] +then + git clone --recursive https://github.com/xlogerais/config-tmux.git ~/.tmux + bash ~/.tmux/create-links.bash +fi