2024-07-22 12:09:56 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-07-22 14:55:52 +03:00
|
|
|
set -x
|
|
|
|
|
2024-08-14 13:02:59 +03:00
|
|
|
#if ! hash lsb_release 2> /dev/null; then
|
|
|
|
# ERRORMESSAGE="lsb_release was not found, the wallpaper scripts cannot figure out the distribution"
|
|
|
|
# echo "$ERRORMESSAGE"
|
|
|
|
# notify-send --app-name=darkman --icon=error "$ERRORMESSAGE"
|
|
|
|
# exit 0
|
|
|
|
#fi
|
2024-07-22 11:39:29 +03:00
|
|
|
|
2024-07-22 15:06:04 +03:00
|
|
|
#if ! hash kvantummanager 2> /dev/null; then
|
|
|
|
# ERRORMESSAGE="kvantummanager wasn't found, Qt theme switching won't work!"
|
|
|
|
# echo "$ERRORMESSAGE"
|
|
|
|
# notify-send --app-name="darkman" --icon=error "$ERRORMESSAGE"
|
|
|
|
# exit 0
|
|
|
|
#fi
|
2024-07-20 07:49:15 +03:00
|
|
|
|
2024-08-14 13:02:59 +03:00
|
|
|
#export DISTROID="$(lsb_release -si)"
|
|
|
|
#export DISTROREL="$(lsb_release -sr)"
|
|
|
|
|
|
|
|
if [ -f /etc/os-release ]; then
|
|
|
|
. /etc/os-release
|
|
|
|
fi
|
2024-07-20 08:01:17 +03:00
|
|
|
|
2024-07-22 14:55:52 +03:00
|
|
|
export DARKMANGET="$(darkman get)"
|
2024-07-20 08:08:36 +03:00
|
|
|
|
2024-08-14 13:02:59 +03:00
|
|
|
printf "Distribution: $ID\nRelease: $VERSION_ID\nMode: $DARKMANGET\n"
|
2024-07-20 08:24:40 +03:00
|
|
|
|
2024-07-30 11:28:07 +03:00
|
|
|
if [[ "$DARKMANGET" -eq "light" ]]; then
|
2024-07-22 15:09:55 +03:00
|
|
|
notify-send --app-name="darkman" --urgency=low --icon=weather-clear-night "Teema: $DARKMANGET"
|
2024-07-30 11:28:07 +03:00
|
|
|
elif [[ "$DARKMANGET" -eq "dark" ]]; then
|
2024-07-22 15:09:55 +03:00
|
|
|
notify-send --app-name="darkman" --urgency=low --icon=weather-clear "Teema: $DARKMANGET"
|
2024-07-20 08:39:12 +03:00
|
|
|
else
|
2024-07-22 11:39:29 +03:00
|
|
|
ERRORMESSAGE="Something went wrong?"
|
2024-07-22 14:55:52 +03:00
|
|
|
echo "$ERRORMESSAGE"
|
|
|
|
notify-send --app-name="darkman" --icon=error "$ERRORMESSAGE"
|
2024-07-22 11:39:29 +03:00
|
|
|
fi
|
|
|
|
|
2024-07-22 15:06:04 +03:00
|
|
|
#if [[ "$QT_STYLE_OVERRIDE" != "kvantum" ]]; then
|
|
|
|
# ERRORMESSAGE="\$QT_STYLE_OVERRIDE is not 'kvantum', Qt theme switching has no effect!"
|
|
|
|
# echo $ERRORMESSAGE
|
|
|
|
# notify-send --app-name="darkman" --icon=error "$ERRORMESSAGE"
|
|
|
|
# exit 0
|
|
|
|
#fi
|