All Projects → alexdelorenzo → brightness

alexdelorenzo / brightness

Licence: AGPL-3.0 license
☀️ Dim your Mac's display from the command line via CoreDisplay

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to brightness

wluma
Automatic brightness adjustment based on screen contents and ALS
Stars: ✭ 290 (+1160.87%)
Mutual labels:  brightness-level, brightness-control
ssh-agent
A shell script that loads ssh-agent and keys into each terminal session of a workstation
Stars: ✭ 15 (-34.78%)
Mutual labels:  macosx
iOS-AirPrint-for-Mac
enable iOS Airprint Sharing on Mac OS
Stars: ✭ 24 (+4.35%)
Mutual labels:  macosx
MarvelForKeynote
Sync your Keynote file to Marvel
Stars: ✭ 16 (-30.43%)
Mutual labels:  macosx
Ambar-Xamarin
A macOS Menu Bar app built with Xamarin and C#
Stars: ✭ 63 (+173.91%)
Mutual labels:  macosx
PrincekinKlineFrame
一款用Swift开发的K线图和深度图组件,具有轻量、敏捷等特点,可供虚拟货币行业和金融行业使用
Stars: ✭ 72 (+213.04%)
Mutual labels:  macosx
WeChatWork-MacOS
企业微信小助手
Stars: ✭ 27 (+17.39%)
Mutual labels:  macosx
appleloops
A utility to deploy the additional audio content packages for Apple's audio editing programs.
Stars: ✭ 20 (-13.04%)
Mutual labels:  macosx
AwsTerm
A collection of awesome terminal utilities
Stars: ✭ 37 (+60.87%)
Mutual labels:  macosx
JFaceRecog
facial recognition in Java
Stars: ✭ 25 (+8.7%)
Mutual labels:  facial-recognition
sloth-app
Sloth desktop app
Stars: ✭ 16 (-30.43%)
Mutual labels:  macosx
picosdk-c-examples
A set of C/C++ examples for PicoScope® oscilloscope and PicoLog® data logger products.
Stars: ✭ 37 (+60.87%)
Mutual labels:  macosx
careful rm
A safe wrapper for rm that adds useful warnings and an optional recycle/trash mode
Stars: ✭ 22 (-4.35%)
Mutual labels:  macosx
funcd
Daemon for functional keys (works without X11)
Stars: ✭ 14 (-39.13%)
Mutual labels:  brightness-control
Mojave-Dynamic-Wallpaper
Automatic Changing Mojave Wallpaper
Stars: ✭ 15 (-34.78%)
Mutual labels:  macosx
conky-for-macOS
macOS port of the Light-weight system monitor for X.
Stars: ✭ 139 (+504.35%)
Mutual labels:  macosx
stinsen
Coordinators in SwiftUI. Simple, powerful and elegant.
Stars: ✭ 563 (+2347.83%)
Mutual labels:  macosx
nvim
Repository for the Tandem NeoVim Plugin
Stars: ✭ 23 (+0%)
Mutual labels:  macosx
britishMuseumFacesDetection
A python example for using OpenCV to identify faces within @BritishMuseum images.
Stars: ✭ 66 (+186.96%)
Mutual labels:  facial-recognition
12306-electron
🚄 electron-vue构建12306跨平台(Mac、Windows、Linux)客户端
Stars: ✭ 125 (+443.48%)
Mutual labels:  macosx

brightness: Adjust display brightness with your 🌞

brightness is a command-line utility and daemon that adjusts your display's brightness.

In daemonized mode, brightness will use facial recognition to determine whether or not to change your display's brightness when your system goes idle.

As a command-line utility, you can use brightness to get and set your display's brightness.

Use Cases

You intend to leave your screen on, even while there's little to no mouse or keyboard activity. This can happen while watching a video, reading text or following a recipe.

You probably don't like it when your screen goes off when you're looking at it. There's probably a camera on your screen and it's probably in front of your face.

Let's use it to make computers a little less annoying.

You want to adjust display brightness programmatically, or you're using macOS 10.13+

Apple deprecated their public IOKit Framework APIs in favor of an undocumented CoreDisplay API. Deprecation of IOKit broke existing utilities.

However, brightness takes advantage of private CoreDisplay APIs that control display brightness, allowing us to adjust it programmatically.

Installation

# clone the repo
git clone https://github.com/thismachinechills/brightness.git


# install the application
cd brightness
pip3 install -r requirements.txt
python3 setup.py install


# check if it worked
brightness --help

Notes

I've only tested this on macOS 10.13

Prerequisites

Python Version

Python 3.7.0+

Application Dependencies

pip3 install -r requirements.txt

Platform Dependencies

macOS

macOS 10.13+.

All dependencies can be installed with pip3 install -r requirements.txt.

Or pip3 install pyobjc

Windows

Windows 10+.

All dependencies can be installed with pip3 install -r requirements.txt.

Or pip3 install wmi

Linux

Please install xbacklight and xprintidle.

Ubuntu & Debian

sudo apt install xbacklight xprintidle

Usage

Usage: brightness [OPTIONS]

  brightness is a daemon and command-line utility that adjusts your
  display's brightness.

  In daemonized mode, brightness will use facial recognition to determine
  whether or not to change your display's brightness when your system goes
  idle.

  As a command-line utility, you can use brightness to get and set your
  display's brightness.

  Run without arguments to get the current brightness for the default
  display.

  $ brightness
  75.0

Options:
  -c, --capture INTEGER           Capture device.  [default: 0]
  -b, --brightness INTEGER RANGE  Screen brightness between 0 and 100.
                                  [default: 0]
  -d, --daemon                    Run in daemonized mode. Use facial
                                  recognition when system goes idle to
                                  determine whether to change brightness.
                                  [default: False]
  -i, --idle FLOAT                Seconds between inactivtiy and facial
                                  recognition.  [default: 300]
  -f, --frames INTEGER            Number of frames to capture in succession.
                                  Increase this value if you're getting false
                                  negatives  [default: 2]
  --help                          Show this message and exit.

Example

Change the brightness to 50%

brightness -b 50

Run in daemonized mode. If the system has been idle for 10 minutes (600 seconds), brightness will check for faces.

brightness -d -i 600

Run in daemonized mode. If the system has been idle for 120 seconds, capture 3 frames from device 0 for use in facial recognition.

brightness -d -c 0 -b 0 -i 120 -f 3

Contributions

All contributions are welcomed and encouraged.

By submitting a contribution, you agree that your modifications can be distributed under the licensing terms below.

License

See LICENSE.

Alternative License

Please contact me if you'd like to use this software under another license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].