linutil/tabs/applications-setup/rofi-setup.sh

40 lines
1.5 KiB
Bash
Raw Normal View History

2024-07-15 20:00:04 +01:00
#!/bin/sh -e
. ../common-script.sh
2024-09-17 03:10:02 +01:00
installRofi() {
echo "Installing Rofi..."
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
echo "Rofi is already installed."
fi
}
setupRofiConfig() {
2024-09-17 03:10:02 +01:00
echo "Copying Rofi configuration files..."
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
setupRofiConfig