Remove unused factory.hpp imports

This commit is contained in:
patrick96 2021-09-21 21:27:42 +02:00 committed by Patrick Ziegler
parent fabce6a493
commit 3b6a950380
29 changed files with 13 additions and 40 deletions

View File

@ -6,7 +6,6 @@
#include "components/logger.hpp" #include "components/logger.hpp"
#include "components/types.hpp" #include "components/types.hpp"
#include "errors.hpp" #include "errors.hpp"
#include "utils/factory.hpp"
#include "utils/functional.hpp" #include "utils/functional.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -3,7 +3,6 @@
#include <streambuf> #include <streambuf>
#include "common.hpp" #include "common.hpp"
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "common.hpp" #include "common.hpp"
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -6,7 +6,6 @@
#include <cstdio> #include <cstdio>
#include "common.hpp" #include "common.hpp"
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -4,7 +4,6 @@
#include "common.hpp" #include "common.hpp"
#include "components/logger.hpp" #include "components/logger.hpp"
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -3,7 +3,6 @@
#include <poll.h> #include <poll.h>
#include "common.hpp" #include "common.hpp"
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -13,7 +13,6 @@
#include "tags/dispatch.hpp" #include "tags/dispatch.hpp"
#include "utils/bspwm.hpp" #include "utils/bspwm.hpp"
#include "utils/color.hpp" #include "utils/color.hpp"
#include "utils/factory.hpp"
#include "utils/math.hpp" #include "utils/math.hpp"
#include "utils/string.hpp" #include "utils/string.hpp"
#include "x11/atoms.hpp" #include "x11/atoms.hpp"

View File

