nwg-panel: enable sysload by default

This commit is contained in:
Colin 2024-06-19 02:00:03 +00:00
parent b3c5e53156
commit b7f99c022b
4 changed files with 6 additions and 4 deletions

View File

@ -143,7 +143,7 @@
};
executor-sysload = {
script = "sane-sysload";
script = "sane-sysload {mem} {cpu}";
interval = 10;
css-name = "";
on-right-click = "";

View File

@ -48,7 +48,7 @@ in
brightness = mkEnableOption' true "display backlight level and slider";
mediaTitle = mkEnableOption' true "display title of current song/media";
mediaPrevNext = mkEnableOption' true "display prev/next button in media";
sysload = mkEnableOption' false "display system load info (cpu/memory)";
sysload = mkEnableOption' true "display system load info (cpu/memory)";
windowIcon = mkEnableOption' true "display icon of active window";
windowTitle = mkEnableOption' true "display title of active window";
workspaceNumbers = mkOption {

View File

@ -66,6 +66,7 @@
windowTitle = false;
mediaPrevNext = false;
mediaTitle = false;
sysload = false;
workspaceNumbers = [ "1" "2" "3" "4" "5" ];
workspaceHideEmpty = false;
};

View File

@ -470,7 +470,7 @@ def main() -> None:
parser.add_argument("--hour-suffix", default=SUFFIX_HR)
parser.add_argument("--minute-suffix", default=SUFFIX_MIN)
parser.add_argument("--percent-suffix", default=SUFFIX_PERCENT)
parser.add_argument("formatstr")
parser.add_argument("formatstr", nargs="+")
args = parser.parse_args()
if args.debug:
@ -483,7 +483,8 @@ def main() -> None:
f.suffix_min = args.minute_suffix
info = AllInfo(f)
print(args.formatstr.format(
formatstr = " ".join(args.formatstr)
print(formatstr.format(
bat=LazyFormatter(info, "bat"),
bat_icon=LazyFormatter(info, "bat_icon"),
bat_time=LazyFormatter(info, "bat_time"),