-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_all
76 lines (65 loc) · 1.95 KB
/
install_all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
# set some colors
CNT="[\e[1;36mNOTE\e[0m]"
COK="[\e[1;32mOK\e[0m]"
CER="[\e[1;31mERROR\e[0m]"
CAT="[\e[1;37mATTENTION\e[0m]"
CWR="[\e[1;35mWARNING\e[0m]"
CAC="[\e[1;33mACTION\e[0m]"
INSTLOG="install.log"
# Set some files as exacutable
echo -e "$CNT - Start install all(fcitx5 font hypr zsh)"
chmod +x ./install_fcitx5
chmod +x ./install_font
chmod +x ./install_hypr
chmod +x ./install_zsh
#### Check for yay ####
ISYAY=/sbin/yay
if [ -f "$ISYAY" ]; then
echo -e "$COK - yay is ok"
else
echo -e "$CWR - I don't find yay bin"
exit
fi
### Install fcitx5 ####
read -n1 -rep $'[\e[1;33mACTION\e[0m] - Install fcitx5? (y,n) ' INST
if [[ $INST == "Y" || $INST == "y" ]]; then
./install_fcitx5
fi
sleep 1
### Install font ####
read -n1 -rep $'[\e[1;33mACTION\e[0m] - Install font? (y,n) ' INST
if [[ $INST == "Y" || $INST == "y" ]]; then
./install_font
fi
sleep 1
### Install Hyprland ####
read -n1 -rep $'[\e[1;33mACTION\e[0m] - Install Hyprland? (y,n) ' INST
if [[ $INST == "Y" || $INST == "y" ]]; then
./install_hypr
fi
sleep 1
### Install Hyprland ####
read -n1 -rep $'[\e[1;33mACTION\e[0m] - Install zsh? (y,n) ' INST
if [[ $INST == "Y" || $INST == "y" ]]; then
./install_zsh
fi
### Copy Config Files ###
read -n1 -rep $'[\e[1;33mACTION\e[0m] - Copy config files? (y,n) ' CFG
if [[ $CFG == "Y" || $CFG == "y" ]]; then
echo -e "$CNT - Copying config files..."
for DIR in alacritty hypr mako swaylock waybar wlogout wofi
do
DIRPATH=~/.config/$DIR
if [ -d "$DIRPATH" ]; then
echo -e "$CAT - Config for $DIR located, backing up."
mv $DIRPATH $DIRPATH-back &>> $INSTLOG
echo -e "$COK - Backed up $DIR to $DIRPATH-back."
fi
echo -e "$CNT - Copying $DIR config to $DIRPATH."
cp -R $DIR ~/.config/ &>> $INSTLOG
done
fi
# Set some files as exacutable
echo -e "$CNT - Setting some file as executable."
chmod +x ~/.config/hypr/scripts/xdg-portal-hyprland