summaryrefslogtreecommitdiff
path: root/skel/.config/autostart/autostart.sh
diff options
context:
space:
mode:
Diffstat (limited to 'skel/.config/autostart/autostart.sh')
-rwxr-xr-xskel/.config/autostart/autostart.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/skel/.config/autostart/autostart.sh b/skel/.config/autostart/autostart.sh
index 2cfc1d6..82bcc6a 100755
--- a/skel/.config/autostart/autostart.sh
+++ b/skel/.config/autostart/autostart.sh
@@ -1,10 +1,14 @@
#!/bin/bash
+XML_ESCAPE_REGEX="s|^//\(.*\)||; s|\&|\&amp;|g; s|>|\&gt;|g; s|<|\&lt;|g; s|'|\&apos;|g;"
-[ -f ~/welcome.txt ] && zenity --question --width=620 \
- --title="_EDITION_TITLE_" \
- --text="$(cat ~/welcome.txt)" \
- --ok-label="OK" \
- --cancel-label="Don't show this again" || rm ~/welcome.txt &
+
+for notice in ~/welcome.txt ~/news.txt
+do [ -f $notice ] && zenity --forms --width=620 \
+ --title="_EDITION_TITLE_" \
+ --text="$(sed "$XML_ESCAPE_REGEX" $notice)" \
+ --ok-label="OK" \
+ --cancel-label="Don't show this again" || rm $notice &
+done
~/.config/autostart/autostart-lxde.sh &