diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2017-12-12 03:36:25 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2017-12-12 11:25:16 -0500 |
commit | 3cd1167d6205479e4197585a2ac729be228d80ad (patch) | |
tree | bf27468f3944c13f9f575e3dddb0198f7e2445a8 /skel/.config/autostart/autostart.sh | |
parent | 550cabfe63fe47a69f1c89dcc504f90190e59326 (diff) |
dynamic welcome/news notices and desktop background
* autostart.sh script will display any new ~/news.txt
* default desktop background is a symlink
Diffstat (limited to 'skel/.config/autostart/autostart.sh')
-rwxr-xr-x | skel/.config/autostart/autostart.sh | 14 |
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|\&|\&|g; s|>|\>|g; s|<|\<|g; s|'|\'|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 & |