zshrc: Screensaver zufaellig zwischen cmatrix und asciiquarium wechseln
This commit is contained in:
parent
40232d50da
commit
c3f4ae7408
1 changed files with 8 additions and 5 deletions
13
zsh/.zshrc
13
zsh/.zshrc
|
|
@ -75,8 +75,11 @@ setopt AUTO_CD
|
|||
precmd() { print -Pn "\e]0;%n@%m: %~\a" }
|
||||
export COLORTERM=truecolor
|
||||
|
||||
# Terminal-Screensaver: cmatrix nach 5 Min Idle
|
||||
if command -v cmatrix &>/dev/null; then
|
||||
TMOUT=300
|
||||
TRAPALRM() { cmatrix -sab }
|
||||
fi
|
||||
# Terminal-Screensaver: zufaellig cmatrix oder asciiquarium nach 5 Min Idle
|
||||
TMOUT=300
|
||||
TRAPALRM() {
|
||||
local screensavers=()
|
||||
command -v cmatrix &>/dev/null && screensavers+=("cmatrix -sab")
|
||||
command -v asciiquarium &>/dev/null && screensavers+=("asciiquarium")
|
||||
(( ${#screensavers[@]} )) && eval "${screensavers[$((RANDOM % ${#screensavers[@]} + 1))]}"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue