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