Improve flakestat
This commit is contained in:
parent
960da0c59b
commit
0c97e9f3f6
@ -172,12 +172,11 @@ in
|
||||
({
|
||||
"layer" = "top";
|
||||
"position" = "top";
|
||||
modules-left = [ "custom/launcher" "hyprland/workspaces" ];
|
||||
modules-left = [ "custom/flakestat" "hyprland/workspaces" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right =
|
||||
[
|
||||
(lib.mkIf (withArrhist) "custom/arrhist")
|
||||
"custom/flakestat"
|
||||
"pulseaudio"
|
||||
"pulseaudio#microphone"
|
||||
"memory"
|
||||
@ -185,11 +184,6 @@ in
|
||||
"tray"
|
||||
(lib.mkIf (withBattery) "battery")
|
||||
];
|
||||
"custom/launcher" = {
|
||||
"format" = " ";
|
||||
"on-click" = "pkill rofi || ~/.config/rofi/launcher.sh";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
"format" = "{name}";
|
||||
"on-click" = "activate";
|
||||
@ -248,13 +242,15 @@ in
|
||||
};
|
||||
"custom/flakestat" = {
|
||||
"exec" = "${flakestat}/bin/flakestat";
|
||||
"format" = " {}";
|
||||
"return-type" = "json";
|
||||
"interval" = 600;
|
||||
};
|
||||
} // lib.optionalAttrs (withArrhist) {
|
||||
"custom/arrhist" = {
|
||||
"exec" = "${arrhist}/bin/arrhist";
|
||||
"return-type" = "json";
|
||||
"interval" = 30;
|
||||
"interval" = 600;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
@ -18,4 +18,15 @@ git fetch -q --all
|
||||
stable_commit_count=$(git rev-list --count "$stable_rev..origin/$stable_branch")
|
||||
unstable_commit_count=$(git rev-list --count "$unstable_rev..origin/$unstable_branch")
|
||||
|
||||
echo "$stable_commit_count|$unstable_commit_count"
|
||||
text="$stable_commit_count|$unstable_commit_count"
|
||||
tooltip="${stable_branch}: ${stable_commit_count}
|
||||
${unstable_branch}: ${unstable_commit_count}"
|
||||
|
||||
output=$(jq -n \
|
||||
--arg text "$text" \
|
||||
--arg tooltip "$tooltip" \
|
||||
--unbuffered \
|
||||
--compact-output \
|
||||
'{text: $text, tooltip: $tooltip}')
|
||||
|
||||
echo "$output"
|
||||
|
Loading…
Reference in New Issue
Block a user