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).
For macOS systems, the installation of build essential tools and development libraries is not needed.
To build the application on Debian-based Linux systems, follow these steps to install the necessary dependencies:
-
Install Build Essential Tools: Install the essential tools required for building software on Debian-based systems:
sudo apt install build-essential
-
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
-
-
Verify that you have
Go 1.22+
installed$ go version
If
go
is not installed, follow instructions on the Go website. -
Clone this repository
$ git clone https://github.com/sonjek/mouse-stay-up $ cd mouse-stay-up
-
Build
$ make build
The binary file is built and ready to run from current folder:
$ ./bin/mouse-stay-up
-
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