fix theme when running as daemon

ご主人様
not manx 4 years ago
parent 3d03663547
commit c2b3a17c27
Signed by: C-xC-c
GPG Key ID: F52ED472284EF2F4

@ -157,7 +157,9 @@
(add-to-list 'org-structure-template-alist '("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"))
(setq org-src-tab-acts-natively t
org-edit-src-content-indentation 0)
org-edit-src-content-indentation 0
org-src-preserve-indentation nil
org-agenda-files '("~/todo.org"))
(setq org-html-doctype "html5")
@ -200,12 +202,13 @@
(switch-to-buffer (get-buffer-create "*scratch*"))
(lisp-interaction-mode))
(definteractive manx/kill-all ()
(mapc 'kill-buffer (buffer-list))
(manx/scratch-buffer))
(global-set-key (kbd "C-c s b") 'manx/scratch-buffer)
(global-set-key (kbd "C-x k") (lambdainteractive () (kill-buffer (current-buffer))))
(global-set-key (kbd "C-M-s-k")
(lambdainteractive ()
(mapc 'kill-buffer (buffer-list))
(manx/scratch-buffer)))
(global-set-key (kbd "C-M-s-k") 'manx/kill-all)
(defmacro manx/split-and-follow (direction)
`(progn
@ -218,6 +221,11 @@
(global-set-key (kbd "C-x 2")
(lambdainteractive () (manx/split-and-follow (split-window-horizontally))))
(definteractive manx/theme ()
"Themes don't load properly when using emacsclient"
(load-theme 'spacemacs-dark)
(spaceline-compile))
(defun unix-line-ends ()
(when (string-match
"-\\(?:dos\\|mac\\)$"
@ -272,7 +280,8 @@
(global-prettify-symbols-mode t)
(defmacro manx/prettify (lst)
`(add-hook (quote ,(car lst))
`(add-hook
(quote ,(car lst))
(lambda ()
(dolist (pair (quote ,(cdr lst)))
(push pair prettify-symbols-alist)))))

@ -6,19 +6,19 @@ Wrappers around functions and lambdas so I don't have to type
I have ~prettify-symbols-mode~ set ~lambdainteractive~ to Λ (capital lambda) because it's cute.
#+BEGIN_SRC emacs-lisp
(defmacro definteractive (name &rest body)
(defmacro definteractive (name &rest body)
`(defun ,name ,(car body)
(interactive)
,@(cdr body)))
(defmacro lambdainteractive (&rest body)
(defmacro lambdainteractive (&rest body)
`(lambda ,(car body) (interactive) ,@(cdr body)))
#+END_SRC
** local-keybind
Hide unecessary lambda when calling (local-set-key) for org-mode
functions
#+BEGIN_SRC emacs-lisp
(defmacro local-keybind (key value)
(defmacro local-keybind (key value)
`(lambda () (local-set-key (kbd ,key) (quote ,value))))
#+END_SRC
* use-package
@ -30,7 +30,7 @@ Always ensure packages are installed. Log to ~*Messages*~.
#+END_SRC
** keychain-environment
#+BEGIN_SRC emacs-lisp
(use-package keychain-environment
(use-package keychain-environment
:bind ("C-c r e" . 'keychain-refresh-environment)
:init (keychain-refresh-environment))
#+END_SRC
@ -40,11 +40,11 @@ Always ensure packages are installed. Log to ~*Messages*~.
#+END_SRC
** diminish
#+BEGIN_SRC emacs-lisp
(use-package diminish)
(use-package diminish)
#+END_SRC
** company
#+BEGIN_SRC emacs-lisp
(use-package company
(use-package company
:diminish 'company-mode
:bind (:map company-mode-map
("C-c /" . 'yas-expand))
@ -56,7 +56,7 @@ Always ensure packages are installed. Log to ~*Messages*~.
** prog
*** c#
#+BEGIN_SRC emacs-lisp
(use-package csharp-mode
(use-package csharp-mode
:defer t
:config
(use-package omnisharp
@ -67,7 +67,7 @@ Always ensure packages are installed. Log to ~*Messages*~.
#+END_SRC
*** elixir
#+BEGIN_SRC emacs-lisp
(use-package elixir-mode
(use-package elixir-mode
:defer t
:config (use-package alchemist))
#+END_SRC
@ -82,7 +82,7 @@ Always ensure packages are installed. Log to ~*Messages*~.
*** slime
sbcl is in a werid place on Gentoo.
#+BEGIN_SRC emacs-lisp
(use-package slime
(use-package slime
:defer t
:custom
(slime-lisp-implementations
@ -96,7 +96,7 @@ sbcl is in a werid place on Gentoo.
#+END_SRC
*** htmlize
#+BEGIN_SRC emacs-lisp
(use-package htmlize)
(use-package htmlize)
#+END_SRC
** yasnippet
#+BEGIN_SRC emacs-lisp
@ -113,7 +113,7 @@ sbcl is in a werid place on Gentoo.
#+END_SRC
** dashboard
#+BEGIN_SRC emacs-lisp
(use-package dashboard
(use-package dashboard
:diminish (dashboard-mode page-break-lines-mode)
:custom
(dashboard-center-content t)
@ -124,7 +124,7 @@ sbcl is in a werid place on Gentoo.
(dashboard-items '((recents . 5)))
:config (dashboard-setup-startup-hook))
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
#+END_SRC
** windows and frames
*** transpose-frame
@ -137,7 +137,7 @@ sbcl is in a werid place on Gentoo.
#+END_SRC
*** switch window
#+BEGIN_SRC emacs-lisp
(use-package switch-window
(use-package switch-window
:custom
(switch-window-input-style 'minibuffer)
(switch-window-increase 4)
@ -146,11 +146,11 @@ sbcl is in a werid place on Gentoo.
#+END_SRC
*** ido
#+BEGIN_SRC emacs-lisp
(setq ido-enable-flex-matching t
(setq ido-enable-flex-matching t
ido-create-new-buffer 'always
ido-everywhere 1)
(use-package ido-vertical-mode
(use-package ido-vertical-mode
:bind ("C-l" . 'ido-reread-directory)
:custom (ido-vertical-define-keys 'C-n-and-C-p-only)
:config
@ -223,18 +223,20 @@ Also saves config if open. manx/emacs-org is defined in [[./init.el][init.el]]
(add-to-list 'org-structure-template-alist '("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"))
(setq org-src-tab-acts-natively t
org-edit-src-content-indentation 0)
org-edit-src-content-indentation 0
org-src-preserve-indentation nil
org-agenda-files '("~/todo.org"))
#+END_SRC
** html export
#+BEGIN_SRC emacs-lisp
(setq org-html-doctype "html5")
(setq org-html-doctype "html5")
(definteractive manx/save-org-to-html()
(definteractive manx/save-org-to-html()
(when (equal major-mode 'org-mode)
(save-buffer)
(org-html-export-to-html)))
(add-hook 'org-mode-hook
(add-hook 'org-mode-hook
(local-keybind "C-c s h" manx/save-org-to-html))
#+END_SRC
** Links
@ -277,12 +279,13 @@ Also saves config if open. manx/emacs-org is defined in [[./init.el][init.el]]
(switch-to-buffer (get-buffer-create "*scratch*"))
(lisp-interaction-mode))
(definteractive manx/kill-all ()
(mapc 'kill-buffer (buffer-list))
(manx/scratch-buffer))
(global-set-key (kbd "C-c s b") 'manx/scratch-buffer)
(global-set-key (kbd "C-x k") (lambdainteractive () (kill-buffer (current-buffer))))
(global-set-key (kbd "C-M-s-k")
(lambdainteractive ()
(mapc 'kill-buffer (buffer-list))
(manx/scratch-buffer)))
(global-set-key (kbd "C-M-s-k") 'manx/kill-all)
#+END_SRC
** frames
#+BEGIN_SRC emacs-lisp
@ -297,25 +300,32 @@ Also saves config if open. manx/emacs-org is defined in [[./init.el][init.el]]
(global-set-key (kbd "C-x 2")
(lambdainteractive () (manx/split-and-follow (split-window-horizontally))))
#+END_SRC
** windows
#+BEGIN_SRC emacs-lisp
(definteractive manx/theme ()
"Themes don't load properly when using emacsclient"
(load-theme 'spacemacs-dark)
(spaceline-compile))
#+END_SRC
* misc
** unix line endings
#+BEGIN_SRC emacs-lisp
(defun unix-line-ends ()
(defun unix-line-ends ()
(when (string-match
"-\\(?:dos\\|mac\\)$"
(symbol-name buffer-file-coding-system))
(set-buffer-file-coding-system 'unix)))
(add-hook 'find-file-hooks 'unix-line-ends)
(add-hook 'find-file-hooks 'unix-line-ends)
#+END_SRC
** UTF8
#+BEGIN_SRC emacs-lisp
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
#+END_SRC
** minor things
Things for GUI and basic config, like electric pairs and highlighting
@ -390,13 +400,13 @@ tabs > spaces. Except in Lisp.
#+END_SRC
* sensitive-minor-mode
#+BEGIN_SRC emacs-lisp
(define-minor-mode sensitive-minor-mode
(define-minor-mode sensitive-minor-mode
"For sensitive files like password lists.
It disables backup creation and auto saving.
It disables backup creation and auto saving.
With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode."
With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode."
:init-value nil
:lighter " Sensitive"
:keymap nil
@ -408,8 +418,8 @@ tabs > spaces. Except in Lisp.
(auto-save-mode 1)))
;; Regexps of sensitive files.
(setq auto-minor-mode-alist
;; Regexps of sensitive files.
(setq auto-minor-mode-alist
(append
'(("stream/manifest/.*\\.json$" . sensitive-minor-mode)
(".emacs.d/snippets/\\*$" . sensitive-minor-mode)

@ -4,34 +4,9 @@
;; 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.
'(TeX-engine (quote xetex))
'(company-idle-delay 0)
'(company-minimum-prefix-length 3)
'(custom-enabled-themes (quote (spacemacs-dark)))
'(custom-safe-themes
(quote
("bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" default)))
'(dashboard-banner-logo-title "Komacs")
'(dashboard-center-content t)
'(dashboard-items (quote ((recents . 5))))
'(dashboard-set-init-info t)
'(dashboard-show-shortcuts nil)
'(dashboard-startup-banner "~/.emacs.d/Komacs.png")
'(ido-vertical-define-keys (quote C-n-and-C-p-only))
'(nginx-indent-level 2)
'(nginx-indent-tabs-mode t)
'(package-selected-packages
(quote
(transpose-frame auto-minor-mode htmlize alchemist elixir-mode nginx-mode yasnippet-snippets which-key use-package switch-window spacemacs-theme spaceline slime-company popup-kill-ring omnisharp keychain-environment ido-vertical-mode hungry-delete diminish dashboard company-auctex beacon avy)))
'(slime-lisp-implementations
(quote
((sbcl
("sbcl" "--core" "/usr/lib64/sbcl/sbcl.core")
:env
("SBCL_HOME=/usr/lib64/sbcl/")))) t)
'(switch-window-increase 4 t)
'(switch-window-input-style (quote minibuffer))
'(switch-window-threshold 2))
("bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" 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.

@ -6,13 +6,12 @@
(package-initialize)
(unless (package-installed-p 'use-package)
(defun check-installed (package)
(unless (package-installed-p package)
(package-refresh-contents)
(package-install 'use-package))
(package-install package)))
(unless (package-installed-p 'spacemacs-theme)
(package-refresh-contents)
(package-install 'spacemacs-theme))
(mapc 'check-installed '(use-package spacemacs-theme))
(defun in-emacs-home (file)
"Checks if a file exists in your emacs home"
@ -33,4 +32,5 @@
(org-babel-load-file manx/emacs-org)
(load manx/emacs-el 'noerror))
(load custom-file 'noerrror)
(load manx/emacs-email 'noerror))
(load manx/emacs-email 'noerror)) ;; and this are needed when using emacsclient

Loading…
Cancel
Save