Giter Site home page Giter Site logo

tassos / timewarrior-indicator Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 2.0 33 KB

An indicator for gnome-shell that shows the current activity tracked by timewarrior

License: GNU General Public License v3.0

JavaScript 98.11% CSS 1.89%
gnome timewarrior gnome-shell-extension

timewarrior-indicator's Introduction

Timewarrior indicator gnome-shell extensions

A very simple indicator for the gnome-shell that displays the current activity tracked from timewarrior

Prerequisites

Timewarrior :) You can get it from here: https://timewarrior.net/

Project overview

This is a very simple gnome-shell extension that parses the output of the timew binary and returns the current activity and the duration of it. The current activity is derived from all the tags that are returned from the timew command. The longest tag is used. The string is cut to be max 20 char long.

The duration is also derived from the output of the timew command and is displayed in a HH:MM format.

Installation

The extension can be installed directly from source, either for the convenience of using git or to test the latest version.

Clone the latest version with git

git clone https://github.com/tassos/timewarrior-indicator.git \
~/.local/share/gnome-shell/extensions/[email protected]

A Shell reload is required Alt+F2 r Enter and extension has to be enabled with gnome-tweak-tool

Upcoming features

Some ideas for extra features:

  • Create a settings panel (implemented in 38625363c7c357a69418896f5ff35377abe62ef6)
  • Restart previous activities from the panel (implemented in 38625363c7c357a69418896f5ff35377abe62ef6)
  • Change the display format
  • Change the tag to display

If you have any ideas on how to make this tool more useful, please contact me!

Author

  • tassos (Tassos Natsakis)

License

Copyright (C) 2017 Tassos Natsakis

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

timewarrior-indicator's People

Contributors

emilianbold avatar lumbric avatar marcolaux avatar tassos avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

timewarrior-indicator's Issues

README wrong directory name

Hello again,

it's not really a bug but perhaps an issue. In the README it's written that a directory called "[email protected]" (hyphen) should be created but in the metadate it's "[email protected]" (underscore).

JS ERROR: Could not load extension [email protected]: Error: uuid "[email protected]" from metadata.json does not match directory name "[email protected]"

I just wanted to reinstall from extensions.gnome.org but perhaps it's not the up to date one. Or it does not install because of this (gets deleted immediately when I try to enable it from there).

broken with gnome 3.22

I'm not able to install or activate -from extensions.gnome.org- because of this error in gnome 3.22:

JS ERROR: Exception in callback for signal: extension-found: SyntaxError: missing : after property id @ /home/marcaux/.local/share/gnome-shell/extensions/[email protected]/extension.js:88

: function
is missing

Use Timewarrior DOM for easier parsing

I have a suggestion which would allow simpler parsing using the Timewarrior DOM to provide the information in machine-readable form.

To determine whether time tracking is currently active, use dom.active, which will yield a 0 or 1:

$ timew get dom.active
1

If time tracking is active, use dom.active.json to provide all the details of the active interval, in JSON form:

$ timew get dom.active.json
{"start":"20170422T140233Z","tags":["Design command syntax","ti","ti.120"]}

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.