Compare commits
2 commits
d4a7aab052
...
303b6ce5a6
Author | SHA1 | Date | |
---|---|---|---|
|
303b6ce5a6 | ||
|
9b0a7e91d5 |
2 changed files with 16 additions and 12 deletions
|
@ -4,8 +4,8 @@
|
||||||
#
|
#
|
||||||
### Startup
|
### Startup
|
||||||
exec_always --no-startup-id autotiling
|
exec_always --no-startup-id autotiling
|
||||||
exec_always --no-startup-id flock -n ~/.polybar.lock polybar mybar
|
exec --no-startup-id bash -c 'while sleep 1; do flock ~/.polybar.lock polybar mybar; done'
|
||||||
exec --no-startup-id watch -n 15 autorandr --change
|
exec --no-startup-id bash -c 'while sleep 15; do autorandr --change; done'
|
||||||
exec --no-startup-id dunst
|
exec --no-startup-id dunst
|
||||||
exec --no-startup-id nm-applet
|
exec --no-startup-id nm-applet
|
||||||
exec --no-startup-id blueman-applet
|
exec --no-startup-id blueman-applet
|
||||||
|
|
|
@ -2,6 +2,16 @@
|
||||||
|
|
||||||
notes() {
|
notes() {
|
||||||
local -r NOTES_DIR="${NOTES_DIR:-${HOME}/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
|
for ARG in "$@"; do
|
||||||
(
|
(
|
||||||
|
@ -10,6 +20,10 @@ notes() {
|
||||||
cd "$NOTES_DIR"
|
cd "$NOTES_DIR"
|
||||||
|
|
||||||
case "${ARG}" in
|
case "${ARG}" in
|
||||||
|
'fzf')
|
||||||
|
"${EDITOR}" "${EDITOR_OPTIONS[@]}" "$(notes ls | fzf)"
|
||||||
|
;;
|
||||||
|
|
||||||
'ls')
|
'ls')
|
||||||
ag -g '' -l "${NOTES_DIR}" | sort -hr
|
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}"
|
echo -e "# $(date -d "@${NOW}" +'%a %d %b %Y')\n\n## todo\n\n" > "${FILE_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local -r EDITOR="${EDITOR:-vim}"
|
|
||||||
local EDITOR_OPTIONS=()
|
|
||||||
|
|
||||||
if [[ "${EDITOR}" =~ 'vim$' ]]; then
|
|
||||||
EDITOR_OPTIONS=(
|
|
||||||
'-c'
|
|
||||||
'set spell'
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
"${EDITOR}" "${EDITOR_OPTIONS[@]}" "${FILE_PATH}"
|
"${EDITOR}" "${EDITOR_OPTIONS[@]}" "${FILE_PATH}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue