mirror of
https://github.com/balkian/dotfiles.git
synced 2024-12-22 00:38:11 +00:00
Minor updates
* Added syncthing * JSON indentation in emacs * Fixed bug with myemacs script
This commit is contained in:
parent
cfb2d498fa
commit
ee3e7b81e4
18
bspwm/.config/bspwm/bspwmrc
Normal file
18
bspwm/.config/bspwm/bspwmrc
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
sxhkd &
|
||||
|
||||
bspc config border_width 2
|
||||
bspc config window_gap 12
|
||||
|
||||
bspc config split_ratio 0.52
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
bspc config focus_by_distance true
|
||||
|
||||
bspc monitor -d I II III IV V VI VII VIII IX X
|
||||
|
||||
bspc rule -a Gimp desktop=^8 state=floating follow=on
|
||||
bspc rule -a Firefox desktop=^2
|
||||
bspc rule -a mplayer2 state=floating
|
||||
bspc rule -a Screenkey manage=off
|
348
emacs.d/init.el
348
emacs.d/init.el
@ -1,348 +0,0 @@
|
||||
;;; BalkEmacs --- My emacs configuration
|
||||
;;; Commentary:
|
||||
|
||||
;;; Config that needs to be loaded before require
|
||||
|
||||
;; Added by Package.el. This must come before configurations of
|
||||
;; installed packages. Don't delete this line. If you don't want it,
|
||||
;; just comment it out by adding a semicolon to the start of the line.
|
||||
;; You may delete these explanatory comments.
|
||||
(package-initialize)
|
||||
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(custom-safe-themes (quote ("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" "31a01668c84d03862a970c471edbd377b2430868eccf5e8a9aec6831f1a0908d" "1297a022df4228b81bc0436230f211bad168a117282c20ddcba2db8c6a200743" "c3c0a3702e1d6c0373a0f6a557788dfd49ec9e66e753fb24493579859c8e95ab" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" default))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
)
|
||||
|
||||
(setq evil-want-C-u-scroll t)
|
||||
|
||||
;;; Code:
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
|
||||
|
||||
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
|
||||
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
(unless (require 'el-get nil 'noerror)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.github.com/dimitri/el-get/master/el-get-install.el")
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
|
||||
(add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes")
|
||||
|
||||
(setq el-get-sources
|
||||
'((:name molokai-theme
|
||||
:type github
|
||||
:pkgname "hbin/molokai-theme"
|
||||
:load "molokai-theme.el")))
|
||||
|
||||
(setq
|
||||
my:el-get-packages
|
||||
'(el-get ; el-get is self-hosting
|
||||
ace-jump-mode
|
||||
auctex
|
||||
auctex-latexmk
|
||||
auto-complete ; complete as you type with overlays
|
||||
ein
|
||||
emmet-mode
|
||||
; escreen ; screen for emacs, C-\ C-h
|
||||
evil
|
||||
evil-jumper
|
||||
evil-leader
|
||||
evil-matchit
|
||||
evil-nerd-commenter
|
||||
evil-numbers
|
||||
evil-org-mode
|
||||
evil-surround
|
||||
exec-path-from-shell
|
||||
f
|
||||
fill-column-indicator
|
||||
flycheck
|
||||
gist
|
||||
git-gutter-fringe
|
||||
guide-key
|
||||
helm
|
||||
helm-ag
|
||||
helm-projectile
|
||||
helm-pydoc
|
||||
helm-swoop
|
||||
jedi
|
||||
magit
|
||||
markdown-mode
|
||||
neotree
|
||||
nxhtml
|
||||
nose
|
||||
ob-ipython
|
||||
pivotal-tracker
|
||||
popwin
|
||||
pretty-mode
|
||||
projectile
|
||||
;; smex
|
||||
s
|
||||
session
|
||||
smart-mode-line
|
||||
switch-window ; takes over C-x o
|
||||
undo-tree
|
||||
vimrc-mode
|
||||
volatile-highlights
|
||||
yaml-mode
|
||||
yasnippet
|
||||
zygospore
|
||||
; zencoding-mode ; http://www.emacswiki.org/emacs/ZenCoding
|
||||
;; color-theme-solarized
|
||||
;; color-theme-tango)) ; check out color-theme-olarized
|
||||
|
||||
;; install new packages and init already installed packages
|
||||
))
|
||||
|
||||
(setq my:el-get-packages
|
||||
(append my:el-get-packages
|
||||
(mapcar #'el-get-source-name el-get-sources)))
|
||||
|
||||
(require 'el-get-elpa)
|
||||
(unless (file-directory-p el-get-recipe-path-elpa)
|
||||
(el-get-elpa-build-local-recipes))
|
||||
|
||||
(el-get 'sync my:el-get-packages)
|
||||
|
||||
|
||||
;;(color-theme-solarized-dark)
|
||||
;(load-theme 'soothe t)
|
||||
;;(require 'monokai-theme)
|
||||
(load-theme 'molokai t)
|
||||
|
||||
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
|
||||
;;(setq completion-cycle-threshold t)
|
||||
|
||||
(add-hook 'after-init-hook 'session-initialize)
|
||||
|
||||
;;; Neotree
|
||||
(require 'neotree)
|
||||
(when neo-persist-show
|
||||
(add-hook 'popwin:before-popup-hook
|
||||
(lambda () (setq neo-persist-show nil)))
|
||||
(add-hook 'popwin:after-popup-hook
|
||||
(lambda () (setq neo-persist-show t))))
|
||||
(setq projectile-switch-project-action 'neotree-projectile-action)
|
||||
|
||||
;;; Popwin
|
||||
(require 'popwin)
|
||||
(popwin-mode)
|
||||
|
||||
;;; Linum
|
||||
(require 'linum)
|
||||
(add-hook 'prog-mode-hook 'linum-mode)
|
||||
(setq linum-format 'dynamic)
|
||||
(set-face-attribute 'linum nil :height 90)
|
||||
|
||||
(setq highlight-color "#232323")
|
||||
|
||||
;;; Show column number
|
||||
(column-number-mode)
|
||||
|
||||
;;; Highlight line
|
||||
(global-hl-line-mode)
|
||||
(set-face-background 'hl-line highlight-color)
|
||||
|
||||
;;; Flycheck
|
||||
(add-hook 'after-init-hook #'global-flycheck-mode)
|
||||
(setq flycheck-temp-prefix ".flycheck")
|
||||
|
||||
;; (global-linum-mode 1)
|
||||
;; (setq linum-mode-inhibit-modes-list '(eshell-mode
|
||||
;; helm-buffer
|
||||
;; shell-mode
|
||||
;; ein:notebook-bg-mode
|
||||
;; ein:bg/ein:notebook
|
||||
;; ein:bg
|
||||
;; ein:notebook
|
||||
;; ))
|
||||
;; (defadvice linum-on (around linum-on-inhibit-for-modes)
|
||||
;; "Stop the load of linum-mode for some major modes."
|
||||
;; (unless (member major-mode linum-mode-inhibit-modes-list)
|
||||
;; ad-do-it))
|
||||
;; (ad-activate 'linum-on)
|
||||
(add-hook 'prog-mode-hook 'fci-mode)
|
||||
|
||||
;; (require 'powerline)
|
||||
;; (powerline-center-evil-theme)
|
||||
|
||||
(sml/setup)
|
||||
(sml/apply-theme 'dark)
|
||||
|
||||
(display-time-mode t)
|
||||
|
||||
;;; Global emacs settings
|
||||
;; disable splash screen
|
||||
(setq inhibit-splash-screen t)
|
||||
(setq truncate-partial-width-windows nil)
|
||||
(set-default 'truncate-lines nil)
|
||||
;; No tabs, only 4 spaces, as default
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq tab-width 4)
|
||||
(setq default-tab-width 4);
|
||||
;; Show info about available commands
|
||||
(setq guide-key/guide-key-sequence '("SPC" ","))
|
||||
|
||||
;; Separate Configs
|
||||
(add-to-list 'load-path (concat user-emacs-directory "config"))
|
||||
(require 'config-latex)
|
||||
(require 'config-python)
|
||||
(eval-after-load 'ein-notebooklist
|
||||
'(require 'config-ein))
|
||||
(require 'config-helm)
|
||||
(require 'config-evil)
|
||||
(require 'config-org)
|
||||
(require 'config-secret)
|
||||
(require 'config-dired)
|
||||
|
||||
;;; Global modes
|
||||
(tool-bar-mode 0)
|
||||
(savehist-mode 1)
|
||||
(show-paren-mode t)
|
||||
(yas-global-mode 1)
|
||||
(guide-key-mode 1)
|
||||
(scroll-bar-mode 0)
|
||||
(projectile-global-mode)
|
||||
|
||||
;;; Specific modes
|
||||
;; (autoload 'markdown-mode "markdown-mode"
|
||||
;; "Major mode for editing Markdown files" t)
|
||||
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
|
||||
|
||||
;;
|
||||
;; Global Keybindings
|
||||
;;
|
||||
(global-set-key "\C-w" 'backward-kill-word)
|
||||
(global-set-key "\C-x\C-k" 'kill-region)
|
||||
(global-set-key [escape] 'keyboard-escape-quit)
|
||||
(define-key helm-map (kbd "C-w") 'backward-kill-word)
|
||||
(global-set-key (kbd "C-x 1") 'zygospore-toggle-delete-other-windows)
|
||||
|
||||
;; Don't clover my folders
|
||||
(setq
|
||||
backup-by-copying t ; don't clobber symlinks
|
||||
delete-old-versions t
|
||||
kept-new-versions 6
|
||||
kept-old-versions 2
|
||||
version-control t) ; use versioned backups
|
||||
|
||||
(setq backup-directory-alist
|
||||
`((".*" . ,temporary-file-directory)))
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" , temporary-file-directory t)))
|
||||
;; Preven #file#.txt files
|
||||
(setq create-lockfiles nil)
|
||||
|
||||
(setq inhibit-startup-message t)
|
||||
|
||||
(toggle-indicate-empty-lines)
|
||||
|
||||
;;; Columns
|
||||
(require 'fill-column-indicator)
|
||||
(setq fci-rule-column 79)
|
||||
(setq fci-rule-color highlight-color)
|
||||
(setq fci-rule-width 3)
|
||||
|
||||
(fringe-mode '(5 . 5))
|
||||
|
||||
(eval-after-load 'magit
|
||||
'(progn
|
||||
(set-face-foreground 'magit-diff-add "green3")
|
||||
(set-face-foreground 'magit-diff-del "red3")
|
||||
(set-face-background 'magit-item-highlight "black")))
|
||||
|
||||
;; Fix Scrolling in tmux
|
||||
;; Set the default font too
|
||||
(defun client-config (&optional frame)
|
||||
"Establish settings for the current terminal."
|
||||
(if (not frame) ;; The initial call.
|
||||
(xterm-mouse-mode 1)
|
||||
;; Otherwise called via after-make-frame-functions.
|
||||
(if xterm-mouse-mode
|
||||
;; Re-initialise the mode in case of a new terminal.
|
||||
(xterm-mouse-mode 1))))
|
||||
;; Evaluate both now (for non-daemon emacs) and upon frame creation
|
||||
;; (for new terminals via emacsclient).
|
||||
(client-config)
|
||||
(add-hook 'after-make-frame-functions 'client-config)
|
||||
|
||||
(defun toggle-current-window-dedication ()
|
||||
(interactive)
|
||||
(let* ((window (selected-window))
|
||||
(dedicated (window-dedicated-p window)))
|
||||
(set-window-dedicated-p window (not dedicated))
|
||||
(message "Window %sdedicated to %s"
|
||||
(if dedicated "no longer " "")
|
||||
(buffer-name))))
|
||||
|
||||
(global-set-key [insert] 'toggle-current-window-dedication)
|
||||
|
||||
|
||||
;; Disable copying to the clipboard
|
||||
;; (setq x-select-enable-clipboard nil)
|
||||
;; (setq x-select-enable-primary t)
|
||||
|
||||
;;; Show human sizes in dired
|
||||
(setq-default dired-listing-switches "-alhv")
|
||||
|
||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||
|
||||
;;; Winner
|
||||
;;; History of visited windows
|
||||
;;; C-<left>, C-<right>
|
||||
(when (fboundp 'winner-mode)
|
||||
(winner-mode 1))
|
||||
|
||||
(exec-path-from-shell-initialize)
|
||||
|
||||
(require 'git-gutter-fringe)
|
||||
(setq git-gutter-fr:side 'right-fringe)
|
||||
|
||||
;; set a default font
|
||||
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-10"))
|
||||
;; emacs doesn't actually save undo history with revert-buffer
|
||||
;; see http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-04/msg00151.html
|
||||
;; fix that.
|
||||
(defun revert-buffer-keep-history (&optional IGNORE-AUTO NOCONFIRM PRESERVE-MODES)
|
||||
(interactive)
|
||||
|
||||
(setq tmp (point))
|
||||
;; tell Emacs the modtime is fine, so we can edit the buffer
|
||||
(clear-visited-file-modtime)
|
||||
|
||||
;; insert the current contents of the file on disk
|
||||
(widen)
|
||||
(delete-region (point-min) (point-max))
|
||||
(insert-file-contents (buffer-file-name))
|
||||
|
||||
;; mark the buffer as not modified
|
||||
(not-modified)
|
||||
(set-visited-file-modtime)
|
||||
(goto-char tmp)
|
||||
)
|
||||
|
||||
(setq revert-buffer-function 'revert-buffer-keep-history)
|
||||
|
||||
(require 'recentf)
|
||||
(recentf-mode 1)
|
||||
(setq recentf-max-saved-items 300)
|
||||
(setq recentf-max-menu-items 20)
|
||||
|
||||
|
||||
(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))
|
||||
(setq tramp-default-method "ssh")
|
||||
(provide '.emacs)
|
8
emacs/.emacs.d/.gitignore
vendored
Normal file
8
emacs/.emacs.d/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
history
|
||||
ac-comphist.dat
|
||||
elpa
|
||||
auto-save-list
|
||||
projectile-bookmarks.eld
|
||||
quelpa
|
||||
recentf
|
||||
custom.el
|
@ -134,6 +134,11 @@
|
||||
(use-package helm-grep)
|
||||
(use-package helm-locate)
|
||||
(use-package helm-misc)
|
||||
(use-package helm-descbinds
|
||||
:config (progn
|
||||
(helm-descbinds-mode)
|
||||
)
|
||||
)
|
||||
(use-package helm-projectile :ensure
|
||||
:config (progn
|
||||
(setq projectile-completion-system 'helm)
|
||||
@ -358,7 +363,6 @@
|
||||
|
||||
(use-package gist
|
||||
:config (progn
|
||||
(use-package gist-helm :ensure t)
|
||||
)
|
||||
)
|
||||
|
||||
@ -373,9 +377,49 @@
|
||||
)
|
||||
)
|
||||
|
||||
(use-package paredit
|
||||
:diminish paredit-mode
|
||||
:init
|
||||
:config (progn
|
||||
(use-package evil-paredit
|
||||
(add-hook 'clojure-mode-hook 'enable-paredit-mode)
|
||||
(add-hook 'cider-repl-mode-hook 'enable-paredit-mode)
|
||||
(add-hook 'lisp-mode-hook 'enable-paredit-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)
|
||||
(add-hook 'lisp-interaction-mode-hook 'enable-paredit-mode)
|
||||
(add-hook 'ielm-mode-hook 'enable-paredit-mode)
|
||||
(add-hook 'json-mode-hook 'enable-paredit-mode)
|
||||
:ensure
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;;; Global emacs settings
|
||||
;; disable splash screen
|
||||
(setq inhibit-splash-screen t)
|
||||
(setq initial-scratch-message "\
|
||||
;;
|
||||
;; _.--. .--._
|
||||
;; .\" .\" \". \".
|
||||
;; ; .\" /\\ \". ;
|
||||
;; ; '._,-/ \\-,_.` ;
|
||||
;; \\ ,` / /\\ \\ `, /
|
||||
;; \\/ \\/ \\/ \\/
|
||||
;; ,=_ \\/\\/ _=,
|
||||
;; | \"_ \\/ _\" |
|
||||
;; |_ '\"-..-\"' _|
|
||||
;; | \"-. .-\" |
|
||||
;; | \"\\ /\" |
|
||||
;; | | | |
|
||||
;; ___ | | | | ___
|
||||
;; _,-\", \", '_ | | _' ,\" ,\"-,_
|
||||
;; _( \\ \\ \\\"=--\"-. | | .-\"--=\"/ / / )_
|
||||
;; ,\" \\ \\ \\ \\ \"-'--'-\" / / / / \".
|
||||
;;! \\ \\ \\ \\ / / / / !
|
||||
;;: \\ \\ \\ \\ / / / / TK
|
||||
;;
|
||||
;; 'TIS BUT A SCRATCH!!
|
||||
")
|
||||
(setq truncate-partial-width-windows nil)
|
||||
(set-default 'truncate-lines nil)
|
||||
;;; Highlight line
|
||||
@ -384,6 +428,7 @@
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq tab-width 4)
|
||||
(setq default-tab-width 4);
|
||||
(setq js-indent-level 2)
|
||||
|
||||
(toggle-indicate-empty-lines)
|
||||
|
||||
|
@ -32,6 +32,9 @@ bindsym Control+Mod1+g exec --no-startup-id i3-one-instance gvim
|
||||
bindsym Control+Mod1+e exec --no-startup-id myemacs -c
|
||||
bindsym $mod+o exec --no-startup-id i3-winmenu.py
|
||||
bindsym $mod+p [instance="pcmanfm"] scratchpad show
|
||||
bindsym $mod+period [instance="emacs" title="^(?!myagenda$)"] scratchpad show
|
||||
bindsym $mod+shift+comma exec --no-startup-id myemacs -nc --eval '(progn (find-file "~/Dropbox/Todo/org/rules.org") (org-agenda-list) (set-window-dedicated-p (selected-window) 1) (set-frame-name "myagenda"))'
|
||||
bindsym $mod+comma [title="^myagenda"] scratchpad show
|
||||
|
||||
# Spotify
|
||||
bindsym XF86AudioPlay exec --no-startup-id spotify-remote.py -a playPause
|
||||
@ -119,7 +122,7 @@ bindsym $mod+i focus mode_toggle
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# Show the first scratchpad window
|
||||
bindsym $mod+minus scratchpad show
|
||||
bindsym $mod+minus [instance="*"] scratchpad show
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+u focus parent
|
||||
@ -235,13 +238,14 @@ client.urgent #2f343a #101010 #93a1a1 #900000
|
||||
|
||||
new_window 1pixel
|
||||
|
||||
for_window [title="^myagenda"] move to scratchpad
|
||||
for_window [class="^Google-chrome$"] border none
|
||||
assign [class="Google-chrome" window_role="browser"] 2: Web
|
||||
for_window [class="^Firefox$"] border none
|
||||
assign [class="Firefox" window_role="browser"] 2: Web
|
||||
for_window [class="^Xfce4-notifyd$"] floating enable; border none; focus mode_toggle
|
||||
for_window [class="^URxvt$"] border 1px
|
||||
for_window [title="^tmux$"] move to scratchpad;
|
||||
for_window [title="^tmux$"] move to scratchpad
|
||||
for_window [title="^pcmanfm$"] move to scratchpad;
|
||||
#KDE
|
||||
for_window [class="Plasma-desktop"] border none
|
||||
@ -297,6 +301,7 @@ bindsym $mod+Escape exec xfce4-session-logout
|
||||
exec --no-startup-id dunst -conf ~/.config/dunst/dunst.conf
|
||||
exec --no-startup-id xfce4-power-manager
|
||||
exec --no-startup-id pasystray
|
||||
exec --no-startup-id syncthing-gtk
|
||||
exec --no-startup-id dropbox start
|
||||
exec --no-startup-id nitrogen --restore
|
||||
exec --no-startup-id compton -b --config ~/.compton.conf
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/bin/sh
|
||||
emacsclient --alternate-editor="" -s "$HOME/.emacs.d/HIGHLANDER" $@
|
||||
emacsclient --alternate-editor="" -s "$HOME/.emacs.d/HIGHLANDER" "$@"
|
||||
|
1
vim/.vim/.gitignore
vendored
1
vim/.vim/.gitignore
vendored
@ -1 +1,2 @@
|
||||
Session.vim
|
||||
bundle
|
||||
|
@ -74,6 +74,9 @@ if [[ ! -d "$TMPDIR" ]]; then
|
||||
mkdir -p -m 700 "$TMPDIR"
|
||||
fi
|
||||
|
||||
# Handy aliases
|
||||
alias fail="less +F"
|
||||
|
||||
# Docker goodies
|
||||
alias drm="docker rm"
|
||||
alias drun="docker run"
|
||||
|
Loading…
Reference in New Issue
Block a user