home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.ubuntu      I preferred Xubuntu, seemed a bit faster      134,474 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 134,038 of 134,474   
   Paul to Dr. Noah Bodie   
   Re: An AI-Written "NoDoze" Bash File To    
   07 Oct 24 03:37:29   
   
   XPost: alt.os.linux.mint   
   From: nospam@needed.invalid   
      
   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: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca