diff --git a/src/bar.cpp b/src/bar.cpp index 0a0a627d..38c5e05a 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -35,8 +35,6 @@ std::shared_ptr &get_bar() return bar; } -std::vector> monitors; - const Options& bar_opts() { return *bar->opts.get(); } @@ -56,8 +54,7 @@ Bar::Bar() : config_path(config::get_bar_path()), opts(std::make_unique auto monitor_name = config::get(this->config_path, "monitor", ""); this->opts->monitor = std::make_unique(); - if (monitors.empty()) - monitors = xlib::get_sorted_monitorlist(); + auto monitors = xlib::get_sorted_monitorlist(); // In case we're not connected to X, we'll just ignore the monitor if (!monitors.empty()) {