https://github.com/times-z/zen-mod-polybar
Script to toggle brightness of a screen to 0 or 1 to be focused on work
https://github.com/times-z/zen-mod-polybar
polybar polybar-scripts
Last synced: about 1 year ago
JSON representation
Script to toggle brightness of a screen to 0 or 1 to be focused on work
- Host: GitHub
- URL: https://github.com/times-z/zen-mod-polybar
- Owner: Times-Z
- Created: 2022-05-15T09:27:38.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-15T10:25:28.000Z (about 4 years ago)
- Last Synced: 2025-03-24T01:40:38.193Z (over 1 year ago)
- Topics: polybar, polybar-scripts
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zen-mod-polybar
Script to toggle brightness of a screen to 0 or 1 to be focused on work
## Dependencies
- xrandr
## Configuration
You can modify one variable in `focus.sh`
```sh
# Screen to be toggled
# Run `xrandr -q` to get output name
readonly SCREEN="DisplayPort-1"
```
## Usage
The script expects parameters :
- `--toggle` : Toggle brightness of the screen to 0 or 1
- `--get-current` : Get current brightness and display an icon
- When brightness is > 0 : 
- When brightness is set to 0 : 
Example module for polybar
```ini
[module/focus]
type = custom/script
interval = 1
exec = ~/.config/polybar/scripts/focus.sh --get-current
click-left = ~/.config/polybar/scripts/focus.sh --toggle
```