GithubHelp home page GithubHelp logo

abishekvashok / cmatrix Goto Github PK

View Code? Open in Web Editor NEW
3.9K 56.0 401.0 364 KB

Terminal based "The Matrix" like implementation

License: GNU General Public License v3.0

C 61.81% Shell 6.38% Makefile 6.54% Roff 4.40% M4 13.56% CMake 7.31%
c matrix screensaver

cmatrix's People

Contributors

a1346054 avatar abishekvashok avatar efferifick avatar flowdalic avatar fogti avatar h3xx avatar hoijui avatar igoro00 avatar incomingstick avatar io12 avatar jeremymeyers avatar kdkasad avatar livibetter avatar michel-slm avatar monster0506 avatar neuschaefer avatar nikoof avatar patatahooligan avatar pierre42100 avatar prince213 avatar rashil2000 avatar sachincool avatar shameempk avatar shinenelson avatar srinivas32 avatar tansly avatar timgates42 avatar tnaia avatar xiaoyu2006 avatar zelfroster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmatrix's Issues

Travis CI build failing

log:

make

CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.15 

/bin/bash: aclocal-1.15: command not found

make: *** [aclocal.m4] Error 127

Reason: Git doesnot preserve timestamps.

How to overcome this:
touch the files.

exit on first keystroke should print the keystroke on the terminal

The -s: option activates the "Screensaver" mode, with exits on first keystroke.
This is nice but the keystroke is not recorded on the terminal. So if for example user wants to type "git" the first character g should be recorded and when learning the screen from matrix, g should be present on the terminal along with whatever other characters the user has typed.

Typo in README.md

CMatrix is based on the screensaver from The Matrix website. It shows text flying in and out in a terminal like as seen in "The Matrix" move

curses.h is not found

I am submitting a

Problem or Feature in Brief

gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -Wall -Wno-comment -c cmatrix.c
cmatrix.c:37:20: fatal error: curses.h: No such file or directory
 #include <curses.h>
                    ^
compilation terminated

Solution (if any)

Would you like to work on it?

Transparency issue in Cinnamon over Arch

I am submitting a Bug Report

Problem or Feature in Brief

I am using the latest arch bundled version of cmatrix (2.0) with Cinnamon DE in Arch. My terminal emulators include Terminator, urxvt, Gnome term and Konsole. They are configured with light yellow tranparent background. When cmatrix runs, it replaces that background with black in all samples. After I exit cmatrix, transparency is restored.

On my Mint system with Cinnamon DE, with the exact same stylistic choices and terminals, cmatrix (v. 1.2 bundled with Ubuntu) correctly respects the transparent terminal background.

It is unclear to me where the bug lies, but since I and another couple of people could not find any help in linux fora, I hope the developer may be able to help.

Edit: Downgrading the package to the 1.2 version fixes the problem. There seems to be something wrong in the transition 1.2 to 2.0 for my system.

Error compiling on Cygwin

make[1]: Entering directory '/cygdrive/c/Users/thorsten/Desktop/cmatrix-master'
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT cmatrix.o -MD -MP -MF .deps/cmatrix.Tpo -c -o cmatrix.o cmatrix.c
cmatrix.c: In function 'resize_screen':
cmatrix.c:253:10: error: lvalue required as left operand of assignment
     COLS = win.ws_col;
          ^
cmatrix.c:254:11: error: lvalue required as left operand of assignment
     LINES = win.ws_row;
           ^
cmatrix.c:257:15: error: lvalue required as left operand of assignment
         LINES = 10;
               ^
cmatrix.c:260:14: error: lvalue required as left operand of assignment
         COLS = 10;
              ^
make[1]: *** [Makefile:425: cmatrix.o] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/thorsten/Desktop/cmatrix-master'
make: *** [Makefile:315: all] Error 2

GCC is version 6.4.0. Do you need more information?

Please tag another higher version of cmatrix

I am submitting a Feature Request

Problem or Feature in Brief

The version number of cmatrix in Debian GNU/Linux, Ubuntu and other deb-based
distributions was "1.2a", which is higher than current release on GitHub (1.2).
We need a higher version number to cleanly update the package.

Solution (if any)

Tag another release on the appropriate commit that is equal or later than current
1.2 tag.

Since the freeze of next Debian major release will take place on 12 February 2019, I suggest
we tag the release as early as possible and no later than that day.

i get this error

