Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fastlane/test_output

# macOS
.DS_Store
.claude

# Build output
build/

9 changes: 6 additions & 3 deletions PortBar/Core/Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ final class PortBarSettings: ObservableObject {
private init() {}

// Popover size — user-resizable via the footer grip, persisted across launches.
static let widthRange: ClosedRange<CGFloat> = 460...1000
// Lower bound must fit every column or rows overflow and get clipped.
static let widthRange: ClosedRange<CGFloat> = 600...1100
static let heightRange: ClosedRange<CGFloat> = 240...760

@Published var popoverWidth: CGFloat = {
let v = CGFloat(UserDefaults.standard.double(forKey: "pb.popoverWidth"))
return v > 0 ? v : 520
let d = v > 0 ? v : 600
return min(max(d, widthRange.lowerBound), widthRange.upperBound)
}() {
didSet { UserDefaults.standard.set(Double(popoverWidth), forKey: "pb.popoverWidth") }
}

@Published var popoverListHeight: CGFloat = {
let v = CGFloat(UserDefaults.standard.double(forKey: "pb.popoverListHeight"))
return v > 0 ? v : 400
let d = v > 0 ? v : 400
return min(max(d, heightRange.lowerBound), heightRange.upperBound)
}() {
didSet { UserDefaults.standard.set(Double(popoverListHeight), forKey: "pb.popoverListHeight") }
}
Expand Down
6 changes: 4 additions & 2 deletions PortBar/UI/PortListPopoverView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ struct PortListPopoverView: View {
}
.font(.caption.weight(.semibold))
.foregroundStyle(Color.secondary)
.padding(.horizontal, 14)
.padding(.leading, 14)
.padding(.trailing, 26) // match row gutter so columns stay aligned
.padding(.vertical, 5)
.background(Color(NSColor.controlBackgroundColor))
}
Expand Down Expand Up @@ -376,7 +377,8 @@ struct PortPopoverRow: View {
}
.frame(width: 104, alignment: .trailing)
}
.padding(.horizontal, 14)
.padding(.leading, 14)
.padding(.trailing, 26) // clear the scroll bar gutter so ✕ isn't covered
.padding(.vertical, 6)
.background(hovered ? Color(NSColor.selectedContentBackgroundColor).opacity(0.1) : Color.clear)
.onHover { hovered = $0 }
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ A native macOS menu bar app that shows every active listening port on your machi

Click the icon → a panel drops down listing all your ports. Kill a runaway process, open it in the browser, or copy the port — all without touching the terminal.

<p align="center">
<img src="docs/img/portbar.png" alt="PortBar popover showing active ports with process, project, uptime, LAN-exposure marker and action buttons" width="620">
</p>

---

## Features
Expand Down
Binary file added docs/img/portbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading