diff --git a/files/bin/timer b/files/bin/timer
index 2a29273..d903bac 100755
--- a/files/bin/timer
+++ b/files/bin/timer
@@ -3,7 +3,7 @@
set timer_folder ~/.timer
set activity_lists_folder $timer_folder/activity.lists
set activity_timeclock_file $timer_folder/activity.timeclock
-set activity_i3blocks_pipe $timer_folder/activity.i3blocks.fifo
+set activity_i3blocks_linefile $timer_folder/activity.i3blocks
set activity_current_file $timer_folder/activity.current
set activity_timeclock_append_log_folder $timer_folder/activity.timeclock.d
set activity_timeclock_append_log_filename $activity_timeclock_append_log_folder/(date +%Y-%m-%d)-(hostname)
@@ -36,10 +36,10 @@ function parse_activity_timeclock
end
if [ $state = 'i' ]
echo $activity > $activity_current_file
- echo "★ $activity" > $activity_i3blocks_pipe
+ echo "★ $activity" > $activity_i3blocks_linefile
else
rm $activity_current_file
- echo "☆" > $activity_i3blocks_pipe
+ echo "☆" > $activity_i3blocks_linefile
end
end
@@ -63,12 +63,12 @@ end
function begin_activity
echo i (date '+%Y-%m-%d %H:%M:%S') $argv >> $activity_timeclock_append_log_filename
- echo "★ $argv" > $activity_i3blocks_pipe
+ echo "★ $argv" > $activity_i3blocks_linefile
end
function end_activity
echo o (date '+%Y-%m-%d %H:%M:%S') >> $activity_timeclock_append_log_filename
- echo "☆" > $activity_i3blocks_pipe
+ echo "☆" > $activity_i3blocks_linefile
end
diff --git a/tasks/timer.yaml b/tasks/timer.yaml
index a4c6e74..8ed8e89 100644
--- a/tasks/timer.yaml
+++ b/tasks/timer.yaml
@@ -20,7 +20,7 @@
content: "{{ default_activities | join('\n') }}"
dest: "{{timer_folder}}/activity.lists/10-default"
-- name: timer activity i3blocks fifo
- command: mkfifo "{{timer_folder}}/activity.i3blocks.fifo"
+- name: timer activity i3blocks linefile
+ shell: echo ☆ > "{{timer_folder}}/activity.i3blocks"
args:
- creates: "{{timer_folder}}/activity.i3blocks.fifo"
+ creates: "{{timer_folder}}/activity.i3blocks"
diff --git a/templates/i3/i3blocks.config.j2 b/templates/i3/i3blocks.config.j2
index 0509a3c..7e7ed3d 100644
--- a/templates/i3/i3blocks.config.j2
+++ b/templates/i3/i3blocks.config.j2
@@ -32,7 +32,7 @@ markup=none
# activity
[activity]
-command=~/bin/pipe-watcher ~/.timer/activity.i3blocks.fifo ☆
+command=tail -f ~/.timer/activity.i3blocks 2> /dev/null
interval=persist
markup=pango