@ -2,8 +2,6 @@
#include <algorithm> #include <algorithm>
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS
namespace command_line { namespace command_line {

View File

@ -18,7 +18,6 @@
#include "modules/meta/event_handler.hpp" #include "modules/meta/event_handler.hpp"
#include "modules/meta/factory.hpp" #include "modules/meta/factory.hpp"
#include "utils/actions.hpp" #include "utils/actions.hpp"
#include "utils/factory.hpp"
#include "utils/inotify.hpp" #include "utils/inotify.hpp"
#include "utils/process.hpp" #include "utils/process.hpp"
#include "utils/string.hpp" #include "utils/string.hpp"

View File

@ -2,12 +2,12 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
#include "components/logger.hpp" #include "components/logger.hpp"
#include "errors.hpp" #include "errors.hpp"
#include "events/signal.hpp" #include "events/signal.hpp"
#include "events/signal_emitter.hpp" #include "events/signal_emitter.hpp"
#include "utils/factory.hpp"
#include "utils/file.hpp" #include "utils/file.hpp"
#include "utils/string.hpp" #include "utils/string.hpp"

View File

@ -7,7 +7,6 @@
#include "events/signal.hpp" #include "events/signal.hpp"
#include "events/signal_emitter.hpp" #include "events/signal_emitter.hpp"
#include "events/signal_receiver.hpp" #include "events/signal_receiver.hpp"
#include "utils/factory.hpp"
#include "utils/math.hpp" #include "utils/math.hpp"
#include "x11/atoms.hpp" #include "x11/atoms.hpp"
#include "x11/background_manager.hpp" #include "x11/background_manager.hpp"

View File

@ -2,8 +2,6 @@
#include <algorithm> #include <algorithm>
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS
taskqueue::make_type taskqueue::make() { taskqueue::make_type taskqueue::make() {

View File

@ -1,7 +1,6 @@
#include "drawtypes/animation.hpp" #include "drawtypes/animation.hpp"
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -3,7 +3,6 @@
#include <cmath> #include <cmath>
#include <utility> #include <utility>
#include "utils/factory.hpp"
#include "utils/string.hpp" #include "utils/string.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -4,7 +4,6 @@
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "utils/color.hpp" #include "utils/color.hpp"
#include "utils/factory.hpp"
#include "utils/math.hpp" #include "utils/math.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -1,6 +1,5 @@
#include "drawtypes/ramp.hpp" #include "drawtypes/ramp.hpp"
#include "utils/factory.hpp"
#include "utils/math.hpp" #include "utils/math.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -5,7 +5,6 @@
#include "drawtypes/iconset.hpp" #include "drawtypes/iconset.hpp"
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "modules/meta/base.inl" #include "modules/meta/base.inl"
#include "utils/factory.hpp"
#include "utils/file.hpp" #include "utils/file.hpp"
#include "utils/string.hpp" #include "utils/string.hpp"

View File

@ -1,16 +1,16 @@
#include "modules/fs.hpp"
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include <fstream> #include <fstream>
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "drawtypes/progressbar.hpp" #include "drawtypes/progressbar.hpp"
#include "drawtypes/ramp.hpp" #include "drawtypes/ramp.hpp"
#include "modules/fs.hpp" #include "modules/meta/base.inl"
#include "utils/factory.hpp"
#include "utils/math.hpp" #include "utils/math.hpp"
#include "utils/string.hpp" #include "utils/string.hpp"
#include "modules/meta/base.inl"
POLYBAR_NS POLYBAR_NS
// Columns in /proc/self/mountinfo // Columns in /proc/self/mountinfo
@ -85,7 +85,8 @@ namespace modules {
// Get data for defined mountpoints // Get data for defined mountpoints
for (auto&& mountpoint : m_mountpoints) { for (auto&& mountpoint : m_mountpoints) {
auto details = std::find_if(mountinfo.begin(), mountinfo.end(), [&](const vector<string>& m) { return m.size() > 4 && m[MOUNTINFO_DIR] == mountpoint; }); auto details = std::find_if(mountinfo.begin(), mountinfo.end(),
[&](const vector<string>& m) { return m.size() > 4 && m[MOUNTINFO_DIR] == mountpoint; });
m_mounts.emplace_back(std::make_unique<fs_mount>(mountpoint, details != mountinfo.end())); m_mounts.emplace_back(std::make_unique<fs_mount>(mountpoint, details != mountinfo.end()));
struct statvfs buffer {}; struct statvfs buffer {};
@ -179,10 +180,8 @@ namespace modules {
label->replace_token("%percentage_used%", to_string(mount->percentage_used)); label->replace_token("%percentage_used%", to_string(mount->percentage_used));
label->replace_token( label->replace_token(
"%total%", string_util::filesize(mount->bytes_total, m_fixed ? 2 : 0, m_fixed, m_bar.locale)); "%total%", string_util::filesize(mount->bytes_total, m_fixed ? 2 : 0, m_fixed, m_bar.locale));
label->replace_token( label->replace_token("%free%", string_util::filesize(mount->bytes_avail, m_fixed ? 2 : 0, m_fixed, m_bar.locale));
"%free%", string_util::filesize(mount->bytes_avail, m_fixed ? 2 : 0, m_fixed, m_bar.locale)); label->replace_token("%used%", string_util::filesize(mount->bytes_used, m_fixed ? 2 : 0, m_fixed, m_bar.locale));
label->replace_token(
"%used%", string_util::filesize(mount->bytes_used, m_fixed ? 2 : 0, m_fixed, m_bar.locale));
}; };
if (tag == TAG_BAR_FREE) { if (tag == TAG_BAR_FREE) {

View File

@ -5,7 +5,6 @@
#include "drawtypes/iconset.hpp" #include "drawtypes/iconset.hpp"
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "modules/meta/base.inl" #include "modules/meta/base.inl"
#include "utils/factory.hpp"
#include "utils/file.hpp" #include "utils/file.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -1,5 +1,7 @@
#include "modules/ipc.hpp" #include "modules/ipc.hpp"
#include <unistd.h>
#include "components/ipc.hpp" #include "components/ipc.hpp"
#include "modules/meta/base.inl" #include "modules/meta/base.inl"
@ -38,9 +40,7 @@ namespace modules {
m_actions.emplace(make_pair<mousebtn, string>(mousebtn::DOUBLE_RIGHT, m_conf.get(name(), "double-click-right", ""s))); m_actions.emplace(make_pair<mousebtn, string>(mousebtn::DOUBLE_RIGHT, m_conf.get(name(), "double-click-right", ""s)));
// clang-format on // clang-format on
const auto pid_token = [](const string& s) { const auto pid_token = [](const string& s) { return string_util::replace_all(s, "%pid%", to_string(getpid())); };
return string_util::replace_all(s, "%pid%", to_string(getpid()));
};
for (auto& action : m_actions) { for (auto& action : m_actions) {
action.second = pid_token(action.second); action.second = pid_token(action.second);

View File

@ -4,7 +4,6 @@
#include "events/signal.hpp" #include "events/signal.hpp"
#include "modules/meta/base.inl" #include "modules/meta/base.inl"
#include "utils/actions.hpp" #include "utils/actions.hpp"
#include "utils/factory.hpp"
#include "utils/scope.hpp" #include "utils/scope.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -6,7 +6,6 @@
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "drawtypes/progressbar.hpp" #include "drawtypes/progressbar.hpp"
#include "modules/meta/base.inl" #include "modules/meta/base.inl"
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -4,7 +4,6 @@
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "drawtypes/ramp.hpp" #include "drawtypes/ramp.hpp"
#include "modules/meta/base.inl" #include "modules/meta/base.inl"
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -3,7 +3,6 @@
#include "drawtypes/iconset.hpp" #include "drawtypes/iconset.hpp"
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "modules/meta/base.inl" #include "modules/meta/base.inl"
#include "utils/factory.hpp"
#include "x11/atoms.hpp" #include "x11/atoms.hpp"
#include "x11/connection.hpp" #include "x11/connection.hpp"

View File

@ -2,7 +2,6 @@
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "modules/meta/base.inl" #include "modules/meta/base.inl"
#include "utils/factory.hpp"
#include "x11/atoms.hpp" #include "x11/atoms.hpp"
#include "x11/connection.hpp" #include "x11/connection.hpp"

View File

@ -7,7 +7,6 @@
#include "drawtypes/iconset.hpp" #include "drawtypes/iconset.hpp"
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "modules/meta/base.inl" #include "modules/meta/base.inl"
#include "utils/factory.hpp"
#include "utils/math.hpp" #include "utils/math.hpp"
#include "x11/atoms.hpp" #include "x11/atoms.hpp"
#include "x11/connection.hpp" #include "x11/connection.hpp"

View File

@ -7,7 +7,6 @@
#include "settings.hpp" #include "settings.hpp"
#include "tags/parser.hpp" #include "tags/parser.hpp"
#include "utils/color.hpp" #include "utils/color.hpp"
#include "utils/factory.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -4,6 +4,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <glob.h> #include <glob.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>

View File

@ -1,7 +1,6 @@
#include "drawtypes/ramp.hpp" #include "drawtypes/ramp.hpp"
#include "common/test.hpp" #include "common/test.hpp"
#include "utils/factory.hpp"
using namespace polybar::drawtypes; using namespace polybar::drawtypes;
using namespace polybar; using namespace polybar;