From f862b976dd158fce055c6d3d029ef61f24610a0f Mon Sep 17 00:00:00 2001 From: Lizzy Hunt Date: Tue, 28 Feb 2023 12:41:07 -0700 Subject: [PATCH] Sleep a bit before starting aggietime auth on work machine, in watch aggietime dont remove the socket --- .stumpwm.d/init.lisp | 2 +- scripts/watch_aggietimed.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.stumpwm.d/init.lisp b/.stumpwm.d/init.lisp index 794b5d8..ee7c0af 100644 --- a/.stumpwm.d/init.lisp +++ b/.stumpwm.d/init.lisp @@ -21,5 +21,5 @@ (setq *mouse-focus-policy* :sloppy) (when (is-work-machine) - (run-shell-command "~/scripts/watch_aggietimed.sh")) + (run-shell-command "sleep 3 && . ~/scripts/watch_aggietimed.sh")) (run-shell-command "dunst") diff --git a/scripts/watch_aggietimed.sh b/scripts/watch_aggietimed.sh index 5adfb29..d8cce82 100755 --- a/scripts/watch_aggietimed.sh +++ b/scripts/watch_aggietimed.sh @@ -1,16 +1,17 @@ -#!/bin/bash +#!/bin/sh socket=/tmp/aggietimed.sock +env_file=/home/lizzy/work/simple_scripts/aggietime_cli/.env + +export $(cat $env_file | xargs) while true do - aggietimed -d --socket-path $socket - + aggietimed -d -s $socket if [ $? -eq 0 ] then break else - rm $socket sleep 1 fi done