commit 14568e8d449e86cb15660aa00b55822c4d6850b2
parent aef20c82aa72bc5d94d018a2b877b9c68bea4623
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 28 Aug 2021 15:46:06 +0200
Removing unnecessary argument
Diffstat:
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/im-notifier.sh b/im-notifier.sh
@@ -14,9 +14,7 @@ TG_ACTION="telegram-desktop"
## Common
function im_notify {
- if [[ "$XDG_CURRENT_DESKTOP" == "GNOME:Phosh" ]] ||
- [[ "$XDG_CURRENT_DESKTOP" == "GNOME" ]] ||
- [[ "$XDG_CURRENT_DESKTOP" == "gnome" ]]; then
+ if [[ $(printf "$XDG_CURRENT_DESKTOP" | grep -i "gnome") != "" ]]; then
gdbus call --session \
--dest=org.freedesktop.Notifications \
--object-path=/org/freedesktop/Notifications \
@@ -32,7 +30,7 @@ function im_notify {
im_signal_listen &
}
function im_unnotify {
- if [[ "$XDG_CURRENT_DESKTOP" == "GNOME:Phosh" ]]; then
+ if [[ $(printf "$XDG_CURRENT_DESKTOP" | grep -i "gnome") != "" ]]; then
gdbus call --session \
--dest=org.freedesktop.Notifications \
--object-path=/org/freedesktop/Notifications \
@@ -66,8 +64,7 @@ function tg_kill {
fi
}
function tg_notify {
- im_notify "Telegram" $2 "$TG_ICON" "$1" "$3" \
- "['im-notify-tg', 'Open Message']"
+ im_notify "Telegram" $2 "$TG_ICON" "$1" "['im-notify-tg', 'Open Message']"
}
# Run Daemon ------------------------------------------------------------------