diff --git a/flake.nix b/flake.nix index 7ae93d3..35ae0d1 100644 --- a/flake.nix +++ b/flake.nix @@ -59,7 +59,21 @@ nativeBuildInputs = [ default.fg42 pkgs.fish test-x default.run-test-wm ]; buildInputs = [ default.fg42 ]; }; - }; + apps.wm = { + type = "app"; + program = "${default.run-test-wm}/bin/run-test-wm"; + }; + + apps.x = { + type = "app"; + program = "${test-x}/bin/test-x"; + }; + apps.default = { + type = "app"; + program = "${default.fg42}/bin/fg42"; + }; + + }; }; } diff --git a/lisp/fg42/deps.el b/lisp/fg42/deps.el index 0bc5647..5a7d641 100644 --- a/lisp/fg42/deps.el +++ b/lisp/fg42/deps.el @@ -122,7 +122,8 @@ forge svg-tag-mode base16-theme - consult) + consult + nerd-icons-completion) (provide 'fg42/deps) ;;; deps.el ends here diff --git a/lisp/fg42/minibuffer.el b/lisp/fg42/minibuffer.el index 2bdef3e..16f87c7 100644 --- a/lisp/fg42/minibuffer.el +++ b/lisp/fg42/minibuffer.el @@ -196,5 +196,14 @@ match all of the components in any order." :bind (("M-g e" . consult-compile-error))) +(use! nerd-icons-completion + "Nerd icons in marginalia" + :after marginalia + :config + (nerd-icons-completion-mode) + (add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup)) + + + (provide 'fg42/minibuffer) ;;; minibuffer.el ends here diff --git a/lisp/fg42/modeline.el b/lisp/fg42/modeline.el index 14221be..3594d3c 100644 --- a/lisp/fg42/modeline.el +++ b/lisp/fg42/modeline.el @@ -58,6 +58,7 @@ to Emacs modeline." :commands noether-global-mode :config (require 'noether-views) + (require 'fg42/modeline/views) (let ((active-border (get-base16-color-or :base0A "#bd93f9")) (inactive-border (get-base16-color-or :base03 "#44475a"))) @@ -73,11 +74,9 @@ to Emacs modeline." (if fg42/modeline-inactive-face fg42/modeline-inactive-face 'fg42/-disabled-modeline-dective-border) (default-value 'face-remapping-alist) face-remaps)) + ;; Setup modelines (when-not-wm - (require 'fg42/modeline/views) - - (when-not-wm - (setq-default noether-views (list fg42/modeline)))) + (setq-default noether-views (list fg42/modeline))) (when-wm (setq-default noether-views (list fg42/minimal-exwm)))) diff --git a/lisp/fg42/modeline/units.el b/lisp/fg42/modeline/units.el index 3b4ea13..7900167 100644 --- a/lisp/fg42/modeline/units.el +++ b/lisp/fg42/modeline/units.el @@ -64,9 +64,12 @@ "Set the EXWM input mode for the current buffer." (setq fg42/-exwm-input-mode (format "%s" exwm--input-mode))) + (defun fg42/-format-exwm-input-mode (_ v _ _) "Just return the input mode name V." - v) + (if (=string v "line") + (propertize "L" 'font-lock-face `(:foreground ,(get-base16-color-or :base07 "eeeeec"))) + (propertize "C" 'font-lock-face `(:foreground ,(get-base16-color-or :base0A "eeeeec"))))) (noether-defunit fg42/exwm-input-mode-unit diff --git a/lisp/fg42/modeline/views.el b/lisp/fg42/modeline/views.el index 54c7466..48abff4 100644 --- a/lisp/fg42/modeline/views.el +++ b/lisp/fg42/modeline/views.el @@ -31,6 +31,11 @@ "Keep the modeline at bottom right by using the data from INFO." (cons -1 -1)) +(defun fg42/--bottom-right-padded (info) + "Keep the modeline at bottom right by using the data from INFO." + (message "here") + (cons 20 20)) + (defun fg42/adjust-modeline (view) "Adjust the VIEW after parent frame resize." @@ -69,28 +74,29 @@ (line-unit :label (format "%s " (nerd-icons-codicon "nf-cod-location"))))) -(when-wm - (noether-defview fg42/minimal-exwm - "A super simple bar containing the line number and column number that +(noether-defview fg42/minimal-exwm + "A super simple bar containing the line number and column number that Appears on the center of the current window." - :managed? t - :buffer "*exwm-status*" - :binding (kbd "C-c 3") - :separator "|" - :frame - (list - ;; Such a big numbers for X and Y will cause the frame to appear on the - ;; bottom right corner and covering the minibuffer - :position '(-30 . -1) - :border-width 0 - :timeout 5 - :border-color "#bd93f9") + :managed? t + :buffer "*exwm-status*" + :binding (kbd "C-c 3") + :separator " | " + :visible? t + :timeout 0 + :frame + (list + :poshandler #'fg42/--bottom-right-padded + :border-width 1 + :border-color "#bd93f9") - :units - (list - (fg42/exwm-input-mode-unit :label "") - (buffer-name-unit :label "") - (time-unit :label "")))) + :units + (list + (fg42/exwm-input-mode-unit :label (format "%s " (nerd-icons-faicon "nf-fa-linux"))) + (buffer-name-unit + :label (format "%s " (nerd-icons-codicon "nf-cod-layers")) + :len 30) + + (time-unit :label (format "%s " (nerd-icons-mdicon "nf-md-clock_time_three"))))) (provide 'fg42/modeline/views)