Giter VIP home page Giter VIP logo

terminal-screensaver's Introduction

Screensavers are cool. Why can't you have them in your terminals?

There is a video demo available on YouTube.

Install

  1. Copy terminal-screensaver.conf.example to ~/.terminal-screensaver.conf and modify as you wish.

  2. In your ~/.bashrc or ~/.zshrc, add a sourcing of the terminal-screensaver-include.sh file:

    screensaver_source=$HOME/Documents/terminal-screensaver/terminal-screensaver-include.sh
    [[ -s "$screensaver_source" ]] && source "$screensaver_source"
    
  3. Put terminal-screensaver and terminal-screensaver-reset somewhere in your PATH.

  4. Read the comments in terminal-screensaverd and run it.

Caveats

This is a toy, designed for fun more than serious use. The idea for it came while watching my coworker pretend to hack on our codebase while running cmatrix.

"Activity" is defined as commands run; this means that a screensaver might trigger while you're in the middle of typing a command. Thankfully, if you're in vim for long enough for it to trigger, the screensaver won't launch until you quit.

Since exiting the screensaver doesn't reset the counter, the polling mechanism will frequently trigger the screensaver again before you have a chance to do much of anything. This should hopefully be fixed soon, but if you have any clever ideas about this, please let me know.

terminal-screensaver's People

Contributors

jercos avatar xiongchiamiov 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

terminal-screensaver's Issues

broken /var/run

Sabayon (Gentoo)

reset (first line) and daemon:
touch: cannot touch '/var/run/terminal-screensaver/####': No such file or directory
mkdir: cannot create directory '/var/run/terminal-screensaver': Permission denied
chmod: cannot access '/var/run/terminal-screensaver': No such file or directory
ls: cannot access '/var/run/terminal-screensaver': No such file or directory

The folder is lost after rebooting, and the program doesn't have the permission to create it in the first place.

Nothing happens

After a little trial and error I set up the script as described in the manual, but nothing happens, no error message either.
I copied the files, except for 'terminal-screensaverd', when I use this file many errors occur.
If I only run 'terminal-screensaver' the configured screensaver will be executed.
I am using Ubuntu 16 LTS and sh.

Does anyone have a better guide for this?

Activity is defined as a command run

This should hopefully be fixed soon, but if you have any clever ideas about this, please let me know.

Try stat --format=%X "$(tty)". Barring some exceptions like Ctrl+C, the atime on the tty will be updated only after a keypress. You can use the atime to help determine whether or not the screensaver should be triggered.

From a helpful user on Reddit.

lol

./terminal-screensaver: 3: ./terminal-screensaver: Syntax error: "(" unexpected

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.