diff --git a/config/.config/systemd/user/quick-backup.service b/config/.config/systemd/user/quick-backup.service new file mode 100644 index 0000000..e709553 --- /dev/null +++ b/config/.config/systemd/user/quick-backup.service @@ -0,0 +1,9 @@ +[Unit] +Description=Daily quick-backup + +[Service] +Type=oneshot +ExecStart=/home/jas/repos/codeberg.org/hyperreal/admin-scripts/shell/quick-backup + +[Install] +WantedBy=default.target diff --git a/config/.config/systemd/user/quick-backup.timer b/config/.config/systemd/user/quick-backup.timer new file mode 100644 index 0000000..f78c8b9 --- /dev/null +++ b/config/.config/systemd/user/quick-backup.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Daily quick-backup +DefaultDependencies=yes + +[Timer] +OnCalendar=*-*-* 00:00:00 +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/config/.config/systemd/user/timers.target.wants/quick-backup.timer b/config/.config/systemd/user/timers.target.wants/quick-backup.timer new file mode 120000 index 0000000..dec7dbb --- /dev/null +++ b/config/.config/systemd/user/timers.target.wants/quick-backup.timer @@ -0,0 +1 @@ +/home/jas/.config/systemd/user/quick-backup.timer \ No newline at end of file diff --git a/doom/.doom.d/config.el b/doom/.doom.d/config.el index aa8dabb..ed63b40 100644 --- a/doom/.doom.d/config.el +++ b/doom/.doom.d/config.el @@ -165,9 +165,9 @@ If point was already at that position, move point to beginning of line." (eval-after-load 'org '(org-load-modules-maybe t)) -(setq org-directory "~/ownCloud/org/") -(setq org-default-notes-file "~/ownCloud/org/inbox.org") -(setq org-agenda-files '("~/ownCloud/org/inbox.org")) +(setq org-directory "~/sync/org/") +(setq org-default-notes-file "~/sync/org/inbox.org") +(setq org-agenda-files '("~/sync/org/inbox.org")) ;; support selecting lines by using shift (setq org-support-shift-select t) @@ -203,9 +203,9 @@ If point was already at that position, move point to beginning of line." (setq org-blank-before-new-entry '((heading . t) (plain-list-item . t))) (setq org-refile-targets - `((("~/ownCloud/org/inbox.org" - "~/ownCloud/org/computing.org" - "~/ownCloud/org/todos.org") + `((("~/sync/org/inbox.org" + "~/sync/org/computing.org" + "~/sync/org/todos.org") . (:maxlevel . 5)))) ;; org-todo-keywords @@ -244,9 +244,24 @@ If point was already at that position, move point to beginning of line." (with-eval-after-load 'ox (require 'ox-hugo)) +;; copy images from clipboard into org file with yank-media +(defun org-mode--image-yank-handler (type image) + (let ((file (read-file-name (format "Save %s image to:" type)))) + (when (file-directory-p file) + (user-error "%s is a directory")) + (when (and (file-exists-p file) + (not (yes-or-no-p (format "%s exists; overwrite?" file)))) + (user-error "%s exists")) + (with-temp-buffer + (set-buffer-multibyte nil) + (insert image) + (write-region (point-min) (point-max) file)) + (insert (format "[[file:%s]]\n" (file-relative-name file))))) + +(add-hook 'org-mode-hook (lambda () (yank-media-handler "image/.*" #'org-mode--image-yank-handler))) ;;;; org-roam -(setq org-roam-directory "~/ownCloud/org-roam") +(setq org-roam-directory "~/sync/org-roam") (org-roam-db-autosync-mode) ;; org-roam-ui diff --git a/zsh/.zshenv b/zsh/.zshenv index af75929..2626033 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1 +1,2 @@ eval "$(starship init zsh)" +source <(fzf --zsh) diff --git a/zsh/.zshrc b/zsh/.zshrc index 83380e7..8666097 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -105,12 +105,6 @@ typeset -gU path cdpath manpath fpath autoload -U add-zsh-hook add-zsh-hook -Uz chpwd() { print -Pn "\e]2;%m:%2~\a" } -# direnv -eval "$(direnv hook zsh)" - -# starship.rs -eval "$(starship init zsh)" - # Ensure always loading the latest version of the emacs-vterm-zsh.sh file if [[ "$INSIDE_EMACS" = 'vterm' ]] \ && [[ -n ${EMACS_VTERM_PATH} ]] \ diff --git a/zsh/.zshrc.d/fzf.zsh b/zsh/.zshrc.d/fzf.zsh index a132f1d..06f99fd 100644 --- a/zsh/.zshrc.d/fzf.zsh +++ b/zsh/.zshrc.d/fzf.zsh @@ -10,3 +10,10 @@ export FZF_COMPLETION_TRIGGER="~~" ## default source for fzf export FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git" + +# CTRL-R +# CTRL-Y to copy the command into clipboard using wl-copy +export FZF_CTRL_R_OPTS=" + --bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort' + --color header:italic + --header 'Press CTRL-Y to copy command into clipboard'"