From 9b0a7e91d50cfd9e9bcaf7d0e3a781391dddc7a3 Mon Sep 17 00:00:00 2001
From: Tony Blyler <tony.blyler@cbinsights.com>
Date: Mon, 27 Sep 2021 09:50:24 -0400
Subject: [PATCH 1/2] Update notes to have an fzf mode

---
 home/.zshrc.d/notes.sh | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/home/.zshrc.d/notes.sh b/home/.zshrc.d/notes.sh
index c7b539c..095dcb8 100755
--- a/home/.zshrc.d/notes.sh
+++ b/home/.zshrc.d/notes.sh
@@ -2,6 +2,16 @@
 
 notes() {
 	local -r NOTES_DIR="${NOTES_DIR:-${HOME}/notes}"
+	local -r EDITOR="${EDITOR:-vim}"
+	local EDITOR_OPTIONS=()
+
+	if [[ "${EDITOR}" =~ 'vim$' ]]; then
+		EDITOR_OPTIONS=(
+			'-c'
+			'set spell'
+		)
+	fi
+
 
 	for ARG in "$@"; do
 		(
@@ -10,6 +20,10 @@ notes() {
 			cd "$NOTES_DIR"
 
 			case "${ARG}" in
+				'fzf')
+					"${EDITOR}" "${EDITOR_OPTIONS[@]}" "$(notes ls | fzf)"
+					;;
+
 				'ls')
 					ag -g '' -l "${NOTES_DIR}" | sort -hr
 					;;
@@ -56,16 +70,6 @@ notes() {
 			echo -e "# $(date -d "@${NOW}" +'%a %d %b %Y')\n\n## todo\n\n" > "${FILE_PATH}"
 		fi
 
-		local -r EDITOR="${EDITOR:-vim}"
-		local EDITOR_OPTIONS=()
-
-		if [[ "${EDITOR}" =~ 'vim$' ]]; then
-			EDITOR_OPTIONS=(
-				'-c'
-				'set spell'
-			)
-		fi
-
 		"${EDITOR}" "${EDITOR_OPTIONS[@]}" "${FILE_PATH}"
 	)
 }

From 303b6ce5a6583b8c03805b4736382db9cfa04f87 Mon Sep 17 00:00:00 2001
From: Tony Blyler <tony.blyler@cbinsights.com>
Date: Mon, 27 Sep 2021 09:50:52 -0400
Subject: [PATCH 2/2] utilize bash rather than `watch` for i3 reocurring
 commands

---
 home/.config/i3/config | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/home/.config/i3/config b/home/.config/i3/config
index 54614c8..b5ab3c4 100644
--- a/home/.config/i3/config
+++ b/home/.config/i3/config
@@ -4,8 +4,8 @@
 #
 ### Startup
 exec_always --no-startup-id autotiling
-exec_always --no-startup-id flock -n ~/.polybar.lock polybar mybar
-exec --no-startup-id watch -n 15 autorandr --change
+exec --no-startup-id bash -c 'while sleep 1; do flock ~/.polybar.lock polybar mybar; done'
+exec --no-startup-id bash -c 'while sleep 15; do autorandr --change; done'
 exec --no-startup-id dunst
 exec --no-startup-id nm-applet
 exec --no-startup-id blueman-applet