Skip to content

Small app that moves your cursor to prevent sleep mode — efficient and virtually invisible.

License

Notifications You must be signed in to change notification settings

sonjek/mouse-stay-up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mouse-Stay-Up

ci status Go Report Card Contributors GitHub release (latest by date including pre-releases) License

This lightweight application is designed to prevent your computer from entering sleep mode by periodically moving the cursor when it detects periods of inactivity. Additionally, the program allows you to disable the keyboard programmatically (MacOS only).

Installation from source

Prepare Build Environment (macOS)

For macOS systems, the installation of build essential tools and development libraries is not needed.

Prepare Build Environment (Debian-Based Linux)

To build the application on Debian-based Linux systems, follow these steps to install the necessary dependencies:

  1. Install Build Essential Tools: Install the essential tools required for building software on Debian-based systems:

    sudo apt install build-essential
  2. Install Development Libraries:

    • libx11-dev: Install the development files for the X11 library, which is required for graphical applications:

      sudo apt install libx11-dev
    • libayatana-appindicator3-dev: Install the development files for the Ayatana AppIndicator library, which is used for creating application indicators:

      sudo apt install libayatana-appindicator3-dev

Build the Application

  1. Verify that you have Go 1.22+ installed

    $ go version

    If go is not installed, follow instructions on the Go website.

  2. Clone this repository

    $ git clone https://github.com/sonjek/mouse-stay-up
    $ cd mouse-stay-up
  3. Build

    $ make build

    The binary file is built and ready to run from current folder:

    $ ./bin/mouse-stay-up
    
  4. You can install the binary file to your OS.

    Installs to /usr/local/bin/ by default:

    $ make install
    

    Install to a different location:

    $ make install INSTALL_PATH=/tmp
    

All available makefile actions:

% make
Usage:  make COMMAND

Commands:
  help        Display this help
  get-deps    Download application dependencies
  build       Build application
  clean       Remove binary file from local bin directory
  install     Install binary file from local bin directory to /usr/local/bin/
  uninstall   Remove binary file from /usr/local/bin/
  start       Build and start application
  test        Run unit tests
  format      Fix code format issues
  deadcode    Run deadcode tool for find unreachable functions
  audit       Quality checks