summaryrefslogtreecommitdiffstats
path: root/i3-continous-backup
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2024-10-14 21:34:04 +0200
committerFlorian Pritz <bluewind@xinu.at>2024-10-14 21:54:03 +0200
commitd5ffb01d87852eb74f6b17ae06ac0c476010065b (patch)
tree1ac6a86d874f30c968ba26bf0f8a5954fa0c67a6 /i3-continous-backup
parentd10ee7703e20ef844907e90797ad66bf0fb984da (diff)
downloadbin-d5ffb01d87852eb74f6b17ae06ac0c476010065b.tar.gz
bin-d5ffb01d87852eb74f6b17ae06ac0c476010065b.tar.xz
Add new scripts
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'i3-continous-backup')
-rwxr-xr-xi3-continous-backup14
1 files changed, 14 insertions, 0 deletions
diff --git a/i3-continous-backup b/i3-continous-backup
new file mode 100755
index 0000000..2c8ef2a
--- /dev/null
+++ b/i3-continous-backup
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+echo "${0##*/}: starting new backup job master"
+
+while :; do
+ if pgrep firefox &>/dev/null; then
+ echo "${0##*/}: creating new i3 backup"
+ i3-dump-layout-all
+ echo "${0##*/}: i3 backup complete"
+ else
+ echo "${0##*/}: skipping i3 backup creation due to firefox not running. is the system in an unclean state?"
+ fi
+ sleep 5m
+done