Zeit
This commit is contained in:
parent
884992bec4
commit
b98aadda04
5 changed files with 48 additions and 1 deletions
|
@ -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
15
.config/sway/i3status-wrapper
Executable 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)"'"}'
|
||||
json_array="$(echo $json_array | jq ". |= [$zeit_obj] + .")"
|
||||
echo "$json_array,"
|
||||
fi
|
||||
done
|
24
.local/bin/zeit-fuzzel
Executable file
24
.local/bin/zeit-fuzzel
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
# Forked from https://github.com/mrusme/zeit/blob/c07a40a3185091dda8ba9a3b81c1e017bfda609b/extras/zeit-waybar-wofi.sh
|
||||
|
||||
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"
|
6
.local/share/applications/zeit-fuzzel.desktop
Normal file
6
.local/share/applications/zeit-fuzzel.desktop
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=toggle zeit time tracking
|
||||
Exec=zeit-fuzzel
|
||||
Terminal=false
|
||||
Type=Application
|
2
.profile
2
.profile
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue