Browse Source

Add dwm_backlight

Add dwm_backlight that displays the value of
xbacklight rounded to the nearest int.
main
joestandring 5 years ago
parent
commit
2c797f8bab
3 changed files with 22 additions and 1 deletions
  1. +7
    -0
      README.md
  2. +13
    -0
      bar-functions/dwm_backlight.sh
  3. +2
    -1
      dwm_bar.sh

+ 7
- 0
README.md View File

@ -18,6 +18,7 @@ A modular statusbar for DWM
- [dwm_vpn](#dwm_vpn)
- [dwm_ccurse](#dwm_ccurse)
- [dwm_transmission](#dwm_transmission)
- [dwm_backlight](#dwm_backlight)
- [Installation](#installation)
- [Usage](#usage)
- [Customizing](#customizing)
@ -107,6 +108,12 @@ Displays the current status of a torrent with transmission-remote
[⏬ archlinux-2019.06.01... | 92% 1min ⬆3.4 ⬇1.5]
```
Dependencies: ```transmission-remote```
### dwm_backlight
Displays the current backlight level with xbacklight
```
[☀ 80]
```
Dependencies: ```xbacklight```
## Installation
1. Clone and enter the repository:
```


+ 13
- 0
bar-functions/dwm_backlight.sh View File

@ -0,0 +1,13 @@
#!/bin/sh
# A dwm_bar module to display the current backlight brighness with xbacklight
# Joe Standring <git@joestandring.com>
# GNU GPLv3
# Dependencies: xbacklight
dwm_backlight () {
printf "☀ %.0f\n" "$(xbacklight)"
}
dwm_backlight

+ 2
- 1
dwm_bar.sh View File

@ -24,6 +24,7 @@ export IDENTIFIER="unicode"
. "$DIR/bar-functions/dwm_resources.sh"
. "$DIR/bar-functions/dwm_battery.sh"
. "$DIR/bar-functions/dwm_mail.sh"
. "$DIR/bar-functions/dwm_backlight.sh"
. "$DIR/bar-functions/dwm_alsa.sh"
. "$DIR/bar-functions/dwm_pulse.sh"
. "$DIR/bar-functions/dwm_weather.sh"
@ -36,6 +37,6 @@ export IDENTIFIER="unicode"
# Update dwm status bar every second
while true
do
xsetroot -name "[$(dwm_countdown)][$(dwm_transmission)][$(dwm_cmus)][$(dwm_resources)][$(dwm_battery)][$(dwm_mail)][$(dwm_alsa)][$(dwm_weather)][$(dwm_vpn)][$(dwm_network)][$(dwm_keyboard)][$(dwm_date)]"
xsetroot -name "[$(dwm_countdown)][$(dwm_transmission)][$(dwm_cmus)][$(dwm_resources)][$(dwm_battery)][$(dwm_mail)][$(dwm_backlight)][$(dwm_alsa)][$(dwm_weather)][$(dwm_vpn)][$(dwm_network)][$(dwm_keyboard)][$(dwm_date)]"
sleep 1
done

Loading…
Cancel
Save