diff options
author | Marvin Borner | 2022-11-01 14:13:08 +0100 |
---|---|---|
committer | Marvin Borner | 2022-11-01 14:13:08 +0100 |
commit | 29c894db157e9b2bb2a392e0abb83ac700a839d5 (patch) | |
tree | 1e630bfabf1d94b61a88ab7b6e8b631113b6f7fd /.scripts/checkapts | |
parent | 600de714ba13c1ccd54357554898db909de5af81 (diff) |
sync
Diffstat (limited to '.scripts/checkapts')
-rwxr-xr-x | .scripts/checkapts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.scripts/checkapts b/.scripts/checkapts new file mode 100755 index 0000000..3319c23 --- /dev/null +++ b/.scripts/checkapts @@ -0,0 +1,13 @@ +#!/bin/sh + +flat=$(curl "https://tl1host.eu/SWTUE/ajax/privroom/search?languageId=1&s_Group=T%C3%BCbingen&s_Einzugsbereich=-1&s_ZimmerArt=3&s_Mietobergrenze=500&s_AnzahlZimmer=1" | jq length) +apt=$(curl "https://tl1host.eu/SWTUE/ajax/privroom/search?languageId=1&s_Group=T%C3%BCbingen&s_Einzugsbereich=-1&s_ZimmerArt=2&s_Mietobergrenze=500&s_AnzahlZimmer=1" | jq length) + +if [ $flat -ne 0 ] || [ $apt -ne 0 ]; then + export XAUTHORITY=/home/melvin/.Xauthority + export DISPLAY=:0 + export XDG_RUNTIME_DIR=/run/user/1000 + export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus + + notify-send -u critical "Interessante StuWe Wohnung!" "tl1host/#privateroom" +fi |