diff --git a/home/.config/i3/config b/home/.config/i3/config index b5ab3c4..54614c8 100644 --- a/home/.config/i3/config +++ b/home/.config/i3/config @@ -4,8 +4,8 @@ # ### Startup exec_always --no-startup-id autotiling -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_always --no-startup-id flock -n ~/.polybar.lock polybar mybar +exec --no-startup-id watch -n 15 autorandr --change exec --no-startup-id dunst exec --no-startup-id nm-applet exec --no-startup-id blueman-applet diff --git a/home/.zshrc.d/notes.sh b/home/.zshrc.d/notes.sh index 095dcb8..c7b539c 100755 --- a/home/.zshrc.d/notes.sh +++ b/home/.zshrc.d/notes.sh @@ -2,16 +2,6 @@ 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 ( @@ -20,10 +10,6 @@ notes() { cd "$NOTES_DIR" case "${ARG}" in - 'fzf') - "${EDITOR}" "${EDITOR_OPTIONS[@]}" "$(notes ls | fzf)" - ;; - 'ls') ag -g '' -l "${NOTES_DIR}" | sort -hr ;; @@ -70,6 +56,16 @@ 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}" ) }