https://github.com/knightchaser/nonsleep-screen
A simple GUI program written in C to toggle screen sleep inhibition on Ubuntu Desktop.
https://github.com/knightchaser/nonsleep-screen
gtk screen utility
Last synced: 2 months ago
JSON representation
A simple GUI program written in C to toggle screen sleep inhibition on Ubuntu Desktop.
- Host: GitHub
- URL: https://github.com/knightchaser/nonsleep-screen
- Owner: KnightChaser
- Created: 2024-11-14T13:04:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-14T13:30:24.000Z (over 1 year ago)
- Last Synced: 2025-01-15T19:53:35.165Z (over 1 year ago)
- Topics: gtk, screen, utility
- Language: C
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nonsleep-screen
This is a simple GTK-based program written in C that allows you to toggle sleep inhibition (preventing the screen from automatically turning off) on Ubuntu Desktop.

## Requirements
- **GTK 3** development libraries
- Install via: `sudo apt update && sudo apt install libgtk-3-dev`
## What It Does (simple!)
- Provides a small window with:
- A **button** to toggle sleep inhibition on and off.
- A **label** showing the current status of sleep inhibition, displayed in bold and color:
- **Green** text for "Enabled"
- **Red** text for "Disabled"
## Build and Run
1. **Build the Program**
Run `make` in the project directory to compile the program into `main.out`.
2. **Run the Program**
Execute the program with:
```bash
./main.out
3. (Optional) If you want to register the compiled binary as an application for your Ubuntu Desktop, run `./register_as_app.sh` with a root(`sudo`) permission. It eliminates the need of manually opening the terminal, finding the path of `main.out` of this project, and manually run.
```bash
sudo ./register_as_app.sh
```