How to set automatic changes

Hello, I use auto-light/dark mode in my setup, managed to make it so my wallpaper switches with the different modes, but I was wondering if Zorin supports the automatic change of cursors/shells/icons. I can set them just fine on say, light mode but then when I switch to dark mode everything resets, even the color of the shell if I'm using one of the Zorin ones. I also had some some issues with using the Gnome Tweaks app, if I tried to make appearance changes from there they just wouldn't stick, if I use Zorin Appearance they stay except for when I change modes. What can I do? Is there a command I can run or an extension? Thanks in advance.

Are you talking about other cursor/icon themes? Have you installed them into the appropriate folders?

A bash script might be:

#!/bin/bash

ICON_THEME="NewIconTheme"
SYSTEM_THEME="NewSystemTheme"
CURSOR_THEME="NewCursorTheme"

change_themes() {
    gsettings set org.gnome.desktop.interface icon-theme "$ICON_THEME"
    gsettings set org.gnome.desktop.interface gtk-theme "$SYSTEM_THEME"
    gsettings set org.gnome.desktop.interface cursor-theme "$CURSOR_THEME"
}

morning_job() {
    MORNING_TIME="08:00"

    if [ "$(date +%H:%M)" == "$MORNING_TIME" ]; then
        change_themes
    fi
}

evening_job() {
    EVENING_TIME="20:00"

    if [ "$(date +%H:%M)" == "$EVENING_TIME" ]; then
        change_themes
    fi
}

morning_job
evening_job

Replace the "NewIconTheme", "NewSystemTheme" and "NewCursorTheme" variables with the actual system, icon and cursor theme names as they are named in the system. The theme folder is labeled by the exact system name of that theme.
The format I used in the above script for the time variables is set to HH:MM

Save the script in any location you want. You can name it whatever you want.... Here, I will name it auto-theme-change
Give the script executable permission

chmod +x auto-theme-change.sh

You can set it as a cron job with crontab -e, then adding the interval followed by the path to the script. For example, if you want it to run every minute of each hour:
* * * * * /path/to/auto-theme-change.sh

Change the command above to reflect the actual path, actual file name and if you prefer a different interval check.

1 Like