forked from SolDoesTech/hyprland
-
Notifications
You must be signed in to change notification settings - Fork 0
/
set-hypr
139 lines (126 loc) · 5.46 KB
/
set-hypr
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/bin/bash
# The follwoing will attempt to install all needed packages to run Hyprland
# This is a quick and dirty script there are no error checking
# This script is meant to run on a clean fresh system
#
# Below is a list of the packages that would be installed
#
# hyprland: This is the Hyprland compositor
# kitty: This is the default terminal
# waybar-hyprland: This is a fork of waybar with Hyprland workspace support
# swaybg: This is used to set a desktop background image
# swaylock-effects: This allows for the locking of the desktop its a fork that adds some editional visual effects
# wofi: This is an application launcher menu
# wlogout: This is a logout menu that allows for shutdown, reboot and sleep
# mako: This is a graphical notification daemon
# thunar: This is a graphical file manager
# ttf-jetbrains-mono-nerd: Som nerd fonts for icons and overall look
# noto-fonts-emoji: fonts needed by the weather script in the top bar
# polkit-gnome: needed to get superuser access on some graphical appliaction
# python-requests: needed for the weather module script to execute
# starship: allows to customize the shell prompt
# swappy: This is a screenshot editor tool
# grim: This is a screenshot tool it grabs images from a Wayland compositor
# slurp: This helps with screenshots, it selects a region in a Wayland compositor
# pamixer: This helps with audio settings such as volume
# brightnessctl: used to control monitor bright level
# gvfs: adds missing functionality to thunar such as automount usb drives
# bluez: the bluetooth service
# bluez-utils: command line utilities to interact with bluettoth devices
# lxappearance: used to set GTK theme
# xfce4-settings: set of tools for xfce, needed to set GTK theme
# dracula-gtk-theme: the Dracula theme, it fits the overall look and feel
# dracula-icons-git" set of icons to go with the Dracula theme
# xdg-desktop-portal-hyprland-git: xdg-desktop-portal backend for hyprland
#### Check for yay ####
ISYAY=/sbin/yay
if [ -f "$ISYAY" ]; then
echo -e "yay was located, moving on.\n"
yay -Suy
else
echo -e "yay was not located, please install yay. Exiting script.\n"
exit
fi
### Disable wifi powersave mode ###
read -n1 -rep 'Would you like to disable wifi powersave? (y,n)' WIFI
if [[ $WIFI == "Y" || $WIFI == "y" ]]; then
LOC="/etc/NetworkManager/conf.d/wifi-powersave.conf"
echo -e "The following has been added to $LOC.\n"
echo -e "[connection]\nwifi.powersave = 2" | sudo tee -a $LOC
echo -e "\n"
echo -e "Restarting NetworkManager service...\n"
sudo systemctl restart NetworkManager
sleep 3
fi
### Install all of the above pacakges ####
read -n1 -rep 'Would you like to install the packages? (y,n)' INST
if [[ $INST == "Y" || $INST == "y" ]]; then
yay -S --noconfirm hyprland kitty waybar-hyprland \
swaybg swaylock-effects wofi wlogout mako thunar \
ttf-jetbrains-mono-nerd noto-fonts-emoji \
polkit-gnome python-requests starship \
swappy grim slurp pamixer brightnessctl gvfs \
bluez bluez-utils lxappearance xfce4-settings \
dracula-gtk-theme dracula-icons-git xdg-desktop-portal-hyprland-git
# Start the bluetooth service
echo -e "Starting the Bluetooth Service...\n"
sudo systemctl enable --now bluetooth.service
sleep 2
# Clean out other portals
echo -e "Cleaning out conflicting xdg portals...\n"
yay -R --noconfirm xdg-desktop-portal-gnome xdg-desktop-portal-gtk
fi
### Copy Config Files ###
read -n1 -rep 'Would you like to copy config files? (y,n)' CFG
if [[ $CFG == "Y" || $CFG == "y" ]]; then
echo -e "Copying config files...\n"
cp -R hypr ~/.config/
cp -R kitty ~/.config/
cp -R mako ~/.config/
cp -R waybar ~/.config/
cp -R swaylock ~/.config/
cp -R wofi ~/.config/
# Set some files as exacutable
chmod +x ~/.config/hypr/xdg-portal-hyprland
chmod +x ~/.config/waybar/scripts/waybar-wttr.py
fi
### Install teh starship shell ###
read -n1 -rep 'Would you like to install the starship shell? (y,n)' STAR
if [[ $STAR == "Y" || $STAR == "y" ]]; then
# install the starship shell
echo -e "Updating .bashrc...\n"
echo -e '\neval "$(starship init bash)"' >> ~/.bashrc
echo -e "copying starship config file to ~/.confg ...\n"
cp starship.toml ~/.config/
fi
### Install software for Asus ROG laptops ###
read -n1 -rep 'Would you like to install Asus ROG software support? (y,n)' ROG
if [[ $ROG == "Y" || $ROG == "y" ]]; then
echo -e "Adding Keys... \n"
sudo pacman-key --recv-keys 8F654886F17D497FEFE3DB448B15A6B0E9A3FA35
sudo pacman-key --finger 8F654886F17D497FEFE3DB448B15A6B0E9A3FA35
sudo pacman-key --lsign-key 8F654886F17D497FEFE3DB448B15A6B0E9A3FA35
sudo pacman-key --finger 8F654886F17D497FEFE3DB448B15A6B0E9A3FA35
LOC="/etc/pacman.conf"
echo -e "Updating $LOC with g14 repo.\n"
echo -e "\n[g14]\nServer = https://arch.asus-linux.org" | sudo tee -a $LOC
echo -e "\n"
echo -e "Update the system...\n"
sudo pacman -Suy
echo -e "Installing ROG pacakges...\n"
sudo pacman -S --noconfirm asusctl supergfxctl rog-control-center
echo -e "Activating ROG services...\n"
sudo systemctl enable --now power-profiles-daemon.service
sleep 2
sudo systemctl enable --now supergfxd
sleep 2
fi
### Script is done ###
echo -e "Script had completed.\n"
echo -e "You can start Hyprland by typing Hyprland (note the capital H).\n"
read -n1 -rep 'Would you like to start Hyprland now? (y,n)' HYP
if [[ $HYP == "Y" || $HYP == "y" ]]; then
exec Hyprland
else
exit
fi