Skip to content

Commit

Permalink
Merge pull request #1810 from pinselimo/revert-1120
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexays authored Nov 24, 2022
2 parents 74fa131 + 235861f commit 748c612
Show file tree
Hide file tree
Showing 46 changed files with 272 additions and 465 deletions.
35 changes: 0 additions & 35 deletions include/AButton.hpp

This file was deleted.

4 changes: 2 additions & 2 deletions include/modules/backlight.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <string_view>
#include <vector>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/json.hpp"
#include "util/sleeper_thread.hpp"

Expand All @@ -14,7 +14,7 @@ struct udev_device;

namespace waybar::modules {

class Backlight : public AButton {
class Backlight : public ALabel {
class BacklightDev {
public:
BacklightDev() = default;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/battery.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <string>
#include <vector>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"

namespace waybar::modules {
Expand All @@ -26,7 +26,7 @@ namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
#endif

class Battery : public AButton {
class Battery : public ALabel {
public:
Battery(const std::string&, const Json::Value&);
~Battery();
Expand Down
4 changes: 2 additions & 2 deletions include/modules/bluetooth.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "AButton.hpp"
#include "ALabel.hpp"
#ifdef WANT_RFKILL
#include "util/rfkill.hpp"
#endif
Expand All @@ -12,7 +12,7 @@

namespace waybar::modules {

class Bluetooth : public AButton {
class Bluetooth : public ALabel {
struct ControllerInfo {
std::string path;
std::string address;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/clock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <date/tz.h>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"

namespace waybar {
Expand All @@ -14,7 +14,7 @@ namespace modules {
const std::string kCalendarPlaceholder = "calendar";
const std::string KTimezonedTimeListPlaceholder = "timezoned_time_list";

class Clock : public AButton {
class Clock : public ALabel {
public:
Clock(const std::string&, const Json::Value&);
~Clock() = default;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/cpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#include <utility>
#include <vector>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"

namespace waybar::modules {

class Cpu : public AButton {
class Cpu : public ALabel {
public:
Cpu(const std::string&, const Json::Value&);
~Cpu() = default;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/custom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
#include <csignal>
#include <string>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/command.hpp"
#include "util/json.hpp"
#include "util/sleeper_thread.hpp"

namespace waybar::modules {

class Custom : public AButton {
class Custom : public ALabel {
public:
Custom(const std::string&, const std::string&, const Json::Value&);
~Custom();
Expand Down
4 changes: 2 additions & 2 deletions include/modules/disk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

#include <fstream>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/format.hpp"
#include "util/sleeper_thread.hpp"

namespace waybar::modules {

class Disk : public AButton {
class Disk : public ALabel {
public:
Disk(const std::string&, const Json::Value&);
~Disk() = default;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/hyprland/backend.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include <list>
#include <functional>
#include <list>
#include <memory>
#include <mutex>
#include <string>
Expand All @@ -9,7 +9,7 @@
namespace waybar::modules::hyprland {

class EventHandler {
public:
public:
virtual void onEvent(const std::string& ev) = 0;
virtual ~EventHandler() = default;
};
Expand Down
5 changes: 2 additions & 3 deletions include/modules/hyprland/language.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#include <fmt/format.h>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "bar.hpp"
#include "modules/hyprland/backend.hpp"
#include "util/json.hpp"

namespace waybar::modules::hyprland {

class Language : public waybar::AButton,
public EventHandler {
class Language : public waybar::ALabel, public EventHandler {
public:
Language(const std::string&, const waybar::Bar&, const Json::Value&);
~Language();
Expand Down
3 changes: 1 addition & 2 deletions include/modules/hyprland/window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

namespace waybar::modules::hyprland {

class Window : public waybar::ALabel,
public EventHandler {
class Window : public waybar::ALabel, public EventHandler {
public:
Window(const std::string&, const waybar::Bar&, const Json::Value&);
~Window();
Expand Down
4 changes: 2 additions & 2 deletions include/modules/idle_inhibitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

#include <fmt/format.h>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "bar.hpp"
#include "client.hpp"

namespace waybar::modules {

class IdleInhibitor : public AButton {
class IdleInhibitor : public ALabel {
sigc::connection timeout_;

public:
Expand Down
4 changes: 2 additions & 2 deletions include/modules/inhibitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

#include <memory>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "bar.hpp"

namespace waybar::modules {

class Inhibitor : public AButton {
class Inhibitor : public ALabel {
public:
Inhibitor(const std::string&, const waybar::Bar&, const Json::Value&);
~Inhibitor() override;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#include <fstream>
#include <unordered_map>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"

namespace waybar::modules {

class Memory : public AButton {
class Memory : public ALabel {
public:
Memory(const std::string&, const Json::Value&);
~Memory() = default;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/mpd/mpd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#include <condition_variable>
#include <thread>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "modules/mpd/state.hpp"

namespace waybar::modules {

class MPD : public AButton {
class MPD : public ALabel {
friend class detail::Context;

// State machine
Expand Down
2 changes: 1 addition & 1 deletion include/modules/mpd/state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <condition_variable>
#include <thread>

#include "AButton.hpp"
#include "ALabel.hpp"

namespace waybar::modules {
class MPD;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/network.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

#include <optional>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"
#ifdef WANT_RFKILL
#include "util/rfkill.hpp"
#endif

namespace waybar::modules {

class Network : public AButton {
class Network : public ALabel {
public:
Network(const std::string&, const Json::Value&);
~Network();
Expand Down
4 changes: 2 additions & 2 deletions include/modules/pulseaudio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include <algorithm>
#include <array>

#include "AButton.hpp"
#include "ALabel.hpp"

namespace waybar::modules {

class Pulseaudio : public AButton {
class Pulseaudio : public ALabel {
public:
Pulseaudio(const std::string&, const Json::Value&);
~Pulseaudio();
Expand Down
4 changes: 2 additions & 2 deletions include/modules/simpleclock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

#include <fmt/chrono.h>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"

namespace waybar::modules {

class Clock : public AButton {
class Clock : public ALabel {
public:
Clock(const std::string&, const Json::Value&);
~Clock() = default;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/sndio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

#include <vector>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"

namespace waybar::modules {

class Sndio : public AButton {
class Sndio : public ALabel {
public:
Sndio(const std::string &, const Json::Value &);
~Sndio();
Expand Down
4 changes: 2 additions & 2 deletions include/modules/sway/language.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
#include <map>
#include <string>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "bar.hpp"
#include "client.hpp"
#include "modules/sway/ipc/client.hpp"
#include "util/json.hpp"

namespace waybar::modules::sway {

class Language : public AButton, public sigc::trackable {
class Language : public ALabel, public sigc::trackable {
public:
Language(const std::string& id, const Json::Value& config);
~Language() = default;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/sway/mode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

#include <fmt/format.h>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "bar.hpp"
#include "client.hpp"
#include "modules/sway/ipc/client.hpp"
#include "util/json.hpp"

namespace waybar::modules::sway {

class Mode : public AButton, public sigc::trackable {
class Mode : public ALabel, public sigc::trackable {
public:
Mode(const std::string&, const Json::Value&);
~Mode() = default;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/temperature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

#include <fstream>

#include "AButton.hpp"
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"

namespace waybar::modules {

class Temperature : public AButton {
class Temperature : public ALabel {
public:
Temperature(const std::string&, const Json::Value&);
~Temperature() = default;
Expand Down
Loading

0 comments on commit 748c612

Please sign in to comment.