This was really helpful when I redid the FastComments admin area, as that was a big slog of UI work that I quickly got tired of. This was before Claude :)
All of this is built into the OS, I think the settings are in the control center
` #!/bin/bash
# Set focus text from command line argument or prompt user if [ -z "$1" ]; then echo "What's your current focus?" read FOCUS else FOCUS="$1" fi
if [ -z "$FOCUS" ]; then echo -n "\033]0;$(date +'%b %d %H:%M')\007" else echo -n "\033]0;$(date +'%b %d %H:%M') Focus: $FOCUS\007" fi
echo "Focus set to: $FOCUS" `
for MaxOS zsh, uncomment `DISABLE_AUTO_TITLE="true"` in .zshrc and do:
` #!/bin/zsh
# Set focus text from command line argument or prompt user if [ -z "$1" ]; then echo "What's your current focus?" read FOCUS else FOCUS="$1" fi
if [ -z "$FOCUS" ]; then echo -n "\033]0;$(date +'%b %d %H:%M')\007" else echo -n "\033]0;$(date +'%b %d %H:%M') Focus: $FOCUS\007" fi
echo "Focus set to: $FOCUS" `
If the something you are asking about is a pre-built tool, I would think the menubar is the MacOS place to put a reminder and it looks like someone has built that: https://lifehacker.com/tech/one-thing-app-turns-your-macs-me...
We have all been there where you are supposed to work on that boring but critical bug for the project, where a few other team members are waiting, but you end up booking a domain, building a landing page, and launching a waiting list. By dinner, as you are talking to potential alpha users in your community and start spreading the word, you realize you have not touched that bug.
Anyway, I like timers; the only complication in my Watch is a timer.[2] At my desk, I use a physical hourglass regularly. The physical hourglass helps me not be constrained by the Pomodoro-ish restrictions and work past the finish line.
For distractions (that seem important and sometimes are) while I'm on a specific task, I usually have my handy notebook, and I write them down quickly with a pen so I can return to them later. That helps me prevent launching ideas into landing pages.
Once you are good with a process/pattern, whatever tool you build/buy/use, as a timer in this case, helps your focus on your current situation.
Why do I now imagine a queue of colleagues standing restlessly at your desk, waiting for the hourglass to run out?
The way you describe hourglass not as a constraint, but as a way to reframe the session is kinda interesting. I’ve noticed that physical tools tend to change my mindset more than digital ones—they’re harder to ignore and don’t come with tabs.
Also really like the point about writing distractions down instead of chasing them—feels like the simplest tools (timer, notebook) often win because they don’t compete for attention. They just hold space.
With the heavy lifting of SwiftUI/Swift Data, and iCloud providing automatic and private syncing, this is the cloc output for my project, (including widgets and all of the code and projects needed to target all of these platforms.)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
XML 13 0 0 579
Swift 19 131 142 548
JSON 4 0 0 115
YAML 1 7 0 43
-------------------------------------------------------------------------------
SUM: 37 138 142 1285
-------------------------------------------------------------------------------
If you live in the apple ecosystem and want to make a simple tool for yourself, you really should go ahead and do that.
It started as a desire to have a "focus" on my Apple Watch at all times, and in less than 10 hours, I have widgets, shortcuts (and Siri) integrations, and syncing across every apple platform (although I haven't yet tried it on tvOS).
I've thought about productizing it, and I might one day, but that would add orders of magnitude to the time of making this something that people should be asked to pay for.
And I'm not going to open source it, because it is ~500 loc, with no libraries plus a bunch of Xcode generated stuff.
``` import Foundation import SwiftData
@Model final class FocusItem { let created: Date = Date() var completed: Date? var theFocus: String = "New Focus" var details: String?
init(completed: Date? = nil, theFocus: String, details: String? = nil) {
self.completed = completed
self.theFocus = theFocus
self.details = details
}
}struct FocusItemDescriptors { static let currentFocusPredicate = #Predicate<FocusItem> { $0.completed == nil }
static let sortDescriptor = SortDescriptor(\FocusItem.created, order: .reverse)
static let currentFocusFetchDescriptor = FetchDescriptor(
predicate: currentFocusPredicate, sortBy: [sortDescriptor])
}
`````` import SwiftData import SwiftUI import WidgetKit
struct ContentView: View { @Query( filter: FocusItemDescriptors.currentFocusPredicate, sort: [FocusItemDescriptors.sortDescriptor]) private var items: [FocusItem] @Environment(\.modelContext) private var modelContext
@State private var isAddingNewItem = false
@State private var newFocusText = ""
var body: some View {
NavigationStack {
List {
ForEach(items) { item in
NavigationLink {
FocusItemDetailView(item: item)
} label: {
Text(item.theFocus)
}
}
.onDelete(perform: deleteItems)
}
.navigationTitle("Focus")
.toolbar {
#if os(iOS)
ToolbarItem(placement: .navigationBarTrailing) {
EditButton()
}
#endif
ToolbarItem {
Button(action: addItem) {
Label("Add Item", systemImage: "plus")
}
}
}
}
.sheet(isPresented: $isAddingNewItem) {
AddFocusItemView(isPresented: $isAddingNewItem, addItem: addNewItemWithFocus)
}
}
private func addItem() {
isAddingNewItem = true
}
private func addNewItemWithFocus(_ focus: String) {
withAnimation {
let newItem = FocusItem(theFocus: focus)
modelContext.insert(newItem)
DataManager.shared.reloadWidgets()
}
}
private func deleteItems(offsets: IndexSet) {
withAnimation {
for index in offsets {
modelContext.delete(items[index])
}
DataManager.shared.reloadWidgets()
}
}
}struct FocusItemDetailView: View { @Environment(\.dismiss) private var dismiss let item: FocusItem
var body: some View {
VStack {
Text(item.theFocus)
if let details = item.details {
Text(details)
}
Text(
"\(item.created, format: Date.FormatStyle(date: .numeric, time: .standard))"
)
Button {
item.completed = Date()
DataManager.shared.reloadWidgets()
dismiss()
} label: {
Text("Mark as Complete")
}
}
}
}
struct AddFocusItemView: View {
@Binding var isPresented: Bool
let addItem: (String) -> Void
@State private var newFocusText = "" var body: some View {
NavigationView {
Form {
TextField("What is your focus?", text: $newFocusText, axis: .vertical)
.lineLimit(3...10)
}
.navigationTitle("New Focus")
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("Cancel") {
isPresented = false
}
}
ToolbarItem(placement: .confirmationAction) {
Button("Add") {
addItem(newFocusText)
isPresented = false
}
.disabled(newFocusText.isEmpty)
}
}
}
}
```https://www.kylheku.com/cgit/basta/about/
The stock Basta puts a clock (date + time) into a scroll-protected status line, host name and current working dir.
Basta works fine on MacOS, but you need to get a more recent build of Bash from somewhere (Homebrew ...). I should attempt a Zsh port one of these days; the name wouldn't change, though. :)
I like this constant on screen reminder though and might give it a try myself :)
The gods confound the man who first found out
how to distinguish hours! Confound him, too,
who in this place set up a sundial,
to cut and hack my days so wretchedly
into small portions! When I was a boy,
my belly was my sundial — one surer,
truer, and more exact than any of them.
This dial told me when ’twas proper time
to go to dinner, when I had aught to eat;
But nowadays, why even when I have,
I can’t fall-to unless the sun gives leave.
The town’s so full of these confounded dials
the greatest part of the inhabitants,
shrunk up with hunger, crawl along the street.
— Plautus (c.254-184 BC)(Originally posted 11 years ago: <https://news.ycombinator.com/item?id=7007731#7008338>)
But a just an hourly subtle sound can *just remind you that time passes.
Its really cool because it lets you use any shell-executable file, including bash scripts, python scripts (with shebangs and made executable), as a menu bar tool. The standard output is expected to follow a very simple structure and will be used to create the menu bar tool's text/icon. You can have your scripts simply output emoji as well!
Not just that, but any output after a `---` will be treated as drop down options, and depending on format, those can contain info, or be exectuable actions.
Verrrry useful for all sorts of things.
There's a focus-plasmoid (pomodoro timer), but that one doesn't display text.
Org-mode includes clock in/out features and can display this in either the modeline or frame title (or both). I did the frame title because it's basically unused space otherwise.
I used to use this in conjunction with the Pomodoro method. I don't need to use that these days, though.
I can easily add a task to any project, or the currently active one, without breaking my flow at any time. I recently added an "immediate" task that will instantly clock me in for those things that randomly come up during the day.
The nice thing is I get a complete breakdown of how all my time was spent during the week. I need to report on this for current job so it's a win/win.
This is also a good example of why I use Emacs. I hacked this together in a few minutes and been using and building on it for years.
gnarlouse•10h ago
sheepscreek•8h ago
baby_souffle•8h ago
Most plasma widgets use a config file so this should be possible.