From 70e01478b0f62bbf11ead24ad7b64ce1978c1ea1 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Mon, 16 Dec 2024 18:44:24 +0000 Subject: Converted idleinhibit.sh from bash to sh. --- .config/eww/scripts/idleinhibit.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to '.config/eww') diff --git a/.config/eww/scripts/idleinhibit.sh b/.config/eww/scripts/idleinhibit.sh index f31fb89..b1e5d63 100755 --- a/.config/eww/scripts/idleinhibit.sh +++ b/.config/eww/scripts/idleinhibit.sh @@ -1,20 +1,20 @@ -#!/usr/bin/env bash +#!/bin/sh # Swayidle toggle -function toggle { +toggle() { if pgrep "swayidle" > /dev/null then pkill swayidle notify-send --hint=string:x-canonical-private-synchronous:idleinhibit -u normal " Swayidle Inactive" -else - read -r wallpaper<~/.cache/wallpaper - export wallpaper=$( echo $wallpaper) - swayidle -w \ - timeout 300 'swaylock -f -i $wallpaper' \ - timeout 600 'wlopm --off \*;swaylock -F -i $wallpaper' resume 'wlopm --on \*' \ - before-sleep 'swaylock -f -i $wallpaper' & - notify-send --hint=string:x-canonical-private-synchronous:idleinhibit -u normal " Swayidle Active" -fi + else + read -r wallpaper<~/.cache/wallpaper + export wallpaper="$($wallpaper)" + swayidle -w \ + timeout 300 "swaylock -f -i $wallpaper" \ + timeout 600 "wlopm --off \*;swaylock -F -i $wallpaper' resume 'wlopm --on \*" \ + before-sleep "swaylock -f -i $wallpaper" & + notify-send --hint=string:x-canonical-private-synchronous:idleinhibit -u normal " Swayidle Active" + fi } case $1 in -- cgit v1.2.3