commit cc75bce83d7929fc69cc4b52d5e8be1184f3d980
Author: Simon Watson <spw01@protonmail.com>
Date: Tue Jul 20 15:18:19 2021 -0400
Updates/changes/etc
diff --git a/bashrc/bashrc-all b/bashrc/bashrc-all
index dee6f5e..baf4251 100644
--- a/bashrc/bashrc-all
+++ b/bashrc/bashrc-all
@@ -21,8 +21,10 @@ if [ ! -z "$EXA_PATH" ]; then
fi
# Platform agnostic aliases
-alias tmuxa="tmux attach -t $1"
-alias tmuxl="tmux ls"
+export TMUX_PATH=$(which tmux --skip-alias)
+alias tmuxn="$TMUX_PATH new -s $1"
+alias tmuxa="$TMUX_PATH attach -t $1"
+alias tmuxl="$TMUX_PATH ls"
alias tmuxq="echo $TMUX"
alias httpserver="python -m SimpleHTTPServer"
@@ -36,7 +38,6 @@ case $(hostname) in
# Mac aliases
alias shorten-ps1="PS1='λ > '"
alias default-ps1='PS1="\w λ > \[$(tput sgr0)\]"'
- alias tmuxn="tmux new -s $1"
alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs"
# PATH setups
@@ -58,7 +59,7 @@ case $(hostname) in
export PS1="[\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]]\$ "
alias start_od="rclone --vfs-cache-mode writes mount ipconedrive: /home/watonsi/OneDrive/"
- alias tmux="systemd-run --scope --user tmux"
+ alias tmuxn="systemd-run --scope --user tmux new -s $1"
# function to set terminal title
function set-title() {
diff --git a/emacs/.emacs-all b/emacs/.emacs-all
index 28a8bd2..09ea6b0 100644
--- a/emacs/.emacs-all
+++ b/emacs/.emacs-all
@@ -158,6 +158,7 @@
(global-set-key (kbd "C-c C-.") '(lambda ()
(interactive)
(switch-to-buffer "*Messages*")))
+(global-set-key (kbd "C-c C-f") 'find-file-at-point)
;;; Can probably be replaced with
;;; a yasnippet
@@ -198,7 +199,8 @@
;; Simple rclone cli wrapper
(load "~/Repos/dotfiles/emacs/elisp/rclone.el")
-(global-set-key (kbd "C-c o") 'rclone-copy-buffer)
+(global-set-key (kbd "C-c o") 'rclone-post-buffer)
+(global-set-key (kbd "C-c C-o") 'rclone-get-org)
;; Load for macOS
diff --git a/emacs/elisp/rclone.el b/emacs/elisp/rclone.el
index e602785..0f4648f 100644
--- a/emacs/elisp/rclone.el
+++ b/emacs/elisp/rclone.el
@@ -1,4 +1,12 @@
-(defun rclone-copy-buffer ()
+(defun rclone-post-buffer ()
"Copies path of current buffer to b2/emacs"
(interactive)
(shell-command (format "rclone copy %s spw-b2:/spw01Backups1/emacs/" (buffer-file-name))))
+
+;;; This assumes rclone is configured with my b2 setup
+(defun rclone-get-org ()
+ "Copies orgmode file to temp location and opens in a new buffer"
+ (interactive)
+ (progn
+ (shell-command (format "rclone copy spw-b2:/spw01Backups1/emacs/1.org %s" temporary-file-directory))
+ (find-file (concat temporary-file-directory "1.org"))))