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
51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,54 @@
# DevFocus Changelog

## [Unreleased]

## [2.1.0]
### Changed
- Cleaned up boilerplate scaffold files (MyProjectActivity, MyProjectService)
- Removed default keyboard shortcuts to avoid conflicts with existing IDE bindings — assign via Settings → Keymap → DevFocus
- Removed unnecessary optional Android plugin dependency declaration

### Fixed
- Removed stale "Don't forget to remove sample code" warning logged on every project open

## [2.0.1]
### Fixed
- Removed unnecessary optional Android dependency declaration that required a config-file attribute
- Coroutine exception handler added to suppress debug metadata version mismatch crash on pause

## [2.0.0]
### Added
- **Long break support** — Classic Pomodoro now fires a long break (15 min) after completing a full round of 4 sessions; Deep Work fires a 30-min long break after 2 sessions
- **Skip Break** — button in the tool window and notification action to skip any break and jump straight to the next work session
- **Notification action buttons** — "Skip Break", "Skip Long Break", and "Start Session" (when auto-start is off) actions are now clickable directly from the balloon notification
- **IDE actions** — Start/Pause, Reset, and Skip Break registered as IDE actions under Tools → DevFocus and Find Action; assign your own shortcuts via Settings → Keymap → DevFocus
- **Daily session counter** — tracks how many work sessions you've completed today; shown in the tool window and status bar
- **Auto-start toggle** — new setting to control whether the next work session starts automatically after a break, or waits for a manual start
- **Timer state persistence** — timer state (remaining time, session, phase) is saved and restored across IDE restarts; a running timer resumes as paused
- **Status bar always visible** — shows "🍅 X today" when idle instead of disappearing; work/break/long-break each have a distinct emoji and label
- **Phase label** — explicit "Focus / Break / Long Break" text label with colour coding beneath the circular timer
- **Responsive layout** — tool window adapts to three modes: compact (<160 px), vertical, and horizontal (side-by-side timer and controls)

### Fixed
- Session counter no longer double-increments when a break ends (sessions were previously skipping every other number)
- Circular timer background arc now uses theme-aware colour instead of hardcoded light grey (was invisible in dark themes)
- Layout rebuild on panel resize no longer accumulates duplicate action listeners on buttons
- Skip Break from a notification now correctly starts the new work timer (the state guard in `start()` was blocking it)
- Custom settings panel no longer flashes visible for a frame when a session ends and a break starts

### Changed
- Circular timer scales dynamically with the panel size (capped at 180 px diameter) instead of using a fixed 180 px
- Session indicator dots resize dynamically when sessions-per-round changes (was clipping at >6 sessions with a fixed 200 px width)

## [1.2.3]
### Added
- Notification sound support with enable/disable setting
- Sound plays on work session complete and break complete

