From 6687f67fefa24c1fd49f4894be071c54833a6289 Mon Sep 17 00:00:00 2001 From: Shrinivas Vishnu Kumbhar Date: Mon, 19 Apr 2021 16:50:25 +0530 Subject: [PATCH] add timeshift snapshot boot detection --- PKGBUILD | 2 +- etc/xdg/autostart/snapshot-detect.desktop | 6 ++++++ usr/bin/snapshot-detect.sh | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 etc/xdg/autostart/snapshot-detect.desktop create mode 100755 usr/bin/snapshot-detect.sh diff --git a/PKGBUILD b/PKGBUILD index e5292a9..0f4cc68 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: Librewish pkgname=garuda-common-settings -pkgver=1.2.5 +pkgver=1.2.6 pkgrel=1 arch=('any') url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname" diff --git a/etc/xdg/autostart/snapshot-detect.desktop b/etc/xdg/autostart/snapshot-detect.desktop new file mode 100644 index 0000000..a1e409f --- /dev/null +++ b/etc/xdg/autostart/snapshot-detect.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Snapshot Detect +Icon=timeshift +Exec=snapshot-detect +Terminal=false +Type=Application diff --git a/usr/bin/snapshot-detect.sh b/usr/bin/snapshot-detect.sh new file mode 100755 index 0000000..bf73adc --- /dev/null +++ b/usr/bin/snapshot-detect.sh @@ -0,0 +1,5 @@ +#!/bin/bash +if grep -q timeshift /proc/cmdline; then +notify-send -u critical -i timeshift 'Detected!' 'Booted into Timeshift Snapshot, please restore the snapshot.' +timeshift-launcher +fi