mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-11 00:25:59 +01:00
format
This commit is contained in:
parent
c4913662e1
commit
65b041ddc6
4 changed files with 16 additions and 17 deletions
|
@ -157,23 +157,22 @@ std::string monitorsRequest(eHyprCtlOutputFormat format, std::string request) {
|
||||||
if (!m->output || m->ID == -1ull)
|
if (!m->output || m->ID == -1ull)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
result += std::format(
|
result +=
|
||||||
"Monitor {} (ID {}):\n\t{}x{}@{:.5f} at {}x{}\n\tdescription: {}\n\tmake: {}\n\tmodel: {}\n\tserial: {}\n\tactive workspace: {} ({})\n\t"
|
std::format("Monitor {} (ID {}):\n\t{}x{}@{:.5f} at {}x{}\n\tdescription: {}\n\tmake: {}\n\tmodel: {}\n\tserial: {}\n\tactive workspace: {} ({})\n\t"
|
||||||
"special workspace: {} ({})\n\treserved: {} {} {} {}\n\tscale: {:.2f}\n\ttransform: {}\n\tfocused: {}\n\t"
|
"special workspace: {} ({})\n\treserved: {} {} {} {}\n\tscale: {:.2f}\n\ttransform: {}\n\tfocused: {}\n\t"
|
||||||
"dpmsStatus: {}\n\tvrr: {}\n\tactivelyTearing: {}\n\tdisabled: {}\n\tcurrentFormat: {}\n\tavailableModes: {}\n\n",
|
"dpmsStatus: {}\n\tvrr: {}\n\tactivelyTearing: {}\n\tdisabled: {}\n\tcurrentFormat: {}\n\tavailableModes: {}\n\n",
|
||||||
m->szName, m->ID, (int)m->vecPixelSize.x, (int)m->vecPixelSize.y, m->refreshRate, (int)m->vecPosition.x, (int)m->vecPosition.y, m->szShortDescription,
|
m->szName, m->ID, (int)m->vecPixelSize.x, (int)m->vecPixelSize.y, m->refreshRate, (int)m->vecPosition.x, (int)m->vecPosition.y, m->szShortDescription,
|
||||||
m->output->make, m->output->model, m->output->serial, m->activeWorkspaceID(),
|
m->output->make, m->output->model, m->output->serial, m->activeWorkspaceID(), (!m->activeWorkspace ? "" : m->activeWorkspace->m_szName),
|
||||||
(!m->activeWorkspace ? "" : m->activeWorkspace->m_szName), m->activeSpecialWorkspaceID(), (m->activeSpecialWorkspace ? m->activeSpecialWorkspace->m_szName : ""),
|
m->activeSpecialWorkspaceID(), (m->activeSpecialWorkspace ? m->activeSpecialWorkspace->m_szName : ""), (int)m->vecReservedTopLeft.x,
|
||||||
(int)m->vecReservedTopLeft.x, (int)m->vecReservedTopLeft.y, (int)m->vecReservedBottomRight.x, (int)m->vecReservedBottomRight.y, m->scale, (int)m->transform,
|
(int)m->vecReservedTopLeft.y, (int)m->vecReservedBottomRight.x, (int)m->vecReservedBottomRight.y, m->scale, (int)m->transform,
|
||||||
(m == g_pCompositor->m_pLastMonitor ? "yes" : "no"), (int)m->dpmsStatus, (int)(m->output->state ? m->output->state->state().adaptiveSync : false),
|
(m == g_pCompositor->m_pLastMonitor ? "yes" : "no"), (int)m->dpmsStatus, (int)(m->output->state ? m->output->state->state().adaptiveSync : false),
|
||||||
m->tearingState.activelyTearing, !m->m_bEnabled, formatToString(m->drmFormat), availableModesForOutput(m.get(), format));
|
m->tearingState.activelyTearing, !m->m_bEnabled, formatToString(m->drmFormat), availableModesForOutput(m.get(), format));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static std::string getTagsData(PHLWINDOW w, eHyprCtlOutputFormat format) {
|
static std::string getTagsData(PHLWINDOW w, eHyprCtlOutputFormat format) {
|
||||||
const auto tags = w->m_tags.getTags();
|
const auto tags = w->m_tags.getTags();
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ class IKeyboard : public IHID {
|
||||||
|
|
||||||
std::array<xkb_led_index_t, 3> ledIndexes = {XKB_MOD_INVALID};
|
std::array<xkb_led_index_t, 3> ledIndexes = {XKB_MOD_INVALID};
|
||||||
std::array<xkb_mod_index_t, 8> modIndexes = {XKB_MOD_INVALID};
|
std::array<xkb_mod_index_t, 8> modIndexes = {XKB_MOD_INVALID};
|
||||||
uint32_t leds = 0;
|
uint32_t leds = 0;
|
||||||
|
|
||||||
std::string hlName = "";
|
std::string hlName = "";
|
||||||
std::string xkbFilePath = "";
|
std::string xkbFilePath = "";
|
||||||
|
|
|
@ -837,9 +837,9 @@ bool CMonitorState::updateSwapchain() {
|
||||||
Debug::log(WARN, "updateSwapchain: No mode?");
|
Debug::log(WARN, "updateSwapchain: No mode?");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
options.format = STATE.drmFormat;
|
options.format = STATE.drmFormat;
|
||||||
options.scanout = true;
|
options.scanout = true;
|
||||||
options.length = 2;
|
options.length = 2;
|
||||||
options.size = MODE->pixelSize;
|
options.size = MODE->pixelSize;
|
||||||
return m_pOwner->output->swapchain->reconfigure(options);
|
return m_pOwner->output->swapchain->reconfigure(options);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ class CMonitorState {
|
||||||
bool updateSwapchain();
|
bool updateSwapchain();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ensureBufferPresent();
|
void ensureBufferPresent();
|
||||||
|
|
||||||
CMonitor* m_pOwner;
|
CMonitor* m_pOwner;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue