browser depends on config

This commit is contained in:
Venelin Dechkov
2026-07-30 11:54:49 +03:00
parent efb6df5dc7
commit a4385c8858
+18 -7
View File
@@ -28,7 +28,18 @@ namespace
bool has_child;
Proc child;
Cmd amixer("amixer");
Cmd browser(
#if !defined(PULSEAUDIO)
"apulse",
#endif
BROWSER);
Cmd amixer("amixer"
#if defined(PULSEAUDIO)
,"-Dpulse"
#endif
);
Cmd low_battery_notify("notify-send", "--urgency=critical", "Battery Low");
}
@@ -281,7 +292,7 @@ extern "C"
}
else // start browser
{
Cmd("apulse", BROWSER).detach();
detach(browser);
}
}
@@ -314,7 +325,7 @@ extern "C"
Cmd open_bookmark("apulse", BROWSER);
link = link.substr(link_begin+1);
open_bookmark += link.c_str();
open_bookmark.detach();
detach(open_bookmark);
break;
}
}
@@ -323,28 +334,28 @@ extern "C"
void vene_inc_vol(const Arg*)
{
Cmd inc_vol(amixer + "-q" + "set" + AUDIO_DEV + "3%+");
child = inc_vol.detach();
child = detach(inc_vol);
has_child = true;
}
void vene_dec_vol(const Arg*)
{
Cmd dec_vol(amixer + "-q" + "set" + AUDIO_DEV + "3%-");
child = dec_vol.detach();
child = detach(dec_vol);
has_child = true;
}
void vene_toggle_vol(const Arg*)
{
Cmd toggle_vol(amixer + "-q" + "set" + AUDIO_DEV + "toggle");
child = toggle_vol.detach();
child = detach(toggle_vol);
has_child = true;
}
void vene_toggle_mic(const Arg*)
{
Cmd toggle_mic(amixer + "-q" + "set" + "Capture" + "toggle");
child = toggle_mic.detach();
child = detach(toggle_mic);
has_child = true;
}
}