quick commit

This commit is contained in:
2026-01-31 11:46:12 +01:00
parent 0e613141da
commit ad5e678c5d
25 changed files with 287 additions and 622 deletions

View File

@@ -5,7 +5,9 @@
#include <regex>
#include <sigc++/functors/mem_fun.h>
#include "helpers/systemHelper.hpp"
#include "helpers/command.hpp"
#include "giomm/applicationcommandline.h"
VolumeWidget::VolumeWidget() : Gtk::Box(Gtk::Orientation::HORIZONTAL) {
set_valign(Gtk::Align::CENTER);
@@ -21,7 +23,7 @@ VolumeWidget::VolumeWidget() : Gtk::Box(Gtk::Orientation::HORIZONTAL) {
click->set_button(GDK_BUTTON_PRIMARY);
click->signal_released().connect([this](int, double, double) {
try {
(void)SystemHelper::get_command_output(
(void)CommandHelper::exec(
"wpctl set-mute @DEFAULT_SINK@ toggle");
} catch (const std::exception &ex) {
std::cerr << "[VolumeWidget] failed to toggle mute: " << ex.what()
@@ -44,8 +46,7 @@ VolumeWidget::~VolumeWidget() {
void VolumeWidget::update() {
try {
const std::string out =
SystemHelper::get_command_output("wpctl get-volume @DEFAULT_SINK@");
const std::string out = CommandHelper::exec("wpctl get-volume @DEFAULT_SINK@");
std::smatch m;
std::regex r_percent(R"((\d+(?:\.\d+)?)%)");