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

64 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 additional tools and development libraries is not needed.

Prepare Build Environment (Linux/BSD)

You may require a proxy app which can convert the new DBus calls to the old format. More info in systray library info. For Debian-based systems with GTK based trays, use this script to install snixembed.

Build the Application

  1. Verify that you have Go 1.23+ 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:

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

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

    $ make install
    or
    $ sudo make install
    

    Install to a different location:

    $ make install INSTALL_PATH=/tmp
    

All available makefile actions:

% make
Usage:  make COMMAND

Commands:
  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
  check-go      Ensure that Go is installed
  tidy          Removes unused dependencies and adds missing ones
  update-deps   Update go dependencies
  get-deps      Download application dependencies
  format        Fix code format issues
  deadcode      Run deadcode tool for find unreachable functions
  audit         Quality checks
  help          Display this help