#Screensaver issue - no effect specified

19 messages · Page 1 of 1 (latest)

tawny phoenix
#

Following update to 3.2.1 screensaver is no longer selecting a random effect

It's showing Error: No effect specified. Must specify an effect or use --random-effect.

wild mica
#

I haven't tracked down the exact details, but it looks like possibly the "tte" screensaver package was updated during a recently upgrade. The app no longer provides a list of options for the screen saver by default. You have to either specify tte --help or provide --random-effect.

Here is a short fix for anyone that is interested:

~/.local/share/omarchy/bin/omarchy-cmd-screensaver

Note the "--help" on line #21

#!/bin/bash

screensaver_in_focus() {
  hyprctl activewindow -j | jq -e '.class == "org.omarchy.screensaver"' >/dev/null 2>&1
}

exit_screensaver() {
  hyprctl keyword cursor:invisible false
  pkill -x tte 2>/dev/null
  pkill -f org.omarchy.screensaver 2>/dev/null
  exit 0
}

trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT

printf '\033]11;rgb:00/00/00\007' # Set background color to black

hyprctl keyword cursor:invisible true &>/dev/null

while true; do
  effect=$(tte --help 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | grep -Ev '^(dev_worm)$' | sort -u | shuf -n1)

  tte -i ~/.config/omarchy/branding/screensaver.txt \
    --frame-rate 120 --canvas-width 0 --canvas-height 0 --reuse-canvas --anchor-canvas c --anchor-text c --no-eol --no-restore-cursor $effect &

  while pgrep -x tte >/dev/null; do
    if read -n 1 -t 1 || ! screensaver_in_focus; then
      exit_screensaver
    fi
  done
done

Alternatively a patch can be submitted with this change instead:

#!/bin/bash

screensaver_in_focus() {
  hyprctl activewindow -j | jq -e '.class == "org.omarchy.screensaver"' >/dev/null 2>&1
}

exit_screensaver() {
  hyprctl keyword cursor:invisible false
  pkill -x tte 2>/dev/null
  pkill -f org.omarchy.screensaver 2>/dev/null
  exit 0
}

trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT

printf '\033]11;rgb:00/00/00\007' # Set background color to black

hyprctl keyword cursor:invisible true &>/dev/null

while true; do
  tte -i ~/.config/omarchy/branding/screensaver.txt \
    --random-effect \
    --frame-rate 120 --canvas-width 0 --canvas-height 0 --reuse-canvas --anchor-canvas c --anchor-text c --no-eol --no-restore-cursor &

  while pgrep -x tte >/dev/null; do
    if read -n 1 -t 1 || ! screensaver_in_focus; then
      exit_screensaver
    fi
  done
done
tawny phoenix
#

I can confirm that this worked for me. I updated ~/.local/share/omarchy/bin/omarchy-cmd-screensaver with the following:

#!/bin/bash

screensaver_in_focus() {
  hyprctl activewindow -j | jq -e '.class == "org.omarchy.screensaver"' >/dev/null 2>&1
}

exit_screensaver() {
  hyprctl keyword cursor:invisible false
  pkill -x tte 2>/dev/null
  pkill -f org.omarchy.screensaver 2>/dev/null
  exit 0
}

trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT

printf '\033]11;rgb:00/00/00\007'  # Set background color to black

hyprctl keyword cursor:invisible true &>/dev/null

while true; do
  effect=$(tte 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | grep -Ev '^(dev_worm)$' | sort -u | shuf -n1)

  tte -i ~/.config/omarchy/branding/screensaver.txt \
    --frame-rate 120 --canvas-width 0 --canvas-height 0 --reuse-canvas --anchor-canvas c --anchor-text c\
    --no-eol --no-restore-cursor --random-effect $effect &

  while pgrep -x tte >/dev/null; do
    if read -n 1 -t 1 || ! screensaver_in_focus; then
      exit_screensaver
    fi
  done
done

wild mica
tawny phoenix
#

Oh yeah, I see that. I was trying to change as little as possible by just adding that --random-effect flag

urban lichen
#

Awesome, same workaround here worked!

ember plover
tawny phoenix
# wild mica <@815762999335583794> I think you can remove the "effect=$(...." line and the re...
#!/bin/bash

screensaver_in_focus() {
  hyprctl activewindow -j | jq -e '.class == "org.omarchy.screensaver"' >/dev/null 2>&1
}

exit_screensaver() {
  hyprctl keyword cursor:invisible false
  pkill -x tte 2>/dev/null
  pkill -f org.omarchy.screensaver 2>/dev/null
  exit 0
}

trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT

printf '\033]11;rgb:00/00/00\007'  # Set background color to black

hyprctl keyword cursor:invisible true &>/dev/null

while true; do

  tte -i ~/.config/omarchy/branding/screensaver.txt \
    --frame-rate 120 --canvas-width 0 --canvas-height 0 --reuse-canvas --anchor-canvas c --anchor-text c\
    --no-eol --no-restore-cursor --random-effect &

  while pgrep -x tte >/dev/null; do
    if read -n 1 -t 1 || ! screensaver_in_focus; then
      exit_screensaver
    fi
  done
done

#

Thanks for your help @wild mica

#

@ember plover we'll need to use the --exclude-effects flag for you

ember plover
#

i was looking today to see if there was an article on how to contribute to omarchy to make the fix at some point. didnt find it yet.

honestly i did not think that new setting would break anything because the existing screensaver code was just feeding it a random effect anyway.

tawny phoenix
#

All good. This is how we learn

#

@wild mica - you seem to know what's going on around these parts. Do I mark this resolved b/c there's a workaround in place, or do I wait until a resolution is published in a release?

wild mica
ember plover
#

its already done 🙂

#omarchy-announcements message

#

3.2.2 has the fix for TTE

#

man, things go fast around these parts

wild mica
#

Like to keep a working operating system KEKW