mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-07-27 09:07:20 +02:00
30 lines
729 B
Bash
Executable File
30 lines
729 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -x
|
|
|
|
if [ -f /etc/os-release ]; then
|
|
. /etc/os-release
|
|
fi
|
|
|
|
export DARKMANGET="$(darkman get)"
|
|
|
|
printf "Distribution: $ID\nRelease: $VERSION_ID\nMode: $DARKMANGET\n"
|
|
|
|
if [[ "$DARKMANGET" -eq "light" ]]; then
|
|
notify-send --app-name="darkman" --urgency=low --icon=weather-clear-night "Teema: $DARKMANGET"
|
|
elif [[ "$DARKMANGET" -eq "dark" ]]; then
|
|
notify-send --app-name="darkman" --urgency=low --icon=weather-clear "Teema: $DARKMANGET"
|
|
else
|
|
ERRORMESSAGE="Something went wrong?"
|
|
echo "$ERRORMESSAGE"
|
|
notify-send --app-name="darkman" --icon=error "$ERRORMESSAGE"
|
|
fi
|
|
|
|
if hash qdbus-qt6 2> /dev/null; then
|
|
QTDBUSBIN=qdbus-qt6
|
|
elif hash qdbus6 2> /dev/null; then
|
|
QTDBUSBIN=qdbus6
|
|
else
|
|
QTDBUSBIN=qdbus
|
|
fi
|