64 lines
1.5 KiB
C++
64 lines
1.5 KiB
C++
#include "Bar.hpp"
|
|
|
|
namespace {
|
|
QVariantMap entry(bool enabled, const char *id) {
|
|
QVariantMap m;
|
|
m["enabled"] = enabled;
|
|
m["id"] = QString::fromLatin1(id);
|
|
return m;
|
|
}
|
|
}
|
|
|
|
Popouts::Popouts(QObject *parent) : ConfigSection(parent) {
|
|
m_statusIcons = true;
|
|
m_tray = true;
|
|
wireSignals();
|
|
}
|
|
|
|
Tray::Tray(QObject *parent) : ConfigSection(parent) {
|
|
m_recolorIcons = false;
|
|
m_showOnHover = true;
|
|
m_statusIcons = {
|
|
entry(true, "audio"),
|
|
entry(true, "microphone"),
|
|
entry(true, "bluetooth"),
|
|
entry(false, "network"),
|
|
entry(false, "wifi"),
|
|
entry(true, "power"),
|
|
};
|
|
m_trayIconSize = 24;
|
|
wireSignals();
|
|
}
|
|
|
|
Bar::Bar(QObject *parent) : ConfigSection(parent) {
|
|
m_autoHide = false;
|
|
m_border = 4;
|
|
m_entries = {
|
|
entry(true, "workspaces"),
|
|
entry(true, "audio"),
|
|
entry(true, "media"),
|
|
entry(true, "resources"),
|
|
entry(true, "updates"),
|
|
entry(false, "dash"),
|
|
entry(true, "spacer"),
|
|
entry(true, "activeWindow"),
|
|
entry(true, "spacer"),
|
|
entry(true, "hyprsunset"),
|
|
entry(true, "tray"),
|
|
entry(true, "statusIcons"),
|
|
entry(false, "network"),
|
|
entry(true, "upower"),
|
|
entry(true, "clock"),
|
|
entry(true, "notifBell"),
|
|
};
|
|
m_fullscreenReveal = true;
|
|
m_height = 24;
|
|
m_hideWhenNotif = true;
|
|
m_popouts = new Popouts(this);
|
|
m_revealDelay = 100;
|
|
m_rounding = 14;
|
|
m_smoothing = 32;
|
|
m_tray = new Tray(this);
|
|
wireSignals();
|
|
}
|