Compare commits

..

11 Commits

Author SHA1 Message Date
phundrak 6d563572d2 feat(emacs/programming): remove unused configuration 2026-05-03 16:23:26 +02:00
phundrak 35a525e3fc feat(emacs/nix): enable LSP server for Nix files by default 2026-05-03 15:53:01 +02:00
phundrak 39c311ba41 feat(emacs/direnv): enable Emacs to load direnv environment
Especially useful when using Nix develompent shells and when LSP
servers would otherwise not be available.
2026-05-03 15:51:25 +02:00
phundrak 8f68f4ba04 feat(emacs/tree-sitter): remove unused packages 2026-05-03 15:51:05 +02:00
phundrak 027761fc52 feat(emacs): remove Yadm config 2026-05-03 15:50:08 +02:00
phundrak c05329171d feat(emacs/evil-surround): add typographic delimiters 2026-05-03 15:49:42 +02:00
phundrak 0a2b238e1e feat(emacs/projectile): ignore nix store 2026-05-03 15:49:03 +02:00
phundrak c8b7d1b899 docs(emacs): move Jujutsu section 2026-05-03 15:49:03 +02:00
phundrak aa793e0638 feat(emacs/langtool): change default language to GB English 2026-05-03 15:49:03 +02:00
phundrak af2f22aa4b feat(emacs): recreate my old hydra menu for writeroom with transient
Create a Transient menu to adapt on the fly the width of my buffers
when using writeroom-mode. This commit also adds two other functions:
- `my/writeroom-reset` which resets the width of the buffer to its
  default state
- `my/writeroom-fit-buffer` which sets the width of the buffer to be
  exactly what is needed to fit the longest line of the buffer
