• An AI-Written "NoDoze" Bash File To Stop Screensavers

    From Dr. Noah Bodie@21:1/5 to All on Sun Oct 6 19:40:52 2024
    XPost: alt.os.linux.mint

    I did not want to install Caffeine so I prompted ChatGPT to write a
    script that keeps the screensaver from activating when you don't want it
    to activate. IE, while watching videos.

    NoDoze checks once every 50 seconds (feel free to increase this numeral)
    to see if you are watching a video on SMPlayer or on YouTube. If you are
    using either one, then the screensaver won't activate. Works great!

    ---

    #!/bin/bash

    # Check if smplayer is running.
    is_smplayer_running() {
    pgrep smplayer > /dev/null
    }

    # Check if the browser's active tab title contains "YouTube" and "-". is_youtube_open() {
    active_window=$(xdotool getactivewindow getwindowname)
    echo "$active_window" | grep -iq "YouTube" && echo "$active_window" |
    grep -iq "Mozilla"
    }

    while true;
    do if is_smplayer_running || is_youtube_open;
    then xdotool key Shift

    fi
    # Wait for 50 seconds before checking again. Increase this delay if needed. sleep 50
    done

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Big Al@21:1/5 to Dr. Noah Bodie on Sun Oct 6 20:11:03 2024
    XPost: alt.os.linux.mint

    On 10/6/24 06:40 PM, Dr. Noah Bodie wrote:
    I did not want to install Caffeine so I prompted ChatGPT to write a script that keeps the
    screensaver from activating when you don't want it to activate. IE, while watching videos.

    NoDoze checks once every 50 seconds (feel free to increase this numeral) to see if you are watching
    a video on SMPlayer or on YouTube. If you are using either one, then the screensaver won't activate.
    Works great!

    ---

    #!/bin/bash

    # Check if smplayer is running.
    is_smplayer_running() {
    pgrep smplayer > /dev/null
    }

    # Check if the browser's active tab title contains "YouTube" and "-". is_youtube_open() {
    active_window=$(xdotool getactivewindow getwindowname)
    echo "$active_window" | grep -iq "YouTube" && echo "$active_window" | grep -iq "Mozilla"
    }

    while true;
    do if is_smplayer_running || is_youtube_open;
    then xdotool key Shift

    fi
    # Wait for 50 seconds before checking again. Increase this delay if needed. sleep 50
    done
    I had AI write a program for me to prune a folder, the inverse of what I normally do, I wanted all
    files BUT a small list deleted. And it did it. I did tweak it a bit but I'm a happy camper.
    --
    Linux Mint 21.3, Cinnamon 6.0.4, Kernel 5.15.0-122-generic
    Al

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr. Noah Bodie@21:1/5 to Big Al on Mon Oct 7 04:14:20 2024
    XPost: alt.os.linux.mint

    On 2024-10-06 09:11 PM, Big Al wrote:
    I had AI write a program for me to prune a folder, the inverse of what I normally do, I wanted all files BUT a small list deleted. And it did it.
    I did tweak it a bit but I'm a happy camper.

    i sought an answer to stopping the screensaver (it kept interrupting my
    movie watching) but all i found was "Lights On", an older program that
    does not work for me. But luckily AI was able to solve the problem quickly!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to Dr. Noah Bodie on Mon Oct 7 03:37:29 2024
    XPost: alt.os.linux.mint

    On Sun, 10/6/2024 6:40 PM, Dr. Noah Bodie wrote:
    I did not want to install Caffeine so I prompted ChatGPT to write a script that keeps the screensaver from activating when you don't want it to activate. IE, while watching videos.

    NoDoze checks once every 50 seconds (feel free to increase this numeral) to see if you are watching a video on SMPlayer or on YouTube. If you are using either one, then the screensaver won't activate. Works great!

    ---

    #!/bin/bash

    # Check if smplayer is running.
    is_smplayer_running() {
    pgrep smplayer > /dev/null
    }

    # Check if the browser's active tab title contains "YouTube" and "-". is_youtube_open() {
    active_window=$(xdotool getactivewindow getwindowname)
    echo "$active_window" | grep -iq "YouTube" && echo "$active_window" | grep -iq "Mozilla"
    }

    while true;
    do if is_smplayer_running || is_youtube_open;
    then xdotool key Shift

    fi
    # Wait for 50 seconds before checking again. Increase this delay if needed. sleep 50
    done

    Have you monitored the environment, to watch what the script is doing ?

    For example, "xev" in a Terminal session, should see the Shift key being pressed.

    First, monitor "xev" without the script running, then start the script and hands-off-keyboard
    and watch xev output sent to Terminal.

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr. Noah Bodie@21:1/5 to yossarian on Mon Oct 7 11:36:06 2024
    XPost: alt.os.linux.mint

    On 2024-10-07 10:53 AM, yossarian < wrote:
    On Sun, 06 Oct 2024 19:40:52 -0300
    "Dr. Noah Bodie" <noah@bodie.not> wrote:

    I did not want to install Caffeine so I prompted ChatGPT to write a
    script that keeps the screensaver from activating when you don't want it
    to activate. IE, while watching videos.

    Honest question
    What is purpose to use screensaver. New screens don't need saver?


    i just do it because i like the "BLASTER" saver. true, it's not really
    needed anymore but i want to keep it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to yossarian on Mon Oct 7 10:29:49 2024
    XPost: alt.os.linux.mint

    On Mon, 10/7/2024 9:53 AM, yossarian wrote:
    On Sun, 06 Oct 2024 19:40:52 -0300
    "Dr. Noah Bodie" <noah@bodie.not> wrote:

    I did not want to install Caffeine so I prompted ChatGPT to write a
    script that keeps the screensaver from activating when you don't want it
    to activate. IE, while watching videos.

    Honest question
    What is purpose to use screensaver. New screens don't need saver?


    There are a couple cases to consider:

    1) Disable driving the screen. Good for panel types
    where the emission of light, wears them out.

    2) Varying the pattern over the screen surface, and
    keeping the panel running. Plasma might have been
    one technology where some of the users liked this method.

    https://en.wikipedia.org/wiki/Screen_burn-in

    For a lot of users, the topic will be irrelevant. My LCDs
    here, don't need any special handling.

    There are things that wear on an LCD panel, and blanking the screen,
    turns off the CCFL tubes or the edge lighting LEDs.
    The intensity of CCFL tubes, drops around 25000 hours
    of usage (assuming the inverter for each tube, lasts
    that long). Some inverters fail after only a year or two
    of usage. LEDs are roughly the same, 25000 to 50000 hours
    before they reach only 70% output. Modern LED screw-in
    light bulbs have a 10,000 hour rating, and that covers
    the SMPS failure in the base of the bulb.

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr. Noah Bodie@21:1/5 to yossarian on Mon Oct 7 12:23:38 2024
    XPost: alt.os.linux.mint

    On 2024-10-07 10:53 AM, yossarian < wrote:

    On Sun, 06 Oct 2024
    "Dr. Noah Bodie" <noah@bodie.not> wrote:
    I did not want to install Caffeine so I prompted ChatGPT to write a
    script that keeps the screensaver from activating when you don't want it
    to activate. IE, while watching videos.

    Honest question
    What is purpose to use screensaver. New screens don't need saver?


    NOTE: This works great for "power management" (screen blanking) that
    laptop owners use to save on battery power. Also I've heard conflicting
    reports about screen burn-in on LCD panels.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr. Noah Bodie@21:1/5 to Paul on Mon Oct 7 12:33:23 2024
    XPost: alt.os.linux.mint

    On 2024-10-07 04:37 AM, Paul wrote:
    Have you monitored the environment, to watch what the script is doing ?

    For example, "xev" in a Terminal session, should see the Shift key being pressed.

    First, monitor "xev" without the script running, then start the script and hands-off-keyboard
    and watch xev output sent to Terminal.

    Paul


    ok, i just tested the xev command and it did show that SHIFT_L was being
    sent every 50 seconds, so everything seems to be working right. i didn't
    notice any runaway apps in the background.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rbowman@21:1/5 to yossarian on Mon Oct 7 18:06:10 2024
    XPost: alt.os.linux.mint

    On Mon, 7 Oct 2024 15:53:44 +0200, yossarian < wrote:

    On Sun, 06 Oct 2024 19:40:52 -0300 "Dr. Noah Bodie" <noah@bodie.not>
    wrote:

    I did not want to install Caffeine so I prompted ChatGPT to write a
    script that keeps the screensaver from activating when you don't want
    it to activate. IE, while watching videos.

    Honest question What is purpose to use screensaver. New screens don't
    need saver?

    At work we used caffeine to prevent being logged out after a period of
    activity rather than just to prevent the screensaver. One problem with
    caffeine is it simulates a keypress of a non-printing character. Most applications ignore it but vim will try to handle the character.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bobbie Sellers@21:1/5 to yossarian on Mon Oct 7 13:04:29 2024
    On 10/7/24 06:53, yossarian wrote:
    On Sun, 06 Oct 2024 19:40:52 -0300
    "Dr. Noah Bodie" <noah@bodie.not> wrote:

    I did not want to install Caffeine so I prompted ChatGPT to write a
    script that keeps the screensaver from activating when you don't want it
    to activate. IE, while watching videos.

    Honest question
    What is purpose to use screensaver. New screens don't need saver?

    It is basically a tool for office users to keep others
    from looking at their display and tools in use. Also some
    people like to look at a good screen saver. If you do not
    run, and not even I do, a cathorde ray tub monitor you are
    saving the screen brom burning in whatever you are displaying.

    bliss

    --
    b l i s s - S F 4 e v e r at D S L E x t r e m e dot com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bud Frede@21:1/5 to Bobbie Sellers on Fri Oct 25 16:17:55 2024
    Bobbie Sellers <bliss-sf4ever@dslextreme.invalid> writes:

    On 10/7/24 06:53, yossarian wrote:
    On Sun, 06 Oct 2024 19:40:52 -0300
    "Dr. Noah Bodie" <noah@bodie.not> wrote:

    I did not want to install Caffeine so I prompted ChatGPT to write a
    script that keeps the screensaver from activating when you don't want it >>> to activate. IE, while watching videos.
    Honest question
    What is purpose to use screensaver. New screens don't need saver?

    It is basically a tool for office users to keep others
    from looking at their display and tools in use. Also some
    people like to look at a good screen saver. If you do not
    run, and not even I do, a cathorde ray tub monitor you are
    saving the screen brom burning in whatever you are displaying.

    bliss

    Some screensavers also let you put a message on the screen so you can
    leave a message for people who come to your desk when you're away.

    I think I even saw one that had a feature so people can leave notes for
    you when you're away from your desk.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)