This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kimai.1r.1m.sh
executable file
·42 lines (35 loc) · 9.69 KB
/
kimai.1r.1m.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# <bitbar.title>Kimai2-cmd</bitbar.title>
# <bitbar.version>v0.1</bitbar.version>
# <bitbar.author>infeeeee</bitbar.author>
# <bitbar.author.github>infeeeee</bitbar.author.github>
# <bitbar.desc>Client for kimai2 the open source self hosted timetracker</bitbar.desc>
# <bitbar.image>http://www.hosted-somewhere/pluginimage</bitbar.image>
# <bitbar.dependencies>kimai2-cmd</bitbar.dependencies>
# <bitbar.abouturl>https://github.com/infeeeee/kimai2-cmd-argos/</bitbar.abouturl>
# --------------------------------- Settings --------------------------------- #
# path to kimai:
kimaipath=kimai
# Images: Uncomment what you want to use
# Full color: (on mac change imagetype to 'image')
#kimailogo='iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAAGWB6gOAAAACXBIWXMAABYlAAAWJQFJUiTwAAANG0lEQVRYCY1YCXBW1RX+3vqv2QkhIWzighCKiKBoQJC6VOkoiu3UcUErttriUmuVcd/qTLXqKIoraq0zrRsuKCJLQZBgcMmwxRUhISEBspB//9/W79wQRHDUx7z/vbx377nf/c453zkPYN8RBEFd370mN+cvnhpEy30cYR2LuTUPdOr5fL4+Ugg8e8xyNBkbMeO1U0rVyAtWTAnsgVloPRHMG/l2r5VsNtt5/nuTgp5ET9BnF1ykgufL8kDjTTB73a/gWXl07MhBP+fNKdDLHNw9+mkUFFnQblz2x2B32RcIRQxUp8b2mlnfvDq4aOnpARe4Ti0vj8XWue/WYtqQM7F+12oMtIbi3tr50ORwXbfi7IUnt/XrH4dVkgdiDuwgjEyPhyMxHqdVnAfT9/35lmnCN/IwbA2PDloBFw6u+WI6Nu2pR8O2DVDL0V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KawNTMCHWLnMX/pDAs7FEM65gfrNA2Tl3uVdDtkTW+Mv6/mGZ8S6vVGtFg3xeFuIZ+Wdj8N95VZog7KnSvsC5IS/ijp6uLmpbxIaGpZrgUvlcXlNtUZ6P0u812nHd9h+A38lMMZGBad2W62wPXDMzr3bNu3hXKvakntqjBl5X7OSChn4X1vg9x++DyDX0upIT8aZYj57Uy2Rc+V0mIsR8L9X2nlmGH8LtQ2b3Ak1Jzct0n5HrfHhVfV2dQs+t3j8uKGUqFvCG4HEz9UQFiw+JfACsFfGPGexoyG7tueQHyuKfk45806Hxh5wXfDCck88NkgfKGXLbEj8QhkgGvMv+Z5APCOXxvdAAzq+R6HYnhnwprGO+mScn3C5xzLGDIC1/XtM9JPyucNJy1HZxYj5MYctmAd/hDOy8b6tti+RRq4k4V2Sk8LHDW3SX4/4XYY2YFNjq2gGnlXxRfMv0LzZwRDr1/DFIAAAAASUVORK5CYII='
# Image type
# On mac use 'image' for the colored icon, 'templateImage' for black icon
#imagetype=image
imagetype=templateImage
# -------------------------- Beginning of the script ------------------------- #
echo "$(${kimaipath} -b list-active) $imagetype=$kimailogo imageHeight=16"
echo "---"
echo "Active measurements: (Click to stop)"
$kimaipath -a list-active
echo "---"
echo "Recent measurements:"
$kimaipath -a list-recent
echo "---"
echo "Open Kimai in browser | href='$($kimaipath url)'"
echo "Reload | refresh=true"
# ----------------------------- End of the script ---------------------------- #