3 ms·
Didn't work in zsh on my Mac. Fixed the issues and added a couple of effects: https://github.com/lasanthak/snowjob/blob/main/snowjob.sh https://github.com/lasa
by kiriberty 3y ago
Didn't work in zsh on my Mac. Fixed the issues and added a couple of effects:
https://github.com/lasanthak/snowjob/blob/main/snowjob.sh https://github.com/lasanthak/snowjob/blob/main/snowjob.sh
- JNRowe 3y ago[Because linking to cool zsh features seems to be a hobby of mine…] If you're using zsh for this you can access terminfo directly¹, instead of hardcoding escapes(for example, "echoti cup $snowflakes[$i] $i"²) or shelling out to tput. You can also use zselect to replace sleep. Extra points for "echoti smcup" to use the secondary screen when available, instead of wiping the screen. ¹ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-zsh_002fterminfo-Module https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-... ² To be fair it would need a minor change to array structure, as cup is zero-indexed. ³ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-zsh_002fzselect-Module https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-...