Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UsefulScrollLock

(i'm still learning c++ please don't make too much fun of it)

What

UsefulScrollLock is a simple customizable Linux daemon program to make an LED (like a scroll lock led) useful again as an unserious temparature alarm.

LEDs matched by a substring get turned on if the specified device (e.g. a CPU) gets too hot, or off if everything's chill.

Why

I looked at my scroll lock LED sitting there being useless and thought of this

Why is this in C++

I dont know

Install

Download the latest release and put it in /usr/local/bin or something in PATH (make sure it's executable!).

If you're on systemd (you probably are), use this very useful service unit (put at /etc/systemd/system/usefulscrolllock.service yes this needs to run as root shut up):

[Unit]
Description=usefulscrolllock daemon

[Service]
Type=simple
ExecStart=usefulscrolllock
Restart=on-failure

[Install]
WantedBy=multi-user.target

then run systemctl daemon-reload and systemctl enable --now usefulscrolllock.service both as root

Config (I don't want it to light up the scroll lock LED! I don't want it to use coretemp!)

UsefulScrollLock has a pretty simple config system that should cover most needs.

Create a dir at /etc/usefulscrolllock, then you can create any of these config files (they're all optional):

/etc/usefulscrolllock/hwmon_name

The name of the hwmon device to look for.

If the name specified here doesn't actually exist UsefulScrollLock will just error out like an idiot. It can't read your mind.

To find yours look through each dir in /sys/class/hwmon and read the name file in there.

Examples: coretemp, asus

Defaults to coretemp (for Intel cpus)

/etc/usefulscrolllock/temp_input

The name of the file to look for inside the hwmon dir leave this at default for most cases.

If the name specified here doesn't exist it will error out just like hwmon_name. Again, it can't read your mind

Examples: temp1_input, temp2_input

Defaults to temp1_input.

/etc/usefulscrolllock/temp_threshold

Minimum temperature for LED to light up in celsius. Must be an integer, no decimal points

Examples: 80, 93

Defaults to 80.

/etc/usefulscrolllock/device_substring

The substring to look for to decide which LED devices to light up.

Examples: ::scrolllock, rfw

Defaults to ::scrolllock.

/etc/usefulscrolllock/substring_mode

How to look for the substring in the LED names. Case insensitive.

Valid values:

  • contains: Trigger if the string contains the substring at all.
  • starts: Trigger only if the string starts with the substring.
  • ends: Trigger only if the string ends with the substring.

Examples: CoNtAins, ends, Starts

Defaults to ends.

My LED won't turn on!!!!

Try pressing a key. If it suddenly turns on your device is just terrible and I can't fix this.

Otherwise, check the logs, and if it seems like an issue from my side open an issue.

License

Copyright (C) 2026-present Butterroach

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

About

simple customizable linux daemon program to make an LED (like a scroll lock led) useful again as an unserious temperature alarm

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages