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-07-13 15:09:35 +01:00
|
|
|
setupRofi() {
|
|
|
|
echo "Install Rofi if not already installed..."
|
|
|
|
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
|
|
|
|
echo "Copy Rofi config files"
|
2024-07-14 03:16:02 +01:00
|
|
|
if [ -d "$HOME/.config/rofi" ]; 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"
|
|
|
|
wget -O "$HOME/.config/rofi/powermenu.sh" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/powermenu.sh
|
|
|
|
chmod +x "$HOME/.config/rofi/powermenu.sh"
|
|
|
|
wget -O "$HOME/.config/rofi/config.rasi" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/config.rasi
|
|
|
|
mkdir -p "$HOME/.config/rofi/themes"
|
|
|
|
wget -O "$HOME/.config/rofi/themes/nord.rasi" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/themes/nord.rasi
|
|
|
|
wget -O "$HOME/.config/rofi/themes/sidetab-nord.rasi" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/themes/sidetab-nord.rasi
|
|
|
|
wget -O "$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-07-15 22:26:03 +01:00
|
|
|
setupRofi
|