Giter Club home page Giter Club logo

aware's Introduction

Aware

Aware is a menubar app for macOS and visionOS that displays how long you've been actively using your computer.

dark light

Installing the app

View in Mac App Store or download the latest release from GitHub.

Development information

Requires Xcode 10.2

$ git clone https://github.com/josh/Aware
$ cd Aware/
$ open Aware.xcodeproj/

License

Copyright © 2016 Joshua Peek, Patrick Marsceill. All rights reserved.

aware's People

Contributors

chriscomeau avatar josh avatar nakajima avatar pmarsceill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aware's Issues

Configurable sound reminder

I've just found this app and started using it as a nice replacement for Awareness, which isn't maintained. Thanks!!

One very useful feature that Awareness has is simple sound notifications at configurable times (e.g., every hour). I understand this may be out of the original scope of this app, but it would be an amazing feature to have.

UPD: I see this feature request is already addressed in #66.

Custom Domain

After reviewing #18, I'm wondering if we need a custom domain.

Right now, our gh-pages branch would be hosted at https://josh.github.io/aware. We'd use this page as the "Marketing URL" and "Support URL"s.

The domain also affects our "Bundle ID" which is a reverse domain, currently com.github.josh.Aware. Once the App is published, we can no longer change this.

CC: @pmarsceill

The app is no longer available on the UK mac app store

When you try to visit the mac app store from your homepage from the UK, you get the following error when it opens the app store.

The item you requested is not currently available in the UK store

I'd love to recommend it, but an app that has to log keystrokes and mouse moves to work, but is revoked from the app store will naturally raise red flags in people's minds!

Show UI feedback when timer idles

There should be some visual indication that the timer has paused and started idling. Possible implementations:

  • dim the time count's alpha
  • display an icon
  • a combination of the above

Marketing site todo's

  • Create a switch to show dark menubar example.
  • Write a little JS that makes the clock accurate to system time.
  • Write a little JS that will start the Aware timer on page load
  • Add Google Analytics tracking 618dae3

Notification

Display a notification every time 30 minutes (or any adjustable time) is reached to remind the user to take a break.

visionOS: grace settings

Expose more grace timeouts in settings #70

/// The minimum number of seconds to schedule between background tasks.
let backgroundTaskInterval: Duration = .minutes(5)
/// The duration the app can be in the background and be considered active if it's opened again.
let backgroundGracePeriod: Duration = .hours(2)
/// The duration after locking the device it can be considered active if it's unlocked again.
let lockGracePeriod: Duration = .minutes(1)
/// The max duration to allow the suspending clock to drift from the continuous clock.
let maxSuspendingClockDrift: Duration = .seconds(10)

Probably not all of these but backgroundGracePeriod and lockGracePeriod, I think.

Customize Duration formatters

Depends on #70.

Now our custom duration formatting is more aligned with Swift's FormatStyle, it should be pretty easy to swap up the format styles at these call sites.

Text(duration, format: .abbreviatedDuration)

Text(duration, format: .abbreviatedDuration)

This test case makes use of a few other styles we could expose as user settings:

func testDurationFormatted() {
XCTAssertEqual(Duration.seconds(15).formatted(.time(pattern: .hourMinuteSecond)), "0:00:15")
XCTAssertEqual(Duration.seconds(15).formatted(.timeDuration), "15")
XCTAssertEqual(Duration.minutes(1).formatted(.timeDuration), "1:00")
XCTAssertEqual(Duration.seconds(15).formatted(.components(style: .spellOut)), "fifteen seconds")
XCTAssertEqual(Duration.minutes(1).formatted(.components(style: .spellOut)), "one minute")
XCTAssertEqual(Duration.minutes(15).formatted(.abbreviatedDuration), "15m")
}

The main two I kinda like are our current "1h 15m" and the more compact "1:15". Then for both, support adding seconds. I mostly want seconds cause I would turn that on while debugging the app hehe.

There might be some other styles by tweaking .components(style: .condensedAbbreviated, fields: [.hour, .minute]).

Settings page would write this to UserDefaults via the @AppStorage magic. Then we can run that back in the views. We probably just need to define a custom enum of the options we want to expose.

@pmarsceill maybe an interesting UI question, should this be a picker between 4 styles? Or two styles then "include seconds" toggle.

  • 1h 15m
  • 1h 15m 30s
  • 1:15
  • 1:15:30
  • maybe others...?

Allow alternate time format in menu

Right now the menu displays in Xm format.

image

If I'm working for more than a 200 or so minutes I have to do math (ugh) to figure out how many hours this is. Would it be beneficial to allow users to switch the to HH:MM (or automatically switch it after 60m)?

visionOS: Choose background task mode

let fetchActivityMonitorTask: BackgroundTask = .appRefresh("fetchActivityMonitor")
let processingActivityMonitorTask: BackgroundTask = .processing("processingActivityMonitor")

uses both "app refresh" and "processing" tasks. I think we only need one, but I'm not sure which schedules the most reliably so I ended up adding both. If we had better log data #72 when real world usage, I think we figure out which to go with.

Settings

I think it's time to cave and finally add a proper Settings screen as a foundation for a couple other features.

I've already have a stubbed out DEBUG only Settings popover in visionOS that can be enabled to everyone. Though, I'm still going back and forth on the short vs long gesture and how to do a hover state that doesn't look terrible.

macOS has some established settings window code already we should be using. Since we don't have a classic menu bar as the app runs without an icon, we'll need to add a "Preferences..." to our little icon menu bar extra content. Also add a command+, hotkey.

