emacs updates
This commit is contained in:
parent
f2801cae75
commit
14543a1024
@ -23,7 +23,7 @@
|
||||
;; If there is more than one, they won't work right.
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(vue-mode jedi-direx multi-web-mode web-mode quack elpy importmagic py-autopep8 flycheck excorporate ivy nginx-mode helm-projectile projectile json-mode jinja2-mode company-terraform terraform-mode yaml-mode company racer rust-mode magit theme-looper myterminal-controls meta-presenter which-key dired-launch material-theme neotree undo-tree ztree buffer-move powerline ace-window ace-jump-mode multiple-cursors helm))))
|
||||
(csharp-mode dired-dups swift-mode highlight-indent-guides rainbow-delimiters vue-mode multi-web-mode web-mode quack elpy importmagic py-autopep8 flycheck excorporate ivy nginx-mode helm-projectile projectile json-mode jinja2-mode company-terraform terraform-mode yaml-mode company racer rust-mode magit theme-looper myterminal-controls meta-presenter which-key dired-launch material-theme neotree undo-tree ztree buffer-move powerline ace-window ace-jump-mode multiple-cursors helm))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
@ -4,10 +4,9 @@
|
||||
|
||||
|
||||
|
||||
(defvar dwlisp-mode-hook nil)
|
||||
(add-to-list 'auto-mode-alist '("\\.lisp\\'" . dwlisp-mode))
|
||||
|
||||
(define-derived-mode dwlisp-mode
|
||||
lisp-mode "dwlisp"
|
||||
"major mode for dwlisp"
|
||||
(setq lisp-body-indent 2))
|
||||
(setq lisp-body-indent 2)
|
||||
|
||||
;cc mode
|
||||
(setq c-default-style "linux"
|
||||
c-basic-offset 4)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;Change title-bar text
|
||||
(setq frame-title-format
|
||||
"%b %F")
|
||||
"%F %b ")
|
||||
|
||||
;Disable menu-bar
|
||||
(menu-bar-mode -1)
|
||||
@ -21,3 +21,11 @@
|
||||
|
||||
;line numbers
|
||||
(global-linum-mode)
|
||||
|
||||
;; ITERM2 MOUSE SUPPORT
|
||||
(unless window-system
|
||||
(require 'mouse)
|
||||
(xterm-mouse-mode t)
|
||||
(defun track-mouse (e))
|
||||
(setq mouse-sel-mode t)
|
||||
)
|
||||
|
@ -22,6 +22,7 @@
|
||||
(global-whitespace-mode)
|
||||
(setq whitespace-line-column 500)
|
||||
|
||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||
;Enable winner-mode
|
||||
(winner-mode t)
|
||||
|
||||
@ -70,3 +71,27 @@
|
||||
(setq clean-buffer-list-kill-never-regexps
|
||||
(append '("^\\*EMMS Playlist\\*.*$")
|
||||
clean-buffer-list-kill-never-regexps-init))
|
||||
|
||||
|
||||
;https://stackoverflow.com/questions/43765/pin-emacs-buffers-to-windows-for-cscope
|
||||
(defun toggle-window-dedicated ()
|
||||
|
||||
"Toggle whether the current active window is dedicated or not"
|
||||
|
||||
(interactive)
|
||||
|
||||
(message
|
||||
|
||||
(if (let (window (get-buffer-window (current-buffer)))
|
||||
|
||||
(set-window-dedicated-p window
|
||||
|
||||
(not (window-dedicated-p window))))
|
||||
|
||||
"Window '%s' is dedicated"
|
||||
|
||||
"Window '%s' is normal")
|
||||
|
||||
(current-buffer)))
|
||||
|
||||
(global-set-key (kbd "<f12>") 'toggle-window-dedicated)
|
||||
|
@ -56,18 +56,6 @@
|
||||
(setq company-minimum-prefix-length 2)
|
||||
|
||||
(global-company-mode)
|
||||
;; (defvar company-mode-whitelist
|
||||
;; '(
|
||||
;; js-mode-hook
|
||||
;; python-mode-hook
|
||||
;; rust-mode-hook
|
||||
;; lisp-mode-hook
|
||||
;; terraform-mode-hook
|
||||
;; org-mode-hook
|
||||
;; ))
|
||||
;; (mapc (lambda (h)
|
||||
;; (add-hook h #'company-mode))
|
||||
;; company-mode-whitelist)
|
||||
|
||||
|
||||
;Set up ace-jump-mode
|
||||
@ -85,6 +73,7 @@
|
||||
(setq powerline-default-separator
|
||||
'slant)
|
||||
|
||||
|
||||
;Configure theme-looper
|
||||
(theme-looper-set-theme-set '(deeper-blue
|
||||
wheatgrass
|
||||
@ -144,3 +133,10 @@
|
||||
|
||||
;;flycheck
|
||||
(setq flycheck-flake8-maximum-line-length 500)
|
||||
|
||||
|
||||
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
|
||||
|
||||
(require 'semantic)
|
||||
(semantic-mode 1)
|
||||
(global-semantic-stickyfunc-mode 1)
|
||||
|
150
slate.js
150
slate.js
@ -52,6 +52,14 @@ var full = slate.operation("move", {
|
||||
width: "screenSizeX",
|
||||
height: "screenSizeY"
|
||||
});
|
||||
|
||||
var fullDubble = slate.operation("move", {
|
||||
x: "screenOriginX",
|
||||
y: "screenOriginY",
|
||||
width: "screenSizeX*2",
|
||||
height: "screenSizeY"
|
||||
});
|
||||
|
||||
var topLeft = S.op("corner", {
|
||||
"direction": "top-left",
|
||||
"width": "screenSizeX/2",
|
||||
@ -60,7 +68,7 @@ var topLeft = S.op("corner", {
|
||||
var topLeftShort = S.op("corner", {
|
||||
"direction": "top-left",
|
||||
"width": "screenSizeX/2",
|
||||
"height": "screenSizeY/4"
|
||||
"height": "screenSizeY*0.40"
|
||||
});
|
||||
|
||||
var topRight = S.op("corner", {
|
||||
@ -76,7 +84,7 @@ var bottomLeft = S.op("corner", {
|
||||
var bottomLeftTall = S.op("corner", {
|
||||
"direction": "bottom-left",
|
||||
"width": "screenSizeX/2",
|
||||
"height": "screenSizeY*0.63"
|
||||
"height": "screenSizeY*0.6"
|
||||
});
|
||||
|
||||
var bottomRight = S.op("corner", {
|
||||
@ -196,6 +204,14 @@ var threeMonitorLayout = slate.layout("threeMonitor", {
|
||||
"repeat": true,
|
||||
"ignore-fail": true
|
||||
},
|
||||
"Firefox": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen1);
|
||||
wo.doOperation(full);
|
||||
}],
|
||||
"repeat": true,
|
||||
"ignore-fail": true
|
||||
},
|
||||
"PyCharm Community Edition": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen2);
|
||||
@ -234,10 +250,129 @@ var threeMonitorLayout = slate.layout("threeMonitor", {
|
||||
}
|
||||
});
|
||||
|
||||
var fourMonitorLayout = slate.layout("fourMonitor", {
|
||||
"Slack": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen0);
|
||||
wo.doOperation(topLeftShort);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": true,
|
||||
"repeat": true
|
||||
},
|
||||
"Microsoft Outlook": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen0);
|
||||
wo.doOperation(bottomLeftTall);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": false,
|
||||
"repeat": true
|
||||
},
|
||||
"Google Play Music Desktop Player": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen0);
|
||||
wo.doOperation(bottomRight);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": false,
|
||||
"repeat": true
|
||||
},
|
||||
"VMware Fusion": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen1);
|
||||
wo.doOperation(full);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": true,
|
||||
"repeat": true
|
||||
},
|
||||
"Google Chrome": {
|
||||
"operations": [googleChromeLayout],
|
||||
"repeat": true,
|
||||
"ignore-fail": true
|
||||
},
|
||||
"Firefox": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen0);
|
||||
wo.doOperation(full);
|
||||
}],
|
||||
"repeat": true,
|
||||
"ignore-fail": true
|
||||
},
|
||||
"PyCharm Community Edition": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen2);
|
||||
wo.doOperation(full);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": true,
|
||||
"repeat": true
|
||||
},
|
||||
"WebStorm": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen2);
|
||||
wo.doOperation(full);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": true,
|
||||
"repeat": true
|
||||
},
|
||||
"Xcode": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen2);
|
||||
wo.doOperation(full);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": true,
|
||||
"repeat": true
|
||||
},
|
||||
"Android Studio": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen2);
|
||||
wo.doOperation(full);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": true,
|
||||
"repeat": true
|
||||
},
|
||||
"Emacs": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen3);
|
||||
wo.doOperation(full);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": true,
|
||||
"repeat": true
|
||||
},
|
||||
"iTerm2": {
|
||||
"operations": [function(wo) {
|
||||
wo.doOperation(moveScreen1);
|
||||
wo.doOperation(full);
|
||||
}],
|
||||
"main-first": true,
|
||||
"ignore-fail": true,
|
||||
"repeat": true
|
||||
}
|
||||
});
|
||||
|
||||
slate.bind("a:ctrl,alt,cmd", slate.operation("layout", {
|
||||
name: threeMonitorLayout
|
||||
}));
|
||||
|
||||
slate.bind("f:ctrl,cmd", fullDubble)
|
||||
|
||||
slate.bind("a:ctrl,alt,cmd", function(wo){
|
||||
|
||||
if (slate.screenCount() == 3) {
|
||||
slate.operation("layout", {
|
||||
name: threeMonitorLayout
|
||||
}).run();
|
||||
}
|
||||
if (slate.screenCount() == 4) {
|
||||
slate.operation("layout", {
|
||||
name: fourMonitorLayout
|
||||
}).run();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -248,6 +383,11 @@ if (slate.screenCount() == 3) {
|
||||
name: threeMonitorLayout
|
||||
}).run();
|
||||
}
|
||||
if (slate.screenCount() == 4) {
|
||||
slate.operation("layout", {
|
||||
name: fourMonitorLayout
|
||||
}).run();
|
||||
}
|
||||
|
||||
slate.log("screen count " + slate.screenCount());
|
||||
slate.eachScreen(function(screenObject) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user