Advertisement
Guest User

Untitled

a guest
Feb 27th, 2021
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 3.92 KB | None | 0 0
  1. ; CCCPmacs specific stuff follows
  2. (defun cccp ()
  3.   (let* ((banner '("          ▀▀▀██████▄▄▄          "
  4.                    "                 ▀▀▀████▄       "
  5.                    "          ▄███████▀   ▀███▄     "
  6.                    "        ▄███████▀       ▀███▄   "
  7.                    "      ▄████████           ███▄  "
  8.                    "     ██████████▄           ███▌ "
  9.                    "     ▀█████▀ ▀███▄         ▐███ "
  10.                    "       ▀█▀     ▀███▄       ▐███ "
  11.                    "                 ▀███▄     ███▌ "
  12.                    "    ▄██▄           ▀███▄  ▐███  "
  13.                    "  ▄██████▄           ▀███▄███   "
  14.                    " █████▀▀████▄▄        ▄█████    "
  15.                    " ████▀   ▀▀█████▄▄▄▄█████████▄  "
  16.                    "  ▀▀         ▀▀██████▀▀   ▀▀██  "))
  17.          (longest-line (apply #'max (mapcar #'length banner))))
  18.     (put-text-property
  19.      (point)
  20.      (dolist (line banner (point))
  21.        (insert (+doom-dashboard--center
  22.                 +doom-dashboard--width
  23.                 (concat line (make-string (max 0 (- longest-line (length line))) 32)))
  24.                "\n"))
  25.      'face 'doom-dashboard-banner)))
  26.  
  27. (setq +doom-dashboard-ascii-banner-fn #'cccp)
  28.  
  29. (custom-set-faces!
  30.   '(doom-dashboard-banner :foreground "red" )
  31.   )
  32. (custom-set-faces! '(doom-dashboard-menu-title :foreground "red"))
  33. (custom-set-faces! '(doom-dashboard-menu-desc :foreground "red"))
  34.  
  35. ; Fancy hammer and sickle
  36. (setq fancy-splash-image (concat doom-private-dir "cccp300px.png"))
  37.  
  38. (setq +doom-dashboard-menu-sections
  39.  '(("возобновить"
  40.     :icon  (all-the-icons-faicon "star" :face 'doom-dashboard-menu-title)
  41.     :when (cond ((featurep! :ui workspaces)
  42.                  (file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir)))
  43.                 ((require 'desktop nil t)
  44.                  (file-exists-p (desktop-full-file-name))))
  45.     :face (:inherit (doom-dashboard-menu-title bold))
  46.     :action doom/quickload-session)
  47.    ("Советская повестка дня"
  48.     :icon (all-the-icons-faicon "globe" :face 'doom-dashboard-menu-title)
  49.     :when (fboundp 'org-agenda)
  50.     :action org-agenda)
  51.    ("Недавний"
  52.     :icon (all-the-icons-octicon "file-text" :face 'doom-dashboard-menu-title)
  53.     :action recentf-open-files)
  54.    ("Запустить миссию"
  55.     :icon (all-the-icons-faicon "space-shuttle" :face 'doom-dashboard-menu-title)
  56.     :action projectile-switch-project)
  57.    ("Закладки"
  58.     :icon (all-the-icons-octicon "bookmark" :face 'doom-dashboard-menu-title)
  59.     :action bookmark-jump)
  60.    ("Управление реактором"
  61.     :icon (all-the-icons-alltheicon "atom" :face 'doom-dashboard-menu-title)
  62.     :when (file-directory-p doom-private-dir)
  63.     :action doom/open-private-config)
  64.    ("Конституция СССР"
  65.     :icon (all-the-icons-octicon "book" :face 'doom-dashboard-menu-title)
  66.     :action info-emacs-manual))
  67.  )
  68.  
  69. (defun doom-display-benchmark-h (&optional return-p)
  70.   "Display a benchmark including number of packages and modules loaded.
  71.  
  72. If RETURN-P, return the message as a string instead of displaying it."
  73.   (funcall (if return-p #'format #'message)
  74.            "CCCPmacs executed %d fascists across %d oblasts in %.03fs"
  75.            (- (length load-path) (length doom--initial-load-path))
  76.            (if doom-modules (hash-table-count doom-modules) 0)
  77.            (or doom-init-time
  78.                (setq doom-init-time
  79.                      (float-time (time-subtract (current-time) before-init-time))))))
  80.  
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement