Compare commits

..

99 Commits

Author SHA1 Message Date
f4ae8b2e21 chore: upgrade Vuepress 2025-11-19 12:55:52 +01:00
21c570a440 fix(mu4e): disable ical features for now 2025-11-19 12:40:01 +01:00
9b266c444d docs: formatting 2025-11-19 12:40:01 +01:00
3fe9b05623 chore(applications): change remote of npm-transient 2025-11-19 12:40:01 +01:00
c29895d019 treesitter 2025-11-19 12:40:01 +01:00
003d5d12cf feat(Nix): add nix-ts-mode for TreeSitter support in Nix files 2025-11-19 12:40:01 +01:00
764be96265 feat(treesit/astro): disable autocompilation of astro grammar 2025-11-19 12:40:01 +01:00
4b070dbe4f langtool 2025-11-19 12:40:01 +01:00
e432aa5f20 feat(LSP): add better LSP config for LSP servers 2025-11-19 12:40:01 +01:00
419d291d21 feat(tree-sitter): better tree sitter config, precompiled grammars 2025-11-19 12:40:01 +01:00
43e54218a9 feat(wakatime): add wakatime package 2025-11-19 12:40:01 +01:00
bbfd7414f4 feat(webkit browser): remove webkit browser config
I no longer use it, and my Emacs build does not include it anyway.
2025-11-19 12:40:01 +01:00
06a787d3c9 feat(jujutsu): add jjdescription package 2025-11-19 12:40:01 +01:00
0adfe045a8 feat(langtool): restore langtool, using a local server 2025-11-19 12:40:01 +01:00
79fbbd45e5 fix(mu4e): preserve newlines in signature 2025-11-19 12:40:01 +01:00
df99684d3c feat(AI): add AI agent packages to Emacs 2025-11-19 12:40:01 +01:00
4adcfc8f6f feat(langtool): better keybind for langtool-correct-at-point 2025-11-19 12:40:01 +01:00
9d58977c68 feat(emacs): add Json and Tailwind CSS configuration 2025-11-19 12:40:01 +01:00
5c28ff6d39 feat(emacs): add QML configuration 2025-11-19 12:39:59 +01:00
880d9a0a4a feat(emacs): add Jujutsu packages 2025-11-19 12:39:59 +01:00
11aba117de feat(emacs): add keybinds for org-clock 2025-11-19 12:39:59 +01:00
7a7700855f feat(shell/eat): improve eat configuration
This commit enables eat-mode in Eshell, allowing the use of tools that
normally would not work in Eshell.

It also automatically closes the eat buffer when exiting the shell
instead of keeping it open.
2025-06-08 14:51:25 +02:00
b330e1c7e0 feat(emacs/exwm): deprecate EXWM config 2025-05-24 23:35:17 +02:00
5c5ec6f668 feat(emacs/avy): remove avy-dispatch-alist config
This variable was set to its default value already.
2025-05-24 23:24:17 +02:00
aaf7edeba6 feat(emacs/mu4e): remove .desktop for mu4e (already in NixOS config) 2025-05-24 23:22:28 +02:00
d37bfce977 docs(index): add note about NixOS configuration 2025-05-24 21:48:46 +02:00
b3a4f3cbd8 chore: switch from shell.nix to devenv 2025-05-24 21:48:46 +02:00
f720e6a57e chore: deprecate StumpWM, Picom, and Neofetch configurations 2025-05-24 21:48:46 +02:00
e87c0a9217 feat(keybinds): add treemacs keybinds 2025-05-24 21:24:14 +02:00
8748b30895 fix(emacs/keybinds): correct native Elisp functions closing buffers 2025-05-24 21:23:25 +02:00
295ed85fd5 feat(emacs/term): replace VTerm with Eat 2025-05-24 21:22:26 +02:00
4a31230d16 feat(emacs/mu4e): update config for current NixOS configuration 2025-05-24 21:21:47 +02:00
20ac94c9fb feat(emacs/tramp): add NixOS support for TRAMP connections 2025-05-24 21:20:20 +02:00
57a5be3183 fix(emacs/lsp): fix LSP on NixOS 2025-05-24 21:19:43 +02:00
1ad9328960 fix(emacs/packages): fix some packages setup 2025-05-24 21:19:25 +02:00
78029eefc8 feat(dart): remove Dart config 2025-05-24 21:17:34 +02:00
6e601839aa docs(git): switch from gpg signing to ssh signing 2025-03-12 13:53:48 +01:00
3c5e0db760 fix: move link to bootstrap script to deprecated links 2025-03-02 14:33:09 +01:00
5bc174dd9d docs(git): additional comments and documentation 2025-03-02 14:28:19 +01:00
3ad2ae4074 docs(emacs/basic): set backup directory for TRAMP files 2025-03-02 14:20:21 +01:00
c2ebc0db51 docs(emacs/misc): set custom function for Elcord buffer name 2025-03-02 14:20:10 +01:00
316aabe413 docs(emacs/programming): set treesitter for Rust modes 2025-03-02 14:20:10 +01:00
6b379bfaf8 docs(emacs/programming): never really used emacsql directly 2025-03-02 14:20:10 +01:00
ec0fe5c43c docs(scripts): remove yarn wrapper
It caused more harm than good
2025-03-02 14:20:09 +01:00
d4ec04f975 docs(hyprland): update syntax for current version of Hyprland 2025-03-02 14:20:09 +01:00
358464f10a docs(hyprland): enable numlock by default 2025-03-02 14:20:09 +01:00
6fe4ff5f8e docs(git): comment and update my git configuration 2025-03-02 14:20:09 +01:00
8cd8b3e342 chore: temporarily disable custom CSS 2025-02-11 09:13:36 +01:00
bb720581fb chore: deploy to Cloudflare Pages 2025-02-09 10:58:02 +01:00
be955e6673 docs(scripts): delete unused scripts, switch some from fish to bash
All checks were successful
deploy / build (push) Successful in 4m12s
2024-11-08 21:19:59 +01:00
bd851e73a6 docs: replace Firefox with Zen Browser 2024-11-08 20:11:05 +01:00
98e6a409b4 docs(emacs): add "ci" as a highlighted keyword in Magit 2024-11-08 20:04:28 +01:00
d9a7e58f1e docs(emacs): remove csetq, replace it with setopt
All checks were successful
deploy / build (push) Successful in 5m24s
2024-10-06 11:58:42 +02:00
4baaaadf02 docs(emacs/programming): add information regarding Vue programming
All checks were successful
deploy / build (push) Successful in 5m27s
2024-10-05 20:10:42 +02:00
03bde6015f docs(programming): remove zig configuration 2024-10-05 20:10:42 +02:00
5631935f8f docs(emacs/programming): separate dap-mode from lsp-mode 2024-10-05 20:10:42 +02:00
edaef817b5 docs(emacs/treesit): better syntax highlighting with tree-sitter 2024-10-05 20:10:41 +02:00
697edb0cdb fix: correct tangle name for keybinding management 2024-10-05 20:10:41 +02:00
39f8a4510b docs: add todo
All checks were successful
deploy / build (push) Successful in 6m4s
2024-10-03 19:55:54 +02:00
664aa185dd docs(emasc/keybinds): add keybind to rename-uniquely 2024-10-03 19:55:29 +02:00
39d9900022 docs(emacs/org): fix keybinding and add another
All checks were successful
deploy / build (push) Successful in 5m36s
2024-09-21 16:08:30 +02:00
bbb77f27c8 fix: restore some more broken links
All checks were successful
deploy / build (push) Successful in 5m42s
2024-09-21 15:37:31 +02:00
c02d6690ed fix: restore broken links
All checks were successful
deploy / build (push) Successful in 5m30s
2024-09-21 15:27:37 +02:00
420bd45c34 docs(emacs/org): add org-mode keybinds for conlanging.el
All checks were successful
deploy / build (push) Successful in 5m40s
2024-09-21 12:15:55 +02:00
bdbe74c5e7 docs(emacs): add ron-mode 2024-09-21 12:15:37 +02:00
f61b58f9c7 chore: switch from yarn to npm, update dependencies 2024-09-21 12:15:07 +02:00
30892f9ca0 docs(emacs): remove garbage collection code
Some checks failed
deploy / build (push) Failing after 0s
It actually made Emacs hang a lot, which isn’t good
2024-09-12 21:02:16 +02:00
ba39302238 docs(hyprland): remove unused master layout 2024-09-12 21:01:01 +02:00
25e3b3db92 chore: update dependencies 2024-09-12 21:00:43 +02:00
58fc99cf8c docs(emacs): remove undo-tree
All checks were successful
deploy / build (push) Successful in 7m57s
2024-06-20 18:41:32 +02:00
9d8c985588 docs(emacs): better configuration for vterm 2024-06-20 18:41:16 +02:00
4759bf48d0 docs(hyprland): replace discord with vesktop 2024-06-20 18:40:14 +02:00
4567b9aa02 docs(hyprland): remove touchpad settings 2024-06-20 18:39:58 +02:00
bec66b58a7 docs(fish): add my pumo-system-info utility to fish greeting
All checks were successful
deploy / build (push) Successful in 2m22s
2024-06-20 09:42:11 +02:00
d97531a1d1 docs(fish): better starfish prompt 2024-06-20 09:42:11 +02:00
7848ed1168 docs(fish): enable transient prompt with starfish 2024-06-20 09:42:11 +02:00
4f50b88488 docs(fish): add sqlx autocompletion to shell 2024-06-20 09:42:11 +02:00
63133d312e docs(emacs programming): fix treesit urls and add Astro config 2024-06-20 09:42:06 +02:00
d7c2eadcec fix(umami): fix Umami site ID 2024-06-20 09:38:44 +02:00
bcaeb2ac30 docs(rustfmt): remove rustfmt config
All checks were successful
deploy / build (push) Successful in 2m55s
2024-04-13 08:45:36 +02:00
dependabot[bot]
d1d8fa9f0d chore(deps): bump the npm_and_yarn group across 1 directory with 3 updates
All checks were successful
deploy / build (push) Successful in 1m42s
Bumps the npm_and_yarn group with 3 updates in the / directory: [ip](https://github.com/indutny/node-ip), [tar](https://github.com/isaacs/node-tar) and [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `ip` from 2.0.0 to 2.0.1
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

Updates `tar` from 6.2.0 to 6.2.1
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.2.0...v6.2.1)

Updates `vite` from 5.0.12 to 5.0.13
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.13/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.13/packages/vite)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 22:14:58 +02:00
b6449d2836 docs(README): update website badge
All checks were successful
deploy / build (push) Successful in 1m37s
2024-04-11 06:31:23 +02:00
7b76d45eb5 docs(hyprland): replace dunst with swaync, add wlsunset to autostart
All checks were successful
deploy / build (push) Successful in 1m46s
2024-04-11 06:23:15 +02:00
90813e5ecf docs(emacs): add eshell-vterm package 2024-04-03 06:10:33 +02:00
184510f1af docs(emacs): add method for tangling all Emacs config files 2024-04-03 06:09:36 +02:00
b11b2982c6 docs(emacs): fix docstring of windows-adjust-size 2024-04-03 06:09:06 +02:00
788ecefbe5 docs(emacs): move most keybindings to same file
All general keybindings (not linked to a specific mode) are now
defined in keybindings.org in neatly displayed tables.
2024-04-03 06:07:58 +02:00
b4e585457b docs(emacs, fish): add eww-related features
Emacs: add yuck-mode with parinfer-rust-mode enabled by default.

Fish: add eww autocompletions
2024-04-03 06:04:23 +02:00
f7b6ef1a4c docs(hyprland, scripts): better screenshot script
This commit adds the possibility of using swappy to edit screenshots.
It also changes the behaviour of the delay by first allowing the user
to select the area they want to capture, and then only does it wait
for the indicated amount of time before it takes the screen capture.
2024-04-03 06:03:17 +02:00
8ec4e4ad43 docs(hyprland): better screens configuration 2024-04-03 06:00:08 +02:00
f78c81b21f docs(hyprland): fix mouse keybindings
All checks were successful
deploy / build (push) Successful in 2m3s
2024-04-02 06:20:49 +02:00
7497a07278 chore: update yarn lockfile
All checks were successful
deploy / build (push) Successful in 1m48s
2024-04-02 05:39:01 +02:00
80b61bfbc7 docs(hyprland): add Hyprland config
Some checks failed
deploy / build (push) Failing after 6m58s
2024-04-01 21:49:34 +02:00
83aa372345 chore,docs: add Nix shell, update readme accordingly 2024-04-01 06:48:58 +02:00
345e8d04c8 chore: update version of yarn used 2024-04-01 06:46:27 +02:00
92459846c3 docs(emacs): add nix-mode 2024-03-21 06:20:57 +01:00
0a75cd2637 docs(tmux): fix keybindings generation 2024-03-21 06:20:47 +01:00
d694bcf2d9 docs(scripts): script to make Emacs usable in a browser 2024-03-21 06:20:13 +01:00
392ec1d137 docs(scripts): fix wrappers 2024-03-21 06:19:55 +01:00
51 changed files with 6289 additions and 5742 deletions

7
.envrc Normal file
View File

@@ -0,0 +1,7 @@
export DIRENV_WARN_TIMEOUT=20s
eval "$(devenv direnvrc)"
# The use_devenv function supports passing flags to the devenv command
# For example: use devenv --impure --option services.postgres.enable:bool true
use devenv

View File

@@ -1,32 +0,0 @@
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@v3
with:
node-version: 18.x
- run: corepack enable
- run: yarn install --frozen-lockfile
- run: yarn build
- 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

40
.github/workflows/deploy.yaml vendored Normal file
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

10
.gitignore vendored
View File

@@ -4,3 +4,13 @@ node_modules
/docs/**/*.md /docs/**/*.md
/docs/.vuepress/dist/ /docs/.vuepress/dist/
/.yarn/ /.yarn/
# Devenv
.devenv*
devenv.local.nix
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml

View File

@@ -1,3 +0,0 @@
enableMessageNames: false
nodeLinker: node-modules

View File