2026-05-03 15:49:03 +02:00
phundrak 1ea379f907 docs(emacs): user user-lisp/ dir instead of plain lisp/ dir
Also precompile user-lisp content if the ELC files are older than
their original source file.
2026-05-03 15:48:58 +02:00
56 changed files with 10065 additions and 1729 deletions
-10
View File
@@ -1,10 +0,0 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
[*.{js,ts,json,mts,css}]
indent_style = space
indent_size = 2
+5 -2
View File
@@ -1,4 +1,7 @@
#!/usr/bin/env bash
export DIRENV_WARN_TIMEOUT=20s
eval "$(devenv direnvrc)"
dotenv
# The use_devenv function supports passing flags to the devenv command
# For example: use devenv --impure --option services.postgres.enable:bool true
use devenv
-26
View File
@@ -1,26 +0,0 @@
name: deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v16
with:
name: phundrak
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: devenv
- name: Install devenv
run: nix profile add nixpkgs#devenv
- name: Deploy to Cloudflare Pages
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: devenv tasks run website:deploy
+40
View File
@@ -0,0 +1,40 @@
name: deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: purcell/setup-emacs@master
with:
version: 29.1
- name: "Export org to md"
run: emacs -Q --script export.el
- uses: actions/setup-node@v4
with:
node-version: 20.x
- run: corepack enable
- run: npm ci
- run: npm run build
- name: "Deploy to Cloudflare Pages"
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.ACCOUNT_ID }}
projectName: config-phundrak-com
directory: docs/.vuepress/dist/
githubToken: ${{ secrets.TOKEN }}
# - name: "Deploy to remote server"
# uses: appleboy/scp-action@v0.1.4
# with:
# host: ${{ secrets.HOST }}
# username: ${{ secrets.USERNAME }}
# key: ${{ secrets.KEY }}
# port: ${{ secrets.PORT }}
# source: docs/.vuepress/dist/*
# target: ${{ secrets.DESTPATH }}
# strip_components: 3
+3 -21
View File
@@ -1,31 +1,13 @@
node_modules
/docs/**/*.md
# Vitepress
/.vitepress/cache/
/.vitepress/dist/
/docs/.vitepress/
/docs/img
/docs/eittlandic/img
/docs/proto-nyqy/img
.temp
.cache
/docs/**/*.md
/docs/.vuepress/dist/
/.yarn/
# Devenv
.devenv*
devenv.local.nix
devenv.local.yaml
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml
# Devenv
.devenv*
devenv.local.nix
devenv.local.yaml
# direnv
.direnv
+2 -6
View File
@@ -1,13 +1,9 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": true,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"printWidth": 100,
"trailingComma": "es5",
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": true,
"arrowParens": "always"
}
-21
View File
@@ -1,21 +0,0 @@
<template>
<figure>
<img :alt="alt" :src="src" />
<figcaption><slot></slot></figcaption>
</figure>
</template>
<script setup lang="ts">
const props = defineProps<{
src: string;
alt?: string;
}>();
</script>
<style>
figcaption {
text-align: center;
margin-top: 1rem;
margin-bottom: 1rem;
}
</style>
-33
View File
@@ -1,33 +0,0 @@
// -*- mode: typescript; -*-
import { defineConfig, HeadConfig } from 'vitepress';
import appHead from './head';
import { sidebar } from './sidebar';
import { nav } from './nav';
export default defineConfig({
title: "Pundraks Dotfiles",
cleanUrls: true,
description: 'Pundraks Linux configuration',
head: appHead as HeadConfig[],
srcDir: './docs',
themeConfig: {
sidebar,
nav,
outline: {
level: 'deep'
},
search: {
provider: 'local'
},
},
markdown: {
image: {
lazyLoading: true
},
linkify: true,
typographer: true,
headers: {
level: [1, 2, 3, 4, 5]
}
},
})
-79
View File
@@ -1,79 +0,0 @@
interface Head {
type?: 'image/png';
async?: boolean,
src?: string,
'data-website-id'?: string
}
interface Favicon extends Head {
rel: 'apple-touch-icon' | 'icon' | 'manifest';
href: string;
sizes?: string;
}
interface Meta extends Head {
property?: string,
name?: string,
content: string
}
const favicons: Favicon[] = [
{ rel: 'apple-touch-icon', sizes: '57x57', href: '/img/meta/apple-icon-57x57.png' },
{ rel: 'apple-touch-icon', sizes: '60x60', href: '/img/meta/apple-icon-60x60.png' },
{ rel: 'apple-touch-icon', sizes: '72x72', href: '/img/meta/apple-icon-72x72.png' },
{ rel: 'apple-touch-icon', sizes: '76x76', href: '/img/meta/apple-icon-76x76.png' },
{ rel: 'apple-touch-icon', sizes: '114x114', href: '/img/meta/apple-icon-114x114.png' },
{ rel: 'apple-touch-icon', sizes: '120x120', href: '/img/meta/apple-icon-120x120.png' },
{ rel: 'apple-touch-icon', sizes: '144x144', href: '/img/meta/apple-icon-144x144.png' },
{ rel: 'apple-touch-icon', sizes: '152x152', href: '/img/meta/apple-icon-152x152.png' },
{ rel: 'apple-touch-icon', sizes: '180x180', href: '/img/meta/apple-icon-180x180.png' },
{ rel: 'icon', type: 'image/png', sizes: '192x192', href: '/img/meta/android-icon-192x192.png' },
{ rel: 'icon', type: 'image/png', sizes: '32x32', href: '/img/meta/favicon-32x32.png' },
{ rel: 'icon', type: 'image/png', sizes: '96x96', href: '/img/meta/favicon-96x96.png' },
{ rel: 'icon', type: 'image/png', sizes: '16x16', href: '/img/meta/favicon-16x16.png' },
{ rel: 'manifest', href: '/img/meta/manifest.json' },
];
const meta: Meta[] = [
{
name: 'author',
content: 'Lucien Cartier-Tilet',
},
{
property: 'og:image',
content: 'https://cdn.phundrak.com/img/rich_preview.png',
},
{
property: 'og:title',
content: 'Pundraks Dotfiles',
},
{
property: 'og:description',
content: 'Pundraks Linux configuration',
},
{
name: 'fediverse:creator',
content: '@phundrak@mastodon.phundrak.com',
},
{
name: 'twitter:card',
content: 'summary',
},
{
name: 'twitter:site',
content: '@phundrak',
},
{
name: 'twitter:creator',
content: '@phundrak',
},
{ name: 'msapplication-TileColor', content: '#3b4252' },
{ name: 'msapplication-TileImage', content: '/ms-icon-144x144.png' },
{ name: 'theme-color', content: '#3b4252' },
]
const appHead: (string | Head)[][] = favicons.map((head) => ['link', head])
meta.map((item) => appHead.push(['meta', item]))
export default appHead;
-8
View File
@@ -1,8 +0,0 @@
import { DefaultTheme } from "vitepress";
export const nav: DefaultTheme.NavItem[] = [
{ text: 'About', link: '/about' },
{ text: 'Configs', link: '/' },
{ text: 'Deprecated Configs', link: '/deprecated/', activeMatch: '/deprecated/*' },
{ text: 'Source', link: 'https://labs.phundrak.com/phundrak/config.phundrak.com' },
]
-59
View File
@@ -1,59 +0,0 @@
import { DefaultTheme } from "vitepress";
export const sidebar: DefaultTheme.Sidebar = {
'/': [
{ text: 'Index', link: '/' },
{ text: 'Custom Scripts', link: '/scripts' },
{ text: 'Desktop', link: '/desktop' },
{ text: 'General Shell Config', link: '/shell' },
{ text: 'Fish', link: '/fish' },
{ text: 'Git', link: '/git' },
{ text: 'Hyprland', link: '/hyprland' },
{ text: 'MPD', link: '/mpd' },
{ text: 'Tmux', link: '/tmux' },
{
text: 'Emacs',
items: [
{ text: 'Index', link: '/emacs/' },
{ text: 'Basic Config', link: '/emacs/basic-config' },
{ text: 'Custom Elisp', link: '/emacs/custom-elisp' },
{ text: 'Package Managers', link: '/emacs/package-manager' },
{ text: 'Keybind Managers', link: '/emacs/keybinding-managers' },
{ text: 'Autocompletion', link: '/emacs/packages/autocompletion' },
{ text: 'Applications', link: '/emacs/packages/applications' },
{ text: 'Editing', link: '/emacs/packages/editing' },
{ text: 'Built-in', link: '/emacs/packages/emacs-builtin' },
{ text: 'Making My Life Easier', link: '/emacs/packages/helpful' },
{ text: 'LaTeX', link: '/emacs/packages/latex' },
{ text: 'Org Mode', link: '/emacs/packages/org' },
{ text: 'Programming', link: '/emacs/packages/programming' },
{ text: 'Visual Config', link: '/emacs/packages/visual-config' },
{ text: 'Misc', link: '/emacs/packages/misc' },
{ text: 'Keybindings', link: '/emacs/keybindings' },
]
}
],
'/deprecated/': [
{ text: 'AwesomeWM', link: '/deprecated/awesome' },
{ text: 'Bootstrap Script', link: '/deprecated/bootstrap' },
{ text: 'EXWM', link: '/emacs/packages/exwm' },
{ text: 'i3', link: '/deprecated/i3' },
{ text: 'Nano', link: '/deprecated/nano' },
{ text: 'Neofetch', link: '/neofetch' },
{ text: 'Picom', link: '/picom' },
{ text: 'Polybar', link: '/deprecated/polybar' },
{
text: 'StumpWM', items: [
{ text: 'Index', link: '/stumpwm/' },
{ text: 'Basic Configuration', link: '/stumpwm/init' },
{ text: 'Colours', link: '/stumpwm/colours' },
{ text: 'Modeline', link: '/stumpwm/mode-line' },
{ text: 'Groups and Placement', link: '/stumpwm/groups' },
{ text: 'Theme', link: '/stumpwm/theme' },
{ text: 'Commands', link: '/stumpwm/commands' },
{ text: 'Keybinds', link: '/stumpwm/keybindings' },
{ text: 'Utilities', link: '/stumpwm/utilities' },
]
}
]
}
-10
View File
@@ -1,10 +0,0 @@
import { Theme } from "vitepress";
import DefaultTheme from "vitepress/theme";
import ImgFigure from "../components/ImgFigure.vue";
export default {
extends: DefaultTheme,
enhanceApp({ app }) {
app.component('ImgFigure', ImgFigure);
}
} satisfies Theme;
+9 -9
View File
@@ -3,11 +3,11 @@
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1783538213,
"narHash": "sha256-jNjKlmrejUrBgVAeiavlMLlkmC7ZEv1D9nhfuwMW5Q8=",
"lastModified": 1777679510,
"narHash": "sha256-uG8LPb1useAwa0cjO5sEkYhCSPjbWiCH3DyNxQLVSck=",
"owner": "cachix",
"repo": "devenv",
"rev": "d1fb321e73048d0e1e2b523580268ebb3df2ae90",
"rev": "bc8b21628907c726c74094cedc439c10a455cdb7",
"type": "github"
},
"original": {
@@ -22,11 +22,11 @@
"nixpkgs-src": "nixpkgs-src"
},
"locked": {
"lastModified": 1783345554,
"narHash": "sha256-LZhOm4kqjHUnwP4CNHpaqqEVcumGNd1PvOEOad8LkS0=",
"lastModified": 1776852779,
"narHash": "sha256-WwO/ITisCXwyiRgtktZgv3iGhAGO+IB5Av4kKCwezR0=",
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "6004ea8c229fe9d41b21c6f4c76bf6c2e10771dd",
"rev": "ec3063523dcd911aeadb50faa589f237cdab5853",
"type": "github"
},
"original": {
@@ -39,11 +39,11 @@
"nixpkgs-src": {
"flake": false,
"locked": {
"lastModified": 1783279667,
"narHash": "sha256-/NAkDSsve+GNM0Bt6tleJdCGfsTlK89nPjkVOzZMo0s=",
"lastModified": 1776329215,
"narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f205b5574fd0cb7da5b702a2da51507b7f4fdd1b",
"rev": "b86751bc4085f48661017fa226dee99fab6c651b",
"type": "github"
},
"original": {
+8 -39
View File
@@ -1,40 +1,9 @@
{ pkgs, ... }: {
languages.javascript = {
enable = true;
npm.enable = false;
pnpm.enable = true;
};
dotenv.enable = true;
processes.dev.exec = "pnpm dev";
cachix = {
push = "phundrak";
pull = [
"phundrak"
"devenv"
];
};
tasks = {
"website:install-deps".exec = "pnpm ci";
"website:export-md" = {
exec = "${pkgs.emacs}/bin/emacs -Q --script export.el";
execIfModified = [ "docs/**/*.org" ];
};
"website:build" = {
exec = "pnpm build";
after = [
"website:export-md@succeeded"
"website:install-deps@succeeded"
];
};
"website:deploy" = {
exec = ''
if [[ -z "''${CLOUDFLARE_API_TOKEN:-}" ]]; then
echo "Error: CLOUDFLARE_API_TOKEN is not set. Run this in CI only."
exit 1
fi
${pkgs.wrangler}/bin/wrangler pages deploy
'';
after = [ "website:build@succeeded" ];
};
};
{ pkgs, ... }:
{
languages.typescript.enable = true;
packages = [ pkgs.nodejs_20 ];
scripts.export.exec = ''
${pkgs.emacs}/bin/emacs -Q --script export.el
'';
}
+3 -6
View File
@@ -3,14 +3,11 @@ inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
# If you're using non-OSS software, you can set allow_unfree to true.
# allow_unfree: true
# If you're not willing to allow unsupported packages:
# allow_unsupported_system: false
# If you're using non-OSS software, you can set allowUnfree to true.
# allowUnfree: true
# If you're willing to use a package that's vulnerable
# permitted_insecure_packages:
# permittedInsecurePackages:
# - "openssl-1.1.1w"
# If you have more than one devenv you can merge them
-7
View File
@@ -6,13 +6,6 @@ Hi, Im Pundrak (pronounced /PUN-drak/, or more exactly {{{phon(pʰynɖak̚
also known as Lucien Cartier-Tilet. If you want to know more about me,
you can head to my [[https://phundrak.com/en][main website]].
#+html: ::: warning
This website is currently not maintained, aside from the Emacs part of
it. If you want to see my current Linux configuration, head over to my
[[https://labs.phundrak.com/phundrak/nix-config][NixOS configuration]]. This website will be, at some point, rewritten to
reflect it.
#+html: :::
This website is my collection of dotfiles for my daily GNU/Linux
environment, tweaked to my liking. The sidebar will act as an index of
the various tools I use and their configuration.
+7 -4
View File
@@ -1,6 +1,6 @@
#+TITLE: i3
#+setupfile: ../headers
#+PROPERTY: header-args :noweb yes :exports code :tangle no
#+PROPERTY: header-args :noweb yes :exports code :tangle ~/.config/i3/config
#+PROPERTY: header-args:emacs-lisp :exports none :tangle no
* i3
@@ -17,11 +17,14 @@ It is to be noted I am using [[https://github.com/Airblader/i3][Airbladers fo
#+END_SRC
** Screenshots
#+html: <ImgFigure src="/img/neofetch.png.webp">Desktop with Neofetch in the terminal</ImgFigure>
#+CAPTION: Desktop with Neofetch in the terminal
[[./img/neofetch.png.webp]]
#+html: <ImgFigure src="/img/emacs.png.webp">Desktop with Emacs opened</ImgFigure>
#+CAPTION: Desktop with Emacs opened
[[./img/emacs.png.webp]]
#+html: <ImgFigure src="/img/rofi.png.webp">Desktop with Rofi</ImgFigure>
#+CAPTION: Desktop with Rofi
[[./img/rofi.png.webp]]
** Variables declaration
*** Global
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Basic Configuration
#+setupfile: ../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/basic-config.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/basic-config.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Basic Configuration
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Custom Elisp
#+setupfile: ../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/custom-elisp.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/custom-elisp.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Custom Elisp
+56 -21
View File
@@ -6,7 +6,7 @@
* Emacs Configuration
#+html: <ImgFigure src="/img/emacs.svg">Emacs Screenshot</ImgFigure>
[[file:./img/emacs.svg]]
** Introduction
After a couple of years using Spacemacs and a failed attempt at
@@ -29,7 +29,9 @@ general-purpose programming language. Therefore, if you want to do
something in Emacs, with enough Elisp you can do it --- if its not in
Emacs already, that is.
#+html: <ImgFigure src="/img/emacs.svg" alt="XKCD n°378: Real Programmers">Dammit Emacs…</ImgFigure>
#+attr_html: :alt Dammit Emacs… :loading lazy
#+caption: [[https://xkcd.com/378/][XKCD n°378]]: Real Programmers
[[file:./img/real_programmers.png]]
** A Warning Before You Proceed
:PROPERTIES:
@@ -76,6 +78,8 @@ block.
#+end_src
** Loading All Configuration Modules
Here are all my Emacs configuration modules, each dedicated to a
specific aspect of my Emacs configuration.
#+name: emacs-modules
| Module Name | Config Page |
@@ -96,27 +100,58 @@ block.
| =visual-config.el= | [[file:./packages/visual-config.org][Packages — Visual Configuration]] |
| =keybindings.el= | [[file:./keybindings.org][Keybindings]] |
#+name: generate-modules
#+begin_src emacs-lisp :tangle no :cache yes :var modules=emacs-modules :exports none
(mapconcat (lambda (line)
(concat "\"" (string-trim (car line) "=" "=") "\""))
modules
" ")
#+name: modules
#+begin_src emacs-lisp :tangle no :cache yes :var modules=emacs-modules :exports none :results list
(mapcar (lambda (module) (string-trim (car module) "=" "="))
modules)
#+end_src
#+RESULTS[05f9bb535bec2ba84390cc118600323683f51e7c]: generate-modules
: "basic-config.el" "custom-elisp.el" "package-manager.el" "keybinding-managers.el" "applications.el" "autocompletion.el" "editing.el" "emacs-builtin.el" "helpful.el" "latex.el" "misc.el" "org.el" "programming.el" "visual-config.el" "keybindings.el"
#+RESULTS[1c6034eb268577137e95a6f828c249fc306943b1]: modules
- basic-config.el
- custom-elisp.el
- package-manager.el
- keybinding-managers.el
- applications.el
- autocompletion.el
- editing.el
- emacs-builtin.el
- helpful.el
- latex.el
- misc.el
- org.el
- programming.el
- visual-config.el
- keybindings.el
#+begin_src emacs-lisp :noweb yes
(dolist (module '(<<generate-modules()>>))
The first thing Emacs does is verify if any of these modules need to
be byte-compiled again, i.e. if the =.el= file is younger than its
corresponding =.elc= file. If so, the =.el= file is byte-compiled.
#+begin_src emacs-lisp :var modules=modules :results none
(defun my/mtime (file)
"Get the modification time of FILE as a timestamp."
(let* ((current-time-list nil)
(attr (file-attributes file))
(time-attr (file-attribute-modification-time attr)))
(/ (car time-attr) (cdr time-attr))))
;; `modules' is a variable created by org-mode from the table of modules
(let* ((config-dir (expand-file-name "user-lisp" user-emacs-directory))
(modules (mapcar (lambda (module)
(file-name-sans-extension (expand-file-name module config-dir)))
modules)))
(dolist (module modules)
(let* ((el-file (concat module ".el"))
(elc-file (concat module ".elc"))
(el-last-change (my/mtime el-file))
(elc-last-change (if (file-exists-p elc-file) (my/mtime elc-file) 0)))
(when (> el-last-change elc-last-change)
(byte-compile-file el-file)))))
#+end_src
Now we can load them.
#+begin_src emacs-lisp :var modules=modules :results none
(dolist (module (mapcar #'file-name-sans-extension modules))
(load (expand-file-name module
(expand-file-name "lisp" user-emacs-directory))))
(expand-file-name "user-lisp" user-emacs-directory))))
#+end_src
* TODOs :noexport:
** TODO advise ~evil-insert~ in eshell
Advise ~evil-insert~ to go to the end of the buffer while in
~eshell-mode~.
** DONE Get started with org-roam
CLOSED: [2023-06-17 Sat 13:38]
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Keybinding Managers
#+setupfile: ../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/keybinding-managers.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/keybinding-managers.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Keybinding Managers
+2 -23
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Keybindings
#+setupfile: ../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/keybindings.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/keybindings.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Keybindings
@@ -83,7 +83,6 @@ Undefining some stuff to make keybind prefixes work correctly.
<<general-keybindings-gen(table=keybindings-refactor, prefix="r")>>
<<general-keybindings-gen(table=keybindings-toggle, prefix="t ")>>
<<general-keybindings-gen(table=keybindings-text, prefix="T")>>
<<general-keybindings-gen(table=keybindings-vc, prefix="v")>>
<<general-keybindings-gen(table=keybindings-windows, prefix="w")>>
<<general-keybindings-gen(table=keybindings-quit, prefix="q")>>)
#+end_src
@@ -264,7 +263,7 @@ I also have some keybindings dedicated to opening specific files.
"fI" '((lambda ()
(interactive)
(quick-find-files nil
(expand-file-name "lisp" user-emacs-directory)
(expand-file-name "user-lisp" user-emacs-directory)
"el"))
:which-key "elisp config"
:package quick-find-files)
@@ -500,26 +499,6 @@ My toggle keybindings are prefixed by ~t~.
| is | set-input-method | |
*** TODO Rewrite =my/modify-frame-alpha-background/body= :noexport:
** VCS
Magit is awesome, but I rarely use it nowadays in favour of [[https://jj-vcs.github.io/][Jujutsu]].
And for that, I use =vc.el= in Emacs thanks to =vc-jj= (see [[file:./packages/applications.md#Jujutsu][my Jujutsu
config for Emacs]]). But this is only half the story, let me now set my
keybinds for =vc.el=. ethey are all prefixed by =v=.
#+name: keybindings-vc
| Key | Function | Description | Package |
|-----+-----------------------+-------------+---------|
| a | vc-annotate | | vc |
| r | vc-revset | | vc |
| | | VCS | |
| j | | jujutsu | |
| ja | vc-jj-abandon-change | abandon | vc-jj |
| jb | | bookmarks | |
| jbd | vc-jj-bookmark-delete | delete | vc-jj |
| jbr | vc-jj-bookmark-rename | rename | vc-jj |
| jbs | vc-jj-bookmark-set | set | vc-jj |
| je | vc-jj-edit-change | edit | vc-jj |
| jn | vc-jj-new-change | new | vc-jj |
** Windows
A couple of keybindings are hidden from which-key, otherwise theres not
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Package Manager
#+setupfile: ../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/package-manager.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/package-manager.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Package Manager
+11 -24
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — Applications
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/applications.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/applications.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Applications
@@ -1530,10 +1530,9 @@ compatible with git repositories. In fact, I pretty much dont use git
anymore, jj (abbreviation of Jujutsu) has almost completely replaced
git for me.
I like Magits interface, as you can see in my [[file:./applications.md#magit][Magit]] config. But
reimplementing it entirely probably wont happen on my end (lack of
time, mainly), so Ill leave that up to people more motivated than me.
In the meantime, I can reimplement some of its API with =majjit=.
I like Magits interface, as you can see in my [[file:./applications.md#magit][Magit]] config.
Therefore, lets install =majjit=, my slow and scuffed attempt at
bringing some Magit features to jujutsu.
#+begin_src emacs-lisp
(use-package majjit
:defer t
@@ -1545,22 +1544,6 @@ In the meantime, I can reimplement some of its API with =majjit=.
:custom ((majjit-default-directory "~/code/")))
#+end_src
Speaking of other projects others did better, I use =vc-jj=, which
brings basic jujutsu support to =project.el= and =vc.el=. And Ill just
add my grain of salt to force =project.el= to recognize jujutsu
repositories as projects.
#+begin_src emacs-lisp
(use-package vc-jj
:straight (:build t)
:after '(project vc)
:config
(add-to-list 'project-vc-extra-root-markers ".jj")
:init
(require 'project)
(require 'vc)
(require 'vc-jj))
#+end_src
Though, Ill be honest, I generally prefer to use Jujutsu in the
terminal, unlike git. Something I do use Emacs for, however, is
writing my commit messages.
@@ -1573,6 +1556,12 @@ writing my commit messages.
:init (add-to-list 'auto-mode-alist '("\\.jjdescription\\'" . jjdescription-mode)))
#+end_src
And I want Emacs to know that any directory which has a =.jj= repository
is the root of a project.
#+begin_src emacs-lisp
;;(add-to-list 'project-vc-extra-root-markers ".jj")
#+end_src
*** Forge
Forge acts as an interface for GitHub, GitLab, and Bitbucket inside
Magit. A lot of possibilities are present, you can read issues and
@@ -1734,9 +1723,7 @@ buffer.
(use-package wakatime-mode
:defer t
:straight (:build t)
:init (global-wakatime-mode)
:config
(setq wakatime-cli-path (executable-find "wakatime-cli")))
:init (global-wakatime-mode))
#+end_src
** Wttr.in
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — Autocompletion
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/autocompletion.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/autocompletion.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Autocompletion
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — Editing
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/editing.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/editing.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
+2 -2
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — Emacs Built-ins
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/emacs-builtin.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/emacs-builtin.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
@@ -175,7 +175,7 @@ compilation buffer, as well as enable some syntax highlighting.
#+end_src
** Eshell
#+html: <ImgFigure src="/img/emacs-eshell.svg">Eshell in Emacs</ImgFigure>
[[file:../img/emacs-eshell.svg]]
Eshell is a built-in shell available from Emacs which I use almost as
often as fish. Some adjustments are necessary to make it fit my taste
+2 -2
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — EXWM (Deprecated)
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle no
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/exwm.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* EXWM (Deprecated)
@@ -47,7 +47,7 @@ easily.
In order to launch Emacs with EXWM with ~startx~, I need a ~xinit~ file.
This one is exported to ~$HOME/.xinitrc.emacs~.
#+begin_src sh :tangle no :shebang "#!/bin/sh"
#+begin_src sh :tangle ~/.xinitrc.emacs :shebang "#!/bin/sh"
xhost +SI:localuser:$USER
# Set fallback cursor
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — Making My Life Easier
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/helpful.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/helpful.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Making my life easier
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — LaTeX
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/latex.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/latex.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* LaTeX
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — Misc
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/misc.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/misc.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Misc
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — Org Mode
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/org.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/org.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Org-mode
+4 -31
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — Programming
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/programming.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/programming.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Programming
@@ -455,10 +455,6 @@ Yes, I love org-mode and I largely prefer to use it instead of
Markdown due to its far superior power and abilities. But still,
sometimes I need to use Markdown because not everyone uses org-mode,
unfortunately.
I prefer to use =pandoc= to =markdown= as my =markdown-command=, as it
better handles modern Markdown, including Githubs dialect, which
=markdown= has troubles with.
#+begin_src emacs-lisp
(use-package markdown-mode
:defer t
@@ -469,9 +465,6 @@ better handles modern Markdown, including Githubs dialect, which
("\\.mdx\\'" . markdown-mode))
:hook (markdown-mode . orgtbl-mode)
:hook (markdown-mode . visual-line-mode)
:config
(setq markdown-fontify-code-blocks-natively t
markdown-command '("," "pandoc" "--from=markdown" "--to=html5"))
:general
(phundrak/evil
:keymaps 'markdown-mode-map
@@ -557,7 +550,9 @@ better handles modern Markdown, including Githubs dialect, which
"xp" #'markdown-insert-pre
"xP" #'markdown-pre-region
"xs" #'markdown-insert-strike-through
"xq" #'markdown-blockquote-region))
"xq" #'markdown-blockquote-region)
:config
(setq markdown-fontify-code-blocks-natively t))
#+end_src
Since most of my Markdown files are related to GitHub, Id like to be
@@ -709,28 +704,6 @@ When editing some scripts though, I need to use the built-in ~shell-mode~.
:mode "/\\(Cargo.lock\\|\\.cargo/config\\)\\'")
#+end_src
*** Typst
[[https://typst.app/][Typst]] is an attempt at making a simpler LaTeX alternative with a quite
simple language that still has some programming capabilities. In my
case, I use [[https://codeberg.org/meow_king/typst-ts-mode/][typst-ts-mode]] to get a major mode for Typst, relying on
[[https://github.com/uben0/tree-sitter-typst][uben0s Typst treesitter module]].
#+begin_src emacs-lisp
(use-package typst-ts-mode
:defer t
:straight (:build t))
#+end_src
I also wrote a package that extends =lsp-mode= to support [[https://github.com/Myriad-Dreamin/tinymist][tinymist]] as an
LSP server for Typst.
#+begin_src emacs-lisp
(use-package lsp-typst
:after lsp-mode
:mode "\\.typ\\'"
:hook (typst-ts-mode . lsp-deferred)
:straight (:build t :type git :repo "labs.phundrak.com/phundrak/lsp-typst"))
#+end_src
*** Yaml
#+begin_src emacs-lisp
(use-package yaml-mode
+1 -1
View File
@@ -1,7 +1,7 @@
#+title: Emacs — Packages — Visual Configuration
#+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/visual-config.el
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/user-lisp/visual-config.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Visual Configuration
+8 -7
View File
@@ -2,7 +2,7 @@
#+title: Git
#+setupfile: headers
#+PROPERTY: header-args :exports code :tangle no
#+PROPERTY: header-args:conf-unix :mkdirp yes :tangle no :exports code :noweb yes
#+PROPERTY: header-args:conf-unix :mkdirp yes :tangle ~/.config/git/config :exports code :noweb yes
* Git
** Basic configuration
@@ -46,23 +46,24 @@ This is entirely a matter of personal preferences, but I like to use
*** Better Diffing
Gits diffing algorithm evolved and improved over time, but its
default algorithm did not. Take this example, from [[https://blog.gitbutler.com/how-git-core-devs-configure-git/][this Gitbutler article]]:
default algorithm did not. Take this example, from [[https://blog.gitbutler.com/how-git-core-devs-configure-git/][this Gitbutler
article]]:
#+html: <ImgFigure src="/img/git/diff-default.png">Default git diff output</ImgFigure>
[[file:./img/git/diff-default.png]]
Not really readable, I think youll agree. I mean, you can sort of see
what happens, but really, we just moved the =h2= styling below the
=.event= styling. Git seems to think otherwise. However, lets turn on
the =histogram= algorithm on:
#+html: <ImgFigure src="/img/git/diff-histogram.png">git diff output with histogram algorithm</ImgFigure>
[[file:./img/git/diff-histogram.png]]
Immediately, we have a much clearer picture of what happened! But Ill
let you on another secret: you can make it even clearer by using the
=colorMoved= option to color differently lines that were moved from
lines that were actually modified!
#+html: <ImgFigure src="/img/git/diff-moved.png">git diff output with histogram algorithm and specific colours for moved blocks</ImgFigure>
[[file:./img/git/diff-moved.png]]
Ill also add a configuration to make it easier to see what is being
compared using =mnemonicPrefix=. As per =man git-config=:
@@ -126,11 +127,11 @@ show you the conflicting incoming and HEAD changes, but it will also
show you what the code was before either modified the conflicting
area. Not a must-have feature, but a nice one to have. Compare this:
#+html: <ImgFigure src="/img/git/merge-default.png">Default appearance of a git conflict during a merge</ImgFigure>
[[file:./img/git/merge-default.png]]
To this:
#+html: <ImgFigure src="/img/git/merge-zdiff3.png">Same git conflict but with zdiff3</ImgFigure>
[[file:./img/git/merge-zdiff3.png]]
We have a new line beginning with =|||||||= with the original line
below. Also, its nice to see Emacs supports this syntax out of the

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 323 KiB

Before

Width:  |  Height:  |  Size: 592 KiB

After

Width:  |  Height:  |  Size: 592 KiB

Before

Width:  |  Height:  |  Size: 4.3 MiB

After

Width:  |  Height:  |  Size: 4.3 MiB

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Before

Width:  |  Height:  |  Size: 415 KiB

After

Width:  |  Height:  |  Size: 415 KiB

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Before

Width:  |  Height:  |  Size: 395 KiB

After

Width:  |  Height:  |  Size: 395 KiB

+1 -1
View File
@@ -2,7 +2,7 @@
#+setupfile: ../headers
#+property: header-args:emacs-lisp :tangle no :exports results :cache yes :noweb yes
#+html: <ImgFigure src="/img/stumpwm.png">StumpWM Screenshot</ImgFigure>
[[file:../img/stumpwm.png]]
* StumpWM (deprecated)
+5095
View File
File diff suppressed because it is too large Load Diff
+18 -5
View File
@@ -1,17 +1,30 @@
{
"name": "config.phundrak.com",
"version": "2.0.0",
"version": "1.0.0",
"description": "",
"main": "index.js",
"repository": "https://labs.phundrak.com/phundrak/config.phundrak.com",
"repository": {
"type": "git",
"url": "https://labs.phundrak.com/phundrak/conlang.phundrak.com"
},
"author": "Lucien Cartier-Tilet <lucien@phundrak.com>",
"license": "AGPL-3.0",
"private": true,
"devDependencies": {
"vitepress": "^2.0.0-alpha.18"
"@vuepress/bundler-vite": "2.0.0-rc.26",
"@vuepress/plugin-slimsearch": "^2.0.0-rc.118",
"@vuepress/plugin-umami-analytics": "2.0.0-rc.118",
"@vuepress/theme-default": "2.0.0-rc.118",
"baseline-browser-mapping": "^2.10.0",
"sass-embedded": "^1.97.3",
"vuepress": "2.0.0-rc.26"
},
"dependencies": {
"less": "^4.4.2",
"nord": "^0.2.1"
},
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build"
"dev": "vuepress dev docs",
"build": "vuepress build docs"
}
}
-1252
View File
File diff suppressed because it is too large Load Diff
-3
View File
@@ -1,3 +0,0 @@
allowBuilds:
'@parcel/watcher': true
esbuild: true
-7
View File
@@ -1,7 +0,0 @@
// -*- mode: json-ts; -*-
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "config-phundrak-com",
"pages_build_output_dir": ".vitepress/dist/",
"compatibility_date": "2026-07-11"
}