From 49eb66641cadb5a7650199de40c21e34d416e623 Mon Sep 17 00:00:00 2001 From: Bas Dado Date: Mon, 9 Sep 2024 16:26:21 +0200 Subject: [PATCH] [TWEAK] Better check if we're running KDE, in which case Spectacle should work --- README.md | 11 ++++++++++- screenshot.sh | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4277a5d..59cf8ba 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,18 @@ Based on this: https://superuser.com/questions/1594667/how-can-i-make-a-screensh ## Usage -Copy the files in systemd to: `~/.config/systemd/user/` +Copy the files in systemd to: `~/.config/systemd/user/`: +```bash +cp systemd/* ~/.config/systemd/user/ +``` + Modify the paths in them so they point to wherever this repo is. +```bash +nano ~/.config/systemd/user/screenshot.service +``` + Run: ```bash +systemctl --user enable screenshot.service screenshot.timer systemctl --user start screenshot.service screenshot.timer ``` \ No newline at end of file diff --git a/screenshot.sh b/screenshot.sh index a48aa60..95a09e0 100755 --- a/screenshot.sh +++ b/screenshot.sh @@ -13,7 +13,7 @@ SCR_NEW="$DIR/$DAY/$TIME.$FORMAT" SCR_LAST=`ls -t $DIR/$DAY/*.png | head -n1` # do a screenshot -if [ "$DESKTOP_SESSION" = "plasmawayland" ] +if [ "$XDG_CURRENT_DESKTOP" = "KDE" ] then spectacle -bn -o $SCR_NEW else