From acce21bbc187351f207b065a886f3b0bbd4efebe Mon Sep 17 00:00:00 2001 From: rostyhn Date: Mon, 6 Dec 2021 17:56:42 -0700 Subject: [PATCH] prepping for new computer --- Xresources | 3 +-- bashrc | 2 ++ emacs | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++- emacs_home.el | 6 +++++ 4 files changed, 74 insertions(+), 3 deletions(-) diff --git a/Xresources b/Xresources index ded2603..ec4bf53 100644 --- a/Xresources +++ b/Xresources @@ -19,5 +19,4 @@ urxvt.urgentOnBell: true urxvt.depth: 32 urxvt.cursorUnderline: true urxvt.cursorBlink: true -urxvt.perl-ext-common: bell-command -urxvt.bell-command: notify-send "rxvt-unicode: bell" \ No newline at end of file +urxvt*scrollTtyOutput: false \ No newline at end of file diff --git a/bashrc b/bashrc index 885eb54..7a08297 100644 --- a/bashrc +++ b/bashrc @@ -20,6 +20,7 @@ alias mv="rsync -aP --remove-source-files" export PATH=/home/local/ASUAD/rhnatysh/ParaView/install/bin:$PATH +export FLASK_ENV=development # paraview Python module path vars export LD_LIBRARY_PATH=/home/local/ASUAD/rhnatysh/ParaView/install/lib:$LD_LIBRARY_PATH export PYTHONPATH=/home/local/ASUAD/rhnatysh/ParaView/install/lib/python3.8/site-packages/:$PYTHONPATH @@ -45,3 +46,4 @@ fi unset __conda_setup # <<< conda initialize <<< +[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && source /opt/miniconda3/etc/profile.d/conda.sh diff --git a/emacs b/emacs index 922e7ce..41cc9a7 100644 --- a/emacs +++ b/emacs @@ -52,7 +52,64 @@ Return a list of installed packages or nil for every skipped package." (or (file-exists-p package-user-dir) (package-refresh-contents)) -(ensure-package-installed 'use-package 'ivy 'magit 'centaur-tabs 'eglot 'telephone-line 'dashboard 'multiple-cursors 'flycheck 'which-key 'restart-emacs 'doom-themes 'rainbow-mode 'rainbow-delimiters 'neotree 'all-the-icons 'elpy 'rustic 'simpleclip 'messages-are-flowing 'hl-todo 'format-all 'auctex 'counsel 'swiper 'projectile 'org-roam 'smex) +(ensure-package-installed 'use-package 'ivy 'magit 'centaur-tabs 'eglot 'telephone-line 'dashboard 'multiple-cursors 'flycheck 'which-key 'restart-emacs 'doom-themes 'rainbow-mode 'rainbow-delimiters 'neotree 'all-the-icons 'elpy 'rustic 'simpleclip 'messages-are-flowing 'hl-todo 'format-all 'auctex 'counsel 'swiper 'projectile 'org-roam 'smex 'smartparens 'origami) + +(require 'origami) +(bind-keys + :map origami-mode-map + ("C-c C-" . origami-toggle-node)) + +(add-hook 'prog-mode-hook #'origami-mode) +(require 'smartparens-config) +(add-hook 'prog-mode-hook #'smartparens-mode) +(bind-keys + :map smartparens-mode-map + ("C-M-a" . sp-beginning-of-sexp) + ("C-M-e" . sp-end-of-sexp) + + ("C-" . sp-down-sexp) + ("C-" . sp-up-sexp) + ("M-" . sp-backward-down-sexp) + ("M-" . sp-backward-up-sexp) + + ("C-M-f" . sp-forward-sexp) + ("C-M-b" . sp-backward-sexp) + + ("C-M-n" . sp-next-sexp) + ("C-M-p" . sp-previous-sexp) + + ("C-S-f" . sp-forward-symbol) + ("C-S-b" . sp-backward-symbol) + + ("C-" . sp-forward-slurp-sexp) + ("M-" . sp-forward-barf-sexp) + ("C-" . sp-backward-slurp-sexp) + ("M-" . sp-backward-barf-sexp) + + ("C-M-t" . sp-transpose-sexp) + ("C-M-k" . sp-kill-sexp) + ("C-k" . sp-kill-hybrid-sexp) + ("M-k" . sp-backward-kill-sexp) + ("C-M-w" . sp-copy-sexp) + ("C-M-d" . delete-sexp) + + ("M-" . backward-kill-word) + ("C-" . sp-backward-kill-word) + ([remap sp-backward-kill-word] . backward-kill-word) + + ("M-[" . sp-backward-unwrap-sexp) + ("M-]" . sp-unwrap-sexp) + + ("C-x C-t" . sp-transpose-hybrid-sexp) + + ("C-c (" . wrap-with-parens) + ("C-c [" . wrap-with-brackets) + ("C-c {" . wrap-with-braces) + ("C-c '" . wrap-with-single-quotes) + ("C-c \"" . wrap-with-double-quotes) + ("C-c _" . wrap-with-underscores) + ("C-c `" . wrap-with-back-quotes)) + (use-package company) (add-hook 'after-init-hook 'global-company-mode) @@ -162,11 +219,18 @@ Return a list of installed packages or nil for every skipped package." (setq org-log-done t) (setq org-startup-with-inline-images t) (setq org-startup-with-latex-preview t) +(setq-default org-display-custom-times t) +(setq org-time-stamp-custom-formats '("<%a %b %e %Y>" . "<%a %b %e %Y %H:%M>")) ; agenda settings (setq org-agenda-include-diary t) (setq org-agenda-skip-scheduled-if-done t) (setq org-agenda-skip-deadline-if-done t) +(setq org-agenda-todo-ignore-deadlines t) +(setq org-agenda-todo-ignore-with-date t) +(setq org-agenda-todo-ignore-scheduled t) +(setq org-agenda-start-on-weekday nil) +(setq org-agenda-start-day "+0d") (add-hook 'diary-list-entries-hook 'diary-sort-entries t) (add-hook 'text-mode-hook 'turn-on-visual-line-mode) diff --git a/emacs_home.el b/emacs_home.el index 998b668..f27f121 100644 --- a/emacs_home.el +++ b/emacs_home.el @@ -24,6 +24,10 @@ "%?" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :unnarrowed t) + ("e" "encrypted" plain "%?" + :target (file+head "${slug}.org.gpg" + "#+title: ${title}\n") + :unnarrowed t) ("b" "book notes" plain "\n* Source\n\nAuthor: %^{Author}\nTitle: ${title}\nYear: %^{Year}\n\n %?" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") @@ -55,6 +59,8 @@ (appt-activate 1) (defun notify-send (title msg) (interactive) + ;; only the first line of the message is returned + ;; (subseq msg 0 (search msg "\n")) (shell-command (concat "notify-send '" title "' '" msg "'"))) (defun facade-notify-appt (min-to-app new-time msg) (notify-send (format "Appointment in %s minute(s)" min-to-app) msg))