add "inputs" page

Signed-off-by: Hadi <[email protected]>
This commit is contained in:
Hadi
2026-08-13 17:59:03 +02:00
parent df530f39b0
commit 6e4f8b889c
23 changed files with 1047 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
package input
import tea "charm.land/bubbletea/v2"
// applyReset kicks off a `hyprctl reload`, which restores the keyboard
// layout and mouse sensitivity to their hyprland.conf values (along with
// anything else set there); both sections are marked pending since a
// reload touches them together.
func (m *Model) applyReset() tea.Cmd {
m.layoutPending = true
m.mousePending = true
m.layoutFeedback = ""
m.mouseFeedback = ""
return resetCmd()
}
func (m *Model) handleReset(msg resetMsg) tea.Cmd {
m.layoutPending = false
m.mousePending = false
if msg.err != nil {
m.layoutFeedback = msg.err.Error()
m.mouseFeedback = msg.err.Error()
return nil
}
return tea.Batch(fetchLayoutCmd(), fetchSensitivityCmd())
}