my nixos configuration
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

better mode line

Thunder 774dde59 97328ee3

+67 -18
+67 -18
home/emacs/config.org
··· 1291 1291 nonl) 1292 1292 "λ ")) 1293 1293 1294 + ;; (setq eshell-banner-message 1295 + ;; (let ((os (with-temp-buffer 1296 + ;; (insert-file-contents "/etc/os-release") 1297 + ;; (goto-char (point-min)) 1298 + ;; (re-search-forward "PRETTY_NAME=\"\\(.*\\)\"") 1299 + ;; (match-string 1)))) 1300 + ;; (concat os "\n\n"))) 1301 + 1294 1302 (defun eshell/nix-shell (&rest args) 1295 1303 (if (member "--run" args) 1296 1304 (eshell-command-result ··· 1329 1337 1330 1338 * Polymode 1331 1339 1332 - #+begin_src emacs-lisp 1340 + #+begin_src emacs-lisp :tangle no 1333 1341 (use-package polymode 1334 1342 :config 1335 1343 (define-hostmode poly-rustic-hostmode :mode 'rustic-mode) ··· 1795 1803 (set-face-attribute face nil 1796 1804 :box `(:line-width (1 . ,vpad) :color ,(face-background face nil t) :style nil) 1797 1805 :height 110)) 1798 - '(mode-line-active mode-line-inactive))) 1806 + '(mode-line-active mode-line-inactive))) 1799 1807 1800 1808 (setq mode-line-format nil) 1801 1809 (kill-local-variable 'mode-line-format) 1802 1810 (force-mode-line-update) 1803 1811 1804 - (setq-default mode-line-format 1805 - `("%e" 1806 - " " 1807 - mode-line-buffer-identification 1808 - " " 1809 - mode-line-position 1810 - " " 1811 - mode-line-modes 1812 - (:eval 1813 - (if (magit-toplevel) 1814 - (propertize (format "  %s" (magit-get-current-branch)) 'face '(:foreground "#cba6f7")) 1815 - "") 1816 - ) 1817 - " " 1818 - "%=" 1819 - (:eval (nyan-create)))) 1812 + (let* ((flavor (alist-get catppuccin-flavor catppuccin-flavor-alist)) 1813 + (text (alist-get 'text flavor)) 1814 + (green (alist-get 'green flavor)) 1815 + (red (alist-get 'red flavor)) 1816 + (yellow (alist-get 'yellow flavor)) 1817 + (mauve (alist-get 'mauve flavor))) 1818 + (setq-default mode-line-format 1819 + `( 1820 + " " 1821 + (:eval 1822 + (propertize "%b" 'face 'bold)) 1823 + " L%l" ;; line number 1824 + ;; mode-line-position 1825 + " " 1826 + ;; mode-line-modes 1827 + 1828 + (:eval 1829 + (pcase envrc--status 1830 + ('none (propertize "" 'face ,(list 'quote (list :foreground text)))) 1831 + ('on (propertize "" 'face ,(list 'quote (list :foreground green)))) 1832 + ('error (propertize "" 'face ,(list 'quote (list :foreground red)))) 1833 + (_ (propertize "" 'face ,(list 'quote :foreground red))))) 1834 + 1835 + " " 1836 + 1837 + (:eval 1838 + (when (magit-toplevel) 1839 + (propertize (format "  %s" (magit-get-current-branch)) 'face ,(list 'quote (list :foreground mauve))) 1840 + )) 1841 + 1842 + (:eval (when (magit-toplevel) " ")) 1843 + 1844 + (:eval 1845 + (when (eglot-managed-p) 1846 + (eglot--mode-line-format))) 1847 + 1848 + (:eval (when (eglot-managed-p) " ")) 1849 + 1850 + (:eval 1851 + (when flycheck-mode 1852 + (if (eq flycheck-last-status-change 'finished) 1853 + (let-alist (flycheck-count-errors flycheck-current-errors) 1854 + (concat 1855 + (when (and (not .error) (not .warning:?) (not .warning)) 1856 + (propertize "" 'face ,(list 'quote (list :foreground green)))) 1857 + (when .error 1858 + (propertize (format " %s" .error) 'face ,(list 'quote (list :foreground red)))) 1859 + (when (or .warning:? .warning) 1860 + (propertize (format "%s %s" (if .error " " "") (+ (or .warning:? 0) (or .warning 0))) 'face ,(list 'quote (list :foreground yellow)))) 1861 + ) 1862 + )) 1863 + )) 1864 + 1865 + (:eval (when flycheck-mode " ")) 1820 1866 1867 + "%=" 1868 + (:eval (nyan-create))))) 1869 + 1821 1870 (nyan-start-animation)) 1822 1871 1823 1872 (add-hook 'window-setup-hook #'th/mode-line)