[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A simple screensaver that works - any improvement possible?



On Sat, 27 Mar 2021 16:47:48 +0000, Darac Marjal
<mailinglist@darac.org.uk> wrote:
>     To: debian-user@lists.debian.org
>     Subject: Re: A simple screensaver that works - any improvement
> possible?
>     From: Darac Marjal <mailinglist@darac.org.uk>
>     Date: Sat, 27 Mar 2021 16:47:48 +0000
>     Message-id: <[🔎] [🔎] a6372598-1f9e-dec8-764b-32819dbc0c11@darac.org.uk>
>     In-reply-to: <[🔎]
> [🔎] CAEG4cZVXEAF66qQXeXQudQ_Qy0h6QtLnnkMAsMjiNXOOqhsesw@mail.gmail.com>
>     References: <[🔎]
> [🔎] CAEG4cZVXEAF66qQXeXQudQ_Qy0h6QtLnnkMAsMjiNXOOqhsesw@mail.gmail.com>

[...]

> OK. You're wanting something that turns the screen off while idling at
> the console? Are you aware of physlock and vlock?
>
> You've assigned the value 0 to the variable $done, and then not
> referenced it - remove that assignment.
>
> You initialise $i and increment it, but then you don't actually use it
> anywhere?
>
> Instead of "kill -18" and "kill -19", use "kill -CONT" and "kill -STOP"
> - it's more readable.
>
> Don't use backticks, use $(...) instead, as it nests better.
>
> Your usage states to run "./ssvr.sh ssvr.sh" and then you use "kill ...
> `pidof $1`". This seems to imply that you're not aware of the $$
> variable, which is the PID of the current shell.
>
> Most of these are simple fixes which shellcheck.net can advise you on.
> If possible, you should find a plugin for the editor you're using which
> can give you realtime shellcheck advice :)
>

Okay, thanks. But unfortunately, I had already posted my post on
xautolock before I checked your post. Apologise. Please provide
guidance on xautolock here:
https://lists.debian.org/debian-user/2021/03/msg01431.html

Best.


Reply to: