new time input picker, added support for minutes in timeframe
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 10s
Python / lint-format (pull_request) Successful in 16s
Python / test (pull_request) Successful in 27s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m10s

This commit is contained in:
2026-06-08 14:51:46 +02:00
parent fe91a65324
commit 52980e4d84
6 changed files with 1318 additions and 184 deletions
+10 -2
View File
@@ -135,9 +135,17 @@ void HyprsunsetManager::apply() {
if (m_manualToggle || !m_activeAuto || !m_startAllowed)
return;
const auto current = QTime::currentTime().hour();
const auto current = QTime::currentTime();
const auto currentMin = current.hour() * 60 + current.minute();
bool isDarkTime;
if (current >= m_startTime || current < m_endTime) {
if (m_startTime <= m_endTime) {
isDarkTime = (currentMin >= m_startTime && currentMin < m_endTime);
} else {
isDarkTime = (currentMin >= m_startTime || currentMin < m_endTime);
}
if (isDarkTime) {
start();
} else {
end();