@@ -1,6 +1,6 @@
|
||||
#+TITLE: i3
|
||||
#+setupfile: ../headers
|
||||
#+PROPERTY: header-args :noweb yes :exports code :tangle ~/.config/i3/config
|
||||
#+PROPERTY: header-args :noweb yes :exports code :tangle no
|
||||
#+PROPERTY: header-args:emacs-lisp :exports none :tangle no
|
||||
|
||||
* i3
|
||||
@@ -17,14 +17,11 @@ It is to be noted I am using [[https://github.com/Airblader/i3][Airblader’s fo
|
||||
#+END_SRC
|
||||
|
||||
** Screenshots
|
||||
#+CAPTION: Desktop with Neofetch in the terminal
|
||||
[[./img/neofetch.png.webp]]
|
||||
#+html: <ImgFigure src="/img/neofetch.png.webp">Desktop with Neofetch in the terminal</ImgFigure>
|
||||
|
||||
#+CAPTION: Desktop with Emacs opened
|
||||
[[./img/emacs.png.webp]]
|
||||
#+html: <ImgFigure src="/img/emacs.png.webp">Desktop with Emacs opened</ImgFigure>
|
||||
|
||||
#+CAPTION: Desktop with Rofi
|
||||
[[./img/rofi.png.webp]]
|
||||
#+html: <ImgFigure src="/img/rofi.png.webp">Desktop with Rofi</ImgFigure>
|
||||
|
||||
** Variables declaration
|
||||
*** Global
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
* Emacs Configuration
|
||||
|
||||
[[file:./img/emacs.svg]]
|
||||
#+html: <ImgFigure src="/img/emacs.svg">Emacs Screenshot</ImgFigure>
|
||||
|
||||
** Introduction
|
||||
After a couple of years using Spacemacs and a failed attempt at
|
||||
@@ -29,9 +29,7 @@ general-purpose programming language. Therefore, if you want to do
|
||||
something in Emacs, with enough Elisp you can do it --- if it’s not in
|
||||
Emacs already, that is.
|
||||
|
||||
#+attr_html: :alt Dammit Emacs… :loading lazy
|
||||
#+caption: [[https://xkcd.com/378/][XKCD n°378]]: Real Programmers
|
||||
[[file:./img/real_programmers.png]]
|
||||
#+html: <ImgFigure src="/img/emacs.svg" alt="XKCD n°378: Real Programmers">Dammit Emacs…</ImgFigure>
|
||||
|
||||
** A Warning Before You Proceed
|
||||
:PROPERTIES:
|
||||
|
||||
@@ -83,6 +83,7 @@ Undefining some stuff to make keybind prefixes work correctly.
|
||||
<<general-keybindings-gen(table=keybindings-refactor, prefix="r")>>
|
||||
<<general-keybindings-gen(table=keybindings-toggle, prefix="t ")>>
|
||||
<<general-keybindings-gen(table=keybindings-text, prefix="T")>>
|
||||
<<general-keybindings-gen(table=keybindings-vc, prefix="v")>>
|
||||
<<general-keybindings-gen(table=keybindings-windows, prefix="w")>>
|
||||
<<general-keybindings-gen(table=keybindings-quit, prefix="q")>>)
|
||||
#+end_src
|
||||
@@ -499,6 +500,26 @@ My toggle keybindings are prefixed by ~t~.
|
||||
| is | set-input-method | |
|
||||
|
||||
*** TODO Rewrite =my/modify-frame-alpha-background/body= :noexport:
|
||||
** VCS
|
||||
Magit is awesome, but I rarely use it nowadays in favour of [[https://jj-vcs.github.io/][Jujutsu]].
|
||||
And for that, I use =vc.el= in Emacs thanks to =vc-jj= (see [[file:./packages/applications.md#Jujutsu][my Jujutsu
|
||||
config for Emacs]]). But this is only half the story, let me now set my
|
||||
keybinds for =vc.el=. ethey are all prefixed by =v=.
|
||||
|
||||
#+name: keybindings-vc
|
||||
| Key | Function | Description | Package |
|
||||
|-----+-----------------------+-------------+---------|
|
||||
| a | vc-annotate | | vc |
|
||||
| r | vc-revset | | vc |
|
||||
| | | VCS | |
|
||||
| j | | jujutsu | |
|
||||
| ja | vc-jj-abandon-change | abandon | vc-jj |
|
||||
| jb | | bookmarks | |
|
||||
| jbd | vc-jj-bookmark-delete | delete | vc-jj |
|
||||
| jbr | vc-jj-bookmark-rename | rename | vc-jj |
|
||||
| jbs | vc-jj-bookmark-set | set | vc-jj |
|
||||
| je | vc-jj-edit-change | edit | vc-jj |
|
||||
| jn | vc-jj-new-change | new | vc-jj |
|
||||
|
||||
** Windows
|
||||
A couple of keybindings are hidden from which-key, otherwise there’s not
|
||||
|
||||
@@ -1530,9 +1530,10 @@ compatible with git repositories. In fact, I pretty much don’t use git
|
||||
anymore, jj (abbreviation of Jujutsu) has almost completely replaced
|
||||
git for me.
|
||||
|
||||
I like Magit’s interface, as you can see in my [[file:./applications.md#magit][Magit]] config.
|
||||
Therefore, let’s install =majjit=, my slow and scuffed attempt at
|
||||
bringing some Magit features to jujutsu.
|
||||
I like Magit’s interface, as you can see in my [[file:./applications.md#magit][Magit]] config. But
|
||||
reimplementing it entirely probably won’t happen on my end (lack of
|
||||
time, mainly), so I’ll leave that up to people more motivated than me.
|
||||
In the meantime, I can reimplement some of its API with =majjit=.
|
||||
#+begin_src emacs-lisp
|
||||
(use-package majjit
|
||||
:defer t
|
||||
@@ -1544,6 +1545,22 @@ bringing some Magit features to jujutsu.
|
||||
:custom ((majjit-default-directory "~/code/")))
|
||||
#+end_src
|
||||
|
||||
Speaking of other projects others did better, I use =vc-jj=, which
|
||||
brings basic jujutsu support to =project.el= and =vc.el=. And I’ll just
|
||||
add my grain of salt to force =project.el= to recognize jujutsu
|
||||
repositories as projects.
|
||||
#+begin_src emacs-lisp
|
||||
(use-package vc-jj
|
||||
:straight (:build t)
|
||||
:after '(project vc)
|
||||
:config
|
||||
(add-to-list 'project-vc-extra-root-markers ".jj")
|
||||
:init
|
||||
(require 'project)
|
||||
(require 'vc)
|
||||
(require 'vc-jj))
|
||||
#+end_src
|
||||
|
||||
Though, I’ll 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.
|
||||
@@ -1556,12 +1573,6 @@ writing my commit messages.
|
||||
:init (add-to-list 'auto-mode-alist '("\\.jjdescription\\'" . jjdescription-mode)))
|
||||
#+end_src
|
||||
|
||||
And I want Emacs to know that any directory which has a =.jj= repository
|
||||
is the root of a project.
|
||||
#+begin_src emacs-lisp
|
||||
;;(add-to-list 'project-vc-extra-root-markers ".jj")
|
||||
#+end_src
|
||||
|
||||
*** Forge
|
||||
Forge acts as an interface for GitHub, GitLab, and Bitbucket inside
|
||||
Magit. A lot of possibilities are present, you can read issues and
|
||||
|
||||
@@ -175,7 +175,7 @@ compilation buffer, as well as enable some syntax highlighting.
|
||||
#+end_src
|
||||
|
||||
** Eshell
|
||||
[[file:../img/emacs-eshell.svg]]
|
||||
#+html: <ImgFigure src="/img/emacs-eshell.svg">Eshell in Emacs</ImgFigure>
|
||||
|
||||
Eshell is a built-in shell available from Emacs which I use almost as
|
||||
often as fish. Some adjustments are necessary to make it fit my taste
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#+title: Emacs — Packages — EXWM (Deprecated)
|
||||
#+setupfile: ../../headers
|
||||
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
|
||||
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/exwm.el
|
||||
#+property: header-args:emacs-lisp+ :tangle no
|
||||
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
|
||||
|
||||
* EXWM (Deprecated)
|
||||
@@ -47,7 +47,7 @@ easily.
|
||||
|
||||
In order to launch Emacs with EXWM with ~startx~, I need a ~xinit~ file.
|
||||
This one is exported to ~$HOME/.xinitrc.emacs~.
|
||||
#+begin_src sh :tangle ~/.xinitrc.emacs :shebang "#!/bin/sh"
|
||||
#+begin_src sh :tangle no :shebang "#!/bin/sh"
|
||||
xhost +SI:localuser:$USER
|
||||
|
||||
# Set fallback cursor
|
||||
|
||||
@@ -455,6 +455,10 @@ Yes, I love org-mode and I largely prefer to use it instead of
|
||||
Markdown due to its far superior power and abilities. But still,
|
||||
sometimes I need to use Markdown because not everyone uses org-mode,
|
||||
unfortunately.
|
||||
|
||||
I prefer to use =pandoc= to =markdown= as my =markdown-command=, as it
|
||||
better handles modern Markdown, including Github’s dialect, which
|
||||
=markdown= has troubles with.
|
||||
#+begin_src emacs-lisp
|
||||
(use-package markdown-mode
|
||||
:defer t
|
||||
@@ -465,6 +469,9 @@ unfortunately.
|
||||
("\\.mdx\\'" . markdown-mode))
|
||||
:hook (markdown-mode . orgtbl-mode)
|
||||
:hook (markdown-mode . visual-line-mode)
|
||||
:config
|
||||
(setq markdown-fontify-code-blocks-natively t
|
||||
markdown-command '("," "pandoc" "--from=markdown" "--to=html5"))
|
||||
:general
|
||||
(phundrak/evil
|
||||
:keymaps 'markdown-mode-map
|
||||
@@ -550,9 +557,7 @@ unfortunately.
|
||||
"xp" #'markdown-insert-pre
|
||||
"xP" #'markdown-pre-region
|
||||
"xs" #'markdown-insert-strike-through
|
||||
"xq" #'markdown-blockquote-region)
|
||||
:config
|
||||
(setq markdown-fontify-code-blocks-natively t))
|
||||
"xq" #'markdown-blockquote-region))
|
||||
#+end_src
|
||||
|
||||
Since most of my Markdown files are related to GitHub, I’d like to be
|
||||
@@ -704,6 +709,28 @@ When editing some scripts though, I need to use the built-in ~shell-mode~.
|
||||
:mode "/\\(Cargo.lock\\|\\.cargo/config\\)\\'")
|
||||
#+end_src
|
||||
|
||||
*** Typst
|
||||
[[https://typst.app/][Typst]] is an attempt at making a simpler LaTeX alternative with a quite
|
||||
simple language that still has some programming capabilities. In my
|
||||
case, I use [[https://codeberg.org/meow_king/typst-ts-mode/][typst-ts-mode]] to get a major mode for Typst, relying on
|
||||
[[https://github.com/uben0/tree-sitter-typst][uben0’s Typst treesitter module]].
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package typst-ts-mode
|
||||
:defer t
|
||||
:straight (:build t))
|
||||
#+end_src
|
||||
|
||||
I also wrote a package that extends =lsp-mode= to support [[https://github.com/Myriad-Dreamin/tinymist][tinymist]] as an
|
||||
LSP server for Typst.
|
||||
#+begin_src emacs-lisp
|
||||
(use-package lsp-typst
|
||||
:after lsp-mode
|
||||
:mode "\\.typ\\'"
|
||||
:hook (typst-ts-mode . lsp-deferred)
|
||||
:straight (:build t :type git :repo "labs.phundrak.com/phundrak/lsp-typst"))
|
||||
#+end_src
|
||||
|
||||
*** Yaml
|
||||
#+begin_src emacs-lisp
|
||||
(use-package yaml-mode
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#+title: Git
|
||||
#+setupfile: headers
|
||||
#+PROPERTY: header-args :exports code :tangle no
|
||||
#+PROPERTY: header-args:conf-unix :mkdirp yes :tangle ~/.config/git/config :exports code :noweb yes
|
||||
#+PROPERTY: header-args:conf-unix :mkdirp yes :tangle no :exports code :noweb yes
|
||||
|
||||
* Git
|
||||
** Basic configuration
|
||||
@@ -46,24 +46,23 @@ This is entirely a matter of personal preferences, but I like to use
|
||||
|
||||
*** Better Diffing
|
||||
Git’s diffing algorithm evolved and improved over time, but its
|
||||
default algorithm did not. Take this example, from [[https://blog.gitbutler.com/how-git-core-devs-configure-git/][this Gitbutler
|
||||
article]]:
|
||||
default algorithm did not. Take this example, from [[https://blog.gitbutler.com/how-git-core-devs-configure-git/][this Gitbutler article]]:
|
||||
|
||||
[[file:./img/git/diff-default.png]]
|
||||
#+html: <ImgFigure src="/img/git/diff-default.png">Default git diff output</ImgFigure>
|
||||
|
||||
Not really readable, I think you’ll 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, let’s turn on
|
||||
the =histogram= algorithm on:
|
||||
|
||||
[[file:./img/git/diff-histogram.png]]
|
||||
#+html: <ImgFigure src="/img/git/diff-histogram.png">git diff output with histogram algorithm</ImgFigure>
|
||||
|
||||
Immediately, we have a much clearer picture of what happened! But I’ll
|
||||
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]]
|
||||
#+html: <ImgFigure src="/img/git/diff-moved.png">git diff output with histogram algorithm and specific colours for moved blocks</ImgFigure>
|
||||
|
||||
I’ll also add a configuration to make it easier to see what is being
|
||||
compared using =mnemonicPrefix=. As per =man git-config=:
|
||||
@@ -127,11 +126,11 @@ show you the conflicting incoming and HEAD changes, but it will also
|
||||
show you what the code was before either modified the conflicting
|
||||
area. Not a must-have feature, but a nice one to have. Compare this:
|
||||
|
||||
[[file:./img/git/merge-default.png]]
|
||||
#+html: <ImgFigure src="/img/git/merge-default.png">Default appearance of a git conflict during a merge</ImgFigure>
|
||||
|
||||
To this:
|
||||
|
||||
[[file:./img/git/merge-zdiff3.png]]
|
||||
#+html: <ImgFigure src="/img/git/merge-zdiff3.png">Same git conflict but with zdiff3</ImgFigure>
|
||||
|
||||
We have a new line beginning with =|||||||= with the original line
|
||||
below. Also, it’s nice to see Emacs supports this syntax out of the
|
||||
|
||||
@@ -6,6 +6,13 @@ Hi, I’m P’undrak (pronounced /PUN-drak/, or more exactly {{{phon(pʰynɖak̚
|
||||
also known as Lucien Cartier-Tilet. If you want to know more about me,
|
||||
you can head to my [[https://phundrak.com/en][main website]].
|
||||
|
||||
#+html: ::: warning
|
||||
This website is currently not maintained, aside from the Emacs part of
|
||||
it. If you want to see my current Linux configuration, head over to my
|
||||
[[https://labs.phundrak.com/phundrak/nix-config][NixOS configuration]]. This website will be, at some point, rewritten to
|
||||
reflect it.
|
||||
#+html: :::
|
||||
|
||||
This website is my collection of dotfiles for my daily GNU/Linux
|
||||
environment, tweaked to my liking. The sidebar will act as an index of
|
||||
the various tools I use and their configuration.
|
||||
|
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 323 KiB |
|
Before Width: | Height: | Size: 592 KiB After Width: | Height: | Size: 592 KiB |
|
Before Width: | Height: | Size: 4.3 MiB After Width: | Height: | Size: 4.3 MiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 415 KiB After Width: | Height: | Size: 415 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 395 KiB After Width: | Height: | Size: 395 KiB |
@@ -2,7 +2,7 @@
|
||||
#+setupfile: ../headers
|
||||
#+property: header-args:emacs-lisp :tangle no :exports results :cache yes :noweb yes
|
||||
|
||||
[[file:../img/stumpwm.png]]
|
||||
#+html: <ImgFigure src="/img/stumpwm.png">StumpWM Screenshot</ImgFigure>
|
||||
|
||||
* StumpWM (deprecated)
|
||||
|
||||
|
||||