Rules-based browser launcher for TUI + GNOME. switchyard.aly.codes
tui gome bowser go
0

Configure Feed

Select the types of activity you want to include in your feed.

cmd/sw/model: show actions hint only if browser has desktop actions

Aly Raffauf (Jul 6, 2026, 8:51 AM EDT) 40e5a57e 3e39a6f9

+13 -2
+13 -2
cmd/sw/model.go
··· 234 234 235 235 func helpView(m model) string { 236 236 var hints string 237 - if m.pickingAction { 237 + switch { 238 + case m.pickingAction: 238 239 hints = "↑↓ navigate • ↩ launch • ← back • / edit URL • q quit" 239 - } else { 240 + case selectedBrowserHasActions(m): 240 241 hints = "↑↓ navigate • ↩ launch • → actions • / edit URL • q quit" 242 + default: 243 + hints = "↑↓ navigate • ↩ launch • / edit URL • q quit" 241 244 } 242 245 return centeredStageRowView(lipgloss.Height(hints), m.styles.helpText.Render(hints)) 246 + } 247 + 248 + func selectedBrowserHasActions(m model) bool { 249 + selected, ok := m.browserList.SelectedItem().(browserItem) 250 + if !ok { 251 + return false 252 + } 253 + return len(browserscan.ListDesktopActions(selected.id)) != 0 243 254 } 244 255 245 256 func centeredStageRowView(height int, content string) string {