GithubHelp home page GithubHelp logo

bnema / swayidle-brightness-manager Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.31 MB

Adjusts brightness to 10% after a set idle time and locks the screen before sleep.

License: Apache License 2.0

Shell 7.71% Go 92.29%
golang hyprland sway swayidle swaylock

swayidle-brightness-manager's Introduction

Swayidle Brightness Manager

This tiny Go application is a utility for Hyprland or Sway that get your actual brightness and set it to 10% after X seconds of idle time. The bash script also locks the screen before the system goes to sleep. It is designed to work with swayidle and swaylock.

Features

  • Decreases the screen brightness to 10% after 30 seconds of idle time.
  • Restores the brightness to its original level upon resuming activity.
  • Ensures that the screen is locked before the system goes to sleep.
  • Prevent dimming the screen if the user is watching a video.

Pre-requisites

  • go 1.20 or higher
  • Sway or Hyprland
  • swayidle
  • swaylock
  • brightnessctl
  • playerctl

Service example

[Unit]
Description=Sway Idle Brightness Manager

[Service]
Environment=PATH=/home/YOURUSERNAME/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStart=/bin/bash %h/.local/bin/agent-brightness-manager.sh
Restart=always

[Install]
WantedBy=default.target

swayidle-brightness-manager's People

Contributors

bnema avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.