-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·92 lines (73 loc) · 2.32 KB
/
install.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
#!/bin/bash
# check if yay is installed
installed=$(which yay)
if [[ $installed != "/usr/bin/yay" ]]; then
cd ..
sudo pacman -S --needed git
git clone https://aur.archlinux.org/yay
wait
cd yay
makepkg -si
wait
cd ..
cd ags_personal
fi
# update packages
yay -Syu
# remove dunst as ags has builtin notification service
yay -R dunst
userConfDir="/home/"$(whoami)"/.config"
function install_packages(){
while IFS= read -r package #IFS is special variable to fine whitespaces
do
#Skip emty lines and comments in package.txt
if [[ -z "$package" || "$package" == "#"* ]]; then
continue
fi
yay -S --needed --noconfirm "$package"
done < $1
}
# install dependencies
install_packages "./packages/dependencies.txt"
# remove folders(if was any) and ereate symlinks to .config
currDir=$(pwd)
rm -rf $userConfDir/ags
rm -rf $userConfDir/hypr
ln -s $currDir/.config/hypr $userConfDir/hypr
ln -s $currDir/.config/ags $userConfDir/ags
# set theme to adw-gtk3-dark
gsettings set org.gnome.desktop.interface gtk-theme "adw-gtk3-dark"
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' # for gtk4 apps
echo "Theme is set to adw-gtk3-dark"
sleep 2
# Add Wallpaper for hyprpaper
# URL of the API endpoint to fetch random wallpapers from Wallhaven.cc
API_URL="https://wallhaven.cc/api/v1/search?sorting=random"
# Download the JSON response containing information about random wallpapers
response=$(curl -s "$API_URL")
# Parse the JSON response to extract the URL of the random wallpaper
wallpaper_url=$(echo "$response" | jq -r '.data[0].path')
# Download the wallpaper using wget
wget "$wallpaper_url" -P ~/Pictures/Wallpapers/
echo "Random wallpaper downloaded to ~/Pictures/Wallpapers"
# my personal packages install
# if you want to configure and install
# change user name
user="mallarb"
if [[ $(whoami) == "$user" ]]; then
export currDir=$(pwd)
export userConfDir="/home/"$(whoami)"/.config"
install_packages "./packages/personal_packages.txt"
# start warp service
# sudo systemctl enable warp-svc.service
# sudo systemctl start warp-svc.service
# warp-cli register
# copy config files
rm -rf $userConfDir/kitty
ln -s $currDir/.config/kitty $userConfDir/kitty
rm -rf $userConfDir/nvim
ln -s $currDir/.config/nvim $userConfDir/nvim
fi
source ./scripts/sddm.sh
source ./scripts/grub.sh
source ./scripts/terminal.sh