diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-02-15 12:42:11 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-02-15 12:42:11 +0900 |
| commit | 1d714a5ea76fd19d530b9d06ce9b73627d8224d9 (patch) | |
| tree | 31e4e71e7b5e93a6c555a9b5507744cc2e6e12c5 /copy.sh | |
| parent | adee3e65f23b3bff8466a2b8d0bc54eb75d9b095 (diff) | |
updated rofi theme handling
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -302,10 +302,10 @@ if [ "$resolution" == "< 1440p" ]; then mv config/hypr/hyprlock-1080p.conf config/hypr/hyprlock.conf # rofi fonts reduction - themes_dir="assets/rofi/themes" + themes_dir="config/rofi/themes" config_file="config/rofi/config.rasi" - # Change rofi font size in ~/.local/share/rofi/themes/ + # Change rofi font size find "$themes_dir" -type f | while read -r file; do if grep -Pzoq 'element-text {\n font: "JetBrainsMono Nerd Font SemiBold 12";\n}' "$file"; then sed -i 's/font: "JetBrainsMono Nerd Font SemiBold 12"/font: "JetBrainsMono Nerd Font SemiBold 11"/' "$file" @@ -638,21 +638,22 @@ fi printf "\n%.0s" {1..1} -## Rofi Additional themes -source_DIR="assets/rofi/themes" +# Define the target directory for rofi themes rofi_DIR="$HOME/.local/share/rofi/themes" -echo -e "${NOTE} copying additional rofi themes into ${YELLOW}$rofi_DIR${RESET}... " - if [ ! -d "$rofi_DIR" ]; then - echo "${INFO}Directory $rofi_DIR does not exist. Creating it now..." | tee -a "$LOG" mkdir -p "$rofi_DIR" fi - -# Copy the rofi themes from assets -cp -r "$source_DIR"/* "$rofi_DIR" - -echo "${OK}rofi themes from ${YELLOW}$source_DIR${RESET} have been copied to ${MAGENTA}$rofi_DIR${RESET}" | tee -a "$LOG" +if [ -d "$HOME/.config/rofi/themes" ]; then + if [ -z "$(ls -A $HOME/.config/rofi/themes)" ]; then + echo '/* Default Rofi theme */' > "$HOME/.config/rofi/themes/default.rasi" + fi + ln -snf ~/.config/rofi/themes/* ~/.local/share/rofi/themes/ + # Delete the dummy file if it was created + if [ -f "$HOME/.config/rofi/themes/default.rasi" ]; then + rm "$HOME/.config/rofi/themes/default.rasi" + fi +fi printf "\n%.0s" {1..1} |
