Void Linux workstation powered by niri, Fish and NeoVim. Contains scripts, browser extensions, custom XBPS packages, and typst plugins. git.anhgelus.world/anhgelus/dotfiles
void niri fish neovim nvim vim dotfiles linux
1
fork

Configure Feed

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

feat(typst): template file

+186 -2
+33 -2
README.md
··· 1 1 # dotfiles 2 2 3 - My personnal dotfiles of my workstation powered by Void, Sway, niri, nvim and fish. 3 + My dotfiles of my workstation powered by Void, ~~Sway,~~ niri, nvim and fish. 4 + 5 + Detailled information available [on my website](https://anhgelus.world/setup) (in French). 6 + 7 + ## nvim 4 8 5 - You can install my nvim config with 9 + You can install my nvim config with: 10 + > [!WARNING] 11 + > This command will override your NeoVim config. 12 + > Proceed with caution! 13 + 14 + > [!INFO] 15 + > It will download the AppImage of NeoVim, put it in your home, and clone my config in your `.config/nvim`. 16 + 6 17 ```bash 7 18 curl -L https://git.anhgelus.world/anhgelus/dotfiles/raw/branch/main/setup.sh | bash 8 19 ``` 9 20 21 + ## typst 22 + 23 + I write simple packages for typst that are not published on their repository. 24 + You can find their documentation in the `typst` folder. 25 + 26 + You can install these scripts to your local repo with: 27 + > [!WARNING] 28 + > This command may overrides scripts installed in your local repository. 29 + > Proceed with caution! 30 + 31 + > [!INFO] 32 + > These will be available under `@local/<package>:<version>`. 33 + > See [`typst/README.md`](./typst/README.md) for more information. 34 + > 35 + > If you want, you can set `@anhgelus` (or anything else) instead of `@local` by modifying `packages/local/` into 36 + > `packages/anhgelus`. 37 + 38 + ```bash 39 + cp -r typst/* ${XDG_DATA_HOME:-$HOME/.local/share}/typst/packages/local/ 40 + ```
+29
typst/README.md
··· 1 + # typst scripts 2 + 3 + The version of these scripts will always be `1.0.0`, because using anything else looks like to be too complicated for 4 + anything. 5 + 6 + ## `template.typ` 7 + 8 + This template requires: 9 + - `Inter` as the sans-serif font; 10 + - `PT Astra Serif` as the serif font; 11 + - `FiraCode Nerd Font Mono` as the monospace font. 12 + 13 + These can be freely used. 14 + I may add an option to modify this. 15 + 16 + Import it and load it with: 17 + ```typ 18 + // import the script from the local repo 19 + // if you have modified the repo name, replace `@local` with their name 20 + #import "@local/template:1.0.0": * 21 + 22 + // initialize template 23 + #show: doc.with( 24 + authors: ( 25 + (name: "Your Name", affiliation: "Your affiliation", email: "Your email"), 26 + ), 27 + page_title: "Page title :D", 28 + ) 29 + ```
+124
typst/template.typ
··· 1 + #let doc(authors: (), page_title: [], doc) = { 2 + // style 3 + set text( 4 + font: "Inter", 5 + size: 11pt, 6 + ) 7 + set par( 8 + leading: 1em, 9 + first-line-indent: 1em, 10 + spacing: 2em, 11 + ) 12 + set heading(numbering: "1.") 13 + 14 + set page( 15 + header: align( 16 + right + horizon, 17 + // Retrieve the document 18 + // element's title property. 19 + context document.title, 20 + ), 21 + numbering: "1", 22 + margin: (x: 2.85cm), 23 + ) 24 + 25 + show heading: set par(leading: 0.75em) 26 + show heading: set text(font: "PT Astra Serif") 27 + show heading.where(level: 1): set block(below: 1em) 28 + show heading.where(level: 1): set text(size: 1.2em) 29 + show heading.where(level: 1, numbering: "1."): it => { 30 + pagebreak(weak: true) 31 + it 32 + } 33 + show heading.where(level: 2): set block(above: 3em, below: 1em) 34 + show heading.where(level: 2): set text(size: 1.1em) 35 + 36 + show title: set text(size: 1.25em, font: "PT Astra Serif") 37 + show title: set align(center) 38 + show title: set block(above: 5em, below: 1em) 39 + show title: set par(leading: 0.5em) 40 + 41 + show enum: set par(leading: 0.9em) 42 + show list: set par(leading: 0.9em) 43 + 44 + show raw: set text(font: "FiraCode Nerd Font Mono") 45 + show raw.where(block: false): set text(weight: 500, size: 1.1em) 46 + 47 + // style 48 + set text( 49 + font: "Inter", 50 + size: 11pt, 51 + ) 52 + set par( 53 + leading: 1em, 54 + first-line-indent: 1em, 55 + spacing: 2em, 56 + ) 57 + set heading(numbering: "1.") 58 + 59 + set page( 60 + header: align( 61 + right + horizon, 62 + // Retrieve the document 63 + // element's title property. 64 + context { 65 + emph([ 66 + #document.title - #authors.first().name 67 + ]) 68 + } 69 + ), 70 + numbering: "1", 71 + margin: (x: 2.85cm), 72 + ) 73 + 74 + show heading: set par(leading: 0.75em) 75 + show heading: set text(font: "PT Astra Serif") 76 + show heading.where(level: 1): set block(below: 1em) 77 + show heading.where(level: 1): set text(size: 1.2em) 78 + show heading.where(level: 2): set block(above: 3em, below: 1em) 79 + show heading.where(level: 2): set text(size: 1.1em) 80 + 81 + show title: set text(size: 1.25em, font: "PT Astra Serif") 82 + show title: set align(center) 83 + show title: set block(above: 5em, below: 1em) 84 + show title: set par(leading: 0.5em) 85 + show outline: it => { 86 + it 87 + pagebreak() 88 + } 89 + 90 + show enum: set par(leading: 0.9em) 91 + show list: set par(leading: 0.9em) 92 + 93 + show raw: set text(font: "FiraCode Nerd Font Mono") 94 + show raw.where(block: false): set text(weight: 500, size: 1.1em) 95 + set document(title: page_title) 96 + let ncols = calc.min(authors.len(), 3) 97 + 98 + title() 99 + 100 + block(below: 5em, context { 101 + grid( 102 + columns: (1fr,) * ncols, 103 + gutter: 2em, 104 + align: center, 105 + ..authors.map(author => { 106 + par(leading: 0.75em)[ 107 + #author.name \ 108 + #author.affiliation \ 109 + #link("mailto:" + author.email) 110 + ] 111 + }) 112 + ) 113 + }) 114 + 115 + 116 + outline(title: "Table des matières") 117 + 118 + show heading.where(level: 1): it => { 119 + pagebreak(weak: true) 120 + it 121 + } 122 + 123 + doc 124 + }