Browse Source

Rclone copy cmd and key bind

Simon Watson 3 years ago
parent
commit
99329a2aad
2 changed files with 19 additions and 0 deletions
  1. 15 0
      emacs/.emacs-all
  2. 4 0
      emacs/elisp/rclone.el

+ 15 - 0
emacs/.emacs-all

@@ -155,6 +155,9 @@
 (global-set-key (kbd "C-c g") 'sol-l)
 (global-set-key (kbd "C-c y") 'evil-mode) ; Quick toggle evil-mode for slime err
 (global-set-key (kbd "C-c h") 'tramp-cleanup-connection)
+(global-set-key (kbd "C-c C-.") '(lambda ()
+				  (interactive)
+				  (switch-to-buffer "*Messages*")))
 
 ;;; Can probably be replaced with
 ;;; a yasnippet
@@ -178,6 +181,18 @@
 (setq mouse-autoselect-window t
       focus-follows-mouse t)
 
+;; Custom eshell prompt
+(setq eshell-prompt-function
+ (lambda nil
+   " λ > "))
+(setq eshell-prompt-regexp "^ λ > ")
+
+(set-language-environment "UTF-8")
+
+;; Simple rclone cli wrapper
+(load "~/Repos/dotfiles/emacs/elisp/rclone.el")
+(global-set-key (kbd "C-c o") 'rclone-copy-buffer)
+
 
 ;; Load for macOS
 ;;; Slime/etc

+ 4 - 0
emacs/elisp/rclone.el

@@ -0,0 +1,4 @@
+(defun rclone-copy-buffer ()
+  "Copies path of current buffer to b2/emacs"
+  (interactive)
+  (shell-command (format "rclone copy %s spw-b2:/spw01Backups1/emacs/" (buffer-file-name))))