Improve flakestat
This commit is contained in:
parent
960da0c59b
commit
0c97e9f3f6
@ -172,12 +172,11 @@ in
|
|||||||
({
|
({
|
||||||
"layer" = "top";
|
"layer" = "top";
|
||||||
"position" = "top";
|
"position" = "top";
|
||||||
modules-left = [ "custom/launcher" "hyprland/workspaces" ];
|
modules-left = [ "custom/flakestat" "hyprland/workspaces" ];
|
||||||
modules-center = [ "clock" ];
|
modules-center = [ "clock" ];
|
||||||
modules-right =
|
modules-right =
|
||||||
[
|
[
|
||||||
(lib.mkIf (withArrhist) "custom/arrhist")
|
(lib.mkIf (withArrhist) "custom/arrhist")
|
||||||
"custom/flakestat"
|
|
||||||
"pulseaudio"
|
"pulseaudio"
|
||||||
"pulseaudio#microphone"
|
"pulseaudio#microphone"
|
||||||
"memory"
|
"memory"
|
||||||
@ -185,11 +184,6 @@ in
|
|||||||
"tray"
|
"tray"
|
||||||
(lib.mkIf (withBattery) "battery")
|
(lib.mkIf (withBattery) "battery")
|
||||||
];
|
];
|
||||||
"custom/launcher" = {
|
|
||||||
"format" = " ";
|
|
||||||
"on-click" = "pkill rofi || ~/.config/rofi/launcher.sh";
|
|
||||||
"tooltip" = false;
|
|
||||||
};
|
|
||||||
"hyprland/workspaces" = {
|
"hyprland/workspaces" = {
|
||||||
"format" = "{name}";
|
"format" = "{name}";
|
||||||
"on-click" = "activate";
|
"on-click" = "activate";
|
||||||
@ -248,13 +242,15 @@ in
|
|||||||
};
|
};
|
||||||
"custom/flakestat" = {
|
"custom/flakestat" = {
|
||||||
"exec" = "${flakestat}/bin/flakestat";
|
"exec" = "${flakestat}/bin/flakestat";
|
||||||
|
"format" = " {}";
|
||||||
|
"return-type" = "json";
|
||||||
"interval" = 600;
|
"interval" = 600;
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs (withArrhist) {
|
} // lib.optionalAttrs (withArrhist) {
|
||||||
"custom/arrhist" = {
|
"custom/arrhist" = {
|
||||||
"exec" = "${arrhist}/bin/arrhist";
|
"exec" = "${arrhist}/bin/arrhist";
|
||||||
"return-type" = "json";
|
"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")
|
stable_commit_count=$(git rev-list --count "$stable_rev..origin/$stable_branch")
|
||||||
unstable_commit_count=$(git rev-list --count "$unstable_rev..origin/$unstable_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