2024-07-15 20:00:04 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-08-15 07:13:56 +01:00
|
|
|
. ../common-script.sh
|
2024-07-28 16:32:05 +01:00
|
|
|
|
2024-09-17 03:10:02 +01:00
|
|
|
installRofi() {
|
2024-09-18 19:14:04 +01:00
|
|
|
printf "%b\n" "${YELLOW}Installing Rofi...${RC}"
|
2024-07-13 15:09:35 +01:00
|
|
|
if ! command_exists rofi; then
|
2024-07-14 03:16:02 +01:00
|
|
|
case "$PACKAGER" in
|
2024-07-13 15:09:35 +01:00
|
|
|
pacman)
|
2024-08-23 14:12:47 +01:00
|
|
|
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm rofi
|
2024-07-13 15:09:35 +01:00
|
|
|
;;
|
|
|
|
*)
|
2024-08-23 14:12:47 +01:00
|
|
|
$ESCALATION_TOOL "$PACKAGER" install -y rofi
|
2024-07-13 15:09:35 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
2024-09-17 03:44:20 +01:00
|
|
|
printf "%b\n" "${GREEN}Rofi is already installed.${RC}"
|
2024-07-13 15:09:35 +01:00
|
|
|
fi
|
2024-09-16 03:21:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
setupRofiConfig() {
|
2024-09-18 19:14:04 +01:00
|
|
|
printf "%b\n" "${YELLOW}Copying Rofi configuration files...${RC}"
|
2024-09-15 08:41:49 +01:00
|
|
|
if [ -d "$HOME/.config/rofi" ] && [ ! -d "$HOME/.config/rofi-bak" ]; then
|
|
|
|
cp -r "$HOME/.config/rofi" "$HOME/.config/rofi-bak"
|
2024-07-13 15:09:35 +01:00
|
|
|
fi
|
2024-07-14 03:16:02 +01:00
|
|
|
mkdir -p "$HOME/.config/rofi"
|
2024-09-12 21:02:00 +01:00
|
|
|
curl -sSLo "$HOME/.config/rofi/powermenu.sh" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/powermenu.sh
|
2024-07-14 03:16:02 +01:00
|
|
|
chmod +x "$HOME/.config/rofi/powermenu.sh"
|
2024-09-12 21:02:00 +01:00
|
|
|
curl -sSLo "$HOME/.config/rofi/config.rasi" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/config.rasi
|
2024-07-14 03:16:02 +01:00
|
|
|
mkdir -p "$HOME/.config/rofi/themes"
|
2024-09-12 21:02:00 +01:00
|
|
|
curl -sSLo "$HOME/.config/rofi/themes/nord.rasi" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/themes/nord.rasi
|
|
|
|
curl -sSLo "$HOME/.config/rofi/themes/sidetab-nord.rasi" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/themes/sidetab-nord.rasi
|
|
|
|
curl -sSLo "$HOME/.config/rofi/themes/powermenu.rasi" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/themes/powermenu.rasi
|
2024-07-13 15:09:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
2024-08-23 14:12:47 +01:00
|
|
|
checkEscalationTool
|
2024-09-17 03:10:02 +01:00
|
|
|
installRofi
|
2024-09-16 03:21:22 +01:00
|
|
|
setupRofiConfig
|