I think this specific issue could be closed once both platform have at least an empty settings view we can start adding things to.

@pmarsceill if you're interested

Microphone/camera detection

I primarily use Aware to make sure that I'm getting up from my desk once an hour, and it's perfect for when I'm writing code and using my machine. The only place it falls short is in meetings - often I'm not touching my keyboard and mouse if I'm on a Zoom call, which means the timer will reset.

Is there any way to detect if either the microphone is being actively used or if the camera is on? I understand if this is not possible as it might require access to the microphone/camera permissions which could be a privacy issue. As a fallback, is it possible to detect if an application is full-screen and not reset the timer if so? (though I can see this causing other issues with video playback/screensavers etc.)

Can't reorder menu bar item

⌘+drag should allow you to reorder the item in the menu bar.

Not sure why this just doesn't work by default. Maybe its as easy as enabling some allowReorder = true flag. Need to research.

Polish up app icon

The icon is cool, but it could be cooler with a little more polish. I'd like to do the following before our official launch.

  • Explore adding reflection to monitor to make it seem more like a monitor
  • Explore different gradient colors / background treatments on the monitor
  • Try adjusting small screen versions for better viewing at small sizes on non-retina displays
  • Play with the stroke width a bit on the eye / clock
  • Add updated icon to app.

Add Privacy Policy

As a reminder, in June the App Store Review Guidelines were updated to require a privacy policy for all new apps and app updates as part of the app review process. Starting October 3, 2018, App Store Connect will require a privacy policy for all new apps and app updates before they can be submitted for distribution on the App Store. In addition, your app’s privacy policy link or text will only be editable when you submit a new version of your app.

To add or edit your privacy policy for the App Store:

  1. Go to My Apps in App Store Connect, and click on your app.
  2. Under App Store, click on App Information.
  3. In the top right corner, add your privacy policy link for iOS apps or macOS apps, or enter text directly for tvOS apps.
  4. Click Save.

https://developer.apple.com/news/?id=08312018a

visionOS: Tiny window

Explore ways to make the visionOS window even smaller.

visionOS only lets you resize the window so small. Maybe that's something I'm doing that limits that. But it's weird you can trick it to go smaller by physically walking around and moving it somewhere else and it will stay small. But you gotta get up! If you move it forward and backward on that plane, visionOS does this thing where it scales the window bigger as it moves further.

https://developer.apple.com/documentation/visionos/positioning-and-sizing-windows

Timer resetting while watching movies or youtube

Bug

While watching long youtube videos or any kind of video, if there weren't any user activity for more than a couple of minutes, the timer reset to 0, defeating the purpose of tracking user's time with the computer

Speculation

Looking at the code, it appears that in the updateButton function, there appears to be a condition that if the user was not entering any keys, moving, clicking, or scrolling with the mouse for more than 120 seconds (or 2 minutes) the timer resets

Temporary Fix

Removing this

if (self.sinceUserActivity() > userIdleSeconds) {
    timerStart = Date()
    idle = true
} ...

does seems to stop the timer from resetting, however I do not know the implication that might be involved in removing that if block

Any suggestions on how to solve this?

Time since last session

Expand the scope of Aware from tracking how long you are using a device, to how long you are NOT using a device.

Keep a few of the previous time states in memory. Then we should show "time since last reset" somewhere. On Mac, this can serve as a way to show how long your break was. On Vision Pro, it could tell you how long it's been sitting in a cabinet not really being used.

Add README

Some things it might include:

  • Screenshot
  • Instructions for downloading
  • Documenting secret NSDefaults
  • Licensing and attribution

Aware doesn't reset the timer when computer is unlocked (no sleep)

Prerequisites

When I unlock Mac OS after locking it using CMD + CONTROL + Q Aware's timer is not reset to 0m.
Note: The computer isn't put to sleep, just locked.

Expected Behaviour

Timer reset to 0m when I unlock Mac Os.

Current Behaviour

Timer not been reset.

Steps to Reproduce

  1. Prevent your OS from going to sleep in the Preferences.
  2. Start Aware
  3. Lock Mac OS using CMD + CONTROL + Q
  4. Wait
  5. Unlock
  6. See in the menu bar that Aware isn't showing 0m.
MacBook Pro (15-Inch, 2017)
Mac OS version: 10.13.4  

Let me know if you need anything else.

Icon update

@josh I've been working on some icon updates for the next release, what are your thoughts on this type of thing?

aware-icon

Trying to convey time passing on a computer without being so literal.

Clear timer when display sleeps

I have a hot corner setup to put the display to sleep whenever I walk away from my desk. It doesn't do a full sleep and therefore doesn't trigger the sleep event to clear the timer.

Research CGDisplayIsAsleep API.

Improve Video Detection

Research ways to detect video playback to avoid resetting the timer. Users often do not interact with the keyboard while watching a video. So typically the timer is reset as the user appears to be idle while watching the screen.

See this user's report #51

Expected result:

  • Start Netflix video in Safari. Do not interact with keyboard or mouse. Timer should keep counting.
  • Start movie in iTunes. Do not interact with keyboard or mouse. Timer should keep counting.

Implementation requirements:

  • Does not depend on privileged APIs that require "Automation" permission.
  • Must not use any private APIs or any APIs that would prevent Mac App Store submission.
  • Does not shell out or use other commands (e.g. use Process or NSTask).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.