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

36 lines
1.4 KiB
Bash
Raw Normal View History

2024-07-15 20:00:04 +01:00
#!/bin/sh -e
. ../common-script.sh
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
setupRofi