Skip to content

Commit

Permalink
blank-screens: support setting alpha for monitors independently
Browse files Browse the repository at this point in the history
  • Loading branch information
XPhyro committed Sep 12, 2024
1 parent e4cd2b7 commit f5dfae7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cpp/project/blank-screens/src/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ void bs::daemon::dispatch(const std::string& command_line)
if (argv[0] == "alpha") {
std::cerr << xph::exec_name << ": setting alpha to " << argv[1] << '\n';
const auto alpha = argv.size() < 2 ? m_cli.alpha() : std::stod(argv[1]);
m_blinds.lerp_alpha(alpha);
if (argv.size() < 3) {
m_blinds.lerp_alpha(alpha);
} else {
for (const auto& monitor : argv | std::views::drop(2))
m_blinds.lerp_alpha(alpha, monitor);
}
} else if (argv[0] == "add") {
for (const auto& monitor : argv | std::views::drop(1))
m_blinds.add_monitor(monitor, false);
Expand Down

0 comments on commit f5dfae7

Please sign in to comment.