Git Product home page Git Product logo

hypr-zoom's Introduction

hypr-zoom

hypr-zoom is a command-line tool written in Go that smoothly animates the Hyprland cursor zoom-factor changes using variety of easing functions. It simply uses the hyprctl command to adjust the cursor zoom-factor and the ease library for animation interpolation.

Why ?

Hyprland cursor zoom factor changes happen instantly, which can feel ood since Hyprland has cool animations. This little CLI solves that.

Features

  • Smoothly animates cursor zoom-factor using a variety of easing and interpolation functions.
  • Configurable animation duration and steps.

Installation

install from aur: hypr-zoom

Grab from release or :

  1. Clone the repository:

    git clone https://github.com/FaqihS/hypr-zoom.git
    cd hypr-zoom
  2. Build the project:

    go build -o hypr-zoom

Usage

The hypr-zoom command has several flags to configure the animation:

  • -duration: Duration of the animation in milliseconds (default: 500)
  • -steps: Number of steps in the animation (default: 100)
  • -easing: Easing function to use for the animation (default: InOutExpo)
  • -easingOut: Easing function to use for the zoom-out animation (optional)
  • -target: Target zoom factor (default: 2.0)
  • -interp: Interpolation Function used for animation(default: Log)

Example

hypr-zoom -easing=InOutExpo -duration=500 -steps=60 -target=1.2

This command will animate the zoom factor to 1.2 using the InOutExpo easing function over 500 milliseconds with 60 steps.

hypr-zoom -easing=OutBack -easingOut=OutExpo 

This command will animate the zoom factor using the OutBack easing function when zooming-in and OutExpo when zooming-out.

Warning

Adjust duration and steps wisely.

Supported Easing Functions

The following easing functions are supported:

  • Linear
  • InQuad, OutQuad, InOutQuad
  • InCubic, OutCubic, InOutCubic
  • InQuart, OutQuart, InOutQuart
  • InQuint, OutQuint, InOutQuint
  • InSine, OutSine, InOutSine
  • InExpo, OutExpo, InOutExpo
  • InCirc, OutCirc, InOutCirc
  • InBack, OutBack, InOutBack
  • InBounce, OutBounce, InOutBounce
  • InSquare, OutSquare, InOutSquare

For animation preview see here.

Supported Interpolation function

  • Linear
  • Log (Logarithmic)

Showcase

Default+Linear

hypr-zoom -interp=Linear
1.mp4

InOutCubic

hypr-zoom -easing=InOutCubic -interp=Linear
2.mp4

OutBack-Inback

hypr-zoom -duration=600 -steps=150 -easing=OutBack -easingOut=InBack -interp=Linear
3.mp4

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes. Although i'm not real Go Dev :p

Acknowledgements

hypr-zoom's People

Contributors

fshou avatar wholikeel avatar szczotapl 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.