10 changed files with 191 additions and 86 deletions
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
;;; IconsCubes --- The modeline related cubes for FG42 -*- lexical-binding: t; -*- |
||||
;; |
||||
;; Copyright (c) 2010-2021 Sameer Rahmani & Contributors |
||||
;; |
||||
;; Author: Sameer Rahmani <lxsameer@gnu.org> |
||||
;; 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 <http://www.gnu.org/licenses/>. |
||||
;; |
||||
;;; Commentary: |
||||
;;; Code: |
||||
(require 'fpkg) |
||||
(require 'fg42/cube) |
||||
|
||||
|
||||
;; TODO: Break this into two cubes |
||||
(defcube fg42/all-the-icons-cube |
||||
"Install the [[https://github.com/domtronn/all-the-icons.el][all-the-icons.el]] |
||||
package." |
||||
(:title "All the icons cube" |
||||
:flag all-the-icons |
||||
:flag-default t) |
||||
|
||||
(fpkg/use all-the-icons |
||||
:if (display-graphic-p))) |
||||
|
||||
|
||||
(provide 'cubes/icons) |
||||
;;; icons.el ends here |
@ -1,56 +0,0 @@
@@ -1,56 +0,0 @@
|
||||
;;; ModelineCubes --- The modeline related cubes for FG42 -*- lexical-binding: t; -*- |
||||
;; |
||||
;; Copyright (c) 2010-2021 Sameer Rahmani & Contributors |
||||
;; |
||||
;; Author: Sameer Rahmani <lxsameer@gnu.org> |
||||
;; 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 <http://www.gnu.org/licenses/>. |
||||
;; |
||||
;;; Commentary: |
||||
;;; Code: |
||||
(require 'doom-modeline) |
||||
(require 'mini-modeline) |
||||
|
||||
|
||||
(defun fg42/setup-mini-modeline () |
||||
"Setup the doom modeline to work with mini modeline." |
||||
;; (add-hook 'minibuffer-inactive-mode-hook |
||||
;; (lambda () |
||||
;; (make-local-variable 'face-remapping-alist) |
||||
;; (add-to-list 'face-remapping-alist '(default (:background "#21252b"))))) |
||||
|
||||
(doom-modeline-def-modeline 'minibuffer-line |
||||
'(modals |
||||
workspace-name |
||||
window-number |
||||
matches |
||||
buffer-info |
||||
remote-host |
||||
buffer-position |
||||
word-count |
||||
selection-info) |
||||
'(misc-info major-mode process vcs lsp checker " \n")) |
||||
|
||||
(setq mini-modeline-r-format '(:eval (doom-modeline-format--minibuffer-line))) |
||||
(setq mini-modeline-right-padding 1 |
||||
mini-modeline-enhance-visual nil) |
||||
(set-face-attribute 'mode-line nil :box nil) |
||||
(set-face-attribute 'mini-modeline-mode-line nil :background (face-background 'modus-theme-intense-blue) :height 0.2) |
||||
(set-face-attribute 'mini-modeline-mode-line-inactive nil :background (face-background 'fringe) :height 0.2)) |
||||
|
||||
|
||||
(provide 'cubes/modeline/setup) |
||||
;;; setup.el ends here |
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*- |
||||
;; |
||||
;; Copyright (c) 2010-2022 Sameer Rahmani <lxsameer@gnu.org> |
||||
;; |
||||
;; Author: Sameer Rahmani <lxsameer@gnu.org> |
||||
;; 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 <http://www.gnu.org/licenses/>. |
||||
;; |
||||
;;; Commentary: |
||||
;;; Code: |
||||
(require 'fg42/modeline) |
||||
(require 'fg42/statusbar) |
||||
|
||||
|
||||
(defbar-unit battery 30 "B-" |
||||
(format "B%s" (with-temp-buffer |
||||
(insert-file-contents "/sys/class/power_supply/BAT0/capacity") |
||||
(buffer-string)))) |
||||
|
||||
;; The default modeline for FG42 that is compatible with |
||||
;; the FG42's status bar only |
||||
(defmode-line fg42/statusbar-default |
||||
(if (display-graphic-p) |
||||
(progn |
||||
;; We are in the graphical world |
||||
(require 'all-the-icons) |
||||
|
||||
(list |
||||
:brief (list |
||||
'battery |
||||
"|" '(buffer-name) "|" '(format-mode-line "%l:%c") "|" '(format-time-string "%m-%d %H:%M")) |
||||
:long " ")) |
||||
;; No GUI |
||||
(list |
||||
:brief (list) |
||||
:long ""))) |
||||
|
||||
|
||||
(provide 'fg42/modeline/statusbar-default) |
||||
;;; statusbar-default.el ends here |
Loading…
Reference in new issue