Emacs and adding Symbols Nerd Font

This commit is contained in:
agryphus 2024-01-24 01:07:54 -05:00
parent 0340d97e8b
commit 962dddbffd
10 changed files with 77 additions and 19 deletions

View file

@ -59,7 +59,7 @@
** Special symbols/characters ** Special symbols/characters
#+begin_src emacs-lisp #+begin_src emacs-lisp
(after! org (after! org
(setq org-ellipsis " ▼ " (setq
org-superstar-headline-bullets-list '("⁖" "◉" "●" "○" "◉" "●" "○" "◉" "●" "○") org-superstar-headline-bullets-list '("⁖" "◉" "●" "○" "◉" "●" "○" "◉" "●" "○")
org-superstar-itembullet-alist '((?+ . ?➤) (?- . ?✦)))) ; changes +/- symbols in item lists org-superstar-itembullet-alist '((?+ . ?➤) (?- . ?✦)))) ; changes +/- symbols in item lists
@ -78,6 +78,8 @@
("#+END_SRC" . "") ("#+END_SRC" . "")
(":properties:" . "") (":properties:" . "")
(":PROPERTIES:" . "") (":PROPERTIES:" . "")
("#+property:" . "")
("#+PROPERTY:" . "")
(":end:" . "―") (":end:" . "―")
(":END:" . "―") (":END:" . "―")
("#+options:" . "") ("#+options:" . "")
@ -86,6 +88,8 @@
("#+STARTUP:" . "") ("#+STARTUP:" . "")
("#+title: " . "") ("#+title: " . "")
("#+TITLE: " . "") ("#+TITLE: " . "")
("#+TOC:" . "󰠶")
("#+toc:" . "󰠶")
("#+results:" . "") ("#+results:" . "")
("#+RESULTS:" . "") ("#+RESULTS:" . "")
("#+name:" . "") ("#+name:" . "")
@ -307,6 +311,7 @@ From: https://tecosaur.github.io/emacs-config/config.html
** Typst ** Typst
Automatically compile typst documents upon save Automatically compile typst documents upon save
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package! typst-mode)
(add-hook 'after-save-hook (lambda () (add-hook 'after-save-hook (lambda ()
(when (and (buffer-file-name) (when (and (buffer-file-name)
(string= (file-name-extension (buffer-file-name)) "typ")) (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 ** Fonts
#+begin_src emacs-lisp #+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") (set-fontset-font "fontset-default" 'han "Source Han Sans")
#+end_src #+end_src
** Swap evil g[k/j] and k/j ** Swap evil g[k/j] and k/j
#+begin_src emacs-lisp #+begin_src emacs-lisp
(define-key evil-normal-state-map (kbd "gj") 'evil-next-line) (define-key evil-motion-state-map (kbd "gj") 'evil-next-line)
(define-key evil-normal-state-map (kbd "gk") 'evil-previous-line) (define-key evil-motion-state-map (kbd "gk") 'evil-previous-line)
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line) (define-key evil-motion-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 "k") 'evil-previous-visual-line)
#+end_src #+end_src
** Scrolloff ** Scrolloff

View file

@ -64,6 +64,9 @@
(package! gruber-darker-theme) (package! gruber-darker-theme)
(package! no-clown-fiesta-theme) (package! no-clown-fiesta-theme)
(package! mutt-mode) (package! mutt-mode)
(package! anki-connect)
(package! anki-editor)
(package! typst-mode)
; Making org mode look good ; Making org mode look good
(package! writeroom-mode) (package! writeroom-mode)

View file

@ -89,9 +89,9 @@
;; Basic ;; Basic
((border (:background alt-bg :foreground medium-gray)) ((border (:background alt-bg :foreground medium-gray))
(cursor (:background cursor-bg :foreground cursor-fg)) (cursor (:background cursor-bg :foreground cursor-fg))
(hl-line (:background dark-gray)) (hl-line (:background 'unspecified))
(line-number (:foreground gray)) (line-number (:foreground medium-gray))
(line-number-current-line (:background dark-gray :foreground light-gray)) (line-number-current-line (:foreground medium-gray))
(default (:foreground fg :background bg)) (default (:foreground fg :background bg))
(fringe (:background 'unspecified :foreground light-gray)) (fringe (:background 'unspecified :foreground light-gray))
(vertical-border (:background 'unspecified :foreground dark-gray)) (vertical-border (:background 'unspecified :foreground dark-gray))

View file

@ -123,7 +123,7 @@
### Text ### ### Text ###
font = FiraCodeNerdFont font = FiraCode, Symbols Nerd Font
# The spacing between lines. If the height is smaller than the # The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height. # font height, it will get raised to the font height.

38
.config/foot/foot.ini Normal file
View file

@ -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

View file

@ -29,7 +29,13 @@
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
fonts.packages = with pkgs; [ 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; networking.networkmanager.enable = true;
@ -126,7 +132,8 @@
sl # Choo choo sl # Choo choo
# Some nix specific stuff # 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-output-monitor # Track dependency graph during builds
nix-prefetch-git # Like nix-prefetch-url, but for git nix-prefetch-git # Like nix-prefetch-url, but for git
nvd # See diffs between builds 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 # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave # on your system were taken. It's perfectly fine and recommended to leave

View file

@ -1,10 +1,8 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
services.emacs.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
emacs29-gtk3 emacs29-pgtk # Transparency on Wayland requires Pure GTK
# Misc # Misc
ispell # Spellchecker ispell # Spellchecker

View file

@ -1,5 +1,5 @@
configuration { configuration {
font: "FiraCodeNerdFont 12"; font: "FiraCode 12";
kb-cancel: "Super+q,Escape,Control+c"; kb-cancel: "Super+q,Escape,Control+c";
timeout { timeout {
action: "kb-cancel"; action: "kb-cancel";

View file

@ -5,7 +5,7 @@
"modules-left": ["hyprland/workspaces", "custom/scratch", "hyprland/mode", "hyprland/window"], "modules-left": ["hyprland/workspaces", "custom/scratch", "hyprland/mode", "hyprland/window"],
"modules-center": [], "modules-center": [],
"modules-right": ["memory", "network", "pulseaudio", "battery", "tray", "clock"], "modules-right": ["memory", "pulseaudio", "battery", "tray", "clock"],
"hyprland/workspaces": { "hyprland/workspaces": {
"disable-scroll": true, "disable-scroll": true,

View file

@ -1,5 +1,5 @@
* { * {
font-family: FiraCode Nerd Font, FontAwesome; font-family: FiraCode, Symbols Nerd Font Mono, FontAwesome;
font-size: 15px; font-size: 15px;
} }