## [1.2.2]
### Added
- Initial scaffold created from [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template)
- Classic Pomodoro and Deep Work preset modes
- Custom mode with configurable session, break, and sessions-per-round
- Circular timer panel with progress arc
- Session indicator dots showing completed, current, and upcoming sessions
- Status bar widget showing live timer when active
132 changes: 22 additions & 110 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,144 +4,56 @@
[![Version](https://img.shields.io/jetbrains/plugin/v/30114.svg)](https://plugins.jetbrains.com/plugin/30114)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/30114.svg)](https://plugins.jetbrains.com/plugin/30114)

DevFocus is a simple, elegant Pomodoro timer plugin for Android Studio and IntelliJ IDEA.
Designed to help developers stay focused, take breaks, and manage their productivity — right inside the IDE.
DevFocus is a Pomodoro timer plugin for Android Studio and IntelliJ IDEA that helps developers stay focused, take structured breaks, and track their productivity — without leaving the IDE.

<!-- Plugin description -->
# DevFocus — Pomodoro Timer for JetBrains IDEs

DevFocus is a lightweight Pomodoro timer designed specifically for developers using JetBrains IDEs.
Stay focused on your coding sessions without leaving your editor, and maintain a healthy balance between deep work and breaks.

Instead of switching to external productivity apps, DevFocus integrates directly into your IDE so you can manage focus sessions while coding.
Most Pomodoro timers don't survive an IDE restart, skip the long break entirely, and require you to leave the editor just to pause. DevFocus fixes all three — and stays out of your way while doing it.

---

## Features

### 🎯 Classic Pomodoro

Follow the traditional Pomodoro technique:
## What makes it different

- **25 minutes** focused work
- **5 minutes** break

A simple and proven way to stay productive while avoiding burnout.

---
**💾 Survives restarts and crashes.** Timer state is saved to disk continuously. Reopen the IDE — even the next day — and your session is exactly where you left it, paused and ready to resume.

### 🧠 Deep Work Mode
**🔁 Proper long breaks.** After a full round of sessions, DevFocus fires a long break automatically — the defining feature of the Pomodoro technique that most timer plugins quietly omit.

For longer, distraction-free coding sessions.
**⏭ Skip break from the notification.** When you're in flow, click **Skip Break** directly in the IDE notification balloon. No need to open the tool window or break your focus.

- **50 minutes** focused work
- **10 minutes** break
**⌨️ Full keyboard control.** Start/Pause, Reset, and Skip Break are registered as IDE actions — assign your own shortcuts via **Settings → Keymap → DevFocus** to avoid conflicts with your existing bindings. All three are also reachable via **Tools → DevFocus** and Find Action (`Ctrl+Shift+A` / `⌘⇧A`).

Perfect for tasks that require deeper concentration like debugging, architecture work, or learning new systems.
**📍 Status bar always present.** Live countdown visible while you code, even with the tool window closed. When idle, shows your daily session count — a quiet reminder of what you've already accomplished.

---

### ⚙️ Fully Custom Sessions
## Everything else

Create your own focus routine by customizing:

- Work session duration
- Break duration
- Number of rounds per session

Adapt the timer to your personal workflow.

---

### ⏱ Visual Circular Timer

DevFocus includes a clean **clockwise circular timer** that visually represents your session progress, making it easy to track time without distractions.

---

### 📍 Status Bar Timer

Your current session time is always visible in the **IDE status bar**, even if the DevFocus tool window is minimized.

This ensures you can stay aware of your focus session while continuing to work normally in the editor.

---

### 🔔 Smart Session Notifications

DevFocus notifies you when:

- A **focus session is completed**
- A **break session is completed**

These notifications help maintain the Pomodoro rhythm without constantly checking the timer.

---

## Why DevFocus?

Many Pomodoro apps run outside the IDE, forcing developers to constantly switch context.

DevFocus keeps everything inside your development environment so you can:

- Stay focused while coding
- Maintain productive work/break cycles
- Avoid workflow interruptions
- **Three modes** — Classic Pomodoro (25/5), Deep Work (50/10), or fully custom durations
- **Visual circular timer** — arc depletes clockwise, colour-coded by phase
- **Session indicator** — dot row showing completed, active, and upcoming sessions
- **🍅 Daily session counter** — resets at midnight, shown in tool window and status bar
- **Auto-start toggle** — choose whether work sessions start automatically after a break or wait for you
- **Actionable notifications** — Skip Break, Skip Long Break, Start Session — inline in the balloon
- **Responsive tool window** — adapts between compact, vertical, and horizontal layouts as you resize

---

## Supported IDEs

DevFocus works with JetBrains IDEs including:

- IntelliJ IDEA
- Android Studio
- PyCharm
- WebStorm
- CLion
- Rider
- Other IntelliJ-based IDEs

---

## Boost Your Coding Focus

Whether you're debugging a complex issue, implementing a new feature, or learning a new technology, DevFocus helps you stay in the zone while maintaining a healthy development rhythm.
IntelliJ IDEA, Android Studio, PyCharm, WebStorm, CLion, Rider, and all other JetBrains IDEs.

<!-- Plugin description end -->

## Features

- 🕒 Pomodoro countdown in a dedicated tool window
- ⏸️ Auto-break reminders
- 🔔 Session notifications
- 💡 Simple, unobtrusive design
- 🧠 Works in Android Studio and IntelliJ IDEA

## Installation

- Using the IDE built-in plugin system:

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "DevFocus"</kbd> >
<kbd>Install</kbd>

- Using JetBrains Marketplace:
- **IDE Plugin System:** <kbd>Settings</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > search **DevFocus** > <kbd>Install</kbd>

Go to [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/30114) and install it by clicking the <kbd>Install to ...</kbd> button in case your IDE is running.

You can also download the [latest release](https://plugins.jetbrains.com/plugin/30114/versions) from JetBrains Marketplace and install it manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>

- Manually:

Download the [latest release](https://github.com/AkshayAshokCode/DevFocus/releases/latest) and install it manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
- **JetBrains Marketplace:** [plugins.jetbrains.com/plugin/30114](https://plugins.jetbrains.com/plugin/30114)

- **Manually:** Download the [latest release](https://github.com/AkshayAshokCode/DevFocus/releases/latest) and install via <kbd>Settings</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>

## License

DevFocus is licensed under the Apache License 2.0.

Copyright (c) 2026 Akshay Ashok

See the LICENSE file for details.
DevFocus is licensed under the Apache License 2.0.
Copyright (c) 2026 Akshay Ashok — see the LICENSE file for details.
10 changes: 1 addition & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType

plugins {
id("java") // Java support
Expand Down Expand Up @@ -83,7 +82,7 @@ intellijPlatform {

ideaVersion {
sinceBuild = providers.gradleProperty("pluginSinceBuild")
untilBuild = providers.gradleProperty("pluginUntilBuild")
// untilBuild omitted — no upper cap, plugin installs on all IDE versions from sinceBuild onwards
}
}

Expand Down Expand Up @@ -153,12 +152,5 @@ intellijPlatformTesting {
robotServerPlugin()
}
}

runIde {
register("runAndroidStudio") {
type.set(IntelliJPlatformType.AndroidStudio)
version.set("2024.3.2.14")
}
}
}
}
9 changes: 5 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ pluginGroup = com.github.akshayashokcode.devfocus
pluginName = DevFocus
pluginRepositoryUrl = https://github.com/AkshayAshokCode/DevFocus
# SemVer format -> https://semver.org
pluginVersion = 1.2.4
pluginVersion = 2.1.0

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 233
pluginUntilBuild = 251.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IC
Expand All @@ -26,8 +25,10 @@ gradleVersion = 8.13
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false

# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
org.gradle.configuration-cache = true
# Configuration cache disabled — IntelliJ Platform Gradle Plugin's RunIdeTask has a
# non-serializable DefaultProperty field (__runtimeArchitecture__) that causes cache
# write failures. Build cache below is unaffected and still active.
org.gradle.configuration-cache = false

# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
org.gradle.caching = true
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
package com.github.akshayashokcode.devfocus.services

import com.intellij.openapi.components.Service
import com.intellij.openapi.diagnostic.thisLogger
import com.intellij.openapi.project.Project
import com.github.akshayashokcode.devfocus.MyBundle

@Service(Service.Level.PROJECT)
class MyProjectService(project: Project) {

init {
thisLogger().info(MyBundle.message("projectService", project.name))
thisLogger().warn("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.")
}

fun getRandomNumber() = (1..100).random()
}
class MyProjectService(@Suppress("UNUSED_PARAMETER") project: Project)
Loading
Loading