diff --git a/files/start.sh b/files/start.sh new file mode 100755 index 0000000..b348d3b --- /dev/null +++ b/files/start.sh @@ -0,0 +1,15 @@ +#!/bin/sh +i3s=$(i3-msg -t get_workspaces) + +if [ '[]' == "$i3s" ]; then + echo "i3 not running" +else + if [ ! -f /tmp/autostart ]; then + tmux new-session -s i3-pannel -n etc -d 'sleep 5; /usr/bin/nm-applet --no-agent' + tmux new-window -t i3-pannel:1 -n nextcloud 'sleep 30; /usr/bin/nextcloud' + touch /tmp/autostart + else + ddate + fi +fi + diff --git a/roles/copy_files/tasks/main.yml b/roles/copy_files/tasks/main.yml index df7b1e0..9034f6a 100644 --- a/roles/copy_files/tasks/main.yml +++ b/roles/copy_files/tasks/main.yml @@ -16,3 +16,11 @@ group: "{{ user }}" mode: 0644 +- name: copy start + copy: + src: files/start.sh + dest: /opt/start.sh + owner: "root" + group: "root" + mode: 0644 +