-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.sh
executable file
·114 lines (96 loc) · 3.26 KB
/
setup.sh
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/env bash
# Arch linux xmonad setup script
#-----------------
red='\033[1;31m'
rset='\033[0m'
grn='\033[1;32m'
ylo='\033[1;33m'
blue='\033[1;34m'
#-----------------
clear
echo -e "$red Installing necessary packages... $rset"
sudo pacman -Syu xmonad xmonad-contrib xmonad-utils xmobar base-devel alacritty xwallpaper xorg-xsetroot xorg-xprop trayer
clear
echo -e "$grn choose aur helper for installing picom-ibhagwan-git. 1. paru 2. yay $rset"
read -r -p " select aur helper (1 or 2): " ans
if [ $ans -eq 1 ]
then
HELPER="paru"
fi
if [ $ans -eq 2 ]
then
HELPER="yay"
fi
# test if command is available, install if not
mkdir -p ~/.srcs
if ! command -v $HELPER &> /dev/null
then
echo -e "$blue Selected helper not installed. Now setup will install manually $rset"
git clone https://aur.archlinux.org/picom-ibhagwan-git.git ~/.srcs/picom-ibhagwan-git
(cd ~/.srcs/picom-ibhagwan-git/ && makepkg -si )
else
$HELPER -S picom-ibhagwan-git
fi
clear
#copy dotfiles
if [ -f ~/.xmobarrc ]; then
echo -e "$ylo xmobar config detected. creating backup file and copying new config... $rset"
cp ~/.xmobarrc ~/.xmobarrc.bak;
cp ./config/xmobarrc ~/.xmobarrc;
else
echo -e "$blue copying xmobar config file... $rset"
cp ./config/xmobarrc ~/.xmobarrc
fi
echo -e "$blue copying fonts... $rset"
mkdir -p ~/.local/share/fonts
cp -r ./fonts/* ~/.local/share/fonts/
fc-cache -f
mkdir -p ~/.config/
if [ -f ~/.config/picom.conf ]; then
echo -e "$ylo Picom configs detected, backing up and copying new config... $rset"
cp ~/.config/picom.conf ~/.config/picom.conf.bak;
cp ./config/picom.conf ~/.config/picom.conf;
else
echo -e "$blue Installing picom configs... $rset"
cp ./config/picom.conf ~/.config/picom.conf;
fi
if [ -d ~/.config/alacritty ]; then
echo -e "$ylo Alacritty configs detected, backing up and copying new config...$rset"
cp ~/.config/alacritty/alacritty.yml ~/.config/alacritty/alacritty.yml.bak;
cp ./config/alacritty.yml ~/.config/alacritty/alacritty.yml;
else
echo -e "$blue Installing alacritty configs... $rset"
mkdir -p ~/.config/alacritty
cp ./config/alacritty.yml ~/.config/alacritty/alacritty.yml;
fi
if [ -d ~/wallpapers ]; then
echo -e "$ylo Adding wallpaper to ~/wallpapers... $rset"
cp ./wallpapers/* ~/wallpapers/;
else
echo -e "$blue Installing wallpaper... $rset"
mkdir ~/wallpapers && cp -r ./wallpapers/* ~/wallpapers/;
fi
if [ -d ~/.config/dunst ]; then
echo -e "$ylo dunst configs detected, backing up and copying new config... $rset"
mkdir ~/.config/dunst.bak && mv ~/.config/dunst/* ~/.config/dunst.bak/
cp ./config/dunstrc ~/.config/dunst/;
else
echo -e "$blue Installing dunst configs... $rset"
mkdir ~/.config/dunst && cp ./config/dunstrc ~/.config/dunst/;
fi
if [ -d ~/.config/xmonad ]; then
echo -e "$ylo XMonad configs detected, backing up and copying new config... $rset"
mkdir ~/.config/xmonad.bak && mv ~/.config/xmonad/* ~/.config/xmonad.bak/
cp ./config/xmonad.hs ~/.config/xmonad/;
cp ./config/padding-icon.sh ~/.config/xmonad/;
else
echo -e "$blue Installing xmonad configs... $rset"
mkdir ~/.config/xmonad && cp ./config/xmonad.hs ~/.config/xmonad/;
cp ./config/padding-icon.sh ~/.config/xmonad/;
fi
sleep 1;
if [ -d ~/.xmonad ]; then
rm -rf ~/.xmonad && xmonad --recompile;
else
xmonad --recompile
fi