FG42/lisp/fg42/modeline.el

74 lines
2.2 KiB
EmacsLisp

;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*-
;;
;; Copyright (c) 2010-2024 Sameer Rahmani <lxsameer@gnu.org>
;;
;; Author: Sameer Rahmani <lxsameer@gnu.org>
;; URL: https://devheroes.codes/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 <http://www.gnu.org/licenses/>.
;;
;;; Commentary:
;;; Code:
(eval-when-compile
(require 'fpkg))
(defvar fg42/modeline-views nil
"A list of Noether views to use for modeline.")
(defface fg42/-disabled-modeline-active-border
'((t
:background "#bd93f9" :height 0.1 :box nil))
"A new face for modeline in active state."
:group 'fg42)
(defface fg42/-disabled-modeline-dective-border
'((t
:background "#44475a" :height 0.1 :box nil))
"A new face for modeline in active state."
:group 'fg42)
(use! noether
"Smart mode line is a pretty simple yet fantastic alternative
to Emacs modeline."
:if (display-graphic-p)
:after projectile
:config
;;(require 'noether)
(require 'noether-views)
;; Disable the default modeline
(setq-default mode-line-format "")
(let ((face-remaps (default-value 'face-remapping-alist)))
(setf (alist-get 'mode-line face-remaps)
'fg42/-disabled-modeline-active-border
(alist-get 'mode-line-inactive face-remaps)
'fg42/-disabled-modeline-dective-border
(default-value 'face-remapping-alist) face-remaps))
(let ((vs (or fg42/modeline-views
(list
noether-minimal-mode-line
noether-minimal-location
noether-minimal-exwm))))
(setq noether-views vs)
(noether-global-mode)))
(provide 'fg42/modeline)
;;; modeline.el ends here