-
-
Save nothub/91ff81bd945eb8f1e6af08492a13ff75 to your computer and use it in GitHub Desktop.
This project has moved to: https://github.com/nothub/asciiquarium |
Thank you. For Arch users, this could be installed with:
yay -S asciiquarium-transparent-gitSee: https://aur.archlinux.org/packages/asciiquarium-transparent-git
Oh cool :) 👍
This version of asciiquarium doesn't reload automatically when the screen size changes. Is that intentional?
This version of asciiquarium doesn't reload automatically when the screen size changes. Is that intentional?
No, this is not intentional. Thanks for the report.
This version of asciiquarium doesn't reload automatically when the screen size changes. Is that intentional?
No, this is not intentional. Thanks for the report.
This fixes it for me.
Change
elsif ($in eq 'r') {last;} # Redraw (will recreate all objects)
to
elsif ($in eq 'r' || $in eq KEY_RESIZE()) {last;} # Redraw (will recreate all objects)
Version 1.1 fixed this.
https://robobunny.com/projects/asciiquarium/html/?page=1
This version of asciiquarium doesn't reload automatically when the screen size changes. Is that intentional?
No, this is not intentional. Thanks for the report.
This fixes it for me. Change
elsif ($in eq 'r') {last;} # Redraw (will recreate all objects)
toelsif ($in eq 'r' || $in eq KEY_RESIZE()) {last;} # Redraw (will recreate all objects)
Version 1.1 fixed this. https://robobunny.com/projects/asciiquarium/html/?page=1
Oh perfect, thanks for your help! I gonna apply this change soon when I have some spare time.
@planet36 Thanks 👍 added in the latest revision.
How to make it so any keypress (other than r, p) will quit it?
Edit: Found a way. Added elsif ($in ne '-1') {quit();}
, is that correct? Works for me.
patch (also including a commandline option)
--- asciiquarium.pl 2023-02-19 20:38:49.837074714 +0530
+++ /usr/bin/asciiquarium 2023-02-19 20:51:34.291968027 +0530
@@ -116,13 +116,15 @@
my $classic = 0;
my $transparent = 0;
+my $screensaver = 0;
my $print_version = 0;
GetOptions(
'classic' => \$classic,
'transparent' => \$transparent,
+ 'screensaver' => \$screensaver,
'version' => \$print_version,
-) or die "Try: $0 --classic --transparent\n";
+) or die "Try: $0 --classic --transparent --screensaver\n";
if ($print_version) {
VERSION_MESSAGE();
@@ -201,6 +203,7 @@
if ($in eq 'q') {quit();} # Exit
elsif ($in eq 'r' || $in eq KEY_RESIZE()) {last;} # Redraw (will recreate all objects)
elsif ($in eq 'p') {$paused = !$paused;}
+ elsif ($screensaver && $in ne '-1') {quit();} # Exit for any key (screensaver mode)
$anim->animate() unless ($paused);
}
Oh cool, thanks a lot @phanirithvij! I gonna add your patch to the application.
I have moved the file to its own git repo so contributions can be added in a cleaner way.
Thank you.
For Arch users, this could be installed with:
See: https://aur.archlinux.org/packages/asciiquarium-transparent-git