;;; ModelineCubes --- The modeline related cubes for FG42 -*- lexical-binding: t; -*- ;; ;; Copyright (c) 2010-2021 Sameer Rahmani & Contributors ;; ;; Author: Sameer Rahmani ;; URL: https://gitlab.com/FG42/FG42 ;; Version: 3.0.0 ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;; ;;; Commentary: ;;; Code: (require 'fpkg) (require 'fg42/cube) ;; TODO: Break this into two cubes (defcube fg42/modeline-cube "Modeline cube" (:title "Mini modeline" :flag mini-mode-line :group modeline :flag-default t) (defun fg42/mini-modeline-setter (def) (setq-default mini-modeline-l-format (plist-get def :long)) (setq-default mini-modeline-r-format (plist-get def :brief))) (fpkg/use smart-mode-line :straight (smart-mode-line :source melpa) :defer nil :init (progn (setq sml/theme 'respectful) (setq sml/no-confirm-load-theme t) (sml/setup))) (fpkg/use mini-modeline :straight (mini-modeline :repo "kiennq/emacs-mini-modeline" :host github :type git) :after smart-mode-line :init (progn (setq mini-modeline-enhance-visual nil) (setq fg42/modeline-setter #'fg42/mini-modeline-setter)) :defer nil :config (add-hook 'fg42-after-init-hook #'mini-modeline-mode))) (defcube fg42/statusbar-cube "Status bar replaces the default mode line aned merges with the mini buffer to provide a minimal interface for displaying valuable information." (:title "Status bar cube" :flag status-bar :group modeline :flag-default t) (defun fg42/statusbar-setter (def) (setq-default fg42/statusbar-components (plist-get def :brief))) (setq fg42/modeline-setter #'fg42/statusbar-setter) (add-hook 'fg42-after-init-hook (lambda () (require 'fg42/statusbar) (fg42/statusbar-mode t)))) (provide 'cubes/modeline) ;;; modeline.el ends here