ghostmaster75 / piidle

Change Brightness of official Rasperry PI LCD 7" if system are in idle after a period of time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

piidle

Change Brightness of official Rasperry PI LCD 7" if system are in idle after a period of time

How it work:

Use xssstate to check if system are in idle (no keyboard or mouse input) and after a predefinited period of time down the brightness of screen to a specific level. If input key or mouse movement are detectet bring up the brightness to a specific level.

Simulation

Can be use as system service.

Usage

Help Image

Install

Prerequisite

suckless-tools package is needed You can install it by command:

sudo apt install suckless-tools

Installation

copy piidle.sh in /usr/bin/ directory give execution permission with

sudo chmod +x /usr/bin/piidle.sh

Next, copy the service file piidle.service the under /lib/systemd/system/ directory to create service file for the systemd on your system.

Pay attention to change user under [Service] section if you have a different user name.

Let’s reload the systemctl daemon to read new file. You need to reload this deamon each time after making any changes in in .service file.

sudo systemctl daemon-reload

Now enable the service to start on system boot, also start the service using the following commands.

sudo systemctl enable piidle.service

sudo systemctl start piidle.service

Finally verify the script is up and running as a systemd service.

sudo systemctl status piidle.service

About

Change Brightness of official Rasperry PI LCD 7" if system are in idle after a period of time


Languages

Language:Shell 100.0%