Compare commits

..

No commits in common. "519eecbc4b83f303d384879f7e2e60ad193c0578" and "7fe2da7d37bf1e677d0cb82b5c609d5c76d427a3" have entirely different histories.

3 changed files with 18 additions and 22 deletions

View File

@ -8,7 +8,7 @@ local M = {} -- The module to export
M = {
-- misc
sign_error = "",
sign_warn = "",
sign_warning = "",
sign_hint = "",
sign_info = "",
}

View File

@ -102,10 +102,10 @@ end
local function get_lsp_diagnostics()
local result = {}
local levels = {
error = "Error",
warn = "Warn",
errors = "Error",
warnings = "Warn",
info = "Info",
hint = "Hint"
hints = "Hint"
}
for k, level in pairs(levels) do
@ -152,12 +152,12 @@ local left = table.concat {
{
process_diagnostics(
globals.sign_error .. " ",
diagnostics.error,
diagnostics.errors,
"%#DiagnosticVirtualTextError#"
),
process_diagnostics(
globals.sign_warn .. " ",
diagnostics.warn,
globals.sign_warning .. " ",
diagnostics.warnings,
"%#DiagnosticVirtualTextWarn#"
),
process_diagnostics(

View File

@ -43,22 +43,18 @@ do
status=" " && capacity="FULL"
printf " %s:%s(%s) " "$slot" "$status" "$capacity"
else
if [ 100 -lt $(expr $capacity) ]; then
status=""
if [ "$status" = "Charging" ]; then
status=""
else
if [ "$status" = "Charging" ]; then
status=""
else
case "$capacity" in
100|[8-9][0-9]) status="" ;;
[6-7][0-9]) status="" ;;
[4-5][0-9]) status="" ;;
[2-3][0-9]) status="" ;;
*) status="" ;;
esac
[ "BAT0" = $slot ] && [ 30 -gt $capacity ] && notify;
fi
printf " %s:%s (%0.2d%%) " "$slot" "$status" "$capacity";
case "$capacity" in
100|[8-9][0-9]) status="" ;;
[6-7][0-9]) status="" ;;
[4-5][0-9]) status="" ;;
[2-3][0-9]) status="" ;;
*) status="" ;;
esac
[ "BAT0" = $slot ] && [ 30 -gt $capacity ] && notify;
fi
printf " %s:%s (%0.2d%%) " "$slot" "$status" "$capacity";
fi
done