diff options
author | Urbain Vaes <urbain@vaes.uk> | 2020-03-02 10:42:03 +0000 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2020-03-02 10:42:03 +0000 |
commit | 104ca1e11721518f9224527459e8506a858692c9 (patch) | |
tree | c81b075c2203a62c7312a66fd7dc35b95c1a19d7 /i3 | |
parent | cc688055484c2e17d776c5e7254b33e3f4d7816d (diff) | |
parent | ebe9521c37b97959df974f8adeb4c7bfed0a527a (diff) |
Merge branch 'master' of github.com:urbainvaes/dotfiles
Diffstat (limited to 'i3')
-rw-r--r-- | i3/.config/i3/config | 4 | ||||
-rwxr-xr-x | i3/.config/i3blocks/bin/battery | 15 |
2 files changed, 11 insertions, 8 deletions
diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 28fd656..e51e8ac 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -1,7 +1,7 @@ # Modifier set $mod Mod4 -font pango:DejaVu Sans Mono, Awesome 8 +font pango:DejaVu Sans Mono, Awesome 9 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -190,6 +190,8 @@ bindsym XF86AudioMute exec amixer -D pulse sset Master 0% # Display bindsym XF86MonBrightnessUp exec light -A 10 bindsym XF86MonBrightnessDown exec light -U 10 +bindsym Prior exec light -A 10 +bindsym Next exec light -U 10 bindsym Shift+XF86AudioRaiseVolume exec light -A 10 bindsym Shift+XF86AudioLowerVolume exec light -U 10 diff --git a/i3/.config/i3blocks/bin/battery b/i3/.config/i3blocks/bin/battery index 378ee3f..0286809 100755 --- a/i3/.config/i3blocks/bin/battery +++ b/i3/.config/i3blocks/bin/battery @@ -5,7 +5,6 @@ if [ ! -d /sys/class/power_supply/BAT0 ]; then exit fi -current_now=$(cat /sys/class/power_supply/BAT0/current_now) charge_now=$(cat /sys/class/power_supply/BAT0/charge_now) charge_full=$(cat /sys/class/power_supply/BAT0/charge_full) bat_status=$(cat /sys/class/power_supply/BAT0/status) @@ -16,7 +15,7 @@ if [ "$bat_status" = "Full" ]; then fi if [ "$bat_status" = "Discharging" ]; then - tot_minutes_remaining=$(( charge_now*60/current_now )) + # tot_minutes_remaining=$(( charge_now*60/current_now )) if [[ $charge_percent -lt 20 ]]; then icon="" @@ -36,14 +35,16 @@ if [ "$bat_status" = "Discharging" ]; then fi elif [ "$bat_status" = "Charging" ]; then - tot_minutes_remaining=$(( (charge_full-charge_now)*60/current_now )) + # current_now=$(cat /sys/class/power_supply/BAT0/current_now) + # tot_minutes_remaining=$(( (charge_full-charge_now)*60/current_now )) icon= color="lightblue" fi -time_remaining=$(printf "%02d:%02d" \ - $(( tot_minutes_remaining/60 )) \ - $(( tot_minutes_remaining - (tot_minutes_remaining/60)*60 ))) +# time_remaining=$(printf "%02d:%02d" \ +# $(( tot_minutes_remaining/60 )) \ +# $(( tot_minutes_remaining - (tot_minutes_remaining/60)*60 ))) -echo "<span color='$color'>$icon</span> $charge_percent% ($time_remaining)" +# echo "<span color='$color'>$icon</span> $charge_percent% ($time_remaining)" +echo "<span color='$color'>$icon</span> $charge_percent%" |