mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-12-25 02:39:49 +01:00
Added bar:force_no_tray
typo
This commit is contained in:
parent
1898839d4c
commit
ca432cc589
2 changed files with 20 additions and 0 deletions
|
@ -152,6 +152,9 @@ void CStatusBar::destroyModule(SBarModule* module) {
|
|||
}
|
||||
|
||||
void CStatusBar::setupTray() {
|
||||
if (ConfigManager::getInt("bar:force_no_tray") == 1)
|
||||
return;
|
||||
|
||||
Debug::log(LOG, "Setting up tray!");
|
||||
|
||||
char atomName[strlen("_NET_SYSTEM_TRAY_S") + 11];
|
||||
|
@ -260,6 +263,9 @@ void CStatusBar::setupTray() {
|
|||
}
|
||||
|
||||
void CStatusBar::fixTrayOnCreate() {
|
||||
if (ConfigManager::getInt("bar:force_no_tray") == 1)
|
||||
return;
|
||||
|
||||
if (m_bHasTray && ConfigManager::getInt("bar:no_tray_saving") == 0) {
|
||||
for (auto& tray : g_pWindowManager->trayclients) {
|
||||
xcb_reparent_window(g_pWindowManager->DisplayConnection, tray.window, g_pWindowManager->statusBar->trayWindowID, 0, 0);
|
||||
|
@ -285,6 +291,8 @@ void CStatusBar::fixTrayOnCreate() {
|
|||
}
|
||||
|
||||
void CStatusBar::saveTrayOnDestroy() {
|
||||
if (ConfigManager::getInt("bar:force_no_tray") == 1)
|
||||
return;
|
||||
|
||||
// TODO: fix this instead of disabling it.
|
||||
|
||||
|
@ -312,6 +320,9 @@ void CStatusBar::setup(int MonitorID) {
|
|||
}
|
||||
}
|
||||
|
||||
if (ConfigManager::getInt("bar:force_no_tray") == 1)
|
||||
m_bHasTray = false;
|
||||
|
||||
const auto MONITOR = g_pWindowManager->monitors[MonitorID];
|
||||
|
||||
Debug::log(LOG, "Bar monitor found to be " + std::to_string(MONITOR.ID));
|
||||
|
@ -548,6 +559,8 @@ int CStatusBar::drawWorkspacesModule(SBarModule* mod, int off) {
|
|||
}
|
||||
|
||||
int CStatusBar::drawTrayModule(SBarModule* mod, int off) {
|
||||
if (ConfigManager::getInt("bar:force_no_tray") == 1)
|
||||
return 0;
|
||||
|
||||
const auto PAD = 2;
|
||||
|
||||
|
@ -655,6 +668,9 @@ int CStatusBar::drawModule(SBarModule* mod, int off) {
|
|||
}
|
||||
|
||||
void CStatusBar::ensureTrayClientDead(xcb_window_t window) {
|
||||
if (ConfigManager::getInt("bar:force_no_tray") == 1)
|
||||
return;
|
||||
|
||||
auto temp = g_pWindowManager->trayclients;
|
||||
|
||||
g_pWindowManager->trayclients.clear();
|
||||
|
@ -668,6 +684,9 @@ void CStatusBar::ensureTrayClientDead(xcb_window_t window) {
|
|||
}
|
||||
|
||||
void CStatusBar::ensureTrayClientHidden(xcb_window_t window, bool hide) {
|
||||
if (ConfigManager::getInt("bar:force_no_tray") == 1)
|
||||
return;
|
||||
|
||||
for (auto& trayitem : g_pWindowManager->trayclients) {
|
||||
if (trayitem.window == window)
|
||||
trayitem.hidden = hide;
|
||||
|
|
|
@ -38,6 +38,7 @@ void ConfigManager::init() {
|
|||
configValues["bar:font.secondary"].strValue = "Noto Sans";
|
||||
configValues["bar:mod_pad_in"].intValue = 4;
|
||||
configValues["bar:no_tray_saving"].intValue = 1;
|
||||
configValues["bar:force_no_tray"].intValue = 1;
|
||||
|
||||
configValues["status_command"].strValue = "date +%I:%M\\ %p"; // Time // Deprecated
|
||||
|
||||
|
|
Loading…
Reference in a new issue