feat(emacs): conditions for pntk

This commit is contained in:
Pavel Korytov 2020-12-31 09:48:31 +03:00
parent e4bbb752a0
commit ac499424a9
2 changed files with 30 additions and 8 deletions

View file

@ -22,6 +22,10 @@
(straight-use-package 'use-package) (straight-use-package 'use-package)
(eval-when-compile (require 'use-package)) (eval-when-compile (require 'use-package))
#+end_src #+end_src
** System
#+begin_src emacs-lisp
(setq my/lowpower (string= (system-name) "pntk"))
#+end_src
** Load user files ** Load user files
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defconst user-init-dir (defconst user-init-dir
@ -79,7 +83,7 @@
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package which-key (use-package which-key
:config :config
(setq which-key-idle-delay 0.3) (setq which-key-idle-delay (if my/lowpower 1 0.3))
(setq which-key-popup-type 'frame) (setq which-key-popup-type 'frame)
(which-key-mode) (which-key-mode)
(which-key-setup-side-window-bottom) (which-key-setup-side-window-bottom)
@ -163,7 +167,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package evil-collection (use-package evil-collection
:straight t :straight t
:config :config
(evil-collection-init '(eww dired dasboard company vterm flycheck ebuku))) (evil-collection-init '(eww dired company vterm flycheck profiler)))
(use-package evil-quickscope (use-package evil-quickscope
:straight t :straight t
@ -191,6 +195,9 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(my-leader-def "?" 'which-key-show-top-level) (my-leader-def "?" 'which-key-show-top-level)
(my-leader-def "E" 'eval-expression) (my-leader-def "E" 'eval-expression)
(my-leader-def "Ps" 'profiler-start)
(my-leader-def "Pe" 'profiler-stop)
(my-leader-def "Pp" 'profiler-report)
#+end_src #+end_src
*** Help *** Help
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -424,11 +431,12 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
:straight t :straight t
:config :config
(global-company-mode) (global-company-mode)
(setq company-idle-delay 0.125) (setq company-idle-delay (if my/lowpower 0.5 0.125))
(setq company-show-numbers t)) (setq company-show-numbers t))
(use-package company-box (use-package company-box
:straight t :straight t
:if (not my/lowpower)
:hook (company-mode . company-box-mode)) :hook (company-mode . company-box-mode))
(general-imap "C-SPC" 'company-complete) (general-imap "C-SPC" 'company-complete)
@ -613,6 +621,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package all-the-icons-dired (use-package all-the-icons-dired
:straight t :straight t
:if (not my/lowpower)
:config :config
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)) (add-hook 'dired-mode-hook 'all-the-icons-dired-mode))
@ -948,10 +957,11 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(setq doom-modeline-minor-modes nil) (setq doom-modeline-minor-modes nil)
(setq doom-modeline-buffer-state-icon nil)) (setq doom-modeline-buffer-state-icon nil))
#+end_src #+end_src
** Emoji ** CHECK Emoji
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package emojify (use-package emojify
:straight t :straight t
:if (not my/lowpower)
:hook (after-init . global-emojify-mode)) :hook (after-init . global-emojify-mode))
#+end_src #+end_src
** Icons ** Icons
@ -959,7 +969,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package all-the-icons (use-package all-the-icons
:straight t) :straight t)
#+end_src #+end_src
** Dashboard ** OFF Dashboard
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; (use-package dashboard ;; (use-package dashboard
;; :straight t ;; :straight t
@ -994,6 +1004,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package highlight-indent-guides (use-package highlight-indent-guides
:straight t :straight t
:if (not my/lowpower)
:hook ( :hook (
(prog-mode . highlight-indent-guides-mode) (prog-mode . highlight-indent-guides-mode)
(vue-mode . highlight-indent-guides-mode) (vue-mode . highlight-indent-guides-mode)
@ -1004,6 +1015,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package rainbow-delimiters (use-package rainbow-delimiters
:straight t :straight t
:if (not my/lowpower)
:config :config
(add-hook 'org-mode-hook #'rainbow-delimiters-mode) (add-hook 'org-mode-hook #'rainbow-delimiters-mode)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)) (add-hook 'prog-mode-hook #'rainbow-delimiters-mode))

View file

@ -14,6 +14,8 @@
(straight-use-package 'use-package) (straight-use-package 'use-package)
(eval-when-compile (require 'use-package)) (eval-when-compile (require 'use-package))
(setq my/lowpower (string= (system-name) "pntk"))
(defconst user-init-dir (defconst user-init-dir
(cond ((boundp 'user-emacs-directory) (cond ((boundp 'user-emacs-directory)
user-emacs-directory) user-emacs-directory)
@ -53,7 +55,7 @@
(use-package which-key (use-package which-key
:config :config
(setq which-key-idle-delay 0.3) (setq which-key-idle-delay (if my/lowpower 1 0.3))
(setq which-key-popup-type 'frame) (setq which-key-popup-type 'frame)
(which-key-mode) (which-key-mode)
(which-key-setup-side-window-bottom) (which-key-setup-side-window-bottom)
@ -126,7 +128,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package evil-collection (use-package evil-collection
:straight t :straight t
:config :config
(evil-collection-init '(eww dired dasboard company vterm flycheck ebuku))) (evil-collection-init '(eww dired company vterm flycheck profiler)))
(use-package evil-quickscope (use-package evil-quickscope
:straight t :straight t
@ -151,6 +153,9 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(my-leader-def "?" 'which-key-show-top-level) (my-leader-def "?" 'which-key-show-top-level)
(my-leader-def "E" 'eval-expression) (my-leader-def "E" 'eval-expression)
(my-leader-def "Ps" 'profiler-start)
(my-leader-def "Pe" 'profiler-stop)
(my-leader-def "Pp" 'profiler-report)
(my-leader-def (my-leader-def
:infix "h" :infix "h"
@ -366,11 +371,12 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
:straight t :straight t
:config :config
(global-company-mode) (global-company-mode)
(setq company-idle-delay 0.125) (setq company-idle-delay (if my/lowpower 0.5 0.125))
(setq company-show-numbers t)) (setq company-show-numbers t))
(use-package company-box (use-package company-box
:straight t :straight t
:if (not my/lowpower)
:hook (company-mode . company-box-mode)) :hook (company-mode . company-box-mode))
(general-imap "C-SPC" 'company-complete) (general-imap "C-SPC" 'company-complete)
@ -523,6 +529,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package all-the-icons-dired (use-package all-the-icons-dired
:straight t :straight t
:if (not my/lowpower)
:config :config
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)) (add-hook 'dired-mode-hook 'all-the-icons-dired-mode))
@ -815,6 +822,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package emojify (use-package emojify
:straight t :straight t
:if (not my/lowpower)
:hook (after-init . global-emojify-mode)) :hook (after-init . global-emojify-mode))
(use-package all-the-icons (use-package all-the-icons
@ -849,6 +857,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package highlight-indent-guides (use-package highlight-indent-guides
:straight t :straight t
:if (not my/lowpower)
:hook ( :hook (
(prog-mode . highlight-indent-guides-mode) (prog-mode . highlight-indent-guides-mode)
(vue-mode . highlight-indent-guides-mode) (vue-mode . highlight-indent-guides-mode)
@ -859,6 +868,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package rainbow-delimiters (use-package rainbow-delimiters
:straight t :straight t
:if (not my/lowpower)
:config :config
(add-hook 'org-mode-hook #'rainbow-delimiters-mode) (add-hook 'org-mode-hook #'rainbow-delimiters-mode)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)) (add-hook 'prog-mode-hook #'rainbow-delimiters-mode))