Refactor i3 and sddm
This commit is contained in:
parent
d5fd691b6d
commit
91ef7ea9bf
3 changed files with 30 additions and 47 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
## This script takes care of the i3 configuration
|
## This script takes care of the i3 configuration
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ fi
|
||||||
# Install required packages {{{
|
# Install required packages {{{
|
||||||
|
|
||||||
if [ "$OS" = 'arch' ]; then
|
if [ "$OS" = 'arch' ]; then
|
||||||
sudo pacman -S --needed i3
|
pacman -Qe i3-gaps || sudo pacman -S --needed i3
|
||||||
sudo pacman -S --needed dunst suckless-tools
|
sudo pacman -S --needed dunst suckless-tools
|
||||||
sudo pacman -S --needed picom hsetroot rofi xsettingsd lxappearance scrot viewnior
|
sudo pacman -S --needed picom hsetroot rofi xsettingsd lxappearance scrot viewnior
|
||||||
sudo pacman -S --needed noto-fonts
|
sudo pacman -S --needed noto-fonts
|
||||||
|
@ -63,27 +63,17 @@ fi
|
||||||
# Add config links {{{
|
# Add config links {{{
|
||||||
|
|
||||||
echo "Adding .Xresources and .xsettingsd"
|
echo "Adding .Xresources and .xsettingsd"
|
||||||
if [ ! -L ~/.Xresources ]; then
|
make_symlink ~/.Xresources "$GITHUB_DOTFILES"/i3-starterpack/.Xresources
|
||||||
ln -rs "$GITHUB_DOTFILES"/i3-starterpack/.Xresources ~/.Xresources 2> /dev/null
|
make_symlink ~/.xsettingsd "$GITHUB_DOTFILES"/i3-starterpack/.xsettingsd
|
||||||
fi
|
|
||||||
if [ ! -L ~/.xsettingsd ]; then
|
|
||||||
ln -rs "$GITHUB_DOTFILES"/i3-starterpack/.xsettingsd ~/.xsettingsd 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Adding picom.config"
|
echo "Adding picom.config"
|
||||||
mkdir -p ~/.config
|
mkdir -p ~/.config
|
||||||
if [ ! -L ~/.config/picom.conf ]; then
|
make_symlink ~/.config/picom.conf "$BASE_DIR"/dotfiles/picom.conf
|
||||||
ln -rs "$BASE_DIR"/dotfiles/picom.conf ~/.config/picom.conf 2> /dev/null
|
make_symlink ~/.config/compton.conf "$BASE_DIR"/dotfiles/picom.conf
|
||||||
fi
|
|
||||||
if [ ! -L ~/.config/compton.conf ]; then
|
|
||||||
ln -rs "$BASE_DIR"/dotfiles/picom.conf ~/.config/compton.conf 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Adding feather.ttf"
|
echo "Adding feather.ttf"
|
||||||
mkdir -p ~/.fonts/icomoon
|
mkdir -p ~/.fonts/icomoon
|
||||||
if [ ! -L ~/.fonts/icomoon/feather.ttf ]; then
|
make_symlink ~/.fonts/icomoon/feather.ttf "$GITHUB_DOTFILES"/i3-starterpack/.fonts/icomoon/feather.ttf
|
||||||
ln -rs "$GITHUB_DOTFILES"/i3-starterpack/.fonts/icomoon/feather.ttf ~/.fonts/icomoon/feather.ttf 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
@ -91,9 +81,7 @@ fi
|
||||||
|
|
||||||
echo "Adding i3/config"
|
echo "Adding i3/config"
|
||||||
mkdir -p ~/.config/i3
|
mkdir -p ~/.config/i3
|
||||||
if [ ! -L ~/.config/i3/config ]; then
|
make_symlink ~/.config/i3/config "$BASE_DIR"/dotfiles/i3/i3_config
|
||||||
ln -rs "$BASE_DIR"/dotfiles/i3/i3_config ~/.config/i3/config 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
@ -101,30 +89,20 @@ fi
|
||||||
|
|
||||||
echo "Adding i3status/config"
|
echo "Adding i3status/config"
|
||||||
mkdir -p ~/.config/i3status
|
mkdir -p ~/.config/i3status
|
||||||
if [ ! -L ~/.config/i3status/config ]; then
|
make_symlink ~/.config/i3status/config "$BASE_DIR"/dotfiles/i3/i3status_config
|
||||||
ln -rs "$BASE_DIR"/dotfiles/i3/i3status_config ~/.config/i3status/config 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Add i3blocks config {{{
|
# Add i3blocks config {{{
|
||||||
|
|
||||||
echo "Adding i3blocks/config"
|
echo "Adding i3blocks/config"
|
||||||
|
mkdir -p ~/.config/i3blocks
|
||||||
|
make_symlink ~/.config/i3blocks/config "$BASE_DIR"/dotfiles/i3/i3blocks_config
|
||||||
|
|
||||||
|
echo "Adding i3blocks scripts"
|
||||||
mkdir -p ~/.config/i3blocks/scripts
|
mkdir -p ~/.config/i3blocks/scripts
|
||||||
if [ ! -L ~/.config/i3blocks/config ]; then
|
make_symlink ~/.config/i3blocks/scripts/arch-update "$GITHUB_DOTFILES"/i3blocks-contrib/arch-update/arch-update
|
||||||
ln -rs "$BASE_DIR"/dotfiles/i3/i3blocks_config ~/.config/i3blocks/config 2> /dev/null
|
make_symlink ~/.config/i3blocks/scripts/ccurrency "$GITHUB_DOTFILES"/i3blocks-cryptocurrency/ccurrency
|
||||||
fi
|
make_symlink ~/.config/i3blocks/scripts/rofi-calendar "$GITHUB_DOTFILES"/i3blocks-contrib/rofi-calendar/rofi-calendar
|
||||||
|
|
||||||
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
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -L ~/.config/i3blocks/scripts/ccurrency ]; then
|
|
||||||
ln -rs "$GITHUB_DOTFILES"/i3blocks-cryptocurrency/ccurrency ~/.config/i3blocks/scripts/ccurrency 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
|
|
||||||
fi
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
## This script takes care of the sddm configuration
|
## This script takes care of the sddm configuration
|
||||||
|
|
||||||
|
@ -37,4 +37,3 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,11 @@ make_symlink() {
|
||||||
link=$1
|
link=$1
|
||||||
target=$2
|
target=$2
|
||||||
|
|
||||||
|
echo -n "Checking symlink $link..."
|
||||||
if [ "$link" -ef "$target" ]; then
|
if [ "$link" -ef "$target" ]; then
|
||||||
echo "${GREEN}$link points to the right location."
|
echo "${GREEN} ==> OK${NC}"
|
||||||
echo "Nothing changed.${NC}"
|
|
||||||
else
|
else
|
||||||
|
echo "${RED} ==> wrong symlink or not a symlink.${NC}"
|
||||||
if [ "$OVERWRITE" = 'true' ]; then
|
if [ "$OVERWRITE" = 'true' ]; then
|
||||||
rm "$link" 2> /dev/null
|
rm "$link" 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
@ -100,6 +101,11 @@ separator
|
||||||
OVERWRITE='false'
|
OVERWRITE='false'
|
||||||
UPDATE='false'
|
UPDATE='false'
|
||||||
|
|
||||||
|
if [ "$#" -eq 0 ]; then
|
||||||
|
echo "No arguments provided."
|
||||||
|
echo "Use -o to overwrite files."
|
||||||
|
echo "Use -u to enable updating."
|
||||||
|
fi
|
||||||
if [ "$#" -ge 1 ]; then
|
if [ "$#" -ge 1 ]; then
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-o | --overwrite )
|
-o | --overwrite )
|
||||||
|
@ -276,7 +282,7 @@ setup_bash_git_prompt() { # {{{
|
||||||
} # }}}
|
} # }}}
|
||||||
|
|
||||||
setup_i3() { # {{{
|
setup_i3() { # {{{
|
||||||
j
|
|
||||||
# Update i3 configuration
|
# Update i3 configuration
|
||||||
|
|
||||||
echo "Setting up i3..."
|
echo "Setting up i3..."
|
||||||
|
@ -310,11 +316,11 @@ setup_vim() { # {{{
|
||||||
# install_scripts
|
# install_scripts
|
||||||
# configure_git
|
# configure_git
|
||||||
# configure_protonvpn
|
# configure_protonvpn
|
||||||
# setup_bash_files
|
setup_bash_files
|
||||||
# setup_bash_git_prompt
|
setup_bash_git_prompt
|
||||||
# install_rust
|
install_rust
|
||||||
setup_vim
|
setup_vim
|
||||||
# setup_sddm
|
# setup_sddm
|
||||||
# setup_i3
|
setup_i3
|
||||||
# markdown_mimetype
|
# markdown_mimetype
|
||||||
# clone_projects
|
# clone_projects
|
||||||
|
|
Loading…
Add table
Reference in a new issue