1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 07:22:50 -05:00

displays: add configurator (Beta)

- Position, resolution, refresh, orientation, VRR
- niri, Hyprland, MangoWC
- Rely on wlr-output for reading data, compositors to write output
  configurations
- Re-organize display setting group
This commit is contained in:
bbedward
2025-12-15 15:55:31 -05:00
parent bafe1c5fee
commit 43d6f4b1d3
14 changed files with 2678 additions and 697 deletions

View File

@@ -145,6 +145,7 @@ func (m *Manager) handleHead(e wlr_output_management.ZwlrOutputManagerV1HeadEven
handle.SetNameHandler(func(e wlr_output_management.ZwlrOutputHeadV1NameEvent) {
log.Debugf("WlrOutput: Head %d name: %s", headID, e.Name)
head.name = e.Name
head.ready = true
m.post(func() {
m.updateState()
})
@@ -251,11 +252,11 @@ func (m *Manager) handleHead(e wlr_output_management.ZwlrOutputManagerV1HeadEven
m.heads.Delete(headID)
m.post(func() {
m.wlMutex.Lock()
handle.Release()
m.wlMutex.Unlock()
m.wlMutex.Lock()
handle.Release()
m.wlMutex.Unlock()
m.post(func() {
m.updateState()
})
})
@@ -310,11 +311,11 @@ func (m *Manager) handleMode(headID uint32, e wlr_output_management.ZwlrOutputHe
m.modes.Delete(modeID)
m.post(func() {
m.wlMutex.Lock()
handle.Release()
m.wlMutex.Unlock()
m.wlMutex.Lock()
handle.Release()
m.wlMutex.Unlock()
m.post(func() {
m.updateState()
})
})
@@ -328,6 +329,10 @@ func (m *Manager) updateState() {
return true
}
if !head.ready {
return true
}
modes := make([]OutputMode, 0)
var currentMode *OutputMode

View File

@@ -90,6 +90,7 @@ type headState struct {
modeIDs []uint32
adaptiveSync uint32
finished bool
ready bool
}
type modeState struct {