Coder Social home page Coder Social logo

vthg2themax / jiggle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeffchannell/jiggle

0.0 0.0 0.0 579 KB

Gnome extension that highlights the cursor position when the mouse is moved rapidly.

License: GNU General Public License v2.0

JavaScript 94.66% Shell 0.41% Makefile 4.58% CSS 0.36%

jiggle's Introduction

Jiggle

Jiggle is a Gnome Shell extension that highlights the cursor position when the mouse is moved rapidly.

GIF of mouse cursor growing as it is shaken

Preferences

Setting Description
Shake Threshold How vigorous the cursor must shake for jiggling to be detected.
Log Level How much Jiggle should log to journalctl.
Effect Choose which effect is used when jiggling is detected.

Cursor Scaling

Show a larger cursor.

Setting Description
Use System Cursor When enabled, use the system cursor. Otherwise, Jiggle uses icons/jiggle-cursor.png.
Hide Original Cursor When enabled, Jiggle attempts to hide and show the real cursor during its animation.
Growth Speed How fast the cursor grows once jiggling is detected.
Shrink Speed How fast the cursor shrinks once jiggling is no longer detected.

Fireworks

Set off fireworks.

Setting Description
Burst Speed How fast the firework particles fly.
Spark Count How many particles the fireworks have.
Spark Trail How far the particle trails are visible.

Spotlight

Shine a spotlight on the cursor.

Setting Description
Size Size of the spotlight.
Show Speed How fast the spotlight fades in once jiggling is detected.
Hide Speed How fast the spotlight fades once jiggling is no longer detected.

Cursor Trail

Leave a trail of cursors.

Setting Description
Speed Speed of the trail generation.

Known Issues

  • Detecting mouse clicks/active windows isn't as straightforward as one would believe.
  • Getting a higher quality system cursor image isn't either.

Patches welcome.

Development

Feel like building Jiggle from sources? Keep reading...

Anatomy Of An Effect

Jiggle effects use duck typing, and effects are expected to have the following methods:

Method Description
render() Executed in a timed loop, for repainting the screen.
run(x, y) Executed when the cursor moves, with the x and y screen coordinates.
start() Executed when jiggling is first detected.
stop() Executed when jiggling is no longer detected.
update(settings) Executed if any of the preferences are changed. settings is a Gio.Settings instance.

In addition, each effect package should also implement a new_effect function that returns a new instance of the effect.

Building

Tools required:

  • GNU make
  • docker
  • bash
  • glib-compile-schemas
  • glade
make

Recompiling the Settings Schema and Preferences UI

Any changes to the settings or UI xml will require recompilation.

DO NOT edit ui/gtk4.ui directly, as it is generated from ui/gtk3.ui!!!

make compile

Testing

Tests use GjsUnit, which is included here.

make test

Docker Testing

Multiple systems can be tested via Docker:

make docker

Or, test a single system:

make docker_centos
make docker_debian
make docker_fedora

Please note that this can be very slow, as the images are built locally.

© 2020 Jeff Channell

jiggle's People

Contributors

jeffchannell avatar rohmishra avatar

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.