Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; CCCPmacs specific stuff follows
- (defun cccp ()
- (let* ((banner '(" ▀▀▀██████▄▄▄ "
- " ▀▀▀████▄ "
- " ▄███████▀ ▀███▄ "
- " ▄███████▀ ▀███▄ "
- " ▄████████ ███▄ "
- " ██████████▄ ███▌ "
- " ▀█████▀ ▀███▄ ▐███ "
- " ▀█▀ ▀███▄ ▐███ "
- " ▀███▄ ███▌ "
- " ▄██▄ ▀███▄ ▐███ "
- " ▄██████▄ ▀███▄███ "
- " █████▀▀████▄▄ ▄█████ "
- " ████▀ ▀▀█████▄▄▄▄█████████▄ "
- " ▀▀ ▀▀██████▀▀ ▀▀██ "))
- (longest-line (apply #'max (mapcar #'length banner))))
- (put-text-property
- (point)
- (dolist (line banner (point))
- (insert (+doom-dashboard--center
- +doom-dashboard--width
- (concat line (make-string (max 0 (- longest-line (length line))) 32)))
- "\n"))
- 'face 'doom-dashboard-banner)))
- (setq +doom-dashboard-ascii-banner-fn #'cccp)
- (custom-set-faces!
- '(doom-dashboard-banner :foreground "red" )
- )
- (custom-set-faces! '(doom-dashboard-menu-title :foreground "red"))
- (custom-set-faces! '(doom-dashboard-menu-desc :foreground "red"))
- ; Fancy hammer and sickle
- (setq fancy-splash-image (concat doom-private-dir "cccp300px.png"))
- (setq +doom-dashboard-menu-sections
- '(("возобновить"
- :icon (all-the-icons-faicon "star" :face 'doom-dashboard-menu-title)
- :when (cond ((featurep! :ui workspaces)
- (file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir)))
- ((require 'desktop nil t)
- (file-exists-p (desktop-full-file-name))))
- :face (:inherit (doom-dashboard-menu-title bold))
- :action doom/quickload-session)
- ("Советская повестка дня"
- :icon (all-the-icons-faicon "globe" :face 'doom-dashboard-menu-title)
- :when (fboundp 'org-agenda)
- :action org-agenda)
- ("Недавний"
- :icon (all-the-icons-octicon "file-text" :face 'doom-dashboard-menu-title)
- :action recentf-open-files)
- ("Запустить миссию"
- :icon (all-the-icons-faicon "space-shuttle" :face 'doom-dashboard-menu-title)
- :action projectile-switch-project)
- ("Закладки"
- :icon (all-the-icons-octicon "bookmark" :face 'doom-dashboard-menu-title)
- :action bookmark-jump)
- ("Управление реактором"
- :icon (all-the-icons-alltheicon "atom" :face 'doom-dashboard-menu-title)
- :when (file-directory-p doom-private-dir)
- :action doom/open-private-config)
- ("Конституция СССР"
- :icon (all-the-icons-octicon "book" :face 'doom-dashboard-menu-title)
- :action info-emacs-manual))
- )
- (defun doom-display-benchmark-h (&optional return-p)
- "Display a benchmark including number of packages and modules loaded.
- If RETURN-P, return the message as a string instead of displaying it."
- (funcall (if return-p #'format #'message)
- "CCCPmacs executed %d fascists across %d oblasts in %.03fs"
- (- (length load-path) (length doom--initial-load-path))
- (if doom-modules (hash-table-count doom-modules) 0)
- (or doom-init-time
- (setq doom-init-time
- (float-time (time-subtract (current-time) before-init-time))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement