(global-set-key (kbd "C-c r") 'rotate-windows)
(global-set-key (kbd "C-c s") 'eshell)
(global-set-key (kbd "C-c t") 'toggle-window-split)
-(global-set-key (kbd "C-c w") 'edit-work-eqs)
(global-set-key (kbd "<f8>") 'recentf-open-files)
;; OVERRIDES
(global-set-key [remap move-beginning-of-line] 'smart-beginning-of-line)
(interactive)
(find-file user-init-file))
-(defun edit-work-eqs ()
- "Bring up work-eqs.el for editing."
- (interactive)
- (find-file work-eqns))
-
(defun toggle-window-split ()
"If two windows are open, toggle their split layout between vert. and horiz.
Stolen from http://whattheemacsd.com"
(interactive)
(cond ((not (> (count-windows)1))
(message "You can't rotate a single window!"))
+ ((> (count-windows) 2)
+ (message "You can't rotate more than two windows!"))
(t
(setq i 1)
(setq numWindows (count-windows))
(and (= oldpos (point))
(beginning-of-line))))
-(defun unfuck-aveva-license ()
- "Remove the offending xml files when aveva can't find the license."
- (interactive)
- (let ((xml1 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalAcquireInfo.xml")
- (xml2 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalBackEndAcquireInfo.xml"))
- (when (file-exists-p xml1) (delete-file xml1))
- (when (file-exists-p xml2) (delete-file xml2))))
-
(defun eshell-send-on-close-paren ()
"Makes eshell act somewhat like genera.
Makes a closing paren execute the sexp. Currently in test, look out for errors."
alias weather clear -l && curl https://wttr.in
-alias qmk c:/QMK_MSYS/conemu/ConEmu64.exe
;; -*- lexical-binding: t; -*-
;; SETUP FOR SHARED WINDOWS/WSL INIT
(if (eq system-type 'windows-nt)
- (progn (setq delete-by-moving-to-trash t))
+ (progn (setq delete-by-moving-to-trash t)
+ (load (expand-file-name "win-defuns.el" user-emacs-directory))
+ (eshell-eval-command "alias qmk \"c:/QMK_MSYS/conemu/ConEmu64.exe\""))
nil)
(load (expand-file-name "work-eqs.el" user-emacs-directory))
--- /dev/null
+;; -*- lexical-binding: t; -*-
+;; DEFUNS FOR WINDOWS ONLY
+(defun unfuck-aveva-license ()
+ "Remove the offending xml files when aveva can't find the license."
+ (interactive)
+ (let ((xml1 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalAcquireInfo.xml")
+ (xml2 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalBackEndAcquireInfo.xml"))
+ (when (file-exists-p xml1) (delete-file xml1))
+ (when (file-exists-p xml2) (delete-file xml2))))