 (use-package websocket
   :disabled
   :after org-roam)
+
+;; cite sources from .bib files
+(use-package org-ref
+  :straight t
+  :init
+  (setq org-ref-completion-library 'org-ref-ivy-cite
+        org-export-latex-format-toc-function 'org-export-latex-no-toc
+        org-ref-get-pdf-filename-function
+        (lambda (key) (car (bibtex-completion-find-pdf key)))
+        ;; For pdf export engines.
+        org-latex-pdf-process (list "latexmk -pdflatex='%latex -shell-escape -interaction nonstopmode' -pdf -bibtex -f -output-directory=%o %f")
+        ;; I use orb to link org-ref, helm-bibtex and org-noter together (see below for more on org-noter and orb).
+        ;;org-ref-notes-function 'orb-edit-notes)
+	org-ref-default-bibliography "~/Zotero/zotero/zotero.bib"
+	org-ref-default-citation-link "citep"))
+(use-package ivy-bibtex
+  :straight t
+  :config
+  (setq bibtex-completion-bibliography org-ref-default-bibliography))
+
+
+;; Miscellaneous
+
+;; enhanced pdf viewing
+(use-package pdf-tools
+  :straight t
+  :config
+  (setenv "PKG_CONFIG_PATH"
+	  "/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig")
+  (setenv "PATH"
+	  (s-join ":" exec-path))
+  (pdf-tools-install)
+  (setq-default pdf-view-display-size 'fit-width)
+  :custom
+  (pdf-annot-activate-created-annotations t "automatically annotate highlights"))
+
+;; reminds user to keep good posture
+(use-package posture
+  :config
+  (global-set-key (kbd "C-c t p") #'toggle-posture-reminder))
 
 ;; reenable garbage collection when idle
 (run-with-idle-timer

     ("school"))
   org-capture-templates
   ;; entries for personal tasks file (consider removing)
   '(("t" "Personal todo" entry
      (file+olp+datetree t/daily-file)
      "* TODO %? :task:"
      :empty-lines 1 :prepend t)
     ("n" "Personal note" entry
      (file+olp+datetree t/daily-file)
      "* UNREAD %u %? :note:"
      :empty-lines 1 :prepend t)
     ("e" "Upcoming event" entry
      (file+olp+datetree t/daily-file)
      "* EVENT %? :event:\nSCHEDULED: %^{Event Date}t"
      :empty-lines 1 :prepend t)
     ;; entries for school file
     ("s" "Templates for school")
     ("st" "Class-related todo" entry
      (file+olp+datetree t/daily-file)
      "* TODO %^{Title} :%^{Type|hw|study}:\nDEADLINE:%^{Deadline}t\n\n+ [[%c][Turn-In]]\n\n%?"
      :empty-lines 1)
     ("sn" "Class-related notes" entry
      (file+olp+datetree t/daily-file)
      "* %^{Title} :%^{Type|notes|class-info}:\n%U\n\n+ %?"
      :empty-lines 1)))
   ;; agenda settings
   (setq org-deadline-warning-days 3
   org-agenda-custom-commands

  (global-set-key (kbd "C-c f n") #'t/edit-org-dir)
  (global-set-key (kbd "C-c X") #'org-capture)
  (global-set-key (kbd "C-c n a") #'org-agenda)
  ;; edit/nav bindings in org-mode
  (define-key org-mode-map (kbd "C-c .") #'counsel-org-goto)
  (define-key org-mode-map (kbd "M-{") #'backward-paragraph)