@@ -3,7 +3,7 @@
#+html: <a href="https://www.gnu.org/software/emacs/"><img src="https://img.shields.io/badge/Emacs-29.1-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white" /></a> #+html: <a href="https://www.gnu.org/software/emacs/"><img src="https://img.shields.io/badge/Emacs-29.1-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white" /></a>
#+html: <a href="https://orgmode.org/"><img src="https://img.shields.io/badge/Written%20with-Org%20mode-success?logo=Org&logoColor=white&style=flat-square"/></a> #+html: <a href="https://orgmode.org/"><img src="https://img.shields.io/badge/Written%20with-Org%20mode-success?logo=Org&logoColor=white&style=flat-square"/></a>
#+html: <a href="https://v2.vuepress.vuejs.org/"><img src="https://img.shields.io/badge/Framework-Vuepress-42D392?logo=Vue.js&logoColor=white&style=flat-square"/></a> #+html: <a href="https://v2.vuepress.vuejs.org/"><img src="https://img.shields.io/badge/Framework-Vuepress-42D392?logo=Vue.js&logoColor=white&style=flat-square"/></a>
#+html: <a href="https://config.phundrak.com"><img src="https://img.shields.io/badge/dynamic/json?label=Website&query=%24%5B%3A1%5D.status&url=https%3A%2F%2Fdrone.phundrak.com%2Fapi%2Frepos%2Fphundrak%2beta.config.phundrak.com%2Fbuilds&style=flat-square&logo=buffer" /></a> #+html: <a href="https://config.phundrak.com/"><img src="https://img.shields.io/badge/Website-online-success?logo=buffer&logoColor=white&style=flat-square"/></a>
* About the Project * About the Project
@@ -14,6 +14,14 @@ through [[https://www.gnu.org/software/emacs/][Emacs]].
These Markdown files are then compiled by [[https://v2.vuepress.vuejs.org/][Vuepress]] into a beautiful These Markdown files are then compiled by [[https://v2.vuepress.vuejs.org/][Vuepress]] into a beautiful
website available at [[https://beta.config.phundrak.com][config.phundrak.com]]. website available at [[https://beta.config.phundrak.com][config.phundrak.com]].
Note that a few configs here are no longer up to date. I am in the
process of switching over to [[https://nixos.org/][NixOS]]. You can find my current NixOS
configuration [[https://labs.phundrak.com/phundrak/nix-config][in this repository]]. It will eventually circle back to
being a litterary configuration. Not every piece of software will be
configured by Nix exclusively though, Emacs for instance will stay
relatively free of Nix configurations aside from its basic
installation.
* Running the project * Running the project
In order to run the project, you need to export all =.org= files in the In order to run the project, you need to export all =.org= files in the
Markdown format. To do that easily, you can use an org project setup Markdown format. To do that easily, you can use an org project setup
@@ -57,14 +65,20 @@ npm install # delete the yarn.lock file first
Once this is done, you can launch a preview of the project. Once this is done, you can launch a preview of the project.
#+begin_src shell #+begin_src shell
yarn docs:dev yarn dev
# or # or
npm run docs:dev npm run dev
#+end_src #+end_src
You can also compile the project to a static website. You can also compile the project to a static website.
#+begin_src shell #+begin_src shell
yarn docs:build yarn build
# or # or
npm run docs:build npm run build
#+end_src #+end_src
** With Nix shell
A Nix shell is available for running the project without the Emacs
part. Simply run =nix-shell= in the project root. Youll get the latest
version of =yarn= installed and should be able to run the commands
above.

103
devenv.lock Normal file
View File

@@ -0,0 +1,103 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1747717470,
"owner": "cachix",
"repo": "devenv",
"rev": "c7f2256ee4a4a4ee9cbf1e82a6e49b253c374995",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747372754,
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1746807397,
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "c5208b594838ea8e6cca5997fbf784b7cca1ca90",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"git-hooks": "git-hooks",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": [
"git-hooks"
]
}
}
},
"root": "root",
"version": 7
}

9
devenv.nix Normal file
View File

@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
languages.typescript.enable = true;
packages = [ pkgs.nodejs_20 ];
scripts.export.exec = ''
${pkgs.emacs}/bin/emacs -Q --script export.el
'';
}

15
devenv.yaml Normal file
View File

@@ -0,0 +1,15 @@
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
# 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
# permittedInsecurePackages:
# - "openssl-1.1.1w"
# If you have more than one devenv you can merge them
#imports:
# - ./backend

View File

@@ -1,19 +1,14 @@
import { defaultTheme } from '@vuepress/theme-default'; import { defaultTheme } from '@vuepress/theme-default';
import { viteBundler } from '@vuepress/bundler-vite'; import { viteBundler } from '@vuepress/bundler-vite';
import { defineUserConfig } from 'vuepress'; import { defineUserConfig } from 'vuepress';
import { searchProPlugin } from 'vuepress-plugin-search-pro'; import { slimsearchPlugin } from '@vuepress/plugin-slimsearch';
import head from './head'; import head from './head';
interface ChildPage {
text: string;
link: string;
}
export default defineUserConfig({ export default defineUserConfig({
lang: 'en-US', lang: 'en-US',
title: "Phundrak's Dotfiles", title: "Phundrak's Dotfiles",
head: head, head: head as any,
description: "Documentation of the GNU/Linux configuration of P'undrak", description: "Documentation of the GNU/Linux configuration of P'undrak",
bundler: viteBundler({}), bundler: viteBundler({}),
markdown: { markdown: {
@@ -25,9 +20,9 @@ export default defineUserConfig({
}, },
}, },
plugins: [ plugins: [
searchProPlugin({ slimsearchPlugin({
indexContent: true, indexContent: true
}), })
], ],
theme: defaultTheme({ theme: defaultTheme({
sidebarDepth: 5, sidebarDepth: 5,
@@ -62,37 +57,38 @@ export default defineUserConfig({
'/shell', '/shell',
'/fish', '/fish',
'/git', '/git',
'/hyprland',
'/mpd', '/mpd',
'/neofetch',
'/picom',
'/rustfmt',
{
text: 'StumpWM',
link: '/stumpwm/',
collapsible: true,
children: [
'/stumpwm/init',
'/stumpwm/colours',
'/stumpwm/mode-line',
'/stumpwm/groups',
'/stumpwm/theme',
'/stumpwm/commands',
'/stumpwm/keybindings',
'/stumpwm/utilities',
],
},
'/tmux', '/tmux',
'/bootstrap',
{ {
text: 'Deprecated Configs', text: 'Deprecated Configs',
link: '/deprecated/', link: '/deprecated/',
collapsible: true, collapsible: true,
children: [ children: [
'/deprecated/awesome', '/deprecated/awesome',
'/deprecated/bootstrap',
'/emacs/packages/exwm',
'/deprecated/i3', '/deprecated/i3',
'/deprecated/nano', '/deprecated/nano',
'/neofetch',
'/picom',
'/deprecated/polybar', '/deprecated/polybar',
'/deprecated/spacemacs', '/deprecated/spacemacs',
{
text: 'StumpWM',
link: '/stumpwm/',
collapsible: true,
children: [
'/stumpwm/init',
'/stumpwm/colours',
'/stumpwm/mode-line',
'/stumpwm/groups',
'/stumpwm/theme',
'/stumpwm/commands',
'/stumpwm/keybindings',
'/stumpwm/utilities',
],
},
], ],
}, },
], ],

View File

@@ -1,16 +1,16 @@
interface SimplifiedHeader { interface SimplifiedHeader {
tag: string; tag: string;
content: [any]; content: any[];
} }
const simplifiedHead = [ const simplifiedHead:SimplifiedHeader[] = [
{ {
tag: 'script', tag: 'script',
content: [ content: [
{ {
async: true, async: true,
src: 'https://umami.phundrak.com/script.js', src: 'https://umami.phundrak.com/script.js',
'data-website-id': '67166941-8c83-4a19-bc8c-139e44b7f7aa', 'data-website-id': '9574ed51-3939-4d4e-979f-6b2908fbe1af',
'data-do-not-track': 'true', 'data-do-not-track': 'true',
}, },
], ],
@@ -128,7 +128,7 @@ const simplifiedHead = [
}, },
]; ];
let head = []; let head:[string, any, string?][] = [];
simplifiedHead.forEach((tag: SimplifiedHeader) => { simplifiedHead.forEach((tag: SimplifiedHeader) => {
let tagName = tag.tag; let tagName = tag.tag;
tag.content.forEach((element) => { tag.content.forEach((element) => {

View File

@@ -4,171 +4,171 @@
* - Copyright (c) 2016-present Sven Greb <development@svengreb.de> * - Copyright (c) 2016-present Sven Greb <development@svengreb.de>
*/ */
:root { // :root {
--nord0: #2e3440; // --nord0: #2e3440;
--nord1: #3b4252; // --nord1: #3b4252;
--nord2: #434c5e; // --nord2: #434c5e;
--nord3: #4c566a; // --nord3: #4c566a;
--nord4: #d8dee9; // --nord4: #d8dee9;
--nord5: #e5e9f0; // --nord5: #e5e9f0;
--nord6: #eceff4; // --nord6: #eceff4;
--nord7: #8fbcbb; // --nord7: #8fbcbb;
--nord8: #88c0d0; // --nord8: #88c0d0;
--nord9: #81a1c1; // --nord9: #81a1c1;
--nord10: #5e81ac; // --nord10: #5e81ac;
--nord11: #bf616a; // --nord11: #bf616a;
--nord12: #d08770; // --nord12: #d08770;
--nord13: #ebcb8b; // --nord13: #ebcb8b;
--nord14: #a3be8c; // --nord14: #a3be8c;
--nord15: #b48ead; // --nord15: #b48ead;
scroll-behavior: smooth; // scroll-behavior: smooth;
// brand colors // // brand colors
--c-brand: var(--nord9); // --c-brand: var(--nord9);
--c-brand-light: var(--nord14); // --c-brand-light: var(--nord14);
// background colors // // background colors
--c-bg: var(--nord6); // --c-bg: var(--nord6);
--c-bg-light: var(--nord6); // --c-bg-light: var(--nord6);
--c-bg-lighter: var(--nord5); // --c-bg-lighter: var(--nord5);
--c-bg-dark: var(--nord5); // --c-bg-dark: var(--nord5);
--c-bg-darker: var(--nord4); // --c-bg-darker: var(--nord4);
--c-bg-navbar: var(--c-bg); // --c-bg-navbar: var(--c-bg);
--c-bg-sidebar: var(--c-bg); // --c-bg-sidebar: var(--c-bg);
--c-bg-arrow: var(--nord4); // --c-bg-arrow: var(--nord4);
// text colors // // text colors
--c-text: var(--nord1); // --c-text: var(--nord1);
--c-text-accent: var(--c-brand); // --c-text-accent: var(--c-brand);
--c-text-light: var(--nord2); // --c-text-light: var(--nord2);
--c-text-lighter: var(--nord3); // --c-text-lighter: var(--nord3);
--c-text-lightest: var(--nord4); // --c-text-lightest: var(--nord4);
--c-text-quote: var(--nord2); // --c-text-quote: var(--nord2);
// border colors // // border colors
--c-border: var(--nord4); // --c-border: var(--nord4);
--c-border-dark: var(--nord4); // --c-border-dark: var(--nord4);
// custom container colors // // custom container colors
--c-tip: var(--nord14); // --c-tip: var(--nord14);
--c-tip-bg: rgba(163, 190, 140, 0.2); // --c-tip-bg: rgba(163, 190, 140, 0.2);
--c-tip-title: var(--c-text); // --c-tip-title: var(--c-text);
--c-tip-text: var(--c-text); // --c-tip-text: var(--c-text);
--c-tip-text-accent: var(--c-text-accent); // --c-tip-text-accent: var(--c-text-accent);
--c-warning: var(--nord13); // --c-warning: var(--nord13);
--c-warning-bg: rgba(235, 203, 139, 0.3); // --c-warning-bg: rgba(235, 203, 139, 0.3);
--c-warning-bg-light: rgba(235, 203, 139, 0.2); // --c-warning-bg-light: rgba(235, 203, 139, 0.2);
--c-warning-bg-lighter: rgba(235, 203, 139, 0.1); // --c-warning-bg-lighter: rgba(235, 203, 139, 0.1);
--c-warning-border-dark: var(--nord3); // --c-warning-border-dark: var(--nord3);
--c-warning-details-bg: var(--c-bg); // --c-warning-details-bg: var(--c-bg);
--c-warning-title: var(--nord12); // --c-warning-title: var(--nord12);
--c-warning-text: var(--nord12); // --c-warning-text: var(--nord12);
--c-warning-text-accent: var(--nord12); // --c-warning-text-accent: var(--nord12);
--c-warning-text-light: var(--nord12); // --c-warning-text-light: var(--nord12);
--c-warning-text-quote: var(--nord12); // --c-warning-text-quote: var(--nord12);
--c-danger: var(--nord11); // --c-danger: var(--nord11);
--c-danger-bg: rgba(191, 97, 106, 0.2); // --c-danger-bg: rgba(191, 97, 106, 0.2);
--c-danger-bg-light: rgba(191, 97, 106, 0.2); // --c-danger-bg-light: rgba(191, 97, 106, 0.2);
--c-danger-bg-lighter: rgba(191, 97, 106, 0.1); // --c-danger-bg-lighter: rgba(191, 97, 106, 0.1);
--c-danger-border-dark: var(--nord11); // --c-danger-border-dark: var(--nord11);
--c-danger-details-bg: var(--nord2); // --c-danger-details-bg: var(--nord2);
--c-danger-title: var(--nord11); // --c-danger-title: var(--nord11);
--c-danger-text: var(--nord11); // --c-danger-text: var(--nord11);
--c-danger-text-accent: var(--nord11); // --c-danger-text-accent: var(--nord11);
--c-danger-text-light: var(--nord11); // --c-danger-text-light: var(--nord11);
--c-danger-text-quote: var(--nord11); // --c-danger-text-quote: var(--nord11);
--c-details-bg: var(--c-bg-lighter); // --c-details-bg: var(--c-bg-lighter);
// badge component colors // // badge component colors
--c-badge-tip: var(--c-tip); // --c-badge-tip: var(--c-tip);
--c-badge-warning: var(--c-warning); // --c-badge-warning: var(--c-warning);
--c-badge-warning-text: var(--c-bg); // --c-badge-warning-text: var(--c-bg);
--c-badge-danger: var(--c-danger); // --c-badge-danger: var(--c-danger);
--c-badge-danger-text: var(--c-bg); // --c-badge-danger-text: var(--c-bg);
// transition vars // // transition vars
--t-color: 0.3s ease; // --t-color: 0.3s ease;
--t-transform: 0.3s ease; // --t-transform: 0.3s ease;
// code blocks vars // // code blocks vars
--code-bg-color: var(--nord0); // --code-bg-color: var(--nord0);
--code-hl-bg-color: var(--nord1); // --code-hl-bg-color: var(--nord1);
--code-ln-color: #9e9e9e; // --code-ln-color: #9e9e9e;
--code-ln-wrapper-width: 3.5rem; // --code-ln-wrapper-width: 3.5rem;
// font vars // // font vars
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, // --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; // Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
--font-family-code: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; // --font-family-code: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
// layout vars // // layout vars
--navbar-height: 3.6rem; // --navbar-height: 3.6rem;
--navbar-padding-v: 0.7rem; // --navbar-padding-v: 0.7rem;
--navbar-padding-h: 1.5rem; // --navbar-padding-h: 1.5rem;
--sidebar-width: 20rem; // --sidebar-width: 20rem;
--sidebar-width-mobile: calc(var(--sidebar-width) * 0.82); // --sidebar-width-mobile: calc(var(--sidebar-width) * 0.82);
--content-width: 740px; // --content-width: 740px;
--homepage-width: 960px; // --homepage-width: 960px;
} // }
html.dark { // html.dark {
// brand colors // // brand colors
--c-brand: var(--nord14); // --c-brand: var(--nord14);
--c-brand-light: var(--nord14); // --c-brand-light: var(--nord14);
// background colors // // background colors
--c-bg: var(--nord1); // --c-bg: var(--nord1);
--c-bg-light: var(--nord2); // --c-bg-light: var(--nord2);
--c-bg-lighter: var(--nord2); // --c-bg-lighter: var(--nord2);
--c-bg-dark: var(--nord3); // --c-bg-dark: var(--nord3);
--c-bg-darker: var(--nord3); // --c-bg-darker: var(--nord3);
// text colors // // text colors
--c-text: var(--nord4); // --c-text: var(--nord4);
--c-text-light: var(--nord5); // --c-text-light: var(--nord5);
--c-text-lighter: var(--nord5); // --c-text-lighter: var(--nord5);
--c-text-lightest: var(--nord6); // --c-text-lightest: var(--nord6);
--c-text-quote: var(--c-text); // --c-text-quote: var(--c-text);
// border colors // // border colors
--c-border: var(--nord3); // --c-border: var(--nord3);
--c-border-dark: var(--nord3); // --c-border-dark: var(--nord3);
// custom container colors // // custom container colors
--c-tip: var(--nord14); // --c-tip: var(--nord14);
--c-warning: var(--nord13); // --c-warning: var(--nord13);
--c-warning-bg: rgba(235, 203, 139, 0.2); // --c-warning-bg: rgba(235, 203, 139, 0.2);
--c-warning-bg-light: rgba(235, 203, 139, 0.2); // --c-warning-bg-light: rgba(235, 203, 139, 0.2);
--c-warning-bg-lighter: rgba(235, 203, 139, 0.1); // --c-warning-bg-lighter: rgba(235, 203, 139, 0.1);
--c-warning-border-dark: var(--nord3); // --c-warning-border-dark: var(--nord3);
--c-warning-details-bg: var(--c-bg); // --c-warning-details-bg: var(--c-bg);
--c-warning-title: var(--nord13); // --c-warning-title: var(--nord13);
--c-warning-text: var(--nord13); // --c-warning-text: var(--nord13);
--c-warning-text-accent: var(--nord13); // --c-warning-text-accent: var(--nord13);
--c-warning-text-light: var(--nord13); // --c-warning-text-light: var(--nord13);
--c-warning-text-quote: var(--nord13); // --c-warning-text-quote: var(--nord13);
--c-danger: var(--nord11); // --c-danger: var(--nord11);
--c-danger-bg: rgba(191, 97, 106, 0.2); // --c-danger-bg: rgba(191, 97, 106, 0.2);
--c-danger-bg-light: rgba(191, 97, 106, 0.2); // --c-danger-bg-light: rgba(191, 97, 106, 0.2);
--c-danger-bg-lighter: rgba(191, 97, 106, 0.1); // --c-danger-bg-lighter: rgba(191, 97, 106, 0.1);
--c-danger-border-dark: var(--nord11); // --c-danger-border-dark: var(--nord11);
--c-danger-details-bg: var(--nord2); // --c-danger-details-bg: var(--nord2);
--c-danger-title: hsl(354 43% 75.7%); // --c-danger-title: hsl(354 43% 75.7%);
--c-danger-text: hsl(354 43% 80.7%); // --c-danger-text: hsl(354 43% 80.7%);
--c-danger-text-accent: var(--nord11); // --c-danger-text-accent: var(--nord11);
--c-danger-text-light: var(--nord11); // --c-danger-text-light: var(--nord11);
--c-danger-text-quote: var(--nord11); // --c-danger-text-quote: var(--nord11);
--c-details-bg: var(--c-bg-light); // --c-details-bg: var(--c-bg-light);
// badge component colors // // badge component colors
--c-badge-warning-text: var(--nord0); // --c-badge-warning-text: var(--nord0);
--c-badge-danger-text: var(--nord0); // --c-badge-danger-text: var(--nord0);
// code blocks vars // // code blocks vars
--code-hl-bg-color: var(--nord2); // --code-hl-bg-color: var(--nord2);
} // }

View File

@@ -18,13 +18,5 @@ keys or whose remap feature is kind of buggy with some keys, such as
the «é» placed where the «w» is on a Qwerty layout (Im looking at the «é» placed where the «w» is on a Qwerty layout (Im looking at
you, HoloCure). you, HoloCure).
** Installation
If you wish to install my dotfiles and you are on ArchLinux, you can
follow the [[file:bootstrap.org][bootstrap]] page where you can find a walkthrough of how I
configure my environment and what I install. If you have [[https://github.com/TheLocehiliosan/yadm][YADM]]
installed, you can even execute =yadm bootstrap= to execute it after
cloning my repo with =yadm clone
https://labs.phundrak.com/phundrak/dotfiles.git=.
** License ** License
See [[https://labs.phundrak.com/phundrak/dotfiles/src/branch/master/LICENSE.org][the repositorys license file]]. See [[https://labs.phundrak.com/phundrak/dotfiles/src/branch/master/LICENSE.org][the repositorys license file]].

View File

@@ -1031,7 +1031,7 @@ displayed as ~0~). Here is what the possible actions are:
In this category you will find other keybindings that do not fit in other In this category you will find other keybindings that do not fit in other
categories. For now, the only keybinding that is in this category is for categories. For now, the only keybinding that is in this category is for
toggling the touchpads tapping ability. This is linked to a special script I toggling the touchpads tapping ability. This is linked to a special script I
wrote [[file:bin.org::#Toggle_touchpad_tapping-23348b00][here]]. wrote [[file:/scripts.md#toggle-touchpad-tapping][here]].
#+NAME: sc-misc #+NAME: sc-misc
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|--------------------+-----------+---------+-----------+-------------------------+-------| |--------------------+-----------+---------+-----------+-------------------------+-------|

View File

@@ -334,7 +334,7 @@ Some visual packages:
| nordic-theme-git | Nord theme for GTK | | nordic-theme-git | Nord theme for GTK |
| noto-fonts-emoji | Font with emojis | | noto-fonts-emoji | Font with emojis |
| otf-ipafont | Japanese font | | otf-ipafont | Japanese font |
| picom | See [[file:picom.org]] | | picom | See [[file:/picom.org][my Picom config]] |
| powerline-fonts | Powerline fonts | | powerline-fonts | Powerline fonts |
| siji-git | Siji font | | siji-git | Siji font |
| ttf-arphic-uming | CJK font Ming style | | ttf-arphic-uming | CJK font Ming style |
@@ -568,7 +568,6 @@ files that are to be tangled:
| mpd.org | | mpd.org |
| neofetch.org | | neofetch.org |
| picom.org | | picom.org |
| rustfmt.org |
| stumpwm.org | | stumpwm.org |
| tmux.org | | tmux.org |
@@ -583,7 +582,7 @@ files that are to be tangled:
"\n") "\n")
#+END_SRC #+END_SRC
#+RESULTS[127dafd79461dab55296163e57fadb7b355a205a]: generate-tangle #+RESULTS[8b74ad716447b62ace4eeddbd3dae7a1b1bdcdd7]: generate-tangle
#+begin_example #+begin_example
printf '\n\n==== Tangling bin.org\n\n' && \ printf '\n\n==== Tangling bin.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \ emacs -q --batch --eval '(require \'ob-tangle)' \
@@ -620,11 +619,6 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/picom.org")' --eval '(org-babel-tangle-file "~/org/config/picom.org")'
printf '\n\n==== Tangling rustfmt.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/rustfmt.org")'
printf '\n\n==== Tangling stumpwm.org\n\n' && \ printf '\n\n==== Tangling stumpwm.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
@@ -830,7 +824,7 @@ end
#+END_SRC #+END_SRC
*** Symlink some system config files *** Symlink some system config files
Lets symlink the ~plock~ script ([[file:bin.org::#Lock-635fcb38][source here]]) to ~/usr/bin~ so ~xss-lock~ Lets symlink the ~plock~ script ([[file:../scripts.md#plock][source here]]) to ~/usr/bin~ so ~xss-lock~
can find it. can find it.
#+BEGIN_SRC fish #+BEGIN_SRC fish
sudo ln -s ~/.local/bin/plock /usr/bin/plock sudo ln -s ~/.local/bin/plock /usr/bin/plock
@@ -844,7 +838,7 @@ mkdir -p ~/fromGIT
**** Reveal.JS **** Reveal.JS
I sometimes use Reveal.JS to make presentations, and I set its I sometimes use Reveal.JS to make presentations, and I set its
location in my [[file:emacs.org][Emacs config]] to be in =~/fromGIT=, so lets clone it location in my [[file:../emacs/index.md][Emacs config]] to be in =~/fromGIT=, so lets clone it
there. there.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Install Reveal.JS ###########################################################\n\n" printf "\n# Install Reveal.JS ###########################################################\n\n"

View File

@@ -235,7 +235,7 @@ Keywords=Text;Editor;
#+end_src #+end_src
I also have ~mu4e.desktop~ which is used to set my default email client. I also have ~mu4e.desktop~ which is used to set my default email client.
It relies on ~emacsmail~ defined in [[file:bin.org::#Emacsmail-afffb7cd][this document]]. It relies on ~emacsmail~ defined in [[file:./scripts.md#emacsmail][this document]].
#+begin_src conf-desktop :tangle ~/.local/share/applications/mu4e.desktop #+begin_src conf-desktop :tangle ~/.local/share/applications/mu4e.desktop
[Desktop Entry] [Desktop Entry]
Name=Mu4e Name=Mu4e
@@ -344,7 +344,7 @@ Type=Application
*** YouTube ~.desktop~ files *** YouTube ~.desktop~ files
The first ~.desktop~ file related to YouTube is ~ytdl.desktop~ which runs The first ~.desktop~ file related to YouTube is ~ytdl.desktop~ which runs
~ytdl~ defined in [[file:bin.org::#ytdl-a-youtube-dl-wrapper-03bd63e0][this document]]. ~ytdl~ defined in [[file:scripts.md#ytdl][this document]].
#+begin_src conf-desktop :tangle ~/.local/share/applications/ytdl.desktop #+begin_src conf-desktop :tangle ~/.local/share/applications/ytdl.desktop
[Desktop Entry] [Desktop Entry]
Version=0.3 Version=0.3
@@ -357,7 +357,7 @@ Type=Application
Categories=Network;Video Categories=Network;Video
#+end_src #+end_src
There is also ~ytplay.desktop~ for ~ytplay~ defined in [[file:bin.org::#Media-youtube-dl-wrappers-ytplay-z6ka39h0m9j0][this document]]. There is also ~ytplay.desktop~ for ~ytplay~ defined in [[file:scripts.md#ytplay][this document]].
#+begin_src conf-desktop #+begin_src conf-desktop
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application

View File

@@ -27,53 +27,6 @@ loaded, speeding Emacs up a bit.
(blink-cursor-mode 0) ; disable blinking cursor (blink-cursor-mode 0) ; disable blinking cursor
#+end_src #+end_src
*** Better garbage collection
Emacs sometimes freezes up a bit when doing some garbage collection,
which is not super. So, in order to fix that, I do two things:
1. Set up a really high threshold (I have a lot of RAM to spare, so I
dont really care),
2. Hook garbage collection thirty seconds after Emacs loses focus and
every thirty seconds after that,
3. Cancel garbage collection if Emacs gains focus back within this
thirty seconds window.
With a garbage collection threshold, Emacs should never garbage
collect on its own, and Emacs is free to freeze up for a few seconds
when it loses focus since Im looking away.
#+begin_src emacs-lisp
(setq garbage-collection-messages t ;; tell me when garbage collecting
gc-cons-threshold (* 16 1024 1024 1024)) ;; 16GiB of RAM
(defmacro my/time (&rest body)
`(let ((time (current-time)))
,@body
(float-time (time-since time))))
(defun my/garbage-collect ()
"Garbage collect and tell the user how much time it took."
(message "Garbage collector ran for %.06fs"
(my/time (garbage-collect))))
(defvar my/gc-timer nil
"Timer for garbage collection. See
`my/garbage-collect-on-focus-lost'.")
(defun my/garbage-collect-on-focus-lost ()
"Garbage collect when Emacs loses focus.
Garbage collection is only triggered thirty seconds after losing
focus, and only once."
(if (frame-focus-state)
(when (timerp my/gc-timer)
(cancel-timer my/gc-timer))
(setq my/gc-timer (run-with-idle-timer 30 nil #'my/garbage-collect))))
(add-function :after after-focus-change-function #'my/garbage-collect-on-focus-lost)
#+end_src
To write this, I mostly based myself on [[https://news.ycombinator.com/item?id=39190110][this HackerNews thread]] and [[https://akrl.sdf.org/#orgc15a10d][its
related article]].
** Emacs Behavior ** Emacs Behavior
*** Editing Text in Emacs *** Editing Text in Emacs
I *never* want to keep trailing spaces in my files, which is why Im I *never* want to keep trailing spaces in my files, which is why Im
@@ -203,7 +156,9 @@ it looks really uncomfortable! This is why I prefer to tell Emacs to
keep its backup files to itself in a directory it only will access. keep its backup files to itself in a directory it only will access.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq backup-directory-alist `(("." . ,(expand-file-name ".tmp/backups/" (setq backup-directory-alist `(("." . ,(expand-file-name ".tmp/backups/"
user-emacs-directory)))) user-emacs-directory)))
tramp-backup-directory-alist `(("." . ,(expand-file-name ".tmp/tramp-backups/"
user-emacs-directory))))
#+end_src #+end_src
When using LSP with Typescript projects, my =tsconfig.json= or its When using LSP with Typescript projects, my =tsconfig.json= or its
@@ -397,47 +352,3 @@ on the matter.
(unless (string= "-" project-name) (unless (string= "-" project-name)
(format (if (buffer-modified-p) " ◉ %s" "  ●  %s - Emacs") project-name)))))) (format (if (buffer-modified-p) " ◉ %s" "  ●  %s - Emacs") project-name))))))
#+end_src #+end_src
** A better custom variable setter
Something people often forget about custom variables in Elisp is they
can have a custom setter that will run some code if we set the
variable properly with ~customize-set-variable~, so ~setq~ shouldnt be
the users choice by default. But repeatedly writing
~customize-set-variable~ can get tiring and boring. So why not take the
best of both world and create ~csetq~, a ~setq~ that uses
~customize-set-variable~ under the hood while it keeps a syntax similar
to the one ~setq~ uses?
#+begin_src emacs-lisp
(defmacro csetq (&rest forms)
"Bind each custom variable FORM to the value of its VAL.
FORMS is a list of pairs of values [FORM VAL].
`customize-set-variable' is called sequentially on each pair
contained in FORMS. This means `csetq' has a similar behaviour as
`setq': each VAL expression is evaluated sequentially, i.e. the
first VAL is evaluated before the second, and so on. This means
the value of the first FORM can be used to set the second FORM.
The return value of `csetq' is the value of the last VAL.
\(fn [FORM VAL]...)"
(declare (debug (&rest sexp form))
(indent 1))
;; Check if we have an even number of arguments
(when (= (mod (length forms) 2) 1)
(signal 'wrong-number-of-arguments (list 'csetq (1+ (length forms)))))
;; Transform FORMS into a list of pairs (FORM . VALUE)
(let (sexps)
(while forms
(let ((form (pop forms))
(value (pop forms)))
(push `(customize-set-variable ',form ,value)
sexps)))
`(progn ,@(nreverse sexps))))
#+end_src
I first got inspired by [[https://oremacs.com/2015/01/17/setting-up-ediff/][this blog article]] (archived article, just in
case) but it seems the code snippet no longer works properly, so not
only did I have to modify it to make it work with an arbitrary amount
of arguments (as long as its pairs of variables and their value), but
I also had to make the code simply work.

View File

@@ -40,7 +40,7 @@ APPEND and COMPARE-FN, see `add-to-list'."
#+end_src #+end_src
** Generate and insert random passwords ** Generate and insert random passwords
These functions got replaced by my custom package, see [[file:./misc.md#password-generator][Password These functions got replaced by my custom package, see [[file:packages/misc.md#password-generator][Password
generator]]. generator]].
** Handle new windows ** Handle new windows
@@ -59,13 +59,6 @@ focus the new window immediately.
(interactive) (interactive)
(split-window-below) (split-window-below)
(windmove-down)) (windmove-down))
(defun kill-buffer-and-delete-window ()
"Kill the current buffer and delete its window."
(interactive)
(progn
(kill-this-buffer)
(delete-window)))
#+end_src #+end_src
** Resize windows ** Resize windows
@@ -73,9 +66,9 @@ focus the new window immediately.
(with-eval-after-load 'hydra (with-eval-after-load 'hydra
(defhydra windows-adjust-size () (defhydra windows-adjust-size ()
" "
_s_: enlarge
_c_: enlarge _r_: right
_t_: shrink _t_: shrink
_c_: enlarge _r_: right
_s_: enlarge
" "
("c" enlarge-window-horizontally) ("c" enlarge-window-horizontally)
("t" shrink-window) ("t" shrink-window)
@@ -138,3 +131,21 @@ b s~, which bring the user directly to the ~*Messages*~ buffer and the
(interactive) (interactive)
(switch-to-buffer "*scratch*")) (switch-to-buffer "*scratch*"))
#+end_src #+end_src
** Tangle all Emacs config files
#+begin_src emacs-lisp :results none
(defvar my/emacs-org-config-directory
(expand-file-name "org/config/docs/emacs" (getenv "HOME"))
"Location of my config as org files.")
(defun my/tangle-emacs-config ()
"Tangle all my Emacs config files from org files."
(interactive)
(let ((files (f-files my/emacs-org-config-directory
(lambda (file) (f-ext-p file "org"))
t))
(org-confirm-babel-evaluate nil))
(dolist (file files)
(message "Tangling %s" file)
(org-babel-tangle-file file))))
#+end_src

View File

@@ -80,24 +80,23 @@ block.
** Loading All Configuration Modules ** Loading All Configuration Modules
#+name: emacs-modules #+name: emacs-modules
| Module Name | Config Page | | Module Name | Config Page |
|--------------------------+----------------------------------| |------------------------+----------------------------------|
| =basic-config.el= | [[file:./basic-config.org][Basic Configuration]] | | =basic-config.el= | [[file:./basic-config.org][Basic Configuration]] |
| =custom-elisp.el= | [[file:./custom-elisp.org][Custom Elisp]] | | =custom-elisp.el= | [[file:./custom-elisp.org][Custom Elisp]] |
| =package-manager.el= | [[file:./package-manager.org][Package Manager]] | | =package-manager.el= | [[file:./package-manager.org][Package Manager]] |
| =keybinding-managemers.el= | [[file:./keybinding-managemers.org][Keybinding Managers]] | | =keybinding-managers.el= | [[file:keybinding-managers.org][Keybinding Managers]] |
| =applications.el= | [[file:./packages/applications.org][Packages — Applications]] | | =applications.el= | [[file:./packages/applications.org][Packages — Applications]] |
| =autocompletion.el= | [[file:./packages/autocompletion.org][Packages — Autocompletion]] | | =autocompletion.el= | [[file:./packages/autocompletion.org][Packages — Autocompletion]] |
| =editing.el= | [[file:./packages/editing.org][Packages — Editing]] | | =editing.el= | [[file:./packages/editing.org][Packages — Editing]] |
| =emacs-builtin.el= | [[file:./packages/emacs-builtin.org][Packages — Emacs Built-ins]] | | =emacs-builtin.el= | [[file:./packages/emacs-builtin.org][Packages — Emacs Built-ins]] |
| =exwm.el= | [[file:./packages/exwm.org][Packages — EXWM]] | | =helpful.el= | [[file:./packages/helpful.org][Packages — Making My Life Easier]] |
| =helpful.el= | [[file:./packages/helpful.org][Packages — Making My Life Easier]] | | =latex.el= | [[file:./packages/latex.org][Packages — LaTeX]] |
| =latex.el= | [[file:./packages/latex.org][Packages — LaTeX]] | | =misc.el= | [[file:./packages/misc.org][Packages — Misc]] |
| =misc.el= | [[file:./packages/misc.org][Packages — Misc]] | | =org.el= | [[file:./packages/org.org][Packages — Org Mode]] |
| =org.el= | [[file:./packages/org.org][Packages — Org Mode]] | | =programming.el= | [[file:./packages/programming.org][Packages — Programming]] |
| =programming.el= | [[file:./packages/programming.org][Packages — Programming]] | | =visual-config.el= | [[file:./packages/visual-config.org][Packages — Visual Configuration]] |
| =visual-config.el= | [[file:./packages/visual-config.org][Packages — Visual Configuration]] | | =keybindings.el= | [[file:./keybindings.org][Keybindings]] |
| =keybindings.el= | [[file:./keybindings.org][Keybindings]] |
#+name: generate-modules #+name: generate-modules
#+begin_src emacs-lisp :tangle no :cache yes :var modules=emacs-modules :exports none #+begin_src emacs-lisp :tangle no :cache yes :var modules=emacs-modules :exports none
@@ -107,8 +106,8 @@ block.
" ") " ")
#+end_src #+end_src
#+RESULTS[f76449860408293997e174ff94c743d46951835b]: generate-modules #+RESULTS[05f9bb535bec2ba84390cc118600323683f51e7c]: generate-modules
: "basic-config.el" "custom-elisp.el" "package-manager.el" "keybinding-managemers.el" "applications.el" "autocompletion.el" "editing.el" "emacs-builtin.el" "exwm.el" "helpful.el" "latex.el" "misc.el" "org.el" "programming.el" "visual-config.el" "keybindings.el" : "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 #+begin_src emacs-lisp :noweb yes
(dolist (module '(<<generate-modules()>>)) (dolist (module '(<<generate-modules()>>))

View File

@@ -1,7 +1,7 @@
#+title: Emacs — Keybinding Managers #+title: Emacs — Keybinding Managers
#+setupfile: ../headers #+setupfile: ../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code #+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/keybinding-managemers.el #+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/keybinding-managers.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export #+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Keybinding Managers * Keybinding Managers
@@ -68,7 +68,6 @@ they are much more comfortable than Emacs.
evil-want-C-u-scroll t evil-want-C-u-scroll t
evil-want-C-i-jump nil) evil-want-C-i-jump nil)
(require 'evil-vars) (require 'evil-vars)
(evil-set-undo-system 'undo-tree)
:config :config
<<evil-undefine-keys>> <<evil-undefine-keys>>
<<evil-bepo>> <<evil-bepo>>
@@ -156,52 +155,6 @@ additional code compared to most people due to the bépo layout.
(evil-collection-init)) (evil-collection-init))
#+end_src #+end_src
~undo-tree~ is my preferred way of undoing and redoing stuff. The main
reason is it doesnt create a linear undo/redo history, but rather a
complete tree you can navigate to see your complete editing history.
One of the two obvious things to do are to tell Emacs to save all its
undo history files in a dedicated directory, otherwise wed risk
littering all of our directories. The second thing is to simply
globally enable its mode.
#+begin_src emacs-lisp
(use-package undo-tree
:defer t
:straight (:build t)
:custom
(undo-tree-history-directory-alist
`(("." . ,(expand-file-name (file-name-as-directory "undo-tree-hist")
user-emacs-directory))))
:init
(global-undo-tree-mode)
:config
<<undo-tree-ignore-text-properties>>
<<undo-tree-compress-files>>
(setq undo-tree-visualizer-diff t
undo-tree-visualizer-timestamps t
undo-tree-auto-save-history t
undo-tree-enable-undo-in-region t
undo-limit (* 800 1024)
undo-strong-limit (* 12 1024 1024)
undo-outer-limit (* 128 1024 1024)))
#+end_src
An interesting behaviour from DoomEmacs is to compress the history
files with ~zstd~ when it is present on the system. Not only do we enjoy
much smaller files (according to DoomEmacs, we get something like 80%
file savings), Emacs can load them much faster than the regular files.
Sure, it uses more CPU time uncompressing these files, but its
insignificant, and its still faster than loading a heavier file.
#+name: undo-tree-compress-files
#+begin_src emacs-lisp :tangle no
(when (executable-find "zstd")
(defun my/undo-tree-append-zst-to-filename (filename)
"Append .zst to the FILENAME in order to compress it."
(concat filename ".zst"))
(advice-add 'undo-tree-make-history-save-file-name
:filter-return
#'my/undo-tree-append-zst-to-filename))
#+end_src
** Hydra ** Hydra
[[https://github.com/abo-abo/hydra][Hydra]] is a simple menu creator for keybindings. [[https://github.com/abo-abo/hydra][Hydra]] is a simple menu creator for keybindings.
#+begin_src emacs-lisp #+begin_src emacs-lisp

View File

@@ -9,23 +9,32 @@ Undefining some stuff to make keybind prefixes work correctly.
#+name: general-keybindings-gen #+name: general-keybindings-gen
#+header: :tangle no :exports none :results value :cache yes #+header: :tangle no :exports none :results value :cache yes
#+begin_src emacs-lisp :var table=keybinds-windows prefix="" #+begin_src emacs-lisp :var table=keybindings-apps prefix="a"
(mapconcat (lambda (line) (mapconcat
(let* ((key (nth 0 line)) (lambda (line)
(function (nth 1 line)) (let* ((key (format "%s" (nth 0 line)))
(comment (or (nth 2 line) "")) (function (nth 1 line))
(package (or (nth 3 line) ""))) (fn-nil-p (member function '("" "nil")))
(format "\"%s%s\" %s" (comment (or (nth 2 line) ""))
prefix (comment-p (not (string= "" comment)))
key (comment (cond ((nth 2 line) (concat " :wk \"" (nth 2 line) "\""))
(if (string= "" comment) (fn-nil-p " :wk t")
(if (member function '("" "nil")) "nil" (concat "#'" function)) (t "")))
(format "'(%s :wk %s%s)" (package (or (nth 3 line) ""))
(if (member function '("" "nil")) ":ignore t" function) (package-p (not (string= "" (nth 3 line))))
(if (member function '("none" "nil")) "t" (concat "\"" comment "\"")) (package (if package-p (concat " :package " (nth 3 line)) "")))
(if (string-blank-p package) "" (concat ":package " package))))))) (format "\"%s\" %s"
table (concat prefix key)
"\n") (if (or comment-p package-p)
(format "'(%s%s%s)"
(if (member function '("" "nil"))
":ignore t"
function)
(if comment-p comment "")
(if package-p package ""))
(concat "#'" function)))))
table
"\n")
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -36,110 +45,210 @@ Undefining some stuff to make keybind prefixes work correctly.
(phundrak/evil (phundrak/evil
:packages '(counsel) :packages '(counsel)
"U" #'evil-redo "U" '(evil-redo :package evil)
"C-a" #'beginning-of-line "C-a" #'beginning-of-line
"C-e" #'end-of-line "C-e" #'end-of-line
"C-y" #'yank "C-y" #'yank
"M-y" #'counsel-yank-pop) "M-y" '(counsel-yank-pop :package counsel))
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp :results none
(general-define-key (general-define-key
"<f5>" #'compile "<f5>" #'compile
"<f6>" #'recompile) "<f6>" #'recompile)
(phundrak/leader-key (phundrak/leader-key
"SPC" '(counsel-M-x :wk "M-x") "SPC" '(counsel-M-x :wk "M-x")
"'" #'shell-pop "'" '(shell-pop :package shell-pop)
"R" #'recompile
<<general-keybindings-gen(table=keybinds-tabs, prefix="TAB ")>>
<<general-keybindings-gen(table=keybinds-apps, prefix="a")>>
<<general-keybindings-gen(table=keybinds-apps-shell, prefix="as")>>
<<general-keybindings-gen(table=treemacs-keybinds, prefix="at")>>
<<general-keybindings-gen(table=keybinds-buffers, prefix="b")>>
"c" '(:ignore t :wk "code")
"cl" #'evilnc-comment-or-uncomment-lines
<<keybindings-flycheck>>
<<general-keybindings-gen(table=keybinds-files, prefix="f")>>
<<keybinds-specific-files>>
<<general-keybindings-gen(table=keybinds-help, prefix="h")>>
"i" '(:ignore t :wk "insert")
"iu" #'counsel-unicode-char
<<general-keybindings-gen(table=keybinds-jump, prefix="j")>>
<<general-keybindings-gen(table=keybinds-toggle, prefix="t ")>>
<<general-keybindings-gen(table=keybinds-text, prefix="T")>>
<<general-keybindings-gen(table=keybinds-windows, prefix="w")>>
<<general-keybindings-gen(table=keybinds-quit, prefix="q")>>
"u" #'universal-argument "u" #'universal-argument
"U" #'undo-tree-visualize)
<<general-keybindings-gen(table=keybindings-tabs, prefix="TAB ")>>
<<general-keybindings-gen(table=keybindings-apps, prefix="a")>>
<<general-keybindings-gen(table=keybindings-apps-shell, prefix="as")>>
<<general-keybindings-gen(table=keybindings-treemacs, prefix="at")>>
<<general-keybindings-gen(table=keybindings-buffers, prefix="b")>>
<<general-keybindings-gen(table=keybindings-code, prefix="c")>>
<<general-keybindings-gen(table=keybindings-errors, prefix="e")>>
<<keybindings-errors-extra>>
<<general-keybindings-gen(table=keybindings-files, prefix="f")>>
<<keybindings-files-extras>>
<<general-keybindings-gen(table=keybindings-git, prefix="g")>>
<<general-keybindings-gen(table=keybindings-help, prefix="h")>>
<<general-keybindings-gen(table=keybindings-insert, prefix="i")>>
<<general-keybindings-gen(table=keybindings-jump, prefix="j")>>
<<general-keybindings-gen(table=keybindings-language, prefix="l")>>
<<general-keybindings-gen(table=keybindings-media, prefix="m")>>
<<general-keybindings-gen(table=keybindings-org, prefix="o")>>
<<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-windows, prefix="w")>>
<<general-keybindings-gen(table=keybindings-quit, prefix="q")>>)
#+end_src #+end_src
** Apps ** Apps
Here are my apps keybinds. Each one of them is prefixed by ~a~. Here are my apps keybindings. Each one of them is prefixed by ~a~.
#+name: keybinds-apps #+name: keybindings-apps
| Key | Function | Description | Package | | Key | Function | Description | Package |
|-----+----------------------------+-------------+------------| |-----+----------------------------+-------------+-----------------|
| | | apps | | | | | apps | |
| c | calc | | | | a | | AI | |
| C | | calendar | | | ae | eca | | eca |
| CC | calendar | | | | aC | claude-code-ide | | claude-code-ide |
| Co | org-agenda | | org | | ac | claude-code-ide-menu | | claude-code-ide |
| Cs | org-caldav-sync | | org-caldav | | c | calc | | |
| d | docker | | | | C | | calendar | |
| E | elfeed | | | | CC | calendar | | |
| e | | email | | | Co | org-agenda | | org |
| ec | mu4e-compose-new | | | | Cs | org-caldav-sync | | org-caldav |
| em | mu4e | | | | d | docker | | docker |
| k | keycast-mode | | | | E | elfeed | | elfeed |
| K | keycast-log-mode | | | | e | | email | |
| m | | mastodon | | | ec | mu4e-compose-new | | mu4e |
| mm | mastodon | | mastodon | | em | mu4e | | mu4e |
| mn | mastodon-notifications-get | | mastodon | | k | keycast-mode | | keycast |
| mt | mastodon-toot | | mastodon | | K | keycast-log-mode | | keycast |
| T | tetris | | | | m | | mastodon | |
| w | wttrin | | wttrin | | mm | mastodon | | mastodon |
| mn | mastodon-notifications-get | | mastodon |
| mt | mastodon-toot | | mastodon |
| T | tetris | | |
| S | screenshot | | screenshot |
| w | wttrin | | wttrin |
*** Shell apps
I also have two main shell-related functions, prefixed with ~as~. I also have two main shell-related functions, prefixed with ~as~.
#+name: keybinds-apps-shell #+name: keybindings-apps-shell
| Key | Function | Description | Package | | Key | Function | Description | Package |
|-----+-------------+-------------+-------------| |-----+------------+-------------+---------|
| | | shells | | | | | shells | |
| e | eshell-new | | | | e | eshell-new | | |
| v | vterm | | vterm | | t | eat | | eat |
| V | multi-vterm | | multi-vterm |
*** Treemacs
#+name: keybindings-treemacs
| Key | Function | Description | Package |
|-----+----------------------------------------+-------------+----------|
| | | treemacs | |
| c | | create | |
| cd | treemacs-create-dir | | treemacs |
| cf | treemacs-create-file | | treemacs |
| ci | treemacs-create-icon | | treemacs |
| ct | treemacs-create-theme | | treemacs |
| cw | treemacs-create-workspace | | treemacs |
| d | treemacs-delete-file | | treemacs |
| f | | files | |
| ff | treemacs-find-file | | treemacs |
| ft | treemacs-find-tag | | treemacs |
| l | | lsp | |
| ls | treemacs-expand-lsp-symbol | | treemacs |
| ld | treemacs-expand-lsp-treemacs-deps | | treemacs |
| lD | treemacs-collapse-lsp-treemacs-deps | | treemacs |
| lS | treemacs-collapse-lsp-symbol | | treemacs |
| p | | projects | |
| pa | treemacs-add-project-to-workspace | | treemacs |
| pf | treemacs-project-follow-mode | | treemacs |
| pn | treemacs-project-of-node | | treemacs |
| pp | treemacs-project-at-point | | treemacs |
| pr | treemacs-remove-project-from-workspace | | treemacs |
| pt | treemacs-move-project-down | | treemacs |
| ps | treemacs-move-project-up | | treemacs |
| r | | rename | |
| rf | treemacs-rename-file | | treemacs |
| rp | treemacs-rename-project | | treemacs |
| rr | treemacs-rename | | treemacs |
| rw | treemacs-rename-workspace | | treemacs |
| t | treemacs | | treemacs |
| T | | toggles | |
| Td | treemacs-toggle-show-dotfiles | | treemacs |
| Tn | treemacs-toggle-node | | treemacs |
| v | | visit node | |
| va | treemacs-visit-node-ace | | treemacs |
| vc | treemacs-visit-node-close-treemacs | | treemacs |
| vn | treemacs-visit-node-default | | treemacs |
| y | | yank | |
| ya | treemacs-copy-absolute-path-at-point | | treemacs |
| yp | treemacs-copy-project-path-at-point | | treemacs |
| yr | treemacs-copy-relative-path-at-point | | treemacs |
| yf | treemacs-copy-file | | treemacs |
*** Treemacs
#+name: keybindings-treemacs
| Key | Function | Description | Package |
|-----+----------------------------------------+-------------+----------|
| | | treemacs | |
| c | | create | |
| cd | treemacs-create-dir | | treemacs |
| cf | treemacs-create-file | | treemacs |
| ci | treemacs-create-icon | | treemacs |
| ct | treemacs-create-theme | | treemacs |
| cw | treemacs-create-workspace | | treemacs |
| d | treemacs-delete-file | | treemacs |
| f | | files | |
| ff | treemacs-find-file | | treemacs |
| ft | treemacs-find-tag | | treemacs |
| l | | lsp | |
| ls | treemacs-expand-lsp-symbol | | treemacs |
| ld | treemacs-expand-lsp-treemacs-deps | | treemacs |
| lD | treemacs-collapse-lsp-treemacs-deps | | treemacs |
| lS | treemacs-collapse-lsp-symbol | | treemacs |
| p | | projects | |
| pa | treemacs-add-project-to-workspace | | treemacs |
| pf | treemacs-project-follow-mode | | treemacs |
| pn | treemacs-project-of-node | | treemacs |
| pp | treemacs-project-at-point | | treemacs |
| pr | treemacs-remove-project-from-workspace | | treemacs |
| pt | treemacs-move-project-down | | treemacs |
| ps | treemacs-move-project-up | | treemacs |
| r | | rename | |
| rf | treemacs-rename-file | | treemacs |
| rp | treemacs-rename-project | | treemacs |
| rr | treemacs-rename | | treemacs |
| rw | treemacs-rename-workspace | | treemacs |
| t | treemacs | | treemacs |
| T | | toggles | |
| Td | treemacs-toggle-show-dotfiles | | treemacs |
| Tn | treemacs-toggle-node | | treemacs |
| v | | visit node | |
| va | treemacs-visit-node-ace | | treemacs |
| vc | treemacs-visit-node-close-treemacs | | treemacs |
| vn | treemacs-visit-node-default | | treemacs |
| y | | yank | |
| ya | treemacs-copy-absolute-path-at-point | | treemacs |
| yp | treemacs-copy-project-path-at-point | | treemacs |
| yr | treemacs-copy-relative-path-at-point | | treemacs |
| yf | treemacs-copy-file | | treemacs |
** Buffers ** Buffers
My buffer-related keybinds are all prefixed by ~b~. My buffer-related keybindings are all prefixed by ~b~.
#+name: keybinds-buffers #+name: keybindings-buffers
| Key | Function | Description | | Key | Function | Description | Package |
|-----+------------------------------------+-------------| |-----+------------------------------------+-------------+-----------|
| | | buffers | | | | buffers | |
| b | bufler-switch-buffer | | | b | bufler-switch-buffer | | bufler |
| B | bury-buffer | | | B | bury-buffer | | |
| c | clone-indirect-buffer | | | c | clone-indirect-buffer | | |
| C | clone-indirect-buffer-other-window | | | C | clone-indirect-buffer-other-window | | |
| l | bufler | | | l | bufler | | bufler |
| d | kill-this-buffer | | | d | kill-current-buffer | | |
| D | kill-buffer | | | D | kill-buffer | | |
| h | dashboard-refresh-buffer | | | h | dashboard-refresh-buffer | | dashboard |
| m | switch-to-messages-buffer | | | m | switch-to-messages-buffer | | |
| n | next-buffer | | | n | next-buffer | | |
| p | previous-buffer | | | p | previous-buffer | | |
| r | counsel-buffer-or-recentf | | | r | counsel-buffer-or-recentf | | counsel |
| s | switch-to-scratch-buffer | | | R | rename-uniquely | | |
| s | switch-to-scratch-buffer | | |
** Code
#+name: keybindings-code
| Key | Function | Description | Package |
|-----+-----------------------------------+-------------+---------------------|
| | | code | |
| l | evilnc-comment-or-uncomment-lines | | evil-nerd-commenter |
| n | hl-todo-next | | hl-todo |
| p | hl-todo-previous | | hl-todo |
** Errors ** Errors
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -155,39 +264,45 @@ My buffer-related keybinds are all prefixed by ~b~.
("q" nil)) ("q" nil))
#+end_src #+end_src
#+name: keybindings-flycheck #+name: keybindings-errors
| Key | Function | Description | Package |
|-----+---------------------+----------------+---------|
| | | errors | |
| . | hydra-flycheck/body | hydra-flycheck | |
| l | counsel-flycheck | | counsel |
| F | flyspell-hydra/body | flyspell-hydra | |
#+name: keybindings-errors-extra
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
"e" '(:ignore t :which-key "errors")
"e." '(hydra-flycheck/body :wk "hydra")
"el" #'counsel-flycheck
"ee" '(:keymap flycheck-command-map :package 'flycheck :wk "flycheck") "ee" '(:keymap flycheck-command-map :package 'flycheck :wk "flycheck")
"ef" '(:keymap flyspell-mode-map :package 'flyspell :wk "flyspell") "ef" '(:keymap flyspell-mode-map :package 'flyspell :wk "flyspell")
"eF" #'flyspell-hydra/body
#+end_src #+end_src
** Files ** Files
My keybinds for file manipulation are prefixed by ~f~. My keybindings for file manipulation are prefixed by ~f~.
#+name: keybinds-files #+name: keybindings-files
| Key | Function | Description | | Key | Function | Description | Package |
|-----+-------------------+-------------| |-----+-------------------+-------------+------------------|
| | | files | | | | files | |
| f | counsel-find-file | | | f | counsel-find-file | | counsel |
| F | quick-find-files | | | F | quick-find-files | | quick-find-files |
| h | hexl-find-file | | | h | hexl-find-file | | |
| r | counsel-recentf | | | r | counsel-recentf | | counsel |
| s | save-buffer | | | s | save-buffer | | |
I also have some keybinds dedicated to opening specific files. I also have some keybindings dedicated to opening specific files.
#+name: keybinds-specific-files #+name: keybindings-files-extras
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
"fc" '((lambda () "fc" '((lambda ()
(interactive) (interactive)
(quick-find-files nil "~/org/config/docs/emacs" "org")) (quick-find-files nil "~/org/config/docs/emacs" "org"))
:wk "emacs config") :wk "emacs config"
:package quick-find-files)
"fC" '((lambda () "fC" '((lambda ()
(interactive) (interactive)
(quick-find-files nil "~/org/config/docs" "org")) (quick-find-files nil "~/org/config/docs" "org"))
:wk "general config") :wk "general config"
:package quick-find-files)
"fi" '((lambda () "fi" '((lambda ()
(interactive) (interactive)
(find-file (concat user-emacs-directory "init.el"))) (find-file (concat user-emacs-directory "init.el")))
@@ -197,27 +312,49 @@ I also have some keybinds dedicated to opening specific files.
(quick-find-files nil (quick-find-files nil
(expand-file-name "lisp" user-emacs-directory) (expand-file-name "lisp" user-emacs-directory)
"el")) "el"))
:which-key "elisp config") :which-key "elisp config"
:package quick-find-files)
"fR" '((lambda () "fR" '((lambda ()
(interactive) (interactive)
(counsel-find-file "" (counsel-find-file ""
(concat user-emacs-directory (concat user-emacs-directory
(file-name-as-directory "straight") (file-name-as-directory "straight")
(file-name-as-directory "repos")))) (file-name-as-directory "repos"))))
:which-key "straight package") :which-key "straight package"
:package counsel)
"fS" '((lambda () "fS" '((lambda ()
(interactive) (interactive)
(find-file "~/org/config/stumpwm.org")) (find-file "~/org/config/stumpwm.org"))
:which-key "stumpwm.org") :which-key "stumpwm.org")
#+end_src #+end_src
** Git
#+name: keybindings-git
| Key | Function | Description | Package |
|-----+---------------------+-------------+---------|
| | | git | |
| b | magit-blame | | magit |
| c | magit-clone | | magit |
| d | magit-dispatch | | magit |
| i | magit-init | | magit |
| s | magit-status | | magit |
| l | magit-log | | magit |
| y | my/yadm | | magit |
| S | magit-stage-file | | magit |
| U | magit-unstage-file | | magit |
| f | | file | |
| fd | magit-diff | | magit |
| fc | magit-file-checkout | | magit |
| fl | magit-file-dispatch | | magit |
| fF | magit-find-file | | magit |
** Help ** Help
My keybinds for help are prefixed by ~h~. My keybindings for help are prefixed by ~h~.
#+name: keybinds-help #+name: keybindings-help
| Key | Function | Description | | Key | Function | Description |
|-----+--------------------------+-------------| |-----+--------------------------+-------------|
| | | help | | | | help |
| k | which-key-show-top-level | | | k | which-key-show-top-level | which-key |
| i | info | | | i | info | |
| I | info-display-manual | | | I | info-display-manual | |
| d | | describe | | d | | describe |
@@ -232,82 +369,131 @@ My keybinds for help are prefixed by ~h~.
| ds | helpful-symbol | | | ds | helpful-symbol | |
| dv | helpful-variable | | | dv | helpful-variable | |
** Insert
#+name: keybindings-insert
| Key | Function | Description | Package |
|-----+----------------------+-------------+-----------|
| | | insert | |
| u | counsel-unicode-char | | counsel |
| y | ivy-yasnippet | | yasnippet |
** Jump ** Jump
My keybinds for jumping around are prefixed by ~j~. My keybindings for jumping around are prefixed by ~j~.
#+name: keybinds-jump #+name: keybindings-jump
| Key | Function | Description | | Key | Function | Description | Package |
|-----+-------------------------+-------------| |-----+-------------------------------+-------------+---------|
| | | jump | | | | jump | |
| f | counsel-file-jump | | | C | | avy copy | |
| d | dirvish-dwim | | | Cl | avy-copy-line | | avy |
| D | dired-jump-other-window | | | Cr | avy-copy-region | | avy |
| D | dired-jump-other-window | | |
| U | my/avy-open-url | open-url | avy |
| b | avy-pop-mark | | avy |
| c | evil-avy-goto-char-timer | | avy |
| d | dirvish-dwim | | dirvish |
| f | counsel-file-jump | | counsel |
| k | | avy kill | |
| kL | avy-kill-ring-save-whole-line | | avy |
| kR | avy-kill-ring-save-region | | avy |
| kl | avy-kill-whole-line | | avy |
| kr | avy-kill-region | | avy |
| l | avy-goto-line | | avy |
| m | | move | |
| ml | avy-move-line | | avy |
| mr | avy-move-region | | avy |
| mt | avy-transpose-lines-in-region | | avy |
| n | avy-next | | avy |
| p | avy-prev | | avy |
| u | my/avy-goto-url | goto-url | avy |
** Language
#+name: keybindings-language
| Key | Function | Description | Package |
|-----+----------------------------------+-------------+----------|
| | | language | |
| . | langtool-correct-at-point | | langtool |
| B | langtool-correct-buffer | | langtool |
| b | langtool-check-buffer | | langtool |
| c | langtool-check | | langtool |
| d | langtool-check-done | | langtool |
| l | langtool-switch-default-language | | langtool |
| p | langtool-show-message-at-point | | langtool |
| r | langtool-correct-region | | langtool |
** Media
#+name: keybindings-media
| Key | Function | Description | Package |
|-----+-----------------------------+----------------+---------|
| | | media | |
| . | hydra-media/body | hydra-media | emms |
| « | emms-player-mpd-previous | | emms |
| » | emms-player-mpd-next | | emms |
| c | emms-player-mpd-clear | | emms |
| e | | emms | |
| eb | emms-browser | | emms |
| ep | emms-playlist-mode-go | | emms |
| es | emms-player-mpd-show | | emms |
| p | my/mpc-toggle | mpd-play-pause | |
| s | emms-stop | | emms |
| u | | update | |
| um | emms-player-mpd-update-all | | emms |
| uc | emms-cache-set-from-mpd-all | | emm s |
** Project ** Project
My keybinds for my projects are prefixed by ~p~. My keybindings for my projects are prefixed by ~p~.
#+name: keybinds-project #+name: keybindings-project
| Key | Function | Description | | Key | Function | Description | Package |
|-----+--------------------------------------------+-------------| |-----+--------------------------------------------+-------------+------------|
| | | project | | | | project | |
| ! | projectile-run-shell-command-in-root | | | ! | projectile-run-shell-command-in-root | | projectile |
| & | projectile-run-async-shell-command-in-root | | | & | projectile-run-async-shell-command-in-root | | projectile |
| b | counsel-projectile-switch-to-buffer | | | b | counsel-projectile-switch-to-buffer | | counsel |
| c | counsel-projectile | | | c | counsel-projectile | | counsel |
| d | counsel-projectile-find-dir | | | d | counsel-projectile-find-dir | | counsel |
| e | projectile-edit-dir-locals | | | e | projectile-edit-dir-locals | | projectile |
| f | counsel-projectile-find-file | | | f | counsel-projectile-find-file | | counsel |
| g | projectile-find-tag | | | g | projectile-find-tag | | projectile |
| k | project-kill-buffers | | | k | project-kill-buffers | | |
| p | counsel-projectile-switch-project | | | p | counsel-projectile-switch-project | | cousel |
| t | ivy-magit-todos | | | v | projectile-vc | | projectile |
| v | projectile-vc | |
*** Treemacs ** Refactor
#+name: keybindings-refactor
| Key | Function | Description | Package |
|-----+----------------------------------+-----------------+------------------|
| | | refactor | |
| i | evil-iedit-state/iedit-mode | iedit-mode | evil-iedit-state |
| q | evil-iedit-state/quit-iedit-mode | quit-iedit-mode | evil-iedit-state |
#+name: treemacs-keybinds ** Org
| Key | Function | Description | #+name: keybindings-org
|-----+----------------------------------------+-------------| | Key | Function | Description | Package |
| | | treemacs | |-----+--------------------------------+-------------+----------|
| c | | create | | | | org | |
| cd | treemacs-create-dir | | | c | | clock | |
| cf | treemacs-create-file | | | cc | org-clock-cancel | | org |
| ci | treemacs-create-icon | | | cd | org-clock-display | | org |
| ct | treemacs-create-theme | | | cg | org-clock-goto | | org |
| cw | treemacs-create-workspace | | | ci | org-clock-in | | org |
| d | treemacs-delete-file | | | co | org-clock-out | | org |
| f | | files | | C | org-capture | | org |
| ff | treemacs-find-file | | | r | | roam | |
| ft | treemacs-find-tag | | | rb | org-mark-ring-goto | back | org-roam |
| l | | lsp | | rB | org-roam-buffer-toggle | | org-roam |
| ls | treemacs-expand-lsp-symbol | | | rn | | nodes | |
| ld | treemacs-expand-lsp-treemacs-deps | | | rnf | org-roam-node-find | | org-roam |
| lD | treemacs-collapse-lsp-treemacs-deps | | | rni | org-roam-node-insert | | org-roam |
| lS | treemacs-collapse-lsp-symbol | | | rno | org-roam-node-open | | org-roam |
| p | | projects | | rnr | org-roam-node-random | | org-roam |
| pa | treemacs-add-project-to-workspace | | | rnv | org-roam-node-visit | | org-roam |
| pf | treemacs-project-follow-mode | | | rs | | sync | |
| pn | treemacs-project-of-node | | | rsa | org-roam-db-autosync-mode | | org-roam |
| pp | treemacs-project-at-point | | | rsc | org-roam-db-clear-all | | org-roam |
| pr | treemacs-remove-project-from-workspace | | | rsd | org-roam-db-diagnose-node | | org-roam |
| pt | treemacs-move-project-down | | | rss | org-roam-db-sync | | org-roam |
| ps | treemacs-move-project-up | | | ru | | ui | |
| r | | rename | | rua | org-roam-ui-add-to-local-graph | | org-roam |
| rf | treemacs-rename-file | | | ruo | org-roam-ui-open | | org-roam |
| rp | treemacs-rename-project | |
| rr | treemacs-rename | |
| rw | treemacs-rename-workspace | |
| t | treemacs | |
| T | | toggles |
| Td | treemacs-toggle-show-dotfiles | |
| Tn | treemacs-toggle-node | |
| v | | visit node |
| va | treemacs-visit-node-ace | |
| vc | treemacs-visit-node-close-treemacs | |
| vn | treemacs-visit-node-default | |
| y | | yank |
| ya | treemacs-copy-absolute-path-at-point | |
| yp | treemacs-copy-project-path-at-point | |
| yr | treemacs-copy-relative-path-at-point | |
| yf | treemacs-copy-file | |
** Tabs ** Tabs
Emacs has native tabs available, which can be interesting when working Emacs has native tabs available, which can be interesting when working
@@ -315,8 +501,8 @@ on multiple projects at once between which we may want to switch. Tabs
allow the user not to have multiple frames while keeping the allow the user not to have multiple frames while keeping the
advantages of having multiple frames. advantages of having multiple frames.
My keybinds are prefixed by ~SPC TAB~. My keybindings are prefixed by ~SPC TAB~.
#+name: keybinds-tabs #+name: keybindings-tabs
| Key | Function | Description | | Key | Function | Description |
|-----+--------------+-------------| |-----+--------------+-------------|
| | | tabs | | | | tabs |
@@ -332,18 +518,20 @@ My keybinds are prefixed by ~SPC TAB~.
** Text ** Text
The prefix here is ~T~. The prefix here is ~T~.
#+name: keybinds-text #+name: keybindings-text
| Key | Function | Description | | Key | Function | Description | Package |
|-----+----------------------+-------------| |-----+----------------------+-------------+----------------------|
| | | text | | | | text | |
| e | string-edit-at-point | | | e | string-edit-at-point | | string-edit-at-point |
| u | downcase-region | | | u | downcase-region | | |
| U | upcase-region | | | U | upcase-region | | |
| z | hydra-zoom/body | | | z | hydra-zoom/body | | |
*** TODO Rewrite hydra-zoom :noexport:
** Toggles ** Toggles
My toggle keybinds are prefixed by ~t~. My toggle keybindings are prefixed by ~t~.
#+name: keybinds-toggle #+name: keybindings-toggle
| Key | Function | Description | | Key | Function | Description |
|-----+---------------------------------------+--------------| |-----+---------------------------------------+--------------|
| | | toggles | | | | toggles |
@@ -357,42 +545,44 @@ My toggle keybinds are prefixed by ~t~.
| it | toggle-input-method | | | it | toggle-input-method | |
| is | set-input-method | | | is | set-input-method | |
*** TODO Rewrite =my/modify-frame-alpha-background/body= :noexport:
** Windows ** Windows
A couple of keybinds are hidden from which-key, otherwise theres not A couple of keybindings are hidden from which-key, otherwise theres not
much to say. The prefix here is ~w~. much to say. The prefix here is ~w~.
#+name: keybinds-windows #+name: keybindings-windows
| Key | Function | Description | | Key | Function | Description | Package |
|-----+-------------------------------+-------------| |-----+-------------------------------+-------------+----------------|
| | | windows | | | | windows | |
| c | evil-window-left | | | c | evil-window-left | | evil |
| t | evil-window-down | | | t | evil-window-down | | evil |
| s | evil-window-up | | | s | evil-window-up | | evil |
| r | evil-window-right | | | r | evil-window-right | | evil |
| . | windows-adjust-size/body | | | . | windows-adjust-size/body | | |
| - | split-window-below-and-focus | | | - | split-window-below-and-focus | | |
| / | split-window-right-and-focus | | | / | split-window-right-and-focus | | |
| $ | winum-select-window-by-number | | | $ | winum-select-window-by-number | | winum |
| 0 | winum-select-window-0-or-10 | none | | 0 | winum-select-window-0-or-10 | none | winum |
| 1 | winum-select-window-1 | none | | 1 | winum-select-window-1 | none | winum |
| 2 | winum-select-window-2 | none | | 2 | winum-select-window-2 | none | winum |
| 3 | winum-select-window-3 | none | | 3 | winum-select-window-3 | none | winum |
| 4 | winum-select-window-4 | none | | 4 | winum-select-window-4 | none | winum |
| 5 | winum-select-window-5 | none | | 5 | winum-select-window-5 | none | winum |
| 6 | winum-select-window-6 | none | | 6 | winum-select-window-6 | none | winum |
| 7 | winum-select-window-7 | none | | 7 | winum-select-window-7 | none | winum |
| 8 | winum-select-window-8 | none | | 8 | winum-select-window-8 | none | winum |
| 9 | winum-select-window-9 | none | | 9 | winum-select-window-9 | none | winum |
| b | kill-buffer-and-delete-window | | | b | kill-buffer-and-window | | |
| d | delete-window | | | d | delete-window | | |
| o | other-window | | | o | other-window | | |
| D | delete-other-windows | | | D | delete-other-windows | | |
| w | | writeroom | | w | | writeroom | |
| w. | writeroom-buffer-width/body | | | w. | writeroom-buffer-width/body | | writeroom-mode |
| ww | writeroom-mode | | | ww | writeroom-mode | | writeroom-mode |
** Quit ** Quit
Why would I ever use any of these keybinds? They are prefixed with ~q~. Why would I ever use any of these keybindings? They are prefixed with ~q~.
#+name: keybinds-quit #+name: keybindings-quit
| Key | Function | Description | | Key | Function | Description |
|-----+----------------------------+-------------| |-----+----------------------------+-------------|
| | | quit | | | | quit |

View File

@@ -50,7 +50,6 @@ stuff.
(package-initialize) (package-initialize)
(unless package-archive-contents (unless package-archive-contents
(package-refresh-contents)) (package-refresh-contents))
#+end_src #+end_src
From time to time, I fork some packages either because Im trying to From time to time, I fork some packages either because Im trying to

View File

@@ -33,6 +33,35 @@
:defer t) :defer t)
#+end_src #+end_src
** AI
*** Claude Code Emacs
#+begin_src emacs-lisp
(use-package claude-code-ide
:defer t
:straight (:build t :type git :host github :repo "manzaltu/claude-code-ide.el")
:custom
((claude-code-ide-terminal-backend 'eat)
(claude-code-ide-enable-mcp-server t))
:config
(claude-code-ide-emacs-tools-setup))
#+end_src
*** Editor Code Assistant
The Editor Code Assistant, or ECA, is a nice package that allows the
user to use an AI agent right in Emacs. AI is certainly not something
that will replace programmers any time soon, but its still a nice
tool to have when you know what youre doing.
#+begin_src emacs-lisp
(use-package eca
:defer t
:init (setopt eca-extra-args '("--verbose" "--log-level debug"))
:straight (:build t
:host github
:repo "editor-code-assistant/eca-emacs"
:files ("*.el")))
#+end_src
** Bitwarden ** Bitwarden
This package is still a very much work in progress one Im developing This package is still a very much work in progress one Im developing
in order to interact with Bitwarden in Emacs with the help of the in order to interact with Bitwarden in Emacs with the help of the
@@ -295,6 +324,7 @@ know about it since I dont want it to include it a second time after
(setq message-signature nil (setq message-signature nil
mail-signature nil) mail-signature nil)
#+end_src #+end_src
*** Gnus *** Gnus
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package gnus (use-package gnus
@@ -395,7 +425,7 @@ configuration for the ~mu4e~ package itself.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package mu4e (use-package mu4e
:after all-the-icons :after all-the-icons
:straight (:build t) :straight (:build nil)
:commands mu4e mu4e-compose-new :commands mu4e mu4e-compose-new
:init :init
(defun mu4e--main-action-str (name func) (defun mu4e--main-action-str (name func)
@@ -406,16 +436,16 @@ configuration for the ~mu4e~ package itself.
(require 'mu4e) (require 'mu4e)
(remove-hook 'mu4e-main-mode-hook 'evil-collection-mu4e-update-main-view) (remove-hook 'mu4e-main-mode-hook 'evil-collection-mu4e-update-main-view)
<<mu4e-ical-setup>> ;; <<mu4e-ical-setup>>
<<mu4e-ical-init-config>> ;; <<mu4e-ical-init-config>>
(csetq mu4e-completing-read-function 'completing-read (setopt mu4e-completing-read-function 'completing-read
mu4e-use-fancy-chars t mu4e-use-fancy-chars t
message-kill-buffer-on-exit t message-kill-buffer-on-exit t
mu4e-org-support nil) mu4e-org-support nil)
(let ((dir (concat (getenv "HOME") "/Downloads/mu4e"))) (let ((dir (concat (getenv "HOME") "/Downloads/mu4e")))
(when (file-directory-p dir) (when (file-directory-p dir)
(csetq mu4e-attachment-dir dir))) (setopt mu4e-attachment-dir dir)))
(defmacro mu4e-view-mode--prepare () (defmacro mu4e-view-mode--prepare ()
`(lambda () (visual-line-mode 1))) `(lambda () (visual-line-mode 1)))
:gfhook ('mu4e-view-mode-hook (mu4e-view-mode--prepare)) :gfhook ('mu4e-view-mode-hook (mu4e-view-mode--prepare))
@@ -433,7 +463,7 @@ configuration for the ~mu4e~ package itself.
(add-hook 'mu4e-view-mode-hook (lambda () (setq truncate-lines nil))) (add-hook 'mu4e-view-mode-hook (lambda () (setq truncate-lines nil)))
(add-hook 'mu4e-headers-mode-hook (lambda () (setq truncate-lines t))) (add-hook 'mu4e-headers-mode-hook (lambda () (setq truncate-lines t)))
<<mu4e-ical-config>> ;; <<mu4e-ical-config>>
<<mu4e-keybindings-undef>> <<mu4e-keybindings-undef>>
<<mu4e-keybindings-view>> <<mu4e-keybindings-view>>
<<mu4e-keybindings-view-no-prefix>> <<mu4e-keybindings-view-no-prefix>>
@@ -498,22 +528,7 @@ configuration for the ~mu4e~ package itself.
Quick sidenote: on Arch Linux, youll need to install either ~mu~ or Quick sidenote: on Arch Linux, youll need to install either ~mu~ or
~mu-git~ from the AUR in order to use mu4e. I also have a ~.desktop~ file ~mu-git~ from the AUR in order to use mu4e. I also have a ~.desktop~ file
to make it possible to open mu4e directly from my program picker. It to make it possible to open mu4e directly from my program picker. It
uses the shell script ~emacsmail~ Ive written [[file:bin.org::#Emacsmail-afffb7cd][here]]. uses the shell script ~emacsmail~ Ive written [[file:/scripts.md#emacsmail][here]].
#+header: :mkdirp yes
#+begin_src conf-desktop :tangle ~/.local/share/applications/mu4e.desktop
[Desktop Entry]
Name=Mu4e
GenericName=Mu4e
Comment=Maildir Utils for Emacs
MimeType=x-scheme-handler/mailto;
Exec=/home/phundrak/.local/bin/emacsmail %U
Icon=emacs
Type=Application
Terminal=false
Categories=Network;Email;TextEditor
StartupWMClass=Gnus
Keywords=Text;Editor;
#+end_src
**** Interact with iCalendar events **** Interact with iCalendar events
Something that has always bugged me was how to properly with iCalendar Something that has always bugged me was how to properly with iCalendar
@@ -521,8 +536,8 @@ events shared with me on my personal mailbox. The answer is actually
[[https://www.djcbsoftware.nl/code/mu/mu4e/iCalendar.html][dead simple]]. [[https://www.djcbsoftware.nl/code/mu/mu4e/iCalendar.html][dead simple]].
#+name: mu4e-ical-setup #+name: mu4e-ical-setup
#+begin_src emacs-lisp #+begin_src emacs-lisp
(require 'mu4e-icalendar) ;; (require 'mu4e-icalendar)
(mu4e-icalendar-setup) ;; (mu4e-icalendar-setup)
#+end_src #+end_src
Ill just configure a couple of things regarding these events, namely Ill just configure a couple of things regarding these events, namely
@@ -530,14 +545,14 @@ converting them to org-mode and add them to my =~/org/notes.org= file,
and delete the email once I answered to the event. and delete the email once I answered to the event.
#+name: mu4e-ical-config #+name: mu4e-ical-config
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq mu4e-icalendar-trash-after-reply t) ;; (setq mu4e-icalendar-trash-after-reply t)
#+end_src #+end_src
#+name: mu4e-ical-init-config #+name: mu4e-ical-init-config
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq gnus-icalendar-org-capture-file "~/org/notes.org" ;; (setq gnus-icalendar-org-capture-file "~/org/notes.org"
gnus-icalendar-org-capture-headline '("Calendar")) ;; gnus-icalendar-org-capture-headline '("Calendar"))
(gnus-icalendar-org-setup) ;; (gnus-icalendar-org-setup)
#+end_src #+end_src
**** Basic configuration **** Basic configuration
@@ -556,7 +571,7 @@ and how to retrieve them.
#+name: mu4e-mail-on-machine #+name: mu4e-mail-on-machine
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(setq mu4e-get-mail-command "mbsync -a" (setq mu4e-get-mail-command "mbsync -a"
mu4e-root-maildir "~/Mail" mu4e-root-maildir (concat (getenv "HOME") "/Mail/lucien@phundrak.com/")
mu4e-trash-folder "/Trash" mu4e-trash-folder "/Trash"
mu4e-refile-folder "/Archive" mu4e-refile-folder "/Archive"
mu4e-sent-folder "/Sent" mu4e-sent-folder "/Sent"
@@ -791,29 +806,6 @@ With this piece of code, I can simply jump to my inbox maildir with
(:maildir "/Trash" :key ?t))) (:maildir "/Trash" :key ?t)))
#+end_src #+end_src
**** Dealing with spammers
Im sure you have received at least one email recently from a sketchy
email address asking you something that might be completely unrelated
to what you do, or at least somewhat related. Fortunately, [[https://twitter.com/Boris/status/1360208504544444417][we have a
hero]]! Now, let me write a function that will insert their
pre-written text at point to avoid me going back to their Twitter
thread each time I want to shut spammers up.
#+begin_src emacs-lisp
(defun reply-to-bill ()
(interactive)
(insert "Please forward this email to bill@noprocurement.com,
and delete my email, as Ill be changing jobs soon, and this
email address will no longer be active.
Bill Whiskoney is a senior partner at Nordic Procurement
Services, and he handles our budget and will help you further or
introduce you to someone who can."))
#+end_src
If you want the full story, make sure to read the whole thread, I
guarantee it, its worth your time! And in case the Twitter thread
disappear in the future, [[https://threader.app/thread/1360208504544444417][here is a backup]].
**** Getting Fancy **** Getting Fancy
Im not a huge fan of mu4es default icons marking my emails, so Ill Im not a huge fan of mu4es default icons marking my emails, so Ill
redefine them as follows. Be aware the name of these icons are from redefine them as follows. Be aware the name of these icons are from
@@ -1049,8 +1041,6 @@ skipping the export part and write your emails directly in org-mode?
org-msg-signature (format "\n--\n#+begin_signature\n%s\n#+end_signature" org-msg-signature (format "\n--\n#+begin_signature\n%s\n#+end_signature"
(with-temp-buffer (with-temp-buffer
(insert-file-contents mail-signature-file) (insert-file-contents mail-signature-file)
(while (re-search-forward "\n" nil t)
(replace-match "\n\n"))
(buffer-string)))) (buffer-string))))
:general :general
(phundrak/major-leader-key (phundrak/major-leader-key
@@ -1092,7 +1082,7 @@ notification system, and Ill activate the modeline notification.
EMMS, also known as the /Emacs MultiMedia System/, allows the user to EMMS, also known as the /Emacs MultiMedia System/, allows the user to
interact through Emacs with multimedia elements such as music and interact through Emacs with multimedia elements such as music and
videos. My main use for it will be for music with MPD (see its videos. My main use for it will be for music with MPD (see its
configuration [[file:mpd.org][here]]). configuration [[file:/mpd.md][here]]).
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package emms (use-package emms
:defer t :defer t
@@ -1112,6 +1102,9 @@ configuration [[file:mpd.org][here]]).
<<emms-search-set-variable>> <<emms-search-set-variable>>
<<emms-media-hydra>> <<emms-media-hydra>>
(defun my/mpc-toggle ()
(interactive)
(shell-command-and-echo "mpc toggle"))
(defun emms-player-toggle-pause () (defun emms-player-toggle-pause ()
(interactive) (interactive)
(shell-command-and-echo "mpc toggle")) (shell-command-and-echo "mpc toggle"))
@@ -1153,27 +1146,7 @@ configuration [[file:mpd.org][here]]).
:packages 'emms :packages 'emms
"d" #'emms-playlist-mode-kill-track "d" #'emms-playlist-mode-kill-track
"p" #'emms-playlist-mode-play-smart "p" #'emms-playlist-mode-play-smart
"q" #'kill-this-buffer) "q" #'kill-this-buffer))
(phundrak/leader-key
:infix "m"
:packages 'emms
"" '(:ignore t :which-key "media")
"." #'hydra-media/body
"«" #'emms-player-mpd-previous
"»" #'emms-player-mpd-next
"c" #'emms-player-mpd-clear
"e" '(:ignore t :which-key "emms")
"eb" #'emms-browser
"ep" #'emms-playlist-mode-go
"es" #'emms-player-mpd-show
"p" '((lambda ()
(interactive)
(shell-command-and-echo "mpc toggle"))
:which-key "mpc toggle")
"s" #'emms-stop
"u" '(:ignore t :which-key "update")
"um" #'emms-player-mpd-update-all
"uc" #'emms-cache-set-from-mpd-all))
#+end_src #+end_src
*** Finding files from EMMS *** Finding files from EMMS
@@ -1269,6 +1242,40 @@ minibuffer, both separated by a single space."
("q" nil :exit t)) ("q" nil :exit t))
#+end_src #+end_src
** Langtool
LanguageTool is a great tool for catching typos and grammatical errors
in quite a few languages.
#+begin_src emacs-lisp
(use-package langtool
:defer t
:straight (:build t)
:commands (langtool-check
langtool-check-done
langtool-show-message-at-point
langtool-correct-buffer)
:custom
(langtool-default-language "en-US")
(langtool-mother-tongue "fr")
:config
(setq langtool-http-server-host "localhost"
langtool-http-server-port 8081))
#+end_src
Finally, =writegood-mode= detects some simple general rules when writing
in English and can also calculate the Flesh-Kincaid levels of a
document.
#+begin_src emacs-lisp
(use-package writegood-mode
:defer t
:straight (:build t)
:hook org-mode latex-mode
:general
(phundrak/major-leader-key
:keymaps 'writegood-mode-map
"g" #'writegood-grade-level
"r" #'writegood-reading-ease))
#+end_src
** Nov ** Nov
Nov is a major-mode for reading EPUB files within Emacs. Since I have Nov is a major-mode for reading EPUB files within Emacs. Since I have
it, I dont need any other Epub reader on my computer! Plus this one it, I dont need any other Epub reader on my computer! Plus this one
@@ -1348,7 +1355,7 @@ dark mode for PDFs.
"m" 'pdf-view-midnight-minor-mode) "m" 'pdf-view-midnight-minor-mode)
:config :config
(with-eval-after-load 'pdf-view (with-eval-after-load 'pdf-view
(csetq pdf-view-midnight-colors '("#d8dee9" . "#2e3440")))) (setopt pdf-view-midnight-colors '("#d8dee9" . "#2e3440"))))
#+end_src #+end_src
One thing ~pdf-tools~ doesnt handle is restoring the PDF to the last One thing ~pdf-tools~ doesnt handle is restoring the PDF to the last
@@ -1366,6 +1373,60 @@ left it.
#+end_src #+end_src
** Project Management ** Project Management
*** Jujutsu
Lets face it: [[https://git-scm.com/][git]] is awesome. Theres a reason it took over the world
of software development, replacing pretty much all competitors such as
subversion. And I will forever love it. But, it has a lot of
drawbacks, especially its interface that is... not great, to put it
mildly. I absolutely respect its commitment to staying backward
compatible, but its not great.
[[https://jj-vcs.github.io/][Jujutsu]] on the other hand, is awesome! Its interface is really clean,
really intuitive, especially for someone like me who rebases a LOT!
And, for now, it still uses git as its backend, so its entirely
compatible with git repositories. In fact, I pretty much dont use git
anymore, jj (abbreviation of Jujutsu) has almost completely replaced
git for me.
It comes to no surprise then that I will use [[https://elpa.gnu.org/packages/vc-jj.html][=vc-jj=]], a Jujutsu
backend for =vc.el= and =project.el=.
#+begin_src emacs-lisp
(use-package vc-jj
:straight (:build t)
:defer nil)
#+end_src
As mentioned in the packages README, I do need to set these lines in
my jj config:
#+begin_src toml :tangle no
[ui]
diff-formatter = ":git"
conflict-marker-style = "git"
#+end_src
I also like Magits interface, as you can see in my [[file:./applications.md#magit][Magit]] config.
Therefore, lets install =jujutsu-mode= which attempts to recreate a
Magit-style interface for Jujutsu.
#+begin_src emacs-lisp
(use-package jj-mode
:straight (:build t :host github :repo "bolivier/jj-mode.el")
:defer t)
#+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.
#+begin_src emacs-lisp
(use-package jjdescription
:defer nil
:straight (:build t)
:commands jjdescription-mode
:init (add-to-list 'auto-mode-alist '("\\.jjdescription\\'" . jjdescription-mode)))
#+end_src
*** Magit *** Magit
Magit is an awesome wrapper around Git for Emacs! Very often, I go Magit is an awesome wrapper around Git for Emacs! Very often, I go
from disliking to really hating Git GUI clients because they often from disliking to really hating Git GUI clients because they often
@@ -1382,8 +1443,8 @@ doing and what Git is doing! In short, I absolutely love it!
:config :config
(add-hook 'magit-process-find-password-functions 'magit-process-password-auth-source) (add-hook 'magit-process-find-password-functions 'magit-process-password-auth-source)
<<magit-angular-keywords-highlight>> <<magit-angular-keywords-highlight>>
(csetq magit-clone-default-directory "~/fromGIT/" (setopt magit-clone-default-directory "~/fromGIT/"
magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1) magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
(with-eval-after-load 'evil-collection (with-eval-after-load 'evil-collection
(phundrak/evil (phundrak/evil
:packages '(evil-collection magit) :packages '(evil-collection magit)
@@ -1401,25 +1462,7 @@ doing and what Git is doing! In short, I absolutely love it!
:packages 'magit :packages 'magit
"," #'with-editor-finish "," #'with-editor-finish
"k" #'with-editor-cancel "k" #'with-editor-cancel
"a" #'with-editor-cancel) "a" #'with-editor-cancel))
(phundrak/leader-key
:infix "g"
:packages 'magit
"" '(:ignore t :wk "git")
"b" #'magit-blame
"c" #'magit-clone
"d" #'magit-dispatch
"i" #'magit-init
"s" #'magit-status
"l" #'magit-log
"y" #'my/yadm
"S" #'magit-stage-file
"U" #'magit-unstage-file
"f" '(:ignore t :wk "file")
"fd" #'magit-diff
"fc" #'magit-file-checkout
"fl" #'magit-file-dispatch
"fF" #'magit-find-file))
#+end_src #+end_src
There is currently a bug in Emacs TRAMP as described in issue [[https://github.com/magit/magit/issues/4720][#4720]] of There is currently a bug in Emacs TRAMP as described in issue [[https://github.com/magit/magit/issues/4720][#4720]] of
@@ -1448,7 +1491,7 @@ I also want to highlight these angular-style keywords in commit messages.
"Highlight angular-style keywords in commit messages." "Highlight angular-style keywords in commit messages."
(let ((boundary 0)) (let ((boundary 0))
(when (string-match (rx (seq (or "feat" "fix" "docs" "style" "refactor" (when (string-match (rx (seq (or "feat" "fix" "docs" "style" "refactor"
"perf" "test" "chore") "perf" "test" "ci" "chore")
(* "(" (* (not ")")) ")") (* "(" (* (not ")")) ")")
":")) ":"))
msg msg
@@ -1475,14 +1518,7 @@ keywords in a buffer. Lets enable this mode globally.
(use-package hl-todo (use-package hl-todo
:defer t :defer t
:straight (:build t) :straight (:build t)
:init (global-hl-todo-mode 1) :init (global-hl-todo-mode 1))
:general
(phundrak/leader-key
:packages '(hl-todo)
:infix "c"
"" '(:ignore t :which-key "todos")
"n" #'hl-todo-next
"p" #'hl-todo-previous))
#+end_src #+end_src
We can now configure properly =magit-todos=. Notice my custom function We can now configure properly =magit-todos=. Notice my custom function
@@ -1603,7 +1639,8 @@ excluded files.
eol) eol)
,(rx "/" ,(rx "/"
(or "rsync" "ssh" "tmp" "yadm" "sudoedit" "sudo") (or "rsync" "ssh" "tmp" "yadm" "sudoedit" "sudo")
(* any))))) (* any))
"/nix/.*")))
#+end_src #+end_src
** Screenshot ** Screenshot
@@ -1617,15 +1654,31 @@ look nice.
:type git :type git
:host github :host github
:repo "tecosaur/screenshot") :repo "tecosaur/screenshot")
:config (load-file (locate-library "screenshot.el")) :config (load-file (locate-library "screenshot.el")))
:general
(phundrak/leader-key
:infix "a"
:packages '(screenshot)
"S" #'screenshot))
#+end_src #+end_src
** Shells ** Shells
*** Eat
Eat is a modern shell emulator for Emacs. I use it as a replacement
for VTerm as I never got VTerm to actually work on NixOS.
#+begin_src emacs-lisp
(use-package eat
:defer t
:straight (eat :type git
:host codeberg
:repo "akib/emacs-eat"
:files ("*.el" ("term" "term/*.el") "*.texi"
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el")))
:init
(add-hook 'eshell-load-hook #'eat-eshell-mode)
(eat-eshell-mode 1)
:config
(add-hook 'eat-exit-hook #'kill-this-buffer))
#+end_src
*** Shell-pop *** Shell-pop
Shell-pop allows the user to easily call for a new shell in a pop-up Shell-pop allows the user to easily call for a new shell in a pop-up
buffer. buffer.
@@ -1635,7 +1688,7 @@ buffer.
:straight (:build t) :straight (:build t)
:custom :custom
(shell-pop-default-directory "/home/phundrak") (shell-pop-default-directory "/home/phundrak")
(shell-pop-shell-type (quote ("eshell" "*eshell*" (lambda () (eshell shell-pop-term-shell))))) (shell-pop-shell-type (quote ("eat" "*eat-pop*" (lambda () (eat)))))
(shell-pop-window-size 30) (shell-pop-window-size 30)
(shell-pop-full-span nil) (shell-pop-full-span nil)
(shell-pop-window-position "bottom") (shell-pop-window-position "bottom")
@@ -1644,60 +1697,12 @@ buffer.
(shell-pop-cleanup-buffer-at-process-exit t)) (shell-pop-cleanup-buffer-at-process-exit t))
#+end_src #+end_src
*** VTerm ** Wakatime
VTerm gives Emacs access to regular shells with an almost regular
emulator. Be aware you will most likely need to hit ~C-c~ twice to send
an interrupt signal.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package vterm (use-package wakatime-mode
:defer t
:straight t
:config
(setq vterm-shell "/usr/bin/fish"))
#+end_src
One annoying think with vterm is it only can create one buffer, you
cant have multiple vterm buffers by default. ~multi-vterm~ fixes this
issue.
#+begin_src emacs-lisp
(use-package multi-vterm
:after vterm
:defer t :defer t
:straight (:build t) :straight (:build t)
:general :init (global-wakatime-mode))
(phundrak/major-leader-key
:packages '(vterm multi-vterm)
:keymap 'vterm-mode-map
"c" #'multi-vterm
"n" #'multi-vterm-next
"p" #'multi-vterm-prev))
#+end_src
** XWidgets Webkit Browser
I used to use the xwidgets webkit browser in order to view or preview
HTML files from Emacs, but it seems the Cairo background transparency
patch breaks it. So while this isnt patched, I will disable Xwidgets
in my Emacs build, and these keybinds *will not* be tangled.
#+begin_src emacs-lisp :tangle no
(phundrak/evil
:keymaps 'xwidget-webkit-mode-map
"<mouse-4>" #'xwidget-webkit-scroll-down-line
"<mouse-5>" #'xwidget-webkit-scroll-up-line
"c" #'xwidget-webkit-scroll-backward
"t" #'xwidget-webkit-scroll-up-line
"s" #'xwidget-webkit-scroll-down-line
"r" #'xwidget-webkit-scroll-forward
"h" #'xwidget-webkit-goto-history
"C" #'xwidget-webkit-back
"R" #'xwidget-webkit-forward
"C-r" #'xwidget-webkit-reload
"j" nil
"k" nil
"l" nil
"H" nil
"L" nil
"C-d" #'xwidget-webkit-scroll-up
"C-u" #'xwidget-webkit-scroll-down)
#+end_src #+end_src
** Wttr.in ** Wttr.in

View File

@@ -301,10 +301,5 @@ youre not sure or if you dont remember what your snippet is.
(use-package ivy-yasnippet (use-package ivy-yasnippet
:defer t :defer t
:after (ivy yasnippet) :after (ivy yasnippet)
:straight (:build t) :straight (:build t))
:general
(phundrak/leader-key
:infix "i"
:packages 'ivy-yasnippet
"y" #'ivy-yasnippet))
#+end_src #+end_src

View File

@@ -75,11 +75,6 @@ compatibility package that adds states for iedit.
iedit-only-at-symbol-boundaries t iedit-only-at-symbol-boundaries t
iedit-toggle-key-default nil) iedit-toggle-key-default nil)
:general :general
(phundrak/leader-key
:infix "r"
:packages '(iedit evil-iedit-state)
"" '(:ignore t :which-key "refactor")
"i" #'evil-iedit-state/iedit-mode)
(general-define-key (general-define-key
:keymaps 'evil-iedit-state-map :keymaps 'evil-iedit-state-map
"c" nil "c" nil

View File

@@ -81,20 +81,20 @@ Since Emacs 29, it is possible to enable drag-and-drop between Emacs
and other applications. and other applications.
#+name: dired-drag-and-drop #+name: dired-drag-and-drop
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(csetq dired-mouse-drag-files t (setopt dired-mouse-drag-files t
mouse-drag-and-drop-region-cross-program t) mouse-drag-and-drop-region-cross-program t)
#+end_src #+end_src
In Dirvish, its best to use the long name of flags whenever possible, In Dirvish, its best to use the long name of flags whenever possible,
otherwise some commands wont work. otherwise some commands wont work.
#+name: dired-listing-flags #+name: dired-listing-flags
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(csetq dired-listing-switches (string-join '("--all" (setopt dired-listing-switches (string-join '("--all"
"--human-readable" "--human-readable"
"--time-style=long-iso" "--time-style=long-iso"
"--group-directories-first" "--group-directories-first"
"-lv1") "-lv1")
" ")) " "))
#+end_src #+end_src
However, it is possible to instead use =eza= when it is available (its However, it is possible to instead use =eza= when it is available (its
@@ -121,12 +121,12 @@ files and images.
(my/dir (lambda (path &optional dir) (my/dir (lambda (path &optional dir)
(expand-file-name (file-name-as-directory path) (expand-file-name (file-name-as-directory path)
(or dir user-emacs-directory))))) (or dir user-emacs-directory)))))
(csetq image-dired-thumb-size 150 (setopt image-dired-thumb-size 150
image-dired-dir (funcall my/dir "dired-img") image-dired-dir (funcall my/dir "dired-img")
image-dired-db-file (funcall my/file "dired-db.el") image-dired-db-file (funcall my/file "dired-db.el")
image-dired-gallery-dir (funcall my/dir "gallery") image-dired-gallery-dir (funcall my/dir "gallery")
image-dired-temp-image-file (funcall my/file "temp-image" image-dired-dir) image-dired-temp-image-file (funcall my/file "temp-image" image-dired-dir)
image-dired-temp-rotate-image-file (funcall my/file "temp-rotate-image" image-dired-dir))) image-dired-temp-rotate-image-file (funcall my/file "temp-rotate-image" image-dired-dir)))
#+end_src #+end_src
Copying files with Dired is a blocking process. Its usually fine when Copying files with Dired is a blocking process. Its usually fine when
@@ -170,8 +170,6 @@ compilation buffer, as well as enable some syntax highlighting.
"r" nil "r" nil
"R" #'recompile "R" #'recompile
"h" nil) "h" nil)
(phundrak/leader-key
"R" #'recompile)
:config :config
(setq compilation-scroll-output t)) (setq compilation-scroll-output t))
#+end_src #+end_src
@@ -462,15 +460,29 @@ supported natively. I will describe them here.
(use-package tramp (use-package tramp
:straight (tramp :type built-in :build t) :straight (tramp :type built-in :build t)
:config :config
<<tramp-nixos>>
<<tramp-add-yadm>> <<tramp-add-yadm>>
(csetq tramp-ssh-controlmaster-options nil (setopt tramp-ssh-controlmaster-options nil
tramp-verbose 0 tramp-verbose 0
tramp-auto-save-directory (locate-user-emacs-file "tramp/") tramp-auto-save-directory (locate-user-emacs-file "tramp/")
tramp-chunksize 2000) tramp-chunksize 2000)
(add-to-list 'backup-directory-alist ; deactivate auto-save with TRAMP (add-to-list 'backup-directory-alist ; deactivate auto-save with TRAMP
(cons tramp-file-name-regexp nil))) (cons tramp-file-name-regexp nil)))
#+end_src #+end_src
*** SSHing into NixOS remotes
When using TRAMP to SSH into remote NixOS hosts, the true =$PATH= gets
truncated, rendering some binaries unavailable, such as =git= or =nil= (an
LSP server for the Nix language). To fix that, we simply need to write
the following code.
#+name: tramp-nixos
#+begin_src emacs-lisp :tangle no
(require 'tramp-sh)
(setq tramp-remote-path (append tramp-remote-path
'(tramp-own-remote-path)))
#+end_src
*** Yadm *** Yadm
[[https://yadm.io/][~yadm~]] is a git wrapper made to easily manage your dotfiles. It has [[https://yadm.io/][~yadm~]] is a git wrapper made to easily manage your dotfiles. It has
loads of features I dont use (the main one I like but dont use is loads of features I dont use (the main one I like but dont use is

View File

@@ -1,10 +1,16 @@
#+title: Emacs — Packages — EXWM #+title: Emacs — Packages — EXWM (Deprecated)
#+setupfile: ../../headers #+setupfile: ../../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code #+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/exwm.el #+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/exwm.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export #+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* EXWM * EXWM (Deprecated)
#+html: ::: warning
This configuration of EXWM is no longer maintained and was deprecated
on May 24th, 2025. Therefore, it may not be up to date with the latest
versions of EXWM.
#+html: :::
So, Im finally slowly getting back to EXWM. I tried it a couple of So, Im finally slowly getting back to EXWM. I tried it a couple of
years ago, but that was with the SpacemacsOS layer on Spacemacs, on a years ago, but that was with the SpacemacsOS layer on Spacemacs, on a
laptop which got accidentally formatted before I could save my config laptop which got accidentally formatted before I could save my config
@@ -224,7 +230,7 @@ mode), except for ~s-RET~ which opens an eshell terminal.
#+end_src #+end_src
A couple of commands are also automatically executed through my A couple of commands are also automatically executed through my
~autostart~ script written [[file:bin.org::#Autostart-a99e99e7][here]]. ~autostart~ script written [[file:/scripts.md#autostart][here]].
#+name: exwm-autostart #+name: exwm-autostart
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(exwm/run-in-background "autostart") (exwm/run-in-background "autostart")

View File

@@ -25,16 +25,7 @@ it bépo-compatible.
:defer t :defer t
:straight t :straight t
:config :config
(csetq avy-keys '(?a ?u ?i ?e ?c ?t ?s ?r ?n) (setopt avy-keys '(?a ?u ?i ?e ?c ?t ?s ?r ?n))
avy-dispatch-alist '((?x . avy-action-kill-move)
(?X . avy-action-kill-stay)
(?T . avy-action-teleport)
(?m . avy-action-mark)
(?C . avy-action-copy)
(?y . avy-action-yank)
(?Y . avy-action-yank-line)
(?I . avy-action-ispell)
(?z . avy-action-zap-to-char)))
(defun my/avy-goto-url () (defun my/avy-goto-url ()
"Jump to url with avy." "Jump to url with avy."
(interactive) (interactive)
@@ -49,31 +40,6 @@ it bépo-compatible.
:pakages 'avy :pakages 'avy
"gc" #'evil-avy-goto-char-timer "gc" #'evil-avy-goto-char-timer
"gl" #'evil-avy-goto-line) "gl" #'evil-avy-goto-line)
(phundrak/leader-key
:packages 'avy
:infix "j"
"b" #'avy-pop-mark
"c" #'evil-avy-goto-char-timer
"l" #'avy-goto-line)
(phundrak/leader-key
:packages 'avy
:infix "A"
"c" '(:ignore t :which-key "copy")
"cl" #'avy-copy-line
"cr" #'avy-copy-region
"k" '(:ignore t :which-key "kill")
"kl" #'avy-kill-whole-line
"kL" #'avy-kill-ring-save-whole-line
"kr" #'avy-kill-region
"kR" #'avy-kill-ring-save-region
"m" '(:ignore t :which-key "move")
"ml" #'avy-move-line
"mr" #'avy-move-region
"mt" #'avy-transpose-lines-in-region
"n" #'avy-next
"p" #'avy-prev
"u" #'my/avy-goto-url
"U" #'my/avy-open-url)
(phundrak/major-leader-key (phundrak/major-leader-key
:packages '(avy org) :packages '(avy org)
:keymaps 'org-mode-map :keymaps 'org-mode-map
@@ -92,16 +58,24 @@ Lets give ~calc-mode~ some better defaults.
** Elcord ** Elcord
Whats the point of using Emacs if you cant tell everyone? Whats the point of using Emacs if you cant tell everyone?
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my/elcord-buffer-details-format ()
"Return the buffer details string shown on Discord."
(format "Editing %s"
(if (projectile-project-p default-directory)
(f-relative (buffer-file-name) (projectile-project-root))
(buffer-name))))
(use-package elcord (use-package elcord
:straight (:built t) :straight (:built t)
:defer t :defer t
:config :config
(csetq elcord-use-major-mode-as-main-icon t (setopt elcord-use-major-mode-as-main-icon t
elcord-refresh-rate 5 elcord-refresh-rate 5
elcord-boring-buffers-regexp-list `("^ " elcord-boring-buffers-regexp-list `("^ "
,(rx "*" (+ any) "*") ,(rx "*" (+ any) "*")
,(rx bol (or "Re: " ,(rx bol (or "Re: "
"Fwd: "))))) "Fwd: ")))
elcord-buffer-details-format-function #'my/elcord-buffer-details-format))
#+end_src #+end_src
** Elpher ** Elpher

View File

@@ -327,17 +327,6 @@ specified org files which are described below.
(defvar org-worldbuilding-file "~/org/worldbuilding.org") (defvar org-worldbuilding-file "~/org/worldbuilding.org")
#+end_src #+end_src
Let me describe a keybind to invoke org-capture from anywhere within
Emacs.
#+name: org-capture-keybinds
#+begin_src emacs-lisp :tangle no
(phundrak/leader-key
:packages 'org
:infix "o"
"" '(:ignore t :which-key "org")
"c" #'org-capture)
#+end_src
When ~org-capture~ is invoked, it will ask which template we wish to When ~org-capture~ is invoked, it will ask which template we wish to
use. In the table [[org-capture-shortcuts-table]], the /key/ column use. In the table [[org-capture-shortcuts-table]], the /key/ column
represents which keychord we need to hit, titled with /name/, we need to represents which keychord we need to hit, titled with /name/, we need to
@@ -843,28 +832,34 @@ can schedule a todo header for some dates, or set a deadline.
Lets now define some keybinds for inserting stuff in our org buffer: Lets now define some keybinds for inserting stuff in our org buffer:
#+name: org-keybinds-insert #+name: org-keybinds-insert
| Key chord | Function | Description | | Key chord | Function | Description | Package |
|-----------+-------------------------------+-------------| |-----------+---------------------------------------------------+---------------------+------------|
| i | nil | insert | | i | nil | insert | |
| ib | org-insert-structure-template | | | ib | org-insert-structure-template | | |
| id | org-insert-drawer | | | ic | | conlanging | |
| ie | nil | emphasis | | ica | conlanging-eittlandic-insert-adjective-declension | adjective | conlanging |
| ieb | org-emphasize-bold | | | icn | conlanging-eittlandic-insert-noun-declensions | noun | conlanging |
| iec | org-emphasize-code | | | icv | conlanging-eittlandic-insert-verb-declension | verb | conlanging |
| iei | org-emphasize-italic | | | id | org-insert-drawer | | |
| ies | org-emphasize-strike-through | | | ie | nil | emphasis | |
| ieu | org-emphasize-underline | | | ieb | org-emphasize-bold | | |
| iev | org-emphasize-verbatim | | | iec | org-emphasize-code | | |
| iE | org-set-effort | | | iei | org-emphasize-italic | | |
| if | org-footnote-new | | | ies | org-emphasize-strike-through | | |
| ih | org-insert-heading | | | ieu | org-emphasize-underline | | |
| iH | counsel-org-link | | | iev | org-emphasize-verbatim | | |
| ii | org-insert-item | | | iE | org-set-effort | | |
| il | org-insert-link | | | if | org-footnote-new | | |
| in | org-add-note | | | ih | org-insert-heading | | |
| ip | org-set-property | | | iH | counsel-org-link | | |
| is | org-insert-subheading | | | ii | org-insert-item | | |
| it | org-set-tags-command | | | il | org-insert-link | | |
| in | org-add-note | | |
| ip | org-set-property | | |
| is | org-insert-subheading | | |
| it | org-set-tags-command | | |
| iV | conlang-store-heading-vuepress | store Vuepress link | conlanging |
| iv | conlanging-insert-heading-vuepress | vuepress link | conlanging |
There isnt a lot of stuff I can jump to yet, but theres still some: There isnt a lot of stuff I can jump to yet, but theres still some:
#+name: org-keybinds-jump #+name: org-keybinds-jump
@@ -1060,26 +1055,6 @@ management system based on org-mode.
:config :config
(org-roam-db-autosync-mode 1) (org-roam-db-autosync-mode 1)
:general :general
(phundrak/leader-key
:packages '(org org-roam)
:infix "o"
"r" '(:ignore t :which-key "roam")
"rb" '(org-mark-ring-goto :which-key "back")
"rB" #'org-roam-buffer-toggle
"rn" '(:ignore t :which-key "nodes")
"rnf" #'org-roam-node-find
"rni" #'org-roam-node-insert
"rno" #'org-roam-node-open
"rnr" #'org-roam-node-random
"rnv" #'org-roam-node-visit
"rs" '(:ignore t :which-key "sync")
"rsa" #'org-roam-db-autosync-mode
"rsc" #'org-roam-db-clear-all
"rsd" #'org-roam-db-diagnose-node
"rss" #'org-roam-db-sync
"ru" '(:ignore t :which-key "ui")
"rua" #'org-roam-ui-add-to-local-graph
"ruo" #'org-roam-ui-open)
(phundrak/major-leader-key (phundrak/major-leader-key
:keymaps 'org-mode-map :keymaps 'org-mode-map
:packages '(org org-roam) :packages '(org org-roam)
@@ -1165,7 +1140,7 @@ management system based on org-mode.
(phundrak/major-leader-key (phundrak/major-leader-key
:keymaps 'org-mode-map :keymaps 'org-mode-map
:pakages 'org-ref :pakages 'org-ref
"ic" #'org-ref-insert-link "iC" #'org-ref-insert-link
"iL" #'org-ref-insert-ref-link "iL" #'org-ref-insert-ref-link
"ir" #'org-ref-insert-link-hydra/body "ir" #'org-ref-insert-link-hydra/body
"iB" #'org-ref-bibtex-hydra/body)) "iB" #'org-ref-bibtex-hydra/body))

View File

@@ -18,32 +18,27 @@ variables to install grammars for different languages.
:hook ((bash-ts-mode c-ts-mode c++-ts-mode :hook ((bash-ts-mode c-ts-mode c++-ts-mode
html-ts-mode js-ts-mode typescript-ts-mode html-ts-mode js-ts-mode typescript-ts-mode
json-ts-mode rust-ts-mode tsx-ts-mode python-ts-mode json-ts-mode rust-ts-mode tsx-ts-mode python-ts-mode
css-ts-mode yaml-ts-mode) . lsp-deferred) css-ts-mode yaml-ts-mode) . lsp-deferred))
#+end_src
#+begin_src emacs-lisp
(use-package tree-sitter-langs
:after tree-sitter
:straight t
:custom (global-tree-sitter-mode t)
:init :init
(setq treesit-language-source-alist (add-to-list 'treesit-extra-load-path
'((bash "https://github.com/tree-sitter/tree-sitter-bash") (expand-file-name "bin" tree-sitter-langs-grammar-dir)))
(c "https://github.com/tree-sitter/tree-sitter-c")
(cmake "https://github.com/uyha/tree-sitter-cmake") (use-package treesit-auto
(common-lisp "https://github.com/theHamsta/tree-sitter-commonlisp") :after tree-sitter
(cpp "https://github.com/tree-sitter/tree-sitter-cpp") :straight t
(css "https://github.com/tree-sitter/tree-sitter-css") :config (global-treesit-auto-mode))
(csharp "https://github.com/tree-sitter/tree-sitter-c-sharp")
(elisp "https://github.com/Wilfred/tree-sitter-elisp") (use-package treesit-fold
(go "https://github.com/tree-sitter/tree-sitter-go") :after tree-sitter
(go-mod "https://github.com/camdencheek/tree-sitter-go-mod") :straight (:build t :host github :repo "emacs-tree-sitter/treesit-fold")
(html "https://github.com/tree-sitter/tree-sitter-html") :config (treesit-fold-mode))
(js . ("https://github.com/tree-sitter/tree-sitter-javascript" "master" "src"))
(json "https://github.com/tree-sitter/tree-sitter-json")
(lua "https://github.com/Azganoth/tree-sitter-lua")
(make "https://github.com/alemuller/tree-sitter-make")
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
(python "https://github.com/tree-sitter/tree-sitter-python")
(r "https://github.com/r-lib/tree-sitter-r")
(rust "https://github.com/tree-sitter/tree-sitter-rust")
(toml "https://github.com/tree-sitter/tree-sitter-toml")
(tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src"))
(typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))
(yaml "https://github.com/ikatyang/tree-sitter-yaml"))))
#+end_src #+end_src
*** Appwrite *** Appwrite
@@ -58,27 +53,8 @@ it is.
:host github :host github
:repo "Phundrak/appwrite.el") :repo "Phundrak/appwrite.el")
:config :config
(csetq appwrite-endpoint "https://appwrite.phundrak.com" (setopt appwrite-endpoint "https://appwrite.phundrak.com"
appwrite-devel t)) appwrite-devel t))
#+end_src
*** Databases
A really cool tool in Emacs for manipulating databases is ~emacsql~.
Its able to manipulate SQLite databases by default, but its also
possible to manipulate MariaDB and PostgreSQL databases by installing
additional packages. For now, I just need SQLite and PostgreSQL
interfaces, so lets install the relevant packages.
#+begin_src emacs-lisp
(use-package emacsql-psql
:defer t
:after (emacsql)
:straight (:build t))
(with-eval-after-load 'emacsql
(phundrak/major-leader-key
:keymaps 'emacs-lisp-mode-map
:packages '(emacsql)
"E" #'emacsql-fix-vector-indentation))
#+end_src #+end_src
*** Flycheck *** Flycheck
@@ -207,6 +183,7 @@ awesome!
:init :init
(setq lsp-keymap-prefix "C-c l" (setq lsp-keymap-prefix "C-c l"
read-process-output-max (* 3 1024 1024)) read-process-output-max (* 3 1024 1024))
(setenv "LSP_USE_PLISTS" "true")
:hook ((c-mode . lsp-deferred) :hook ((c-mode . lsp-deferred)
(c++-mode . lsp-deferred) (c++-mode . lsp-deferred)
(html-mode . lsp-deferred) (html-mode . lsp-deferred)
@@ -218,9 +195,18 @@ awesome!
(lsp-rust-analyzer-cargo-watch-command "clippy") (lsp-rust-analyzer-cargo-watch-command "clippy")
(lsp-eldoc-render-all t) (lsp-eldoc-render-all t)
(lsp-idle-delay 0.6) (lsp-idle-delay 0.6)
(lsp-rust-analyzer-server-display-inlay-hints t)
(lsp-use-plist t) (lsp-use-plist t)
(lsp-enable-indentation nil)
;; Bash
(lsp-bash-highlight-parsing-errors t)
;; Nix
;; Rust
(lsp-rust-analyzer-server-display-inlay-hints t)
;; ;; Vue configuration
(lsp-vetur-emmet "always")
(lsp-vetur-format-default-formatter-html "prettier")
:config :config
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]coverage\\'")
(lsp-register-client (lsp-register-client
(make-lsp-client :new-connection (lsp-tramp-connection "shellcheck") (make-lsp-client :new-connection (lsp-tramp-connection "shellcheck")
:major-modes '(sh-mode) :major-modes '(sh-mode)
@@ -287,6 +273,7 @@ You can find the keybinds of Treemacs here.
[remap xref-find-apropos] #'consult-lsp-symbols)) [remap xref-find-apropos] #'consult-lsp-symbols))
#+end_src #+end_src
*** dap-mode
~dap-mode~ is an advanced debugging mode that works through LSP. Note ~dap-mode~ is an advanced debugging mode that works through LSP. Note
that currently, ~dap-firefox~ and ~dap-chrome~ dont work correctly due to that currently, ~dap-firefox~ and ~dap-chrome~ dont work correctly due to
[[https://github.com/emacs-lsp/dap-mode/issues/547][this issue]]. A workaround can be found in [[https://github.com/emacs-lsp/dap-mode/issues/554#issuecomment-1171256089][this comment]] though. [[https://github.com/emacs-lsp/dap-mode/issues/547][this issue]]. A workaround can be found in [[https://github.com/emacs-lsp/dap-mode/issues/554#issuecomment-1171256089][this comment]] though.
@@ -321,54 +308,6 @@ that currently, ~dap-firefox~ and ~dap-chrome~ dont work correctly due to
:cwd nil)))) :cwd nil))))
#+end_src #+end_src
*** Langtool
LanguageTool is a great tool for catching typos and grammatical errors
in quite a few languages.
#+begin_src emacs-lisp
(use-package langtool
:defer t
:straight (:build t)
:commands (langtool-check
langtool-check-done
langtool-show-message-at-point
langtool-correct-buffer)
:custom
(langtool-default-language "en-US")
(langtool-mother-tongue "fr")
:config
(setq langtool-java-classpath (string-join '("/usr/share/languagetool"
"/usr/share/java/languagetool/*")
":"))
:general
(phundrak/leader-key
:packages 'langtool
:infix "l"
"" '(:ignore t :which-key "LangTool")
"B" #'langtool-correct-buffer
"b" #'langtool-check-buffer
"c" #'langtool-check
"C" #'langtool-correct-at-point
"d" #'langtool-check-done
"l" #'langtool-switch-default-language
"p" #'langtool-show-message-at-point
"r" #'langtool-correct-region))
#+end_src
Finally, =writegood-mode= detects some simple general rules when writing
in English and can also calculate the Flesh-Kincaid levels of a
document.
#+begin_src emacs-lisp
(use-package writegood-mode
:defer t
:straight (:build t)
:hook org-mode latex-mode
:general
(phundrak/major-leader-key
:keymaps 'writegood-mode-map
"g" #'writegood-grade-level
"r" #'writegood-reading-ease))
#+end_src
** DSLs ** DSLs
DSLs, or /Domain Specific Languages/, are languages dedicated to some DSLs, or /Domain Specific Languages/, are languages dedicated to some
very tasks, such as configuration languages or non-general programming very tasks, such as configuration languages or non-general programming
@@ -670,6 +609,20 @@ Markdown.
:defer t) :defer t)
#+end_src #+end_src
*** Nix
#+begin_src emacs-lisp
(use-package nix-mode
:straight (:build t)
:defer t)
#+end_src
#+begin_src emacs-lisp
(use-package nix-ts-mode
:mode "\\.nix\\'"
:straight (:build t)
:config (add-to-list 'major-mode-remap-alist '((nix-mode . nix-ts-mode))))
#+end_src
*** Nginx *** Nginx
Nginx is another webserver, older and more mature than Caddy. A couple Nginx is another webserver, older and more mature than Caddy. A couple
of packages are required in order to be able to properly work with of packages are required in order to be able to properly work with
@@ -740,8 +693,41 @@ or some I write myself.
org-plantuml-jar-path "~/.local/bin/plantuml.jar")) org-plantuml-jar-path "~/.local/bin/plantuml.jar"))
#+end_src #+end_src
*** QML
Im currently working on a [[https://quickshell.org/][Quickshell]] configuration to replace my
[[https://github.com/Alexays/Waybar][Waybar]] one. Quickshell is configured with [[https://doc.qt.io/qt-6/qmlapplications.html][QML]], which requires its
major mode.
#+begin_src emacs-lisp
(use-package qml-ts-mode
:after lsp-mode
:straight (qml-ts-mode :build t
:type git
:host github
:repo "xhcoding/qml-ts-mode")
:config
(add-to-list 'lsp-language-id-configuration '(qml-ts-mode . "qml-ts"))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '("qmlls" "-E"))
:activation-fn (lsp-activate-on "qml-ts")
:server-id 'qmlls))
(add-hook 'qml-ts-mode-hook (lambda ()
(setq-local electric-indent-chars '(?\n ?\( ?\) ?{ ?} ?\[ ?\] ?\; ?,))
(lsp-deferred))))
#+end_src
*** Ron files
Rusty Object Notation, or RON for short, is to Rust what Json is to
Javascript. Sometimes, I have to work with such files, which is why I
installed this major mode.
#+begin_src emacs-lisp
(use-package ron-mode
:defer t
:straight (:build t))
#+end_src
*** Shells *** Shells
Aside from Eshell, my main shell on my machine is fish (see my [[file:fish.org][fish Aside from Eshell, my main shell on my machine is fish (see my [[file:/fish.md][fish
config]]), therefore I need a mode for it. config]]), therefore I need a mode for it.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package fish-mode (use-package fish-mode
@@ -801,6 +787,17 @@ When editing some scripts though, I need to use the built-in ~shell-mode~.
:mode "\\.yaml\\'") :mode "\\.yaml\\'")
#+end_src #+end_src
*** yuck
This is one of the two file formats used by [[https://github.com/elkowar/eww/][eww]]s configuration, a
Lisp-like language. Therefore, it will also use [[file:./editing.md#parinfer][parinfer]] to manage its
parenthesis.
#+begin_src emacs-lisp
(use-package yuck-mode
:straight (:build t)
:defer t
:hook ((yuck-mode . parinfer-rust-mode)))
#+end_src
** General Programming Languages ** General Programming Languages
*** C/C++ *** C/C++
I know, I know, C and C++ no longer are closely related languages, I know, I know, C and C++ no longer are closely related languages,
@@ -884,7 +881,7 @@ when entering ~lisp-mode~.
#+end_src #+end_src
Sly enables some deep interactivity between Emacs and a CommonLisp Sly enables some deep interactivity between Emacs and a CommonLisp
application running the Slynk backend. For an example, see [[file:stumpwm.org::#Utilities-Sly-kkok6oi0yaj0][my Sly application running the Slynk backend. For an example, see [[file:/stumpwm/utilities.md#sly][my Sly
configuration for StumpWM]]. configuration for StumpWM]].
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package sly (use-package sly
@@ -892,26 +889,6 @@ configuration for StumpWM]].
:straight (:build t)) :straight (:build t))
#+end_src #+end_src
*** Dart
#+begin_src emacs-lisp
(use-package dart-mode
:straight (:build t)
:defer t
:hook (dart-mode . lsp-deferred)
:mode "\\.dart\\'")
#+end_src
#+begin_src emacs-lisp
(use-package lsp-dart
:straight (:build t)
:defer t
:general
(phundrak/major-leader-key
:keymaps 'dart-mode-map
:packages '(lsp-mode lsp-dart)
"l" '(:keymap lsp-command-map :which-key "lsp")))
#+end_src
*** EmacsLisp *** EmacsLisp
This package displays the functions arglist or variables docstring This package displays the functions arglist or variables docstring
in the echo area at the bottom of the frame. Quite useful indeed. in the echo area at the bottom of the frame. Quite useful indeed.
@@ -1278,8 +1255,19 @@ Finally, Im using [[https://github.com/microsoft/pyright][Pyright]] as my LSP
*** Rust *** Rust
Rust is a general programming language, akin to C++ in some ways, but Rust is a general programming language, akin to C++ in some ways, but
much more oriented towards safe code, and much better suited for web much more oriented towards safe code, and much better suited for web
development. First, lets install the most important package, development.
~rustic~.
First, Im using =rust-mode= to tell it to use [[https://tree-sitter.github.io/tree-sitter/][tree sitter]].
#+begin_src emacs-lisp
(use-package rust-mode
:straight t
:defer t
:init
(setq rust-mode-treesitter-derive t))
#+end_src
Then, lets install the most important package, =rustic=, which provides
several improvements on top of =rust-mode=.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package rustic (use-package rustic
:defer t :defer t
@@ -1292,7 +1280,6 @@ development. First, lets install the most important package,
(defalias 'org-babel-execute:rust #'org-babel-execute:rustic) (defalias 'org-babel-execute:rust #'org-babel-execute:rustic)
(add-to-list 'org-src-lang-modes '("rust" . rustic))) (add-to-list 'org-src-lang-modes '("rust" . rustic)))
(setq rustic-lsp-client 'lsp-mode) (setq rustic-lsp-client 'lsp-mode)
(add-hook 'rustic-mode-hook #'tree-sitter-hl-mode)
:general :general
(general-define-key (general-define-key
:keymaps 'rustic-mode-map :keymaps 'rustic-mode-map
@@ -1398,13 +1385,14 @@ languages in the same buffer, mainly HTML, CSS, and JavaScript.
("\\.svelte\\'" . web-mode) ("\\.svelte\\'" . web-mode)
("\\.ctp\\'" . web-mode) ("\\.ctp\\'" . web-mode)
("\\.djhtml\\'" . web-mode) ("\\.djhtml\\'" . web-mode)
("\\.ftl\\'" . web-mode)
("\\.vue\\'" . web-mode)) ("\\.vue\\'" . web-mode))
:config :config
(csetq web-mode-markup-indent-offset 2 (setopt web-mode-markup-indent-offset 2
web-mode-code-indent-offset 2 web-mode-code-indent-offset 2
web-mode-css-indent-offset 2 web-mode-css-indent-offset 2
web-mode-style-padding 0 web-mode-style-padding 0
web-mode-script-padding 0) web-mode-script-padding 0)
:general :general
(phundrak/major-leader-key (phundrak/major-leader-key
:keymaps 'web-mode-map :keymaps 'web-mode-map
@@ -1440,6 +1428,14 @@ Auto-completion for ~emmet-mode~, ~html-mode~, and ~web-mode~.
:after (emmet-mode web-mode)) :after (emmet-mode web-mode))
#+end_src #+end_src
**** Astro
#+begin_src emacs-lisp
(use-package astro-ts-mode
:straight (:build t)
:defer t
:mode "\\.astro\\'")
#+end_src
**** CSS **** CSS
Lets customize a bit the built-in CSS mode. Lets customize a bit the built-in CSS mode.
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -1451,6 +1447,7 @@ Lets customize a bit the built-in CSS mode.
:hook (scss-mode . prettier-js-mode) :hook (scss-mode . prettier-js-mode)
:init :init
(put 'css-indent-offset 'safe-local-variable #'integerp) (put 'css-indent-offset 'safe-local-variable #'integerp)
:config (setopt css-indent-offset 2)
:general :general
(phundrak/major-leader-key (phundrak/major-leader-key
:keymaps 'css-mode-map :keymaps 'css-mode-map
@@ -1506,6 +1503,16 @@ activate when I open ~.less~ files by default. Lets fix that.
"l" '(:keymap lsp-command-map :which-key "lsp"))) "l" '(:keymap lsp-command-map :which-key "lsp")))
#+end_src #+end_src
I also use from time to time TailwindCSS. Lets add its LSP
configuration.
#+begin_src emacs-lisp
(use-package lsp-tailwindcss
:defer t
:after lsp
:init (setq lsp-tailwindcss-add-on-mode t)
:straight (:type git :host github :repo "merrickluo/lsp-tailwindcss"))
#+end_src
**** Javascript **** Javascript
~javascript-mode~ is meh at best, while ~rjsx-mode~ (Real JSX) is much ~javascript-mode~ is meh at best, while ~rjsx-mode~ (Real JSX) is much
better: it supports both JavaScript and ~.jsx~ files for React and better: it supports both JavaScript and ~.jsx~ files for React and
@@ -1562,15 +1569,14 @@ dont. Lets interact with NPM through Emacs then.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package npm-transient (use-package npm-transient
:defer t :defer t
:straight (npm-transient :build t :straight (:build t
:type git :type git
:host github :repo "labs.phundrak.com/phundrak/npm-transient.el")
:repo "Phundrak/npm-transient")) :general
;; :general (phundrak/major-leader-key
;; (phundrak/major-leader-key :packages '(npm-transient typescript-ts-mode web-mode)
;; :packages '(npm-transient rjsx-mode web-mode) :keymaps '(web-mode-map)
;; :keymaps '(rjsx-mode-map web-mode-map) "n" #'npm-transient))
;; "n" #'npm-transient))
#+end_src #+end_src
And finally, here is a formatter for JavaScript. And finally, here is a formatter for JavaScript.
@@ -1584,8 +1590,21 @@ And finally, here is a formatter for JavaScript.
(setq prettier-js-args '("--single-quote" "--jsx-single-quote"))) (setq prettier-js-args '("--single-quote" "--jsx-single-quote")))
#+end_src #+end_src
**** Typescript **** Json
Typescript is a safer alternative to JavaScript. Lets install its major mode then. My configuration for Json is quite short, Im just defaulting to
Emacs built-in tree-sitter mode for any =.json= file and reducing the
indentation to 2 spaces for any file using a mode from the built-in
package =js=.
#+begin_src emacs-lisp
(use-package js
:straight (:type built-in)
:mode ("\\.json\\'" . json-ts-mode)
:config (setopt js-indent-level 2))
#+end_src
**** TypeScript
TypeScript is a safer alternative to JavaScript. Lets install its major mode then.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package typescript-mode (use-package typescript-mode
:defer t :defer t
@@ -1643,43 +1662,21 @@ Tide enabled interactivity with Typescript.
"roi" #'tide-organize-imports)) "roi" #'tide-organize-imports))
#+end_src #+end_src
*** Zig **** Vue
[[https://ziglang.org/][Zig]] is to C kind of what Rust is to C++: a modern replacement without There isnt really any configuration in this heading, but an important
sacrificing performance. It is much safer than C while providing note concerning the usage of LSP with Vue. If the packages =typescript=
interop with it. Plus, its [[https://ziglang.org/documentation/master/std/][standard library]] is pretty complete. and =vue-tsc= are not in the =package.json= of a project, =volar= (or
=vue-semantic-server= according to =lsp-mode=) wont start properly. The
First, here is its major mode. simplest fix is to run the following command:
#+begin_src emacs-lisp #+begin_src sh
(use-package zig-mode npm install --save-dev vue-tsc typescript
:defer t
:straight (:build t)
:after flycheck
:hook (zig-mode . lsp-deferred)
:config
;; This is from DoomEmacs
(flycheck-define-checker zig
"A zig syntax checker using the zig-fmt interpreter."
:command ("zig" "fmt" (eval (buffer-file-name)))
:error-patterns
((error line-start (file-name) ":" line ":" column ": error: " (message) line-end))
:modes zig-mode)
(add-to-list 'flycheck-checkers 'zig)
:general
(phundrak/major-leader-key
:keymaps 'zip-mode-map
:packages 'lsp-mode
"l" '(:keymap lsp-command-map :which-key "lsp"))
(phundrak/major-leader-key
:packages 'zig-mode
:keymaps 'zig-mode-map
"c" #'zig-compile
"f" #'zig-format-buffer
"r" #'zig-run
"t" #'zig-test-buffer))
#+end_src #+end_src
For LSP to work, we need ~zls~ to be installed. In my case, as I am on Or replace =npm= with whichever package manager you prefer.
Arch Linux, I can install it from the AUR, and my AUR helper is ~paru~.
#+begin_src fish :results raw :wrap "src text" :exports code If you want to work with Vue in Emacs, =web-mode= is more than enough
paru --skipreview --noconfirm -S zls-bin 2>&1 when paired with an LSP server.
#+end_src
With the Nix package manager, the Vue 3 LSP server is
=nodePackages."@vue/language-server"= and not =vue-language-server=. The
latter is for Vue 2.

View File

@@ -40,6 +40,17 @@ for fish.
direnv hook fish | source direnv hook fish | source
#+end_src #+end_src
I also use [[https://github.com/elkowar/eww/][eww]] for some widgets, lets load its shell completions.
#+begin_src fish
eww shell-completions --shell fish | source
#+end_src
The [[https://crates.io/crates/sqlx][sqlx]] CLI is a requirement for my Rust projects using this crate.
The code below integrates its completions in Fish.
#+begin_src fish
sqlx completions fish | source
#+end_src
Since I dont really have a better place on this website to put it, Since I dont really have a better place on this website to put it,
here is my direnv configuration located at here is my direnv configuration located at
=$HOME/.config/direnv/direnv.toml=. =$HOME/.config/direnv/direnv.toml=.
@@ -77,13 +88,19 @@ Now, there is only one function I modify when it comes to the
appearance of fish when Im the one using it: the ~fish_greeting~ appearance of fish when Im the one using it: the ~fish_greeting~
function. I just want it empty. function. I just want it empty.
#+BEGIN_SRC fish #+BEGIN_SRC fish
function fish_greeting; end function fish_greeting
pumo-system-info
end
#+END_SRC #+END_SRC
For my fish prompt, I use [[https://starship.rs][starship]], a shell-agnostic prompt. Lets For my fish prompt, I use [[https://starship.rs][starship]], a shell-agnostic prompt. Lets
load it: load it:
#+begin_src fish #+begin_src fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source starship init fish | source
enable_transience
#+end_src #+end_src
** Setting up external tools ** Setting up external tools
@@ -125,6 +142,8 @@ $rlang\
$rust\ $rust\
$scala\ $scala\
$zig\ $zig\
$nix_shell\
$direnv\
$memory_usage\ $memory_usage\
$env_var\ $env_var\
$custom\ $custom\
@@ -148,6 +167,23 @@ symbol = "λ "
style = "bold green" style = "bold green"
#+end_src #+end_src
Some module configurations dont exactly sit right with me, so lets
tweak them a bit.
#+begin_src toml
[nix_shell]
format = '[$symbol$state( \($name\))]($style)'
symbol = '❄️ '
[shlvl]
disabled = false
threshold = 3
[direnv]
disabled = false
detect_files = ['.envrc', '.env']
symbol = ' '
#+end_src
Finally, lets disable all modules I dont need. Finally, lets disable all modules I dont need.
#+begin_src toml #+begin_src toml
[cobol] [cobol]
@@ -194,8 +230,6 @@ disable = true
disable = true disable = true
[vagrant] [vagrant]
disable = true disable = true
[nix_shell]
disable = true
[conda] [conda]
disable = true disable = true
[aws] [aws]
@@ -504,7 +538,7 @@ abbr webcam 'devour mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=
**** Sudo **** Sudo
First, I make it so that ~sudo~ comes with the ~-A~ switch in order to call my First, I make it so that ~sudo~ comes with the ~-A~ switch in order to call my
custom graphical script for getting my password (see [[file:bin.org::#Askpass-d0d7a8c0][askpass]]). I also made it so custom graphical script for getting my password (see [[file:./scripts.md#askpass][askpass]]). I also made it so
~please~ is an equivalent to ~sudo -A~ as a joke. ~please~ is an equivalent to ~sudo -A~ as a joke.
#+BEGIN_SRC fish #+BEGIN_SRC fish
abbr please 'sudo -A' abbr please 'sudo -A'

View File

@@ -6,42 +6,203 @@
* Git * Git
** Basic configuration ** Basic configuration
Just to make Emacs follow the convention in terms of indentation, Im
forcing it to use tabs.
#+begin_src conf-unix #+begin_src conf-unix
# -*- indent-tabs-mode: t; -*- # -*- indent-tabs-mode: t; -*-
#+end_src #+end_src
*** Setting Up Personal Information and Preferences
Lets set some of my personal information, namely my name, my email,
and which GPG key I sign my commits with.
#+begin_src conf-unix #+begin_src conf-unix
[user] [user]
email = lucien@phundrak.com email = lucien@phundrak.com
name = Lucien Cartier-Tilet name = Lucien Cartier-Tilet
signingkey = BD7789E705CB8DCA signingkey = ~/.ssh/id_ed25519.pub
#+end_src #+end_src
In terms of core configuration, I simply set Emacs as my default Git
editor. I also have my global gitignore file, described below in
[[file:./git.md#global-gitignore-file][Global gitignore file]].
#+begin_src conf-unix #+begin_src conf-unix
[core] [core]
editor = emacsclient -c -a emacs editor = emacsclient -c -a emacs
whitespace = fix,-indent-with-non-tab,trailing-space excludesfile = ~/.config/git/global-ignore
excludesfile = /home/phundrak/.gitignore_global
#+end_src
#+begin_src conf-unix
[pull]
rebase = true
#+end_src #+end_src
Lets not forget to tell Git to use the =main= branch by default.
#+begin_src conf-unix #+begin_src conf-unix
[init] [init]
defaultBranch = main defaultBranch = main
#+end_src #+end_src
This is entirely a matter of personal preferences, but I like to use
[[https://zen-browser.app/][Zen]], a Firefox fork with really nice features.
#+begin_src conf-unix
[web]
browser = zen-browser
#+end_src
*** 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]]:
[[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:
[[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!
[[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=:
#+begin_src text
git diff
compares the (i)ndex and the (w)ork tree;
git diff HEAD
compares a (c)ommit and the (w)ork tree;
git diff --cached
compares a (c)ommit and the (i)ndex;
git diff HEAD:<file1> <file2>
compares an (o)bject and a (w)ork tree entity;
git diff --no-index <a> <b>
compares two non-git things <a> and <b>.
#+end_src
That means you can see I was comparing to objects not tracked by git
in my screenshot above.
Finally, =renames= set to =copies= not only better detects file renames,
but also file copies.
#+begin_src conf-unix
[diff]
algorithm = histogram
colorMoved = plain
mnemonicPrefix = true
renames = copy
#+end_src
*** Better Fetching, Pulling, Rebasing, and Pushing
By default, when I pull new commits, I do not want to create a merge
commit, but rather to rebase my commits on whats new upstream.
#+begin_src conf-unix
[pull]
rebase = true
#+end_src
However, there is a problem with gits default behaviour: it wont
allow me to pull changes or perform a rebase as long as my worktree is
dirty. I either have to commit or stash my changes before I can do
something. And you know what? Git can auto stash your changes for you
before performing a rebase. In fact, while were at it, lets also
automatically squash commits that need to be squashed, and update all
refs.
#+begin_src conf-unix
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
#+end_src
And oh, buggers, you have a merge conflict! Im used to it, but since
git 2.3, there is a new feature that adds some context to git
conflicts: =zdiff3= (which stands for /zealous diff3/). Not only will it
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:
[[file:./img/git/merge-default.png]]
To this:
[[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
box!
#+begin_src conf-unix
[merge]
conflictstyle = zdiff3
#+end_src
Finally, once were good to go, we may want to push our changes to the
remote repository. Sometimes, git is confused and isnt sure where it
should push your branch. Lets tell it to simply push your current
branch to the branch with the same name on the remote with
=push.default=. If the upstream branch is not set yet, you can
automatically set it up with =push.autoSetupRemote=. Finally, I dont
want to push separately my tags, so lets push them with any other
push.
#+begin_src conf-unix
[push]
default = simple
autoSetupRemote = true
followTags = true
#+end_src
*** Making Git Look Better
First, lets activate colors in git by default when we are in a terminal.
#+begin_src conf-unix #+begin_src conf-unix
[color] [color]
ui = auto ui = auto
#+end_src #+end_src
Getting a raw list of things branches, tags, …– is *not nice*. So,
lets make it a bit nicer and split these lists in columns.
#+begin_src conf-unix #+begin_src conf-unix
[web] [column]
browser = firefox ui = auto
#+end_src
Simply using the =column.ui= option sets everything to use columns when
using a terminal. If you want more granularity, you can instead use
=column.branch=, =column.status=, etc... Look up =man git-config= for more
info.
*** Better Sorting Branches and Tags
By default, branches are sorted alphabetically. This may be fine for
most people, but I prefer something else: sorting them by how recently
they were comitted to. This is actually quite easy to configure:
#+begin_src conf-unix
[branch]
sort = -committerdate
#+end_src
Sorting tags is not nice by default. For instance, git will show you
version 11 before version 2, because 11 is technically before 2
alphabetically speaking. Lets fix that.
#+begin_src conf-unix
[tag]
sort = version:refname
#+end_src
*** Did You Mean "Commit"?
Sometimes, I fat finger my git commands and white a subcommand that
does not exist, like =git pul= or =git comitt=. By default, git will
simply tell you that, no, that subcommand does not exist, but will be
kind enough to suggest a few commands that may be what you are looking
for. Lets make git not only suggest these, but also ask you if you
want to run the one you most likely wanted to run.
#+begin_src conf-unix
[help]
autocorrect = prompt
#+end_src #+end_src
** Aliases ** Aliases
@@ -178,7 +339,6 @@
| =l= | =log --oneline --graph --decorate= | | =l= | =log --oneline --graph --decorate= |
| =s= | =status= | | =s= | =status= |
| =staged= | =diff --cached= | | =staged= | =diff --cached= |
| =upstream= | =!git push -u origin HEAD= |
#+RESULTS: #+RESULTS:
: a = add --all : a = add --all
@@ -205,6 +365,9 @@
** Tools ** Tools
*** Sendemail *** Sendemail
With git, it is possible to directly send commits as patches to a
mailing list by email. However, it needs to know how. Ill just
configure my mail server here.
#+begin_src conf-unix #+begin_src conf-unix
[sendemail] [sendemail]
smtpserver = mail.phundrak.com smtpserver = mail.phundrak.com
@@ -213,12 +376,24 @@
smtpserverport = 587 smtpserverport = 587
#+end_src #+end_src
Git also needs to know my password for my email address. Obviously, I
wont share it here, but I am using a helper which will itself return
my password to git.
#+begin_src conf-unix #+begin_src conf-unix
[credentials "smtp://lucien@phundrak.com@mail.phundrak.com:587"] [credentials "smtp://lucien@phundrak.com@mail.phundrak.com:587"]
helper = "secret-tool lookup password email_lucien-phundrak-com" helper = "secret-tool lookup password email_lucien-phundrak-com"
#+end_src #+end_src
*** Magit *** Magit
This configuration is specific for what I consider to be the best git
client out there, [[https://magit.vc/][Magit]]. Not just because it is an Emacs git client,
but also because it is quite transparent in terms of what happens with
the command line, but it also lets you see so much more easily what
happens with so many niceties. Rebases, including interactive rebases,
are a breeze with Magit.
I also can interact with some Git forges, including GitHub. Here are
some configurations recommended by Magit for Git.
#+begin_src conf-unix #+begin_src conf-unix
[magithub] [magithub]
online = true online = true
@@ -231,12 +406,17 @@
*** GPG *** GPG
#+begin_src conf-unix #+begin_src conf-unix
[gpg] [gpg]
program = gpg2 format = ssh
[gpg "ssh"]
allowedSignersFile = "~/.ssh/allowed_signers"
[commit] [commit]
gpgsign = true gpgsign = true
#+end_src #+end_src
*** Merge *** Merge
I like to use Emacs for everything (is it surprising?). Lets declare
the merge tool =ediff= and use it in my git configuration.
#+begin_src conf-unix #+begin_src conf-unix
[merge] [merge]
tool = ediff tool = ediff
@@ -247,30 +427,6 @@
cmd = emacs --eval \" (progn (defun ediff-write-merge-buffer () (let ((file ediff-merge-store-file)) (set-buffer ediff-buffer-C) (write-region (point-min) (point-max) file) (message \\\"Merge buffer saved in: %s\\\" file) (set-buffer-modified-p nil) (sit-for 1))) (setq ediff-quit-hook 'kill-emacs ediff-quit-merge-hook 'ediff-write-merge-buffer) (ediff-merge-files-with-ancestor \\\"$LOCAL\\\" \\\"$REMOTE\\\" \\\"$BASE\\\" nil \\\"$MERGED\\\"))\" cmd = emacs --eval \" (progn (defun ediff-write-merge-buffer () (let ((file ediff-merge-store-file)) (set-buffer ediff-buffer-C) (write-region (point-min) (point-max) file) (message \\\"Merge buffer saved in: %s\\\" file) (set-buffer-modified-p nil) (sit-for 1))) (setq ediff-quit-hook 'kill-emacs ediff-quit-merge-hook 'ediff-write-merge-buffer) (ediff-merge-files-with-ancestor \\\"$LOCAL\\\" \\\"$REMOTE\\\" \\\"$BASE\\\" nil \\\"$MERGED\\\"))\"
#+end_src #+end_src
*** Pager
#+begin_src conf-unix
[pager]
diff = delta
log = delta
reflog = delta
show = delta
#+end_src
*** Delta
#+begin_src conf-unix
[delta]
features = side-by-side line-numbers decorations
whitespace-error-style = 22 reverse
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
[interactive]
diffFilter = delta --color-only
#+end_src
*** Git forges *** Git forges
#+begin_src conf-unix #+begin_src conf-unix
[github] [github]
@@ -283,6 +439,9 @@
[url "https://phundrak@labs.phundrak.com"] [url "https://phundrak@labs.phundrak.com"]
insteadOf = https://labs.phundrak.com insteadOf = https://labs.phundrak.com
[url "https://github.com/RustSec/advisory-db"]
insteadOf = https://github.com/RustSec/advisory-db
#+end_src #+end_src
*** LFS *** LFS
@@ -293,3 +452,59 @@
smudge = git-lfs smudge -- %f smudge = git-lfs smudge -- %f
process = git-lfs filter-process process = git-lfs filter-process
#+end_src #+end_src
** Global gitignore file
:PROPERTIES:
:HEADER-ARGS: :mkdirp yes :tangle ~/.config/git/global-ignore
:END:
This is my global gitignore file, specifying files that will always be
ignored by Git, as described in [[file:./git.md#basic-configuration][Basic configuration]].
You may see some lines beginning with =,*=. Just read it as a simple =*=,
this is done in order to avoid org-mode being confused by a
line-initial =*= usually marking headings.
First, lets just ignore dotenv files and direnvs directories.
#+begin_src gitignore
.env
.direnv/
#+end_src
Now, lets ignore files generated by Emacs.
#+begin_src gitignore
,*~
\#*\#
,*.elc
auto-save-list
.\#*
,*_flymake.*
/auto/
.projectile
.dir-locals.el
# Org mode files
.org-id-locations
,*_archive
#+end_src
Finally, lets ignore some files we generally do not want.
#+begin_src text
,*.out
,*.o
,*.so
# Archives
,*.7zz
,*.dmg
,*.gz
,*.iso
,*.jar
,*.rar
,*.tar
,*.zip
,*.log
,*.sqlite
dist/
#+end_src

519
docs/hyprland.org Normal file
View File

@@ -0,0 +1,519 @@
#+title: Hyprland
#+setupfile: headers
#+PROPERTY: header-args:conf :mkdirp yes :tangle ~/.config/hypr/hyprland.conf :export code :noweb yes
#+PROPERTY: header-args :exports code :tangle no
* Hyprland
[[https://hyprland.org/][Hyprland]] is a dynamic wayland compositor which provides autotiling and
beautiful animations out of the box.
** Environment variables
This part will be very short, but I first need to set some environment variables.
#+begin_src conf
env = XCURSOR_SIZE,24
env = SDL_VIDEODRIVER,wayland
#+end_src
** Hardware configuration
The first configuration I want to set is my keyboard and touchpad
configuration. My keyboard uses the AFNOR standard for the [[https://bépo.fr][bépo]]
layout, and I do not use the caps lock key which is replaced by the
control key.
#+begin_src conf
input {
kb_layout = fr
kb_variant = bepo_afnor
kb_model =
kb_options = caps:ctrl_modifier
kb_rules =
numlock_by_default = true
follow_mouse = 1
touchpad {
natural_scroll = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
#+end_src
We can then set the monitors used. If =HDMI-A-1= is not found when
Hyprland launches, it will simply ignore it. And at worst, I can use
[[https://github.com/artizirk/wdisplays][wdisplays]] to manually set the position of my screens.
#+name: monitors-table
| Monitor name | Resolution | Refresh rate (Hz) | Position |
|--------------+------------+-------------------+----------|
| HDMI-A-1 | 2560x1080 | | 0x0 |
| eDP-1 | 1920x1080 | 120 | 2560x0 |
#+name: gen-monitors
#+begin_src emacs-lisp :var table=monitors-table :exports results :tangle no :wrap "src conf" :cache yes
(let ((normalize-value (lambda (value)
(or (if (numberp value)
(number-to-string value)
value)
""))))
(mapconcat (lambda (line)
(let* ((monitor (funcall normalize-value (nth 0 line)))
(resolution (funcall normalize-value (nth 1 line)))
(refresh-rate (funcall normalize-value (nth 2 line)))
(refresh-rate (if (string= "" refresh-rate) "" (concat "@" refresh-rate)))
(position (funcall normalize-value (nth 3 line)))
(scale (funcall normalize-value (nth 4 line)))
(scale (if (string= "" scale) "1" scale)))
(format "monitor = %s, %s%s, %s, %s"
monitor
resolution
refresh-rate
position
scale)))
table
"\n"))
#+end_src
This translates into the following configuration:
#+RESULTS[7a1e8ae4a77d335ec873de9ef0536bb45c84f2a0]: gen-monitors
#+begin_src conf
monitor = HDMI-A-1, 2560x1080, 0x0, 1
monitor = eDP-1, 1920x1080@120, 2560x0, 1
#+end_src
** Visual configuration
Now, onto the visual configuration. I like my gaps, and I feel keeping
my windows relatively tight together but with a greater gap around
them looks nice. I also like the Nord palette which I use here for my
window border colours. Active windows get a gradient from nord9 to
nord14, while inactive windows get a nord3 border. Lastly, I use the
dwindle layout as I find it nicer to use than the master layout.
#+begin_src conf
general {
gaps_in = 5
gaps_out = 20
border_size = 2
col.active_border = rgb(81a1c1) rgb(a3be8c) 45deg
col.inactive_border = rgb(4c566a)
layout = dwindle
}
#+end_src
I may one day use the [[https://github.com/hyprland-community/pyprland][=layout_center=]] layout from [[https://github.com/hyprland-community/pyprland][pyprland]], but I
havent got around to do that yet.
Decorations are just a nice thing to make things look pretty. I like
some slight rounding on my windows with a nice though light shadow.
Again, the colour comes from the Nord palette with nord0.
#+begin_src conf
decoration {
rounding = 5
blur {
enabled = true
size = 9
passes = 1
}
shadow {
enabled = true
color = rgba(2e3440aa)
range = 4
render_power = 3
}
}
#+end_src
Animations are fun! I mostly kept the default animations from the
example config of Hyprland.
#+begin_src conf
animations {
enabled = true
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
#+end_src
Now, we can take care of the configuration of the layouts.
#+begin_src conf
dwindle {
pseudotile = true
preserve_split = true
}
#+end_src
** Autolaunch of programs
The =exec-once= directive of Hyprland allows the user to launch the
associated command only when Hyprland starts in order to avoid
launching multiple instances of some programs.
First, Ill import some environment variables into Hyprland. These may
be necessary for some programs.
#+begin_src conf
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=Hyprland
#+end_src
Next, Ill launch some programs that will give Hyprland a nice
appearance: [[https://github.com/Alexays/Waybar][waybar]] and [[https://github.com/danyspin97/wpaperd][wpaperd]].
#+begin_src conf
exec-once = wpaperd
exec-once = waybar
#+end_src
Lets also take care of some sound stuff. If any new input or output
is detected, switch to it. And stop the music, just in case.
#+begin_src conf
exec-once = pactl load-module module-switch-on-connect
exec-once = mpc stop
#+end_src
Having a working policy kit is generally a good idea.
#+begin_src conf
exec-once = xfce-polkit
#+end_src
Now, lets launch the notification daemon [[https://github.com/ErikReider/SwayNotificationCenter][swaync]].
#+begin_src conf
exec-once = swaync
#+end_src
Lets also launch [[https://sr.ht/~kennylevinsen/wlsunset/][wlsunset]]. Ill very vagely aim at Paris with the
longitude and latitude.
#+begin_src conf
exec-once = wlsunset -l 48.5 -L 2.2 -d 1500
#+end_src
Lets launch some apps and their applet. Here, were launching the
applets for NetworkManager, KDE Connect, and blueman (the bluetooth
manager).
#+begin_src conf
exec-once = nm-applet
exec-once = /usr/lib/kdeconnectd
exec-once = kdeconnect-indicator
exec-once = blueman-applet
#+end_src
Finally, lets launch [[https://github.com/swaywm/swayidle][swayidle]] which lets us lock our session. Itll automatically pause any media playing.
#+begin_src conf
exec-once = swayidle -w timeout 600 'plock' before-sleep 'playerctl pause; plock' lock 'plock'
#+end_src
** Keybindings
First, let me make a couple of variables for reusability. Mind you,
=hjkl= becomes =ctsr= in the bépo keyboard layout.
#+begin_src conf
$left = c
$right = r
$up = s
$down = t
$menu = rofi -combi-modi drun -show combi
#+end_src
Now, Id like to introduce a concept which I really enjoy: submaps.
They allow the Hyprland user to make keychords similar to Emacs, which
allows us to unlock the full potential of keybindings in a window
manager. In Hyprland, something to be wary of is that there is no
automatic submap switching. If there is no explicit indication to exit
the current submap or to switch to another submap, Hyprland will just
stay on the current submap. So, using something like =bind = CTRL, g,
submap, reset= is necessary to exit the current submap on =C-g= (or
=Control + g=, I like the Emacs notation).
In the submap tables below, the submap column may indicate =reset=, a
submaps name, or nothing. If nothing is indicated, the key will not
act on the current submap or switch to another one. A submaps name
will make the key switch to said submap, while the value =reset= will
make us go back to the root submap. Note that all submaps will also
have the escape and =C-g= keys mapped to exiting the current submap.
Note also that I sometimes use [[https://wiki.hyprland.org/Configuring/Binds/#bind-flags][bind flags]]. Ill only set the flag in
the appropriate column when necessary.
These are the keybindings that are present on the top-level keybinding
map.
#+name: top-submap
| Modifiers | Key | Action | Argument | Submap |
|-----------+--------+--------+----------+------------|
| SUPER | Return | exec | kitty | |
| SUPER | Space | | | leader |
| | Print | | | screenshot |
#+begin_src conf
<<gen-submap(table=top-submap, submap="", reset-submap="no")>>
<<gen-submap(table=leader-submap, submap="leader", reset-submap="yes")>>
<<gen-submap(table=apps-submap, submap="apps", reset-submap="yes")>>
<<gen-submap(table=buffers-submap, submap="buffers", reset-submap="yes")>>
<<gen-submap(table=resize-submap, submap="resize", reset-submap="yes")>>
<<gen-submap(table=rofi-submap, submap="rofi", reset-submap="yes")>>
<<gen-submap(table=screenshot-submap, submap="screenshot", reset-submap="yes")>>
<<gen-submap(table=windows-submap, submap="windows", reset-submap="yes")>>
submap = reset
<<gen-submap(table=top-media, submap="", reset-submap="no")>>
<<gen-submap(table=top-windows-movements, submap="", reset-submap="no")>>
<<gen-mouse(table=top-windows-actions)>>
<<gen-submap(table=top-workspace-movements, submap="", reset-submap="no")>>
#+end_src
*** Top keybindings
**** Media keys
#+name: top-media
| Modifiers | Key | Action | Argument | Submap | Bind flag |
|-----------+-----------------------+--------+------------------------------+--------+-----------|
| | XF86AudioPlay | exec | playerctl play-pause | | =l= |
| | XF86AudioPause | exec | playerctl pause | | =l= |
| | XF86AudioStop | exec | playerctl stop | | =l= |
| | XF86AudioPrev | exec | playerctl previous | | =l= |
| | XF86AudioNext | exec | playerctl next | | =l= |
| | XF86AudioForward | exec | playerctl position +1 | | =l= |
| | XF86AudioRewind | exec | playerctl position -1 | | =l= |
| | XF86AudioRaiseVolume | exec | pamixer -i 2 | | =l= |
| | XF86AudioLowerVolume | exec | pamixer -d 2 | | =l= |
| | XF86MonBrightnessUp | exec | xbacklight -perceived -inc 2 | | =l= |
| | XF86MonBrightnessDown | exec | xbacklight -perceived -dec 2 | | =l= |
| | XF86KbdBrightnessUp | exec | xbacklight -perceived -inc 2 | | =l= |
| | XF86KbdBrightnessDown | exec | xbacklight -perceived -dec 2 | | =l= |
**** Quick window movements and actions
These are basically a rehash of what you can find in the [[file:./hyprland.md#windows][windows submap]] but with a few missing keybindings and other extras.
#+name: top-windows-movements
| Modifiers | Key | Action | Argument | Submap |
|------------------+--------+------------------------+----------+--------|
| SUPER | =$left= | movefocus | l | |
| SUPER | =$right= | movefocus | r | |
| SUPER | =$up= | movefocus | u | |
| SUPER | =$down= | movefocus | d | |
| SUPER_SHIFT | =$left= | movewindow | l | reset |
| SUPER_SHIFT | =$right= | movewindow | r | reset |
| SUPER_SHIFT | =$up= | movewindow | u | reset |
| SUPER_SHIFT | =$down= | movewindow | d | reset |
| SUPER_CTRL_SHIFT | =$left= | moveworkspacetomonitor | e+0 +1 | reset |
| SUPER_CTRL_SHIFT | =$right= | moveworkspacetomonitor | e+0 -1 | reset |
| SUPER | Tab | cyclenext | | |
| SUPER_SHIFT | Tab | cyclenext | prev | |
Something I really appreciate with window managers in Linux is the able to really easily move and resize windows. The keybinds below allow the user to press down the super key and perform an action on the window:
- with a left click, move the window around
- with a right click, resize the window
#+name: top-windows-actions
| Modifiers | Key | Action |
|-----------+-----------+--------------|
| SUPER | mouse:272 | movewindow |
| SUPER | mouse:273 | resizewindow |
**** Workspace movements
Due to the bépo layout, the number row does not give immediate access to numbers, but to punctuation symbols. You can find below a table of equivalence of the characters name and the actual character, as well as the number that sits on the same key when pressing shift.
| / | | <l> |
| Character name | Character | Number |
|----------------+-----------+--------|
| quotedbl | ="= | 1 |
| guillemotleft | =«= | 2 |
| guillemotright | =»= | 3 |
| parenleft | =(= | 4 |
| parenright | =)= | 5 |
| at | =@= | 6 |
| plus | =+= | 7 |
| minus | =-= | 8 |
| slash | =/= | 9 |
| asterisk | =*= | 0 |
#+name: top-workspace-movements
| Modifiers | Key | Action | Argument |
|-------------+----------------+-----------------+----------|
| SUPER | quotedbl | workspace | 1 |
| SUPER | guillemotleft | workspace | 2 |
| SUPER | guillemotright | workspace | 3 |
| SUPER | parenleft | workspace | 4 |
| SUPER | parenright | workspace | 5 |
| SUPER | at | workspace | 6 |
| SUPER | plus | workspace | 7 |
| SUPER | minus | workspace | 8 |
| SUPER | slash | workspace | 9 |
| SUPER | asterisk | workspace | 10 |
| SUPER | mouse_down | workspace | e+1 |
| SUPER | mouse_up | workspace | e-1 |
| SUPER_SHIFT | quotedbl | movetoworkspace | 1 |
| SUPER_SHIFT | guillemotleft | movetoworkspace | 2 |
| SUPER_SHIFT | guillemotright | movetoworkspace | 3 |
| SUPER_SHIFT | parenleft | movetoworkspace | 4 |
| SUPER_SHIFT | parenright | movetoworkspace | 5 |
| SUPER_SHIFT | at | movetoworkspace | 6 |
| SUPER_SHIFT | plus | movetoworkspace | 7 |
| SUPER_SHIFT | minus | movetoworkspace | 8 |
| SUPER_SHIFT | slash | movetoworkspace | 9 |
| SUPER_SHIFT | asterisk | movetoworkspace | 10 |
*** Leader
The leader submap is accessible by pressing =s-SPC= (Super and space).
It is sort of the general menu for my keybindings.
#+name: leader-submap
| Modifiers | Key | Action | Argument | Submap |
|-----------+-----+--------+----------+---------|
| | l | exec | =plock= | reset |
| | a | | | apps |
| | b | | | buffers |
| | w | | | windows |
*** Apps
#+name: apps-submap
| Modifiers | Key | Action | Argument | Submap |
|-----------+-----+--------+-------------------+--------|
| | b | exec | =zen-browser= | reset |
| SHIFT | b | exec | =qutebrowser= | reset |
| | d | exec | =vesktop= | reset |
| | e | exec | =emacsclient -c -n= | reset |
| | g | exec | =gimp= | reset |
| | n | exec | =nemo= | reset |
| | r | | | rofi |
| | u | exec | =$menu= | reset |
*** Buffers
I call this the buffer window, but its mostly due to my habit of
handling Emacs buffers. Some of my muscle memory may never fade away.
Consider this as an addition to the [[file:./hyprland.md#windows][windows]] submap.
#+name: buffers-submap
| Modifiers | Key | Action | Argument | Submap |
|-----------+-----+------------+----------+--------|
| | d | killactive | | reset |
*** Resize
This is an example of a submap where I may not want to immediately
exit it. We enter it with the keychord =s-SPC w .= and exit it with
either the usual =C-g=, escape key, but also with the =q= key.
#+name: resize-submap
| Modifiers | Key | Action | Argument | Submap | Bind flag |
|-----------+--------+--------------+----------+--------+-----------|
| | =$left= | resizeactive | -10 0 | | =e= |
| | =$right= | resizeactive | 10 0 | | =e= |
| | =$up= | resizeactive | 0 -10 | | =e= |
| | =$down= | resizeactive | 0 10 | | =e= |
| | q | | | reset | |
*** Rofi
This submap hosts quite a few menus handled with [[https://github.com/davatorium/rofi][rofi]] (I use [[https://github.com/lbonn/rofi][this
wayland fork]]). You may want to take a look at [[file:./scripts.md][custom scripts]] to know
what most of these do.
#+name: rofi-submap
| Modifiers | Key | Action | Argument | Submap |
|-----------+-----+--------+-------------------+--------|
| | a | exec | =awiki= | reset |
| | b | exec | =bluetooth-connect= | reset |
| | e | exec | =rofi-emoji= | reset |
| | r | exec | =$menu= | reset |
| | s | exec | =rofi -show ssh= | reset |
| | y | exec | =ytplay= | reset |
| SHIFT | y | exec | =rofi-ytdl= | reset |
*** Screenshots
Here are the keybinding for the screenshot submap
#+name: screenshot-submap
| Modifiers | Key | Action | Argument | Submap |
|-----------+-------+--------+--------------------+--------|
| | Print | exec | =screenshot= | reset |
| | d | exec | =screenshot -d 3= | reset |
| Shift | d | exec | =screenshot -sced 3= | reset |
| | e | exec | =screenshot -sec= | reset |
| | s | exec | =screenshot -s= | reset |
| Shift | s | exec | =screenshot -sc= | reset |
*** Windows
#+name: windows-submap
| Modifiers | Key | Action | Argument | Submap |
|------------+--------+------------------------+----------+--------|
| | period | | | resize |
| | =$left= | movefocus | l | reset |
| | =$right= | movefocus | r | reset |
| | =$up= | movefocus | u | reset |
| | =$down= | movefocus | d | reset |
| SHIFT | =$left= | movewindow | l | reset |
| SHIFT | =$right= | movewindow | r | reset |
| SHIFT | =$up= | movewindow | u | reset |
| SHIFT | =$down= | movewindow | d | reset |
| CTRL_SHIFT | =$left= | moveworkspacetomonitor | e+0 +1 | reset |
| CTRL_SHIFT | =$right= | moveworkspacetomonitor | e+0 -1 | reset |
| | d | killactive | | reset |
| | f | fullscreen | | reset |
| SHIFT | f | togglefloating | | reset |
** Window rules
For now, I dont have a lot of window rules. One, actually. It makes
the XFCE polkit a floating window.
#+begin_src conf
windowrulev2 = float,class:^(xfce-polkit)$
#+end_src
* Private data :noexport:
#+name: gen-submap
#+begin_src emacs-lisp :var table=leader-submap submap="leader" reset-submap="yes" :exports none :tangle no :wrap "src conf :exports none :tangle no"
(let ((str-or-null (lambda (value)
(cond ((numberp value) (number-to-string value))
((or (null value) (string= "" value)) nil)
(t value))))
(plain-str (lambda (value)
(cond ((numberp value) (number-to-string value))
((or (null value) (string= "" value)) nil)
(t (string-replace "=" "" value))))))
(concat (if (not (string= "" submap))
(concat "submap = " submap "\n")
"")
(mapconcat (lambda (line)
(let* ((modifiers (or (funcall str-or-null (nth 0 line)) ""))
(key (funcall plain-str (nth 1 line)))
(action (funcall str-or-null (nth 2 line)))
(argument (or (funcall plain-str (nth 3 line)) ""))
(submap (funcall str-or-null (nth 4 line)))
(bind-flag (or (funcall plain-str (nth 5 line)) ""))
(action-bind (when action
(format "bind%s = %s, %s, %s, %s"
bind-flag
modifiers
key
action
argument)))
(submap-bind (when submap
(format "bind = %s, %s, submap, %s"
modifiers
key
submap))))
(mapconcat #'identity
(seq-filter (lambda (val) (not (null val)))
(list action-bind submap-bind))
"\n")))
table
"\n")
(if (string= "yes" reset-submap)
"\nbind = , escape, submap, reset
bind = CTRL, g, submap, reset"
"")))
#+end_src
#+RESULTS[16dc2aed068a6e71847eaf331d36c2092f5b0379]: gen-submap
#+begin_src conf :exports none :tangle no
submap = leader
bind = , l, exec, plock
bind = , l, submap, reset
bind = , a, submap, apps
bind = , b, submap, buffers
bind = , w, submap, windows
bind = , escape, submap, reset
bind = CTRL, g, submap, reset
#+end_src
#+name: gen-mouse
#+begin_src emacs-lisp :var table=top-windows-actions
(mapconcat (lambda (line)
(let ((modifiers (or (nth 0 line) ""))
(mouse-btn (nth 1 line))
(command (or (nth 2 line) "")))
(format "bindm = %s, %s, %s" modifiers mouse-btn command)))
table
"\n")
#+end_src
#+RESULTS[bab4997f43c513c6557a8f039ae1e20cc96e7794]: gen-mouse
: bindm = SUPER, mouse:272, movewindow
: bindm = SUPER, mouse:273, resizewindow

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
docs/img/git/diff-moved.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -11,8 +11,7 @@ It can be manipulated by various front-end applications, such as the
command-line utility ~mpc~, TUI ~ncmpcpp~, or GUI ~cantata~. In my case, I command-line utility ~mpc~, TUI ~ncmpcpp~, or GUI ~cantata~. In my case, I
use mainly ~ncmpcpp~ and Emacs EMMS. use mainly ~ncmpcpp~ and Emacs EMMS.
On my computer, MPD runs as a user daemon, as seen in [[file:bootstrap.org::#Execute_bootstrap-Enable_some_services-Mpd-f0f5b9b7][my bootstrap On my computer, MPD runs as a user daemon.
file here]].
** Required Parameters ** Required Parameters
MPD requires a few compulsory parameters that we will see below. MPD requires a few compulsory parameters that we will see below.

View File

@@ -1,10 +1,17 @@
#+title: Neofetch #+title: Neofetch (Deprecated)
#+setupfile: headers #+setupfile: headers
#+PROPERTY: header-args :noweb yes :exports code :tangle no :exports none #+PROPERTY: header-args :noweb yes :exports code :tangle no :exports none
#+PROPERTY: header-args:sh :tangle ~/.config/neofetch/config.conf :exports code #+PROPERTY: header-args:sh :tangle ~/.config/neofetch/config.conf :exports code
#+PROPERTY: header-args:sh+ :noweb yes :padline no :mkdirp yes #+PROPERTY: header-args:sh+ :noweb yes :padline no :mkdirp yes
* Neofetch * Neofetch (Deprecated)
#+html: ::: warning
This configuration of Neofetch is no longer maintained and was
deprecated on May 24th, 2025. Therefore, it may not be up to date with
the latest versions of Neofetch.
#+html: :::
[[https://github.com/dylanaraps/neofetch][Neofetch]] is a CLI utility used to display system information. It was [[https://github.com/dylanaraps/neofetch][Neofetch]] is a CLI utility used to display system information. It was
written in Bash, and thus its configuration file is written as a Bash written in Bash, and thus its configuration file is written as a Bash
script too. This document was written with org-mode, and my script too. This document was written with org-mode, and my

View File

@@ -2,7 +2,14 @@
#+setupfile: headers #+setupfile: headers
#+PROPERTY: header-args:conf :exports code :mkdirp yes :tangle ~/.config/picom/picom.conf #+PROPERTY: header-args:conf :exports code :mkdirp yes :tangle ~/.config/picom/picom.conf
* Picom * Picom (deprecated)
#+html: ::: warning
This configuration of Picom is no longer maintained and was deprecated
on May 24th, 2025. Therefore, it may not be up to date with the latest
versions of Picom.
#+html: :::
Picom is the successor to Compton, a standalone compositor for Xorg. It provides Picom is the successor to Compton, a standalone compositor for Xorg. It provides
compositing for WM that do not provide any, such as i3. I am currently using compositing for WM that do not provide any, such as i3. I am currently using
[[https://github.com/ibhagwan/picom][ibhagwans fork of compton]] which provides the ~dual-kawase~ blur from [[https://github.com/tryone144/compton][tryones [[https://github.com/ibhagwan/picom][ibhagwans fork of compton]] which provides the ~dual-kawase~ blur from [[https://github.com/tryone144/compton][tryones

View File

@@ -1,105 +0,0 @@
#+TITLE: Rust Formatter
#+setupfile: headers
#+PROPERTY: header-args:toml :mkdirp yes :tangle ~/.rustfmt.toml
* Rust Formatter
The ~.rustfmt.toml~ file located in the ~$HOME~ directory is a global
configuration file for Rusts code formatters, such as ~rustfmt~. In this file,
you can find how my Rust code is always formatted.
** General settings
First, we are using the 2018 edition of Rust.
#+BEGIN_SRC toml
edition = "2018"
#+END_SRC
Put single-expression functions on a single line.
#+BEGIN_SRC toml
fn_single_line = true
#+END_SRC
Format string literals where necessary.
#+BEGIN_SRC toml
format_strings = true
#+END_SRC
Maximum width of each line
#+BEGIN_SRC toml
max_width = 80
#+END_SRC
Merge multiple imports into a single nested import.
#+BEGIN_SRC toml
merge_imports = true
#+END_SRC
** Structs and Enums
The maximum length of enum variant having discriminant, that gets
vertically aligned with others. Variants without discriminants would
be ignored for the purpose of alignment.
Note that this is not how much whitespace is inserted, but instead the
longest variant name that doesn't get ignored when aligning.
#+BEGIN_SRC toml
enum_discrim_align_threshold = 20
#+END_SRC
The maximum diff of width between struct fields to be aligned with
each other.
#+BEGIN_SRC toml
struct_field_align_threshold = 20
#+END_SRC
Reorder =impl= items. =type= and =const= are put first, then macros and
methods.
#+BEGIN_SRC toml
reorder_impl_items = true
#+END_SRC
** Comments
Convert ~/* */~ comments to ~//~ comments where possible.
#+BEGIN_SRC toml
normalize_comments = true
#+END_SRC
Break comments to fit on the line.
#+BEGIN_SRC toml
wrap_comments = true
#+END_SRC
Report ~FIXME~ items in comments.
#+BEGIN_SRC toml
report_fixme = "Always"
#+END_SRC
Report ~TODO~ items in comments.
#+BEGIN_SRC toml
todo = "Always"
#+END_SRC
** Documentation
Format code snippet included in doc comments.
#+BEGIN_SRC toml
format_code_in_doc_comments = true
#+END_SRC
Convert ~#![doc]~ and ~#[doc]~ attributes to ~//!~ and ~///~ doc comments.
#+BEGIN_SRC toml
normalize_doc_attributes = true
#+END_SRC
** Whitespace
Use tab characters for indentation, spaces for alignment.
#+BEGIN_SRC toml
hard_tabs = false
#+END_SRC
Number of spaces per tab.
#+BEGIN_SRC toml
tab_spaces = 4
#+END_SRC
I want newlines to always be Unix style.
#+BEGIN_SRC toml
newline_style = "Unix"
#+END_SRC

File diff suppressed because it is too large Load Diff

View File

@@ -119,9 +119,9 @@ Its always nice to have the =BROWSER= variable available in case you
want to do stuff with scripts and your default browser. want to do stuff with scripts and your default browser.
#+name: browser #+name: browser
| Variable | Value | | Variable | Value |
|----------+---------| |----------+-------------|
| =BROWSER= | =firefox= | | =BROWSER= | =zen-browser= |
#+begin_src sh #+begin_src sh
<<export-variables(browser)>> <<export-variables(browser)>>

View File

@@ -1,19 +1,26 @@
#+title: StumpWM #+title: StumpWM (Deprecated)
#+setupfile: ../headers #+setupfile: ../headers
#+property: header-args:emacs-lisp :tangle no :exports results :cache yes :noweb yes #+property: header-args:emacs-lisp :tangle no :exports results :cache yes :noweb yes
[[file:../img/stumpwm.png]] [[file:../img/stumpwm.png]]
* StumpWM * StumpWM (deprecated)
#+html: ::: warning
This configuration of StumpWM is no longer maintained and was
deprecated on May 24th, 2025. Therefore, it may not be up to date with
the latest versions of StumpWM.
#+html: :::
** Introduction ** Introduction
*** What is StumpWM? *** What is StumpWM?
[[https://stumpwm.github.io/][StumpWM]] is a tiling window manager inheriting from [[http://www.nongnu.org/ratpoison/][RatPoison]], written [[https://stumpwm.github.io/][StumpWM]] is a tiling window manager inheriting from [[http://www.nongnu.org/ratpoison/][RatPoison]], written
entirely in [[https://common-lisp.net/][Common Lisp]] and compiled with [[http://www.sbcl.org/][SBCL]]. While it is not a entirely in [[https://common-lisp.net/][Common Lisp]] and compiled with [[http://www.sbcl.org/][SBCL]]. While it is not a
dynamic tiling window manager like [[file:Deprecated/awesome.org][Awesome]] is, its ability of managing dynamic tiling window manager like [[file:/deprecated/awesome.md][Awesome]] is, its ability of managing
windows in frames and using keychords with keymaps like Emacs does is windows in frames and using keychords with keymaps like Emacs does is
a huge plus for me, not to mention the fact its configuration file is a huge plus for me, not to mention the fact its configuration file is
written in Common Lisp, a general programming language, a bit like written in Common Lisp, a general programming language, a bit like
Awesome. This makes it an [[file:Deprecated/i3.org][i3]] on steroids, sort of. It also uses a lot Awesome. This makes it an [[file:/deprecated/i3.md][i3]] on steroids, sort of. It also uses a lot
of Emacs concepts, which is great for an Emacs user such as myself. of Emacs concepts, which is great for an Emacs user such as myself.
*** Why not EXWM then? *** Why not EXWM then?

View File

@@ -525,7 +525,7 @@ with Emacs buffers.
My music is managed through MPD, and I often use ~playerctl~ commands in My music is managed through MPD, and I often use ~playerctl~ commands in
order to interact with it without any GUI application. So, well see a order to interact with it without any GUI application. So, well see a
lot of its usage here, and numerous commands used here come from the lot of its usage here, and numerous commands used here come from the
~mpd~ minor mode loaded [[file:./stumpwm.md#init-file][above]]. ~mpd~ minor mode loaded [[file:init.md][in the init file]].
First, lets declare an interactive keymap in order to easily change First, lets declare an interactive keymap in order to easily change
several times in a row either the current song playing or the volume several times in a row either the current song playing or the volume

View File

@@ -97,7 +97,7 @@ formatter is U+E082, which symbolizes the CPU.
*** Generating the Mode-Line *** Generating the Mode-Line
We can indicate what to display in our modeline. Each formatter will We can indicate what to display in our modeline. Each formatter will
be separated by a Powerline separator with the code point ~0xE0B0~ in be separated by a Powerline separator with the code point ~0xE0B0~ in
the font I am using (see [[file:./stumpwm.md#fonts][Fonts]]). the font I am using (see [[file:theme.md#fonts][Theme » Fonts]]).
#+name: modeline-format #+name: modeline-format
#+caption: Formatters for the modeline #+caption: Formatters for the modeline

View File

@@ -143,7 +143,10 @@ tmux windows would be tabs.
(let* ((command (nth 1 keybind)) (let* ((command (nth 1 keybind))
(command (if (string= "" command) nil command)) (command (if (string= "" command) nil command))
(goto-prefix (nth 2 keybind)) (goto-prefix (nth 2 keybind))
(goto-prefix (if (string= "" goto-prefix) nil (concat "switch-client -T " goto-prefix)))) (goto-prefix (if (or (null goto-prefix)
(string= "" goto-prefix))
nil
(concat "switch-client -T " goto-prefix))))
(if (and command goto-prefix) (if (and command goto-prefix)
(concat command "\\; " goto-prefix) (concat command "\\; " goto-prefix)
(or command goto-prefix))))) (or command goto-prefix)))))
@@ -151,7 +154,7 @@ tmux windows would be tabs.
"\n") "\n")
#+end_src #+end_src
#+RESULTS: gen-keybinds #+RESULTS[3e58a076aacba87d1cca87db849460e4c2414e94]: gen-keybinds
: bind-key -T prefix « select-window -p : bind-key -T prefix « select-window -p
: bind-key -T prefix » select-window -n : bind-key -T prefix » select-window -n
: bind-key -T prefix Tab switch-client -T windows : bind-key -T prefix Tab switch-client -T windows

4052
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -3,21 +3,26 @@
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": {
"dev": "vuepress dev docs",
"build": "vuepress build docs"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://labs.phundrak.com/phundrak/conlang.phundrak.com" "url": "https://labs.phundrak.com/phundrak/conlang.phundrak.com"
}, },
"author": "Lucien Cartier-Tilet <lucien@phundrak.com>", "author": "Lucien Cartier-Tilet <lucien@phundrak.com>",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"private": true,
"devDependencies": { "devDependencies": {
"@vuepress/bundler-vite": "^2.0.0-rc.2", "@vuepress/bundler-vite": "2.0.0-rc.26",
"@vuepress/theme-default": "^2.0.0-rc.2", "@vuepress/plugin-slimsearch": "^2.0.0-rc.118",
"vuepress": "2.0.0-rc.2", "@vuepress/plugin-umami-analytics": "2.0.0-rc.118",
"vuepress-plugin-search-pro": "^2.0.0-rc.16" "@vuepress/theme-default": "2.0.0-rc.118",
"vuepress": "2.0.0-rc.26"
}, },
"packageManager": "yarn@4.0.2" "dependencies": {
"less": "^4.4.2",
"nord": "^0.2.1"
},
"scripts": {
"dev": "vuepress dev docs",
"build": "vuepress build docs"
}
} }

3201
yarn.lock

File diff suppressed because it is too large Load Diff