u/cluelessngl

How to display the icon along with label?
▲ 2 r/SwiftUI+1 crossposts

How to display the icon along with label?

Hey guys I'm trying to display a button in the toolbar of my macOS app and I can get it to either just display the icon or name and never both.

Here's the code:

                    .toolbar {
                        ToolbarItem(placement: .primaryAction) {
                            Button("New Shortcut", systemImage: "plus") {
                                print("New Shortcut")
                            }
                            .labelsVisibility(.visible)
                            .buttonStyle(.borderedProminent)
                        }
                    }
u/cluelessngl — 3 days ago
▲ 2 r/foss

Building a native Wispr Flow alternative :D

Hey everyone, I've been searching for a good Wispr Flow alternative for months specifically one that lets me bring my own API keys, supports local models, and doesn't charge $12/month.

Some alternatives exist, but none of them feel native, and an Electron wrapper is a non-starter for me.

So I'm building it myself. The core idea is a lightweight CLI tool that does one thing well: convert speech to text, with AI post-processing and cleanup built in.

The CLI-first approach makes it easy to integrate with anything - shell scripts, other apps, whatever. From there, each platform gets a proper native frontend: Swift on macOS, GNOME on Linux, and a native app for Windows. Each one can also ship platform-specific features that make sense for that OS.

What I'd love your input on:

Before I dive too deep into implementation, I want to make sure I'm thinking about these two pieces correctly:

  1. AI Cleanup - How should the model clean up raw transcription output? Things like fixing punctuation, removing filler words ("uh", "um"), correcting obvious mishears. Should this be a separate pass, or baked into the transcription prompt? Any preferences on how aggressive the cleanup should be by default?
  2. Post-processing pipeline - Beyond cleanup, what should happen to the text before it reaches the user or another app? Formatting, context-awareness, custom instructions? How configurable should this be?

Any thoughts, prior art, or "please don't do X" warnings are very welcome.

reddit.com
u/cluelessngl — 6 days ago
▲ 0 r/MacOS

A bunch of options like “Center”, “Left & Right”, and “Bottom & Top” are greyed out for me for some reason.

What’s even weirder is that options that are NOT greyed out still don’t work when I use their keyboard shortcuts.

I attached a screenshot. Does anyone know what could be causing this?

u/cluelessngl — 7 days ago
▲ 5 r/foss+1 crossposts

Anyone know any actually good speech-to-text apps like Wispr Flow?

What I’m looking for specifically:

  • Works like Wispr Flow with global push-to-talk dictation
  • AI cleanup/rewrite of speech into polished text
  • Bring your own API keys (OpenAI, Groq, Anthropic, Gemini, etc.)
  • Preferably supports local/offline models too
  • Free and preferably open-source

I don’t just want raw Whisper transcription. The important part is the “cleanup” layer that removes filler words, fixes grammar, restructures rambling speech, and makes it sound like natural writing, similar to Wispr Flow.

Would love to hear real experiences from people using these daily. Which one actually feels closest to Wispr Flow?

reddit.com
u/cluelessngl — 7 days ago

Hey guys I'm building a native macOS app and I was wondering which location users prefer:

  • ~/Library/Application Support/<app-name>/
  • ~/.config/<app-name>/
reddit.com
u/cluelessngl — 13 days ago
▲ 8 r/Xcode+1 crossposts

I'm using SwiftUI but I'm pretty sure the screenshot attached in this post is AppKit. It doesn't even match the preview in XCode.

SettingsView.swift

import SwiftUI

struct SettingsView: View {
    var body: some View {
        NavigationSplitView {
            List {
                NavigationLink(destination: Text("hello")) {
                    Label("General", systemImage: "gear")
                }
                NavigationLink(destination: Text("hello world")) {
                    Label("Appearance", systemImage: "paintbrush")
                }
            }
        } detail: {
            Text("Select a section")
        }
        .frame(width: 600, height: 400)
    }
}

EuclaseApp.swift

import SwiftUI

struct EuclaseApp: App {
    u/NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

    var body: some Scene {
        Settings {
            SettingsView()
        }
    }
}

final class AppDelegate: NSObject, NSApplicationDelegate {
    private let floatingPanelController = PanelController()

    func applicationDidFinishLaunching(_ notification: Notification) {
        floatingPanelController.start()
    }
}

I want to use AppKit for this floating panel but I want SwiftUI to be used in the rest of the app. Please help.

u/cluelessngl — 14 days ago
▲ 3 r/SwiftUI+1 crossposts

Hey guys, I'm trying to make a small Raycast alternative for myself, and I was wondering how I can go about making my NSPanel behave just like Raycast/Spotlight.

Right now, whenever I start the app, my focus is instantly stolen and when I get it back and do the global shortcut to show the panel, it shows without stealing the focus but when I toggle it again to hide, the focus is stolen again before it's hidden. By "focus is stolen again" here, I just mean that the window behind (the three dots) is greyed out.

CoolApp.swift is just the app entry point. It uses an AppDelegate, creates a FloatingPanelController, and calls start() when the app finishes launching. So the floating panel behavior is kicked off at launch from there, while the actual panel logic lives in FloatingPanelController.swift.

Here's my FloatingPanelController.swift:

import AppKit import KeyboardShortcuts import SwiftUI

extension KeyboardShortcuts.Name {
    static let toggleFloatingPanel = Self(
        "toggleFloatingPanel",
        default: .init(.space, modifiers: [.option, .command])
    )
}

final class FloatingPanel: NSPanel {
    override var canBecomeKey: Bool { true }
    override var canBecomeMain: Bool { false }
}

final class FloatingPanelController {
    private let panel: FloatingPanel

    init() {
        panel = FloatingPanel(
            contentRect: NSRect(x: 0, y: 0, width: 600, height: 380),
            styleMask: [.nonactivatingPanel, .borderless],
            backing: .buffered,
            defer: false
        )
        panel.isOpaque = false
        panel.backgroundColor = .clear
        panel.hasShadow = true
        panel.isFloatingPanel = true
        panel.level = .popUpMenu
        panel.hidesOnDeactivate = false
        panel.collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary, .transient]
        panel.center()

        let hostingView = NSHostingView(rootView: ContentView())
        hostingView.autoresizingMask = [.width, .height]
        panel.contentView = hostingView
    }

    func start() {
        KeyboardShortcuts.onKeyUp(for: .toggleFloatingPanel) { [weak self] in
            self?.toggle()
        }
    }

    private func toggle() {
        panel.isVisible ? hidePanel() : showPanel()
    }

    private func showPanel() {
        panel.makeKeyAndOrderFront(nil)
    }

    private func hidePanel() {
        panel.orderOut(nil)
    }
}
reddit.com
u/cluelessngl — 15 days ago