From 962dddbffdd931755616fea56557f26d249d08d7 Mon Sep 17 00:00:00 2001 From: agryphus Date: Wed, 24 Jan 2024 01:07:54 -0500 Subject: [PATCH] Emacs and adding Symbols Nerd Font --- .config/doom/config.org | 18 ++++++--- .config/doom/packages.el | 3 ++ .../doom/themes/some-clown-fiesta-theme.el | 6 +-- .config/dunst/dunstrc | 2 +- .config/foot/foot.ini | 38 +++++++++++++++++++ .config/nixos/core.nix | 17 ++++++++- .config/nixos/profiles/emacs.nix | 4 +- .config/rofi/config.rasi | 2 +- .config/waybar/config | 4 +- .config/waybar/style.css | 2 +- 10 files changed, 77 insertions(+), 19 deletions(-) create mode 100644 .config/foot/foot.ini diff --git a/.config/doom/config.org b/.config/doom/config.org index f9fe147..2c31aca 100644 --- a/.config/doom/config.org +++ b/.config/doom/config.org @@ -59,7 +59,7 @@ ** Special symbols/characters #+begin_src emacs-lisp (after! org - (setq org-ellipsis " ▼ " + (setq org-superstar-headline-bullets-list '("⁖" "◉" "●" "○" "◉" "●" "○" "◉" "●" "○") org-superstar-itembullet-alist '((?+ . ?➤) (?- . ?✦)))) ; changes +/- symbols in item lists @@ -78,6 +78,8 @@ ("#+END_SRC" . "") (":properties:" . "") (":PROPERTIES:" . "") + ("#+property:" . "") + ("#+PROPERTY:" . "") (":end:" . "―") (":END:" . "―") ("#+options:" . "") @@ -86,6 +88,8 @@ ("#+STARTUP:" . "") ("#+title: " . "") ("#+TITLE: " . "") + ("#+TOC:" . "󰠶") + ("#+toc:" . "󰠶") ("#+results:" . "") ("#+RESULTS:" . "") ("#+name:" . "") @@ -307,6 +311,7 @@ From: https://tecosaur.github.io/emacs-config/config.html ** Typst Automatically compile typst documents upon save #+begin_src emacs-lisp + (use-package! typst-mode) (add-hook 'after-save-hook (lambda () (when (and (buffer-file-name) (string= (file-name-extension (buffer-file-name)) "typ")) @@ -456,16 +461,17 @@ Clear all highlighting using C-l. Mimics the "redraw" signal sent to terminals ** Fonts #+begin_src emacs-lisp - (add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font 15")) + (add-to-list 'default-frame-alist '(font . "Symbols Nerd Font Mono 15")) + (add-to-list 'default-frame-alist '(font . "FiraCode 15")) (set-fontset-font "fontset-default" 'han "Source Han Sans") #+end_src ** Swap evil g[k/j] and k/j #+begin_src emacs-lisp - (define-key evil-normal-state-map (kbd "gj") 'evil-next-line) - (define-key evil-normal-state-map (kbd "gk") 'evil-previous-line) - (define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line) - (define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line) + (define-key evil-motion-state-map (kbd "gj") 'evil-next-line) + (define-key evil-motion-state-map (kbd "gk") 'evil-previous-line) + (define-key evil-motion-state-map (kbd "j") 'evil-next-visual-line) + (define-key evil-motion-state-map (kbd "k") 'evil-previous-visual-line) #+end_src ** Scrolloff diff --git a/.config/doom/packages.el b/.config/doom/packages.el index f1f4ff8..dfb1316 100644 --- a/.config/doom/packages.el +++ b/.config/doom/packages.el @@ -64,6 +64,9 @@ (package! gruber-darker-theme) (package! no-clown-fiesta-theme) (package! mutt-mode) +(package! anki-connect) +(package! anki-editor) +(package! typst-mode) ; Making org mode look good (package! writeroom-mode) diff --git a/.config/doom/themes/some-clown-fiesta-theme.el b/.config/doom/themes/some-clown-fiesta-theme.el index db53593..cb6cc3a 100644 --- a/.config/doom/themes/some-clown-fiesta-theme.el +++ b/.config/doom/themes/some-clown-fiesta-theme.el @@ -89,9 +89,9 @@ ;; Basic ((border (:background alt-bg :foreground medium-gray)) (cursor (:background cursor-bg :foreground cursor-fg)) - (hl-line (:background dark-gray)) - (line-number (:foreground gray)) - (line-number-current-line (:background dark-gray :foreground light-gray)) + (hl-line (:background 'unspecified)) + (line-number (:foreground medium-gray)) + (line-number-current-line (:foreground medium-gray)) (default (:foreground fg :background bg)) (fringe (:background 'unspecified :foreground light-gray)) (vertical-border (:background 'unspecified :foreground dark-gray)) diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 65ce5d8..70760cd 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -123,7 +123,7 @@ ### Text ### - font = FiraCodeNerdFont + font = FiraCode, Symbols Nerd Font # The spacing between lines. If the height is smaller than the # font height, it will get raised to the font height. diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini new file mode 100644 index 0000000..15867be --- /dev/null +++ b/.config/foot/foot.ini @@ -0,0 +1,38 @@ +font=FiraCode:size=15,Symbols Nerd Font Mono:size=15 +bold-text-in-bright=palette-based + +[colors] +alpha=0.8 +background=000000 +foreground=ebdbb2 + +# Normal/regular colors (color palette 0-7) +regular0=282828 # black +regular1=cc241d # red +regular2=98971a # green +regular3=d79921 # yellow +regular4=458588 # blue +regular5=b16286 # magenta +regular6=689d6a # cyan +regular7=a89984 # white + +# Same as above +dim0=282828 # black +dim1=cc241d # red +dim2=98971a # green +dim3=d79921 # yellow +dim4=458588 # blue +dim5=b16286 # magenta +dim6=689d6a # cyan +dim7=a89984 # white + +# Bright colors (color palette 8-15) +bright0=928374 # bright black +bright1=fb4934 # bright red +bright2=b8bb26 # bright green +bright3=fabd2f # bright yellow +bright4=83a598 # bright blue +bright5=d3869b # bright magenta +bright6=8ec07c # bright cyan +bright7=ebdbb2 # bright white + diff --git a/.config/nixos/core.nix b/.config/nixos/core.nix index f5897a5..207681e 100644 --- a/.config/nixos/core.nix +++ b/.config/nixos/core.nix @@ -29,7 +29,13 @@ i18n.defaultLocale = "en_US.UTF-8"; fonts.packages = with pkgs; [ - (nerdfonts.override { fonts = [ "FiraCode" ]; }) + # The nerdfonts package does not allow the installation of only the + # Symbols Nerd Font. Also, the "mono" (actually double wide) + # version of this font centers the symbols which is nice. + nur.repos.bandithedoge.symbols-nerd-font + + hack-font + fira-code ]; networking.networkmanager.enable = true; @@ -126,7 +132,8 @@ sl # Choo choo # Some nix specific stuff - nix-index + nil # Nix LSP + nix-index # See which packages source a file nix-output-monitor # Track dependency graph during builds nix-prefetch-git # Like nix-prefetch-url, but for git nvd # See diffs between builds @@ -187,6 +194,12 @@ }) ]; + nixpkgs.config.packageOverrides = pkgs: { + nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { + inherit pkgs; + }; + }; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It's perfectly fine and recommended to leave diff --git a/.config/nixos/profiles/emacs.nix b/.config/nixos/profiles/emacs.nix index d6e3721..106a8c6 100644 --- a/.config/nixos/profiles/emacs.nix +++ b/.config/nixos/profiles/emacs.nix @@ -1,10 +1,8 @@ { config, lib, pkgs, modulesPath, ... }: { - services.emacs.enable = true; - environment.systemPackages = with pkgs; [ - emacs29-gtk3 + emacs29-pgtk # Transparency on Wayland requires Pure GTK # Misc ispell # Spellchecker diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi index bdb45a2..ae8c184 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi @@ -1,5 +1,5 @@ configuration { - font: "FiraCodeNerdFont 12"; + font: "FiraCode 12"; kb-cancel: "Super+q,Escape,Control+c"; timeout { action: "kb-cancel"; diff --git a/.config/waybar/config b/.config/waybar/config index 1441b83..175e615 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -5,7 +5,7 @@ "modules-left": ["hyprland/workspaces", "custom/scratch", "hyprland/mode", "hyprland/window"], "modules-center": [], - "modules-right": ["memory", "network", "pulseaudio", "battery", "tray", "clock"], + "modules-right": ["memory", "pulseaudio", "battery", "tray", "clock"], "hyprland/workspaces": { "disable-scroll": true, @@ -58,7 +58,7 @@ }, "pulseaudio": { - "format": "{icon} {volume}% ", + "format": " {icon} {volume}%", "format-bluetooth": " {volume}% ", "format-muted":"婢 Mute ", "interval": 60, diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 39de3b7..cfd02fe 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -1,5 +1,5 @@ * { - font-family: FiraCode Nerd Font, FontAwesome; + font-family: FiraCode, Symbols Nerd Font Mono, FontAwesome; font-size: 15px; }