mirror of
https://github.com/tomru/hlwm-config.git
synced 2026-03-02 22:17:20 +01:00
fix statusbar
This commit is contained in:
@@ -7,9 +7,22 @@ linuxBattery().then(batteries => {
|
||||
batteries.forEach(battery => {
|
||||
var color = battery.warningLevel !== 'none' ? '#ff0000' : '#eee8d5';
|
||||
var stateSymbol = battery.state === 'charging' ? '↑' : '↓';
|
||||
switch (battery.state) {
|
||||
case 'charging':
|
||||
stateSymbol = '↑';
|
||||
break;
|
||||
case 'fully-charged':
|
||||
stateSymbol = 'F';
|
||||
break;
|
||||
case 'discharging':
|
||||
stateSymbol = '↓';
|
||||
break;
|
||||
default:
|
||||
|
||||
}
|
||||
var timeLeft = battery.timeToFull || battery.timeToEmpty || '';
|
||||
|
||||
var text = `%{F${color}}${battery.percentage} ${stateSymbol} ${timeLeft}%{F-}`;
|
||||
console.log(text);
|
||||
process.stdout.write(text);
|
||||
});
|
||||
});
|
||||
|
||||
2
conkyrc
2
conkyrc
@@ -33,4 +33,4 @@ override_utf8_locale yes
|
||||
use_spacer left
|
||||
|
||||
TEXT
|
||||
%{c} load: ${loadavg 1} ${loadavg 2} ${loadavg 3} | ram: ${memperc}% | swap: ${swapperc} | processes: ${processes} | ${if_up wlp3s0} wlan:${wireless_link_qual_perc wlp3s0}% ${wireless_essid wlp3s0} ↓${downspeed wlp3s0} ↑${upspeed wlp3s0} |$endif ${if_up enp0s25:} lan: ↓${downspeed wlp3s0} ↑${upspeed wlp3s0} |$endif bat ${exec $HOME/.config/herbstluftwm/conky-bat/index.js}
|
||||
%{c} load: ${loadavg 1} ${loadavg 2} ${loadavg 3} | ram: ${memperc}% | swap: ${swapperc} | processes: ${processes} | ${if_up wlan0} wlan:${wireless_link_qual_perc wlan0}% ${wireless_essid wlan0} ↓${downspeed wlan0} ↑${upspeed wlan0} |$endif ${if_up enp0s25:} lan: ↓${downspeed wlan0} ↑${upspeed wlan0} |$endif bat ${exec $HOME/.config/herbstluftwm/conky-bat/index.js}
|
||||
|
||||
@@ -51,5 +51,6 @@ panelGeometry=${geometry[2]}x${statusbar_height}+${x}+${y}
|
||||
| lemonbar \
|
||||
-g $panelGeometry \
|
||||
-f "$font" \
|
||||
-f '-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1' \
|
||||
-B $GRUVBOX_DARK1 -F $GRUVBOX_LIGHT0 \
|
||||
-u 2
|
||||
|
||||
Reference in New Issue
Block a user