Fix volume interval waybar
This commit is contained in:
		| @@ -156,91 +156,98 @@ in | |||||||
|       } |       } | ||||||
|     ''; |     ''; | ||||||
|     settings = [ |     settings = [ | ||||||
|       ({ |       ( | ||||||
|         "layer" = "top"; |         let | ||||||
|         "position" = "top"; |           volInterval = if (osConfig.system.name == "gunter") then "5" else "1"; | ||||||
|         modules-left = [ "custom/flakestat" ]; |         in | ||||||
|         modules-center = [ "hyprland/workspaces" ]; |         { | ||||||
|         modules-right = |           "layer" = "top"; | ||||||
|           [ |           "position" = "top"; | ||||||
|             (lib.mkIf (withArrhist) "custom/arrhist") |           modules-left = [ "custom/flakestat" ]; | ||||||
|             "pulseaudio" |           modules-center = [ "hyprland/workspaces" ]; | ||||||
|             "pulseaudio#microphone" |           modules-right = | ||||||
|             "memory" |             [ | ||||||
|             "cpu" |               (lib.mkIf (withArrhist) "custom/arrhist") | ||||||
|             (lib.mkIf (withBattery) "battery") |               "pulseaudio" | ||||||
|             "clock" |               "pulseaudio#microphone" | ||||||
|             "tray" |               "memory" | ||||||
|           ]; |               "cpu" | ||||||
|         "hyprland/workspaces" = { |               (lib.mkIf (withBattery) "battery") | ||||||
|           "format" = "{name}"; |               "clock" | ||||||
|           "on-click" = "activate"; |               "tray" | ||||||
|           "on-scroll-up" = "hyprctl dispatch workspace e+1"; |             ]; | ||||||
|           "on-scroll-down" = "hyprctl dispatch workspace e-1"; |           "hyprland/workspaces" = { | ||||||
|         }; |             "format" = "{name}"; | ||||||
|         "pulseaudio" = { |             "on-click" = "activate"; | ||||||
|           "scroll-step" = 5; |             "on-scroll-up" = "hyprctl dispatch workspace e+1"; | ||||||
|           "format" = "{icon} {volume}%"; |             "on-scroll-down" = "hyprctl dispatch workspace e-1"; | ||||||
|           "format-muted" = ""; |  | ||||||
|           "format-icons" = { "default" = [ "" "" "" ]; }; |  | ||||||
|           "on-click" = "pamixer -t"; |  | ||||||
|         }; |  | ||||||
|         "pulseaudio#microphone" = { |  | ||||||
|           "format" = "{format_source}"; |  | ||||||
|           "format-source" = " {volume}%"; |  | ||||||
|           "format-source-muted" = ""; |  | ||||||
|           "on-click" = "pamixer --default-source -t"; |  | ||||||
|           "on-scroll-up" = "pamixer --default-source -i 5"; |  | ||||||
|           "on-scroll-down" = "pamixer --default-source -d 5"; |  | ||||||
|           "scroll-step" = 5; |  | ||||||
|           "on-click-right" = "pavucontrol"; |  | ||||||
|         }; |  | ||||||
|         "clock" = { |  | ||||||
|           "interval" = 1; |  | ||||||
|           "format" = "{:%H:%M %A %b %d}"; |  | ||||||
|           "tooltip" = true; |  | ||||||
|         }; |  | ||||||
|         "memory" = { |  | ||||||
|           "interval" = 3; |  | ||||||
|           "format" = " {percentage}%"; |  | ||||||
|           "states" = { "warning" = 85; }; |  | ||||||
|         }; |  | ||||||
|         "cpu" = { |  | ||||||
|           "interval" = 3; |  | ||||||
|           "format" = " {usage}%"; |  | ||||||
|         }; |  | ||||||
|         "tray" = { |  | ||||||
|           "icon-size" = 15; |  | ||||||
|           "spacing" = 6; |  | ||||||
|         }; |  | ||||||
|         "battery" = { |  | ||||||
|           "interval" = 60; |  | ||||||
|           "states" = { |  | ||||||
|             "warning" = 20; |  | ||||||
|             "critical" = 5; |  | ||||||
|           }; |           }; | ||||||
|           "format" = "{icon} {capacity}%"; |           "pulseaudio" = { | ||||||
|           "format-icons" = [ |             "scroll-step" = 5; | ||||||
|             "" |             "format" = "{icon} {volume}%"; | ||||||
|             "" |             "format-muted" = ""; | ||||||
|             "" |             "format-icons" = { "default" = [ "" "" "" ]; }; | ||||||
|             "" |             "on-scroll-up" = "pamixer -i ${volInterval}"; | ||||||
|             "" |             "on-scroll-down" = "pamixer -d ${volInterval}"; | ||||||
|           ]; |             "on-click" = "pamixer -t"; | ||||||
|         }; |           }; | ||||||
|         "custom/flakestat" = { |           "pulseaudio#microphone" = { | ||||||
|           "exec" = "${flakestat}/bin/flakestat"; |             "format" = "{format_source}"; | ||||||
|           "format" = "  {}"; |             "format-source" = " {volume}%"; | ||||||
|           "return-type" = "json"; |             "format-source-muted" = ""; | ||||||
|           "interval" = 600; |             "on-click" = "pamixer --default-source -t"; | ||||||
|         }; |             "on-scroll-up" = "pamixer --default-source -i ${volInterval}"; | ||||||
|       } // lib.optionalAttrs (withArrhist) { |             "on-scroll-down" = "pamixer --default-source -d ${volInterval}"; | ||||||
|         "custom/arrhist" = { |             "scroll-step" = 5; | ||||||
|           "exec" = "${arrhist}/bin/arrhist"; |             "on-click-right" = "pavucontrol"; | ||||||
|           "return-type" = "json"; |           }; | ||||||
|           "interval" = 600; |           "clock" = { | ||||||
|         }; |             "interval" = 1; | ||||||
|       }) |             "format" = "{:%H:%M %A %b %d}"; | ||||||
|  |             "tooltip" = true; | ||||||
|  |           }; | ||||||
|  |           "memory" = { | ||||||
|  |             "interval" = 3; | ||||||
|  |             "format" = " {percentage}%"; | ||||||
|  |             "states" = { "warning" = 85; }; | ||||||
|  |           }; | ||||||
|  |           "cpu" = { | ||||||
|  |             "interval" = 3; | ||||||
|  |             "format" = " {usage}%"; | ||||||
|  |           }; | ||||||
|  |           "tray" = { | ||||||
|  |             "icon-size" = 15; | ||||||
|  |             "spacing" = 6; | ||||||
|  |           }; | ||||||
|  |           "battery" = { | ||||||
|  |             "interval" = 60; | ||||||
|  |             "states" = { | ||||||
|  |               "warning" = 20; | ||||||
|  |               "critical" = 5; | ||||||
|  |             }; | ||||||
|  |             "format" = "{icon} {capacity}%"; | ||||||
|  |             "format-icons" = [ | ||||||
|  |               "" | ||||||
|  |               "" | ||||||
|  |               "" | ||||||
|  |               "" | ||||||
|  |               "" | ||||||
|  |             ]; | ||||||
|  |           }; | ||||||
|  |           "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" = 600; | ||||||
|  |           }; | ||||||
|  |         } | ||||||
|  |       ) | ||||||
|     ]; |     ]; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user