Add sddm
This commit is contained in:
parent
c77f768860
commit
a2290513a4
4 changed files with 71 additions and 15 deletions
|
@ -6,6 +6,10 @@ if [ -z "$BASE_DIR" ]; then
|
|||
echo "BASE_DIR wasn't set."
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$GITHUB_DOTFILES" ]; then
|
||||
echo "GITHUB_DOTFILES wasn't set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install required packages {{{
|
||||
|
||||
|
@ -28,22 +32,21 @@ fi
|
|||
|
||||
# Add clones from GitHub {{{
|
||||
|
||||
github_dotfiles=~/github_dotfiles
|
||||
mkdir -p "$GITHUB_DOTFILES"
|
||||
|
||||
mkdir -p ~/github_dotfiles
|
||||
if [ -e "$github_dotfiles"/i3-starterpack ]; then
|
||||
if [ -e "$GITHUB_DOTFILES"/i3-starterpack ]; then
|
||||
if [ "$UPDATE" = 'true' ]; then
|
||||
cd "$github_dotfiles"/i3-starterpack && git pull
|
||||
cd "$GITHUB_DOTFILES"/i3-starterpack && git pull
|
||||
fi
|
||||
else
|
||||
cd "$github_dotfiles" && git clone https://github.com/addy-dclxvi/i3-starterpack.git
|
||||
cd "$GITHUB_DOTFILES" && git clone https://github.com/addy-dclxvi/i3-starterpack.git
|
||||
fi
|
||||
if [ -e "$github_dotfiles"/i3blocks-contrib ]; then
|
||||
if [ -e "$GITHUB_DOTFILES"/i3blocks-contrib ]; then
|
||||
if [ "$UPDATE" = 'true' ]; then
|
||||
cd "$github_dotfiles"/i3blocks-contrib && git pull
|
||||
cd "$GITHUB_DOTFILES"/i3blocks-contrib && git pull
|
||||
fi
|
||||
else
|
||||
cd "$github_dotfiles" && git clone https://github.com/vivien/i3blocks-contrib.git
|
||||
cd "$GITHUB_DOTFILES" && git clone https://github.com/vivien/i3blocks-contrib.git
|
||||
fi
|
||||
|
||||
# }}}
|
||||
|
@ -52,10 +55,10 @@ fi
|
|||
|
||||
echo "Adding .Xresources and .xsettingsd"
|
||||
if [ ! -L ~/.Xresources ]; then
|
||||
ln -rs "$github_dotfiles"/i3-starterpack/.Xresources ~/.Xresources 2> /dev/null
|
||||
ln -rs "$GITHUB_DOTFILES"/i3-starterpack/.Xresources ~/.Xresources 2> /dev/null
|
||||
fi
|
||||
if [ ! -L ~/.xsettingsd ]; then
|
||||
ln -rs "$github_dotfiles"/i3-starterpack/.xsettingsd ~/.xsettingsd 2> /dev/null
|
||||
ln -rs "$GITHUB_DOTFILES"/i3-starterpack/.xsettingsd ~/.xsettingsd 2> /dev/null
|
||||
fi
|
||||
|
||||
echo "Adding picom.config"
|
||||
|
@ -67,7 +70,7 @@ fi
|
|||
echo "Adding feather.ttf"
|
||||
mkdir -p ~/.fonts/icomoon
|
||||
if [ ! -L ~/.fonts/icomoon/feather.ttf ]; then
|
||||
ln -rs "$github_dotfiles"/i3-starterpack/.fonts/icomoon/feather.ttf ~/.fonts/icomoon/feather.ttf 2> /dev/null
|
||||
ln -rs "$GITHUB_DOTFILES"/i3-starterpack/.fonts/icomoon/feather.ttf ~/.fonts/icomoon/feather.ttf 2> /dev/null
|
||||
fi
|
||||
|
||||
# }}}
|
||||
|
@ -100,10 +103,10 @@ if [ ! -L ~/.config/i3blocks/config ]; then
|
|||
ln -rs "$BASE_DIR"/dotfiles/i3/i3blocks_config ~/.config/i3blocks/config 2> /dev/null
|
||||
fi
|
||||
if [ ! -L ~/.config/i3blocks/scripts/arch-update ]; then
|
||||
ln -rs ~/github_dotfiles/i3blocks-contrib/arch-update/arch-update ~/.config/i3blocks/scripts/arch-update 2> /dev/null
|
||||
ln -rs "$GITHUB_DOTFILES"/i3blocks-contrib/arch-update/arch-update ~/.config/i3blocks/scripts/arch-update 2> /dev/null
|
||||
fi
|
||||
if [ ! -L ~/.config/i3blocks/scripts/rofi-calendar ]; then
|
||||
ln -rs ~/github_dotfiles/i3blocks-contrib/rofi-calendar/rofi-calendar ~/.config/i3blocks/scripts/rofi-calendar 2> /dev/null
|
||||
ln -rs "$GITHUB_DOTFILES"/i3blocks-contrib/rofi-calendar/rofi-calendar ~/.config/i3blocks/scripts/rofi-calendar 2> /dev/null
|
||||
fi
|
||||
|
||||
# }}}
|
40
installation_scripts/sddm.sh
Normal file
40
installation_scripts/sddm.sh
Normal file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
|
||||
## This script takes care of the sddm configuration
|
||||
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
echo "BASE_DIR wasn't set."
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$GITHUB_DOTFILES" ]; then
|
||||
echo "GITHUB_DOTFILES wasn't set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install required packages {{{
|
||||
|
||||
if [ "$OS" = 'arch' ]; then
|
||||
sudo pacman -S --needed sddm
|
||||
elif [ "$OS" = 'debian' ]; then
|
||||
sudo apt install sddm
|
||||
else
|
||||
echo "${RED}The OS wasn't defined. Quitting...${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# }}}
|
||||
|
||||
# Add clones from GitHub {{{
|
||||
|
||||
mkdir -p "$GITHUB_DOTFILES"
|
||||
|
||||
if [ -e "$GITHUB_DOTFILES"/delicious-sddm-theme ]; then
|
||||
if [ "$UPDATE" = 'true' ]; then
|
||||
cd "$GITHUB_DOTFILES"/delicious-sddm-theme && git pull
|
||||
fi
|
||||
else
|
||||
cd "$GITHUB_DOTFILES" && git clone https://github.com/stuomas/delicious-sddm-theme.git && /bin/bash/ "$GITHUB_DOTFILES"/delicious-sddm-theme/install.sh
|
||||
fi
|
||||
|
||||
# }}}
|
||||
|
|
@ -20,6 +20,9 @@ export NC
|
|||
BASE_DIR="$PWD"
|
||||
export BASE_DIR
|
||||
|
||||
GITHUB_DOTFILES=~/github_dotfiles
|
||||
export GITHUB_DOTFILES
|
||||
|
||||
separator() {
|
||||
exit_status=$?
|
||||
if [ $exit_status -eq 0 ]; then
|
||||
|
@ -137,17 +140,27 @@ update_vim() { # {{{
|
|||
# Update vim configuration
|
||||
|
||||
echo "Setting up configuration for Vim..."
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/vim_update.sh
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/vim.sh
|
||||
separator
|
||||
|
||||
} # }}}
|
||||
update_vim
|
||||
|
||||
setup_sddm() { # {{{
|
||||
# Update sddm
|
||||
|
||||
echo "Setting up SDDM..."
|
||||
/bin/bash "$BASE_DIR"/install_scripts/sddm.sh
|
||||
separator
|
||||
|
||||
} # }}}
|
||||
setup_sddm
|
||||
|
||||
update_i3() { # {{{
|
||||
# Update i3 configuration
|
||||
|
||||
echo "Setting up i3..."
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/i3_update.sh
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/i3.sh
|
||||
separator
|
||||
|
||||
} # }}}
|
||||
|
|
Loading…
Add table
Reference in a new issue