╭─cybernecro@cybernecro-MS-7850 ~/Desktop
╰─➤ cmatrix -lba
Couldn't get a file descriptor referring to the console

I installed it via apt. I tried to clone install your version, however, i could not get it to make install.

Add horizontal scrolling and randomize the character size

I am submitting a Feature Request.
Could you make an option in cmatrix that lets it look like this?
image
Basically, you add random binary, randomize the font size, and add some horizontal text as well.

Would you like to work on it?

no... idk cpp!

Add screenshots and improve readme

Readme file could be improved by:

  • Adding screenshots
  • Adding additional documentation

Any other suggestion as welcome :)
If you would like to work on this, please comment.

History of CMatrix?

I like reading some history of FOSS. I remember visiting a CMatrix website long time ago, but the content is gone.

So, I am wondering the history of CMatrix and from the "Thanks" section in README, it feels like @abishekvashok had discussions with Chris Allegretta. And as the commit message of 476808f stated:

Added updated cmatrix code as development was done in my hands after Chris handled me the key to maintain and develop cmatrix.

It looked like the case.

Would @abishekvashok add a history section in README, short paragraph with some notable dates, like when CMatrix was born, when you officially took over and became the Neo.

(I'd throw in some references from the films, but the only things I remember are the name of main character and lots of sunglasses and freaking rains)

Try running "setfont matrix" by hand

I installed cmake by cloning and using the configure route. Cmake works unless I run with the -l argument cmake -lba and I get this error.

Couldn't get a file descriptor referring to the console
There was an error running setfont. Please make sure the
setfont program is in your $PATH.  Try running "setfont matrix" by hand.

My setfont is in $PATH which is inside /bin so that's fine.

I don't understand what I should do with the instruction setfont matrix by hand, I ran setfont matrix and setfont matrix.fnt and both returned Couldn't get a file descriptor referring to the console.

My device

elementary OS 5.0 Juno
Built on Ubuntu 18.04.2 LTS
Linux 4.15.0-58-generic
GTK+ 3.22.30

Compile error on Centos 7: `AM_CONFIG_HEADER(config.h)'

I am submitting a Bug Report

Problem or Feature in Brief

When I do ./configure on my CentOS 7, I get error:

> ./configure
./configure: line 2108: syntax error near unexpected token `config.h'
./configure: line 2108: `AM_CONFIG_HEADER(config.h)'

Solution (if any)

No solutions. ncurses is installed. I see:

> yum list installed | grep ncurse
ncurses.x86_64                          5.9-14.20130511.el7_4          @anaconda
ncurses-base.noarch                     5.9-14.20130511.el7_4          @anaconda
ncurses-libs.x86_64                     5.9-14.20130511.el7_4          @anaconda

Would you like to work on it?

Eh... I don't know how to collaborate?

Advanced color configuration and static configuration from file.

I am submitting a: Feature Request

Feature in Brief

So...this is ENTIRELY cosmetic...I think it would be really neat if you could set a primary color for all text and then a secondary color for select characters. This definitely falls under the vanity category, but it would be cool if all the letters were green except for maybe like your initials, whenever randomly generated, would show up as red.

Solution (if any)

To piggy back on the above as terms of input/configuration, maybe read from a .cmatrix config file in the user root dir or from etc? Could maybe make it easier for people set static system/user configs for stuff like screensaver elements or other automations to not have to consistently pass options to the program and instead just have it check those locations first if no options are provided.

maybe have it look something like this:

[colors]
primary = green
secondary = red

[characters]
primary = *
secondary = a, b, c

[general]
async = true
bold_random = true
bold_all = false
case_sensitive = false

expected behavior from the above would be that primary keyspace minus secondary keyspace would be in primary color, and secondary text would be in secondary color. case_sensitive = false would apply to [aA]. maybe have a general options section for the rest of the stuff under --help as well.

Would you like to work on it?

would if i could...

Cmatrix core dumps when resizing terminal window

I am submitting a Bug Report

Problem or Feature in Brief

Cmatrix core dumps when resizing the terminal window too much

Tested on GNOME terminal and tilix

Solution (if any)

Dont.

Would you like to work on it?

no

Unable to use both "setfont" and "consolechars".

I am submitting a

Problem in Brief

cmatrix -lba pops error as mentioned in the title. Same error pops while using cmatrix on WSL (windows subsystem for linux).

Solution (if any)

Would you like to work on it?

no

Support for larger terminal size than 132x300

As README points out cmatrix by default supports resolutions up to 132x300.
I tried to put it running a terminal window under 204x87 (basically half of vertical display), and yes, 204 columns is an overkill, but hey, let's try to have nice things.

The current issue is that after about 1/3 of the window fils up with characters - it starts to lag immediately and gives me a feeling that The Matrix has a hard time processing some data or keeps changing so many things at once.

Would be great to support higher resolutions without the lag!

P.S.
Could help figure out and contribute to this, but would need some pointers to where to get started and where the bottleneck could be.

Design a website for cmatrix

A website for cmatrix could go into the newly created gh-pages branch.

Please discuss the design of the website to be followed in this issue.

Add option to auto-finish after X seconds

I am submitting a Feature Request

Feature in Brief

It would be great to be able to have cmatrix finish after X seconds automatically. I am working on a browser terminal and i would like to show the cmatrix animation for 5 seconds and then quit but currently i have to rely on the user pressing a key.

Would you like to work on it?

No

tmux support

I am submitting a Bug Report

Problem or Feature in Brief

It does not run properly in a tmux pane.

Solution (if any)

Would you like to work on it?

no

pip cmatrix into lolcat

I am submitting a Feature Request

I am unable to pip cmatrix into lolcat

i think the best suitable way is to have a timer for cmatrix

Documentation about "-l" lock screen option

I am submitting a Feature Request

Lack of description of the "-l" lock option in the man page.
The option is proposed when you type "cmatrix -h" to get help text, but anything in man page.

Request :
Complete the man page (and add the manner to quit this lock screen.)
Or suppress this option that force you to reboot if you don't know how to "unlock"

Tested on GNU/Linux Debian 10 Buster (stable)

thanks

Honor user preference for install directory

Currently, make install fails if run without sudo privileges.

This is because make is unable to install to /usr/share/consolefonts. All other configurations honors the prefix parameter that used to configure the Makefile except consolefonts.

I'm not sure whether this is because consolefonts MUST be installed system-wide and cannot be installed user-specific; or because it just missed to honor the prefix parameter.

There are multiple ways to approach this issue (which I can detail below). I would like to open a pull request with the changes, but then, unfortunately, I'm not familiar with make.

  1. Honor prefix and install to $(prefix)/share/consolefonts/ (and the other directories in the install-data-local function).
  2. Skip the installation of consolefonts (with a warning, probably) if make install is executed without sudo privileges. It is not like cmatrix wouldn't work (except -l) at all without the consolefonts right?

Breaking installation due to a non-trivial error is not desirable, IMHO.

Allow the "-l" option to be used when running cmatrix not in console - feature request

When not in console and running "cmatrix" with the "-l" one gets this error:

Couldn't get a file descriptor referring to the console

But I would really like to be able to run it with the "-l" option in order to get that cool matrix style font without getting that error. So I think that something should be changed in cmatrix to allow this, such as converting the font to an X font and then making cmatrix use this font when it is run using the "-l" option outside of the console.

Migrate to setenv

I am submitting a feature

Problem or Feature in Brief

putenv is used in the code. Although it was the standard in the past, now we have setenv which is also a part of the standard and is more stable. Considering that fact that various putenv bugs still exist ee should migrate to setenv.

Solution (if any)

Change putenv to setenv

Would you like to work on it?

I can do that if no one wants to do so in the next 5 days.

cmatrix forces solarized dark background

I am submitting a

Problem or Feature in Brief

https://imgur.com/V5sLDCr

As you can see in the image, it appears that cmatrix is forcing a Solarized dark-type background in my terminal. This was not like this before. It would just appear normally on my "tango-colorscheme" background. I have no idea why this is happening.

Does it support compiling under macOS?

I run . /configure after some warnings, glibc6 can not work in mac?

configure: WARNING:

*** neither the consolechars nor the setfont program was not found.  You
*** will not be able to see the characters in the matrix font in the
*** console without this program (it may still work in xterms). If you are
*** using Linux, the package containing this program is usually called
*** kbd, kbd-utils, or console-utils

checking for /usr/lib/kbd/consolefonts... no
checking for /usr/share/consolefonts... no
configure: WARNING:

*** You do not appear to have a consolefonts directory in a standard location
*** (/usr/lib/kbd or /usr/share), even though you appear to have the
*** consolechars and/or setfont command.  The matrix font for the console
*** will not be installed.  This means you will not be able to use the
*** matrix console font (and the -l command line switch) unless the font
*** is located in your current directory when you run CMatrix.

checking for mkfontdir... no
checking for /usr/lib/X11/fonts/misc... no
checking for /usr/X11R6/lib/X11/fonts/misc... no
configure: WARNING:

*** You do not appear to have an X window fonts directory in the standard
*** locations (/usr/lib/X11/fonts/misc or /usr/X11R6/lib/X11/fonts/misc). The
*** mtx.pcf font will not be installed.  This means you will probably not
*** be able to use the mtx fonts in your x terminals, and hence be unable
*** to use the -x command line switch.  Sorry about that...

checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating cmatrix.spec
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

cmatrix -l blank screen

In a linux text console, running cmatrix -l just gives me a blank screen. "cmatrix" by itself runs fine.

I'm running on Arch Linux. I tried copying matrix.fnt and matrix.psf.gz to $PWD but the behavior is the same. My TERM is "linux" and my LANG is en_US.UTF-8 (but I tried setting my LANG to "ISO-8859-1" and also to "C"; neither fixed the issue). ncurses is 6.1. kbd is 2.0.4. My default console font is ter-v14n. If I do "setfont matrix", it changes the font to the matrix font correctly.

Kinda stumped here. Let me know if there's any other information you need, or anything else I can try.

support for ncurses libtinfo

I am submitting a Bug Report

Problem or Feature in Brief

NCurses supports to be compiled with separated tinfo (termcap) in '-ltinfo', but the configure.ac scripts doesn't check for this case.

Solution (if any)

existing code:

if eval "test x$CURSES_LIB_NAME = x"
then
    AC_CHECK_LIB(termcap, tgetent, CURSES_LIB="-ltermcap" CURSES_LIB_NAME=termcap)
fi

suggested code to be appended after the existing code:

if eval "test x$CURSES_LIB_NAME = x"
then
    AC_CHECK_LIB(tinfo, tgetent, CURSES_LIB="-ltinfo" CURSES_LIB_NAME=tinfo)
fi

Would you like to work on it?

yes

load font in macOS ?

when i use -l option, the font does not display properly. Is there a way to force loading a compatible font ?
capture d ecran 2017-11-29 a 21 44 28

clarification about/problem with font(s)

hey! :-)
it seems to me like the fonts are not working for me.
mtx.pcf is copied correctly to the systems fonts dir (in my case "/usr/share/fonts/X11/misc/"),
and then mkfontdir is run on that dir, which generates "mtx.pcf.gz".
when i run cmatrix -l, it looks like in the screenshot below.
badfont
in my systems font preview of the "mtx.pcf" file, i see only '@'s.

This is on Trisquel (essentially Ubuntu 14.04)

CMake build system

hey! :-)
i made a first, tiny step in that direction (supporting building with CMake):
https://github.com/hoijui/cmatrix/commits/cmake

it configures and compiles fine on my system (Ubuntu 14.04 64bit), and the resulting cmatrix executable seems to work fine.
what it does not do, is anything else then compiling the executable, like.. doing anything with the font, for example. what other things would be required for it to have the same functionality/features as the current build system?

Crashes when terminal is less than 2 lines high

I am submitting a bug report.

When cmatrix is running, and the terminal is resized to less than two lines, cmatrix crashes with the following error:

996 floating point exception cmatrix

To fix it, I suggest cleanly exiting when the terminal is too small, rather than crashing. I can add a quick solution to prevent a harsh exit, however further investigation may be required to find the source of the error.

make on ubuntu 14.04 fails - AM_INIT_AUTOMAKE: two- and three-arguments forms are deprcated

Hi, after doing a source checkout, I'm able to complete ./configure, but when I run make, I get the following:

looks like you may need to 'modernize' your 'configure.ac' as follows:
https://www.gnu.org/software/automake/manual/html_node/Public-Macros.html

~/project/cmatrix $ make
cd . && aclocal
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
cd . && automake --gnu --include-deps Makefile
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:3: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see:
configure.in:3: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.in:7: error: required file './compile' not found
configure.in:7: 'automake --add-missing' can install 'compile'
Makefile.am: error: required file './ChangeLog' not found
Makefile.am: error: required file './depcomp' not found
Makefile.am: 'automake --add-missing' can install 'depcomp'
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
make: *** [Makefile.in] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.