Browse Source

window manager rice

master
Juni Kim 2 years ago
parent
commit
58498b536d
  1. 2
      .gitignore
  2. 88
      install_alpine.sh

2
.gitignore

@ -1 +1,3 @@
.DS_Store
*.un~
*.swp

88
install_alpine.sh

@ -36,6 +36,37 @@ root_setup() {
user_setup() {
cd "$HOME" || exit 1;
help_text() {
cat <<EOF
./install_alpine.sh user [options]
Options:
-G,--graphical install xorg and wm
-C,--cp install competitive programming scripts
EOF
}
GRAPHICAL=
CP=
while test $# -ne 0; do
case $1 in
-G|--graphical)
GRAPHICAL=1
;;
-C|--cp)
CP=1
;;
*)
echo "invalid option $1"
exit
;;
esac
shift
done
exit 1
if ! (apk list | grep 'doas' 2>&1) > /dev/null; then
echo "doas is not installed.";
exit 1
@ -49,23 +80,7 @@ user_setup() {
sysinfo() {
echo "Dylan Araps scripts"
cd "$HOME" || exit 1;
mkdir -p repos
git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch"
git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch"
git clone https://github.com/dylanaraps/fff "$HOME/repos/fff"
cd "$HOME/repos/pfetch" || exit 1;
doas make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/neofetch" || exit 1;
doas make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/fff" || exit 1;
doas make install || exit 2;
cd "$HOME" || exit 1;
doas apk add neofetch pfetch fff
}
dotfiles() {
@ -102,13 +117,44 @@ user_setup() {
nvim -c 'sleep 60' -c qa --headless
}
vimconfigs() {
doas apk add vim
wget https://git.junickim.me/junikimm717/vim2023/raw/branch/master/lsp.vimrc -o .vimrc
}
competitiveprogramming() {
echo "CP..."
git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp"
go install git.junickim.me/junikimm717/cpgo@latest
}
(dev && sysinfo && dotfiles && neovim) || exit 1
graphical() {
# xorg and drivers
doas setup-xorg-base
doas apk add xf86-video-qxl mesa-egl
doas apk add xf86-input-keyboard xf86-input-mouse xf86-input-evdev
# wm applications
doas apk add i3wm nitrogen alacritty polybar i3lock
# fonts
apk add font-jetbrains-mono-nerd font-siji
mkdir -p "$HOME/.config/polybar" || exit 1
mkdir -p "$HOME/.config/i3" || exit 1
mkdir -p "$HOME/.config/picom" || exit 1
cp "$DIR/dots/polybar.ini" "$HOME/.config/polybar/config" || exit 1
cp "$DIR/dots/i3config" "$HOME/.config/i3/config" || exit 1
cp "$DIR/dots/picom.conf" "$HOME/.config/picom/picom.conf" || exit 1
}
(dev && sysinfo && dotfiles && vimconfigs && neovim) || exit 1
if ! test -z "$CP"; then
competitiveprogramming || exit 1
fi
if ! test -z "$GRAPHICAL"; then
graphical || exit 1
fi
}
if test $# -eq 0; then
@ -117,10 +163,12 @@ fi
case $1 in
root|r)
root_setup
shift
root_setup "$@"
;;
user|u)
user_setup
shift
user_setup "$@"
;;
*)
echo "Invalid option $1"

Loading…
Cancel
Save