Compare commits

...

5 commits

6 changed files with 54 additions and 1 deletions

View file

@ -187,7 +187,7 @@ bindsym $mod+r mode "resize"
bar {
position top
status_command i3status
status_command ~/.config/sway/i3status-wrapper
status_edge_padding 6
status_padding 0

15
.config/sway/i3status-wrapper Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
. ~/.profile
i3status | while true; do
read line
json_array="$(echo $line | grep -F [{ | sed -e 's/^,//')"
if test -z "$json_array"; then
echo "$line"
else
zeit_obj='{"name":"zeit","instance":"zeit","markup":"none","full_text":"'$(zeit tracking --no-colors)'"}'
json_array="$(echo $json_array | jq ". |= [$zeit_obj] + .")"
echo "$json_array,"
fi
done

View file

@ -26,6 +26,10 @@ blockquote {
margin-left: 1em;
padding-left: 1em;
}
li {
margin-bottom: .5em;
}
</style>
"
fi

26
.local/bin/zeit-fuzzel Executable file
View file

@ -0,0 +1,26 @@
#!/bin/sh
# Forked from https://github.com/mrusme/zeit/blob/c07a40a3185091dda8ba9a3b81c1e017bfda609b/extras/zeit-waybar-wofi.sh
. ~/.profile
tracking="$(zeit tracking --no-colors)"
if echo "$tracking" | grep -q '^ ▶ tracking'; then
zeit finish
exit 0
fi
selection="$(zeit list \
--only-projects-and-tasks \
--append-project-id-to-task \
| fuzzel-run \
--dmenu
)"
task="$(echo $selection | pcregrep -io1 '└── (.+) \[.+')"
project="$(echo $selection | pcregrep -io1 '.+\[(.+)\]')"
if test "$task" = "" || "$project" = ""; then
exit 1
fi
zeit track -p "$project" -t "$task"

View file

@ -0,0 +1,6 @@
[Desktop Entry]
Version=1.0
Name=toggle zeit time tracking
Exec=zeit-fuzzel
Terminal=false
Type=Application

View file

@ -7,6 +7,8 @@ ulimit -c unlimited
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/go/bin:$PATH"
export ZEIT_DB=~/Sync/zeit.db
export EDITOR=vis
export FZF_DEFAULT_OPTS='--color=light'