From 0c2af7aac72c74fb2cad8f9e57ccce1e728835e0 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Wed, 11 Feb 2026 07:35:07 +0300 Subject: add initial sources --- src/custom.css | 599 +++++++++ .../gnu+linux-and-emacs-introduction/index.org | 832 ++++++++++++ src/en/articles/index.org | 3 + src/en/index.org | 20 + src/en/mailing-lists/index.org | 5 + src/en/projects/index.org | 5 + src/en/web-log/2024-08-31-test/index.org | 16 + src/en/web-log/index.org | 3 + .../gnu+linux-and-emacs-introduction/index.org.po | 1382 ++++++++++++++++++++ src/es/articles/index.org.po | 30 + src/es/index.org.po | 66 + src/es/mailing-lists/index.org.po | 36 + src/es/projects/index.org.po | 36 + src/es/web-log/2024-08-31-test/index.org.po | 45 + src/es/web-log/index.org.po | 30 + .../aporetic-sans-mono-normalbolditalic.woff2 | Bin 0 -> 1286164 bytes .../aporetic-sans-mono-normalboldupright.woff2 | Bin 0 -> 1171256 bytes .../aporetic-sans-mono-normalregularitalic.woff2 | Bin 0 -> 1269932 bytes .../aporetic-sans-mono-normalregularupright.woff2 | Bin 0 -> 1157512 bytes src/fonts/aporetic-sans-normalbolditalic.woff2 | Bin 0 -> 1572580 bytes src/fonts/aporetic-sans-normalboldupright.woff2 | Bin 0 -> 1433904 bytes src/fonts/aporetic-sans-normalregularitalic.woff2 | Bin 0 -> 1547708 bytes src/fonts/aporetic-sans-normalregularupright.woff2 | Bin 0 -> 1418916 bytes .../aporetic-serif-mono-normalbolditalic.woff2 | Bin 0 -> 1330512 bytes .../aporetic-serif-mono-normalboldupright.woff2 | Bin 0 -> 1218728 bytes .../aporetic-serif-mono-normalregularitalic.woff2 | Bin 0 -> 1319120 bytes .../aporetic-serif-mono-normalregularupright.woff2 | Bin 0 -> 1203304 bytes src/fonts/aporetic-serif-normalbolditalic.woff2 | Bin 0 -> 1621252 bytes src/fonts/aporetic-serif-normalboldupright.woff2 | Bin 0 -> 1483580 bytes src/fonts/aporetic-serif-normalregularitalic.woff2 | Bin 0 -> 1597956 bytes .../aporetic-serif-normalregularupright.woff2 | Bin 0 -> 1468780 bytes .../gnu+linux-and-emacs-introduction/index.org.po | 1382 ++++++++++++++++++++ src/ru/articles/index.org.po | 31 + src/ru/index.org.po | 67 + src/ru/mailing-lists/index.org.po | 37 + src/ru/projects/index.org.po | 37 + src/ru/web-log/2024-08-31-test/index.org.po | 46 + src/ru/web-log/index.org.po | 31 + .../gnu+linux-and-emacs-introduction/index.org.po | 1381 +++++++++++++++++++ src/sk/articles/index.org.po | 30 + src/sk/index.org.bak | 22 + src/sk/index.org.po | 66 + src/sk/mailing-lists/index.org.po | 36 + src/sk/projects/index.org.po | 36 + src/sk/web-log/2024-08-31-test/index.org.po | 45 + src/sk/web-log/index.org.po | 30 + 46 files changed, 6385 insertions(+) create mode 100644 src/custom.css create mode 100644 src/en/articles/gnu+linux-and-emacs-introduction/index.org create mode 100644 src/en/articles/index.org create mode 100644 src/en/index.org create mode 100644 src/en/mailing-lists/index.org create mode 100644 src/en/projects/index.org create mode 100644 src/en/web-log/2024-08-31-test/index.org create mode 100644 src/en/web-log/index.org create mode 100644 src/es/articles/gnu+linux-and-emacs-introduction/index.org.po create mode 100644 src/es/articles/index.org.po create mode 100644 src/es/index.org.po create mode 100644 src/es/mailing-lists/index.org.po create mode 100644 src/es/projects/index.org.po create mode 100644 src/es/web-log/2024-08-31-test/index.org.po create mode 100644 src/es/web-log/index.org.po create mode 100644 src/fonts/aporetic-sans-mono-normalbolditalic.woff2 create mode 100644 src/fonts/aporetic-sans-mono-normalboldupright.woff2 create mode 100644 src/fonts/aporetic-sans-mono-normalregularitalic.woff2 create mode 100644 src/fonts/aporetic-sans-mono-normalregularupright.woff2 create mode 100644 src/fonts/aporetic-sans-normalbolditalic.woff2 create mode 100644 src/fonts/aporetic-sans-normalboldupright.woff2 create mode 100644 src/fonts/aporetic-sans-normalregularitalic.woff2 create mode 100644 src/fonts/aporetic-sans-normalregularupright.woff2 create mode 100644 src/fonts/aporetic-serif-mono-normalbolditalic.woff2 create mode 100644 src/fonts/aporetic-serif-mono-normalboldupright.woff2 create mode 100644 src/fonts/aporetic-serif-mono-normalregularitalic.woff2 create mode 100644 src/fonts/aporetic-serif-mono-normalregularupright.woff2 create mode 100644 src/fonts/aporetic-serif-normalbolditalic.woff2 create mode 100644 src/fonts/aporetic-serif-normalboldupright.woff2 create mode 100644 src/fonts/aporetic-serif-normalregularitalic.woff2 create mode 100644 src/fonts/aporetic-serif-normalregularupright.woff2 create mode 100644 src/ru/articles/gnu+linux-and-emacs-introduction/index.org.po create mode 100644 src/ru/articles/index.org.po create mode 100644 src/ru/index.org.po create mode 100644 src/ru/mailing-lists/index.org.po create mode 100644 src/ru/projects/index.org.po create mode 100644 src/ru/web-log/2024-08-31-test/index.org.po create mode 100644 src/ru/web-log/index.org.po create mode 100644 src/sk/articles/gnu+linux-and-emacs-introduction/index.org.po create mode 100644 src/sk/articles/index.org.po create mode 100644 src/sk/index.org.bak create mode 100644 src/sk/index.org.po create mode 100644 src/sk/mailing-lists/index.org.po create mode 100644 src/sk/projects/index.org.po create mode 100644 src/sk/web-log/2024-08-31-test/index.org.po create mode 100644 src/sk/web-log/index.org.po (limited to 'src') diff --git a/src/custom.css b/src/custom.css new file mode 100644 index 0000000..45d33e5 --- /dev/null +++ b/src/custom.css @@ -0,0 +1,599 @@ +@charset "utf-8"; + + +/* Fonts */ + +@font-face { + font-family: "Aporetic Serif Mono"; + font-display: swap; + font-weight: 700; + font-stretch: normal; + font-style: normal; + src: url('/fonts/aporetic-serif-mono-normalbolditalic.woff2') format('woff2'); +} + +@font-face { + font-family: "Aporetic Serif Mono"; + font-display: swap; + font-weight: 700; + font-stretch: normal; + font-style: normal; + src: url('/fonts/aporetic-serif-mono-normalboldupright.woff2') format('woff2'); +} + +@font-face { + font-family: "Aporetic Serif Mono"; + font-display: swap; + font-weight: 400; + font-stretch: normal; + font-style: normal; + src: url('/fonts/aporetic-serif-mono-normalregularitalic.woff2') format('woff2'); +} + +@font-face { + font-family: "Aporetic Serif Mono"; + font-display: swap; + font-weight: 400; + font-stretch: normal; + font-style: normal; + src: url('/fonts/aporetic-serif-mono-normalregularupright.woff2') format('woff2'); +} + +@font-face { + font-family: "Aporetic Serif"; + font-display: swap; + font-weight: 700; + font-stretch: normal; + font-style: normal; + src: url('/fonts/aporetic-serif-normalbolditalic.woff2') format('woff2'); +} + +@font-face { + font-family: "Aporetic Serif"; + font-display: swap; + font-weight: 700; + font-stretch: normal; + font-style: normal; + src: url('/fonts/aporetic-serif-normalboldupright.woff2') format('woff2'); +} + +@font-face { + font-family: "Aporetic Serif"; + font-display: swap; + font-weight: 400; + font-stretch: normal; + font-style: normal; + src: url('/fonts/aporetic-serif-normalregularitalic.woff2') format('woff2'); +} + +@font-face { + font-family: "Aporetic Serif"; + font-display: swap; + font-weight: 400; + font-stretch: normal; + font-style: normal; + src: url('/fonts/aporetic-serif-normalregularupright.woff2') format('woff2'); +} + + +/* Variables */ + +:root { + --font-serif-regular: "Aporetic Serif", serif; + --font-serif-mono: "Aporetic Serif Mono", monospace; + --font-sans-regular: "Aporetic Sans", sans-serif; + --font-sans-mono: "Aporetic Sans Mono", monospace; + + --default-fg: black; + --default-bg: white; + --default-family: var(--font-sans-regular); + --default-size: 14pt; + + --header-family: var(--font-serif-regular); + + --link-fg: #3548cf; + + --body-margin: 0px; + + --divider-color: #9f9f9f; /* window-divider */ + + --content-border: 2px solid var(--divider-color); + --content-padding: 10px; + + --nav-height: 125px; + --toc-nav-vspacing: 20px; + --toc-base-padding: 5px; + --toc-ul-padding-left: 20px; + --toc-local-padding: 5px; + --toc-extra-padding-x: 4px; + + --tbl-border-color: #193668; /* org-table */ + --tbl-border-size: 1px; + + --code-fg: #005f5f; + --code-family: var(--font-serif-mono); + --code-size: var(--default-size); + + --example-family: var(--default-serif-mono); + --example-size: var(--default-size); + + --src-bg: #fbf9e7; + --src-border-color: #7f7f7f; + --src-border: 1px solid var(--src-border-color); + --src-family: var(--default-serif-mono); + + --src-label-fg: var(--src-border-color); + + --src-builtin-fg: #8f0075; + --src-builtin-weight: bold; + + --src-keyword-fg: #531ab6; + --src-keyword-weight: bold; + + --src-variable-name-fg: #005e8b; + + --src-string-fg: #3548cf; + + --src-constant-fg: #0000b0; + + --src-function-name-fg: #721045; + + --src-comment-fg: #595959; + --src-comment-style: italic; + + --src-comment-delimiter-fg: var(--src-comment-fg); + --src-comment-delimiter-style: italic; + + --src-regexp-grouping-backslash-fg: var(--src-function-name-fg); + --src-regexp-grouping-backslash-weight: bold; + + --src-regexp-grouping-construct-fg: #00663f; + --src-regexp-grouping-construct-weight: bold; + + --src-doc-fg: #2a5045; + --src-doc-style: italic; + + --src-type-fg: #005f5f; + --src-type-weight: bold; +} + + +/* Dark overrides */ + +@media (prefers-color-scheme: dark) { + :root { + color-scheme: dark; + + --scrollbar-track-color: #303030; + --scrollbar-thumb-color: #808080; + --scrollbar-thumb-hover-color: #505050; + --scrollbar-corner-color: #404040; + + --default-fg: white; + --default-bg: black; + + --link-fg: #79a8ff; + + --divider-color: #646464; + + --tbl-border-color: #c6daff; + + --src-bg: #1e1e1e; + + --src-builtin-fg: #f78fe7; + --src-keyword-fg: #b6a0ff; + --src-variable-name-fg: #00d3d0; + --src-string-fg: #79a8ff; + --src-constant-fg: #00bcff; + --src-function-name-fg: #feacd0; + + --src-comment-fg: #989898; + + --src-regexp-grouping-construct-fg: #00c06f; + + --src-doc-fg: #9ac8e0; + --src-type-fg: #6ae4b9; + + --code-fg: #6ae4b9; + } +} + + +/* Responsive variables */ + +/* Large screens */ +@media (min-width: 1024px) { + :root { + --side-width: 250px; + --content-width: calc(92% - var(--side-width)); + --nav-base-font-size: 80%; + --nav-padding: 14px 16px; + --toc-base-font-size: 70%; + --toc-ul-font-size: 150%; + --toc-ul-local-font-size: 130%; + --toc-ul-2-font-size: 80%; + --toc-ul-3-font-size: 80%; + --src-size: 14pt; + --rss-padding: 0 0 0 25px; + --rss-size: 25px 25px; + --rss-pos: 50%; + } +} + +/* Medium screens */ +@media (min-width: 600px) and (max-width: 1024px) { + :root { + --side-width: 175px; + --content-width: calc(92% - var(--side-width)); + --nav-base-font-size: 70%; + --nav-padding: 5px 6px; + --toc-base-font-size: 70%; + --toc-ul-font-size: 130%; + --toc-ul-local-font-size: 130%; + --toc-ul-2-font-size: 80%; + --src-size: 14pt; + --rss-padding: 0 0 19px 9px; + --rss-size: 10px 10px; + --rss-pos: 25%; + } +} + +/* Small screens */ +@media (max-width: 600px) { + :root { + --content-width: 100%; + --nav-base-font-size: 80%; + --nav-padding: 5px 6px; + --toc-base-font-size: 80%; + --toc-ul-font-size: 120%; + --toc-ul-local-font-size: 130%; + --toc-ul-2-font-size: 80%; + --src-size: 14pt; + } +} + + +/* Immutable */ + +/* Body */ +body { + color: var(--default-fg); + background-color: var(--default-bg); + font-family: var(--default-family); + font-size: var(--default-size); + + margin: 0; +} + +/* Headers */ +h1, h2, h3, h4, h5, h6 { + font-family: var(--header-family); +} + +/* Scroll bars */ +/* ::-webkit-scrollbar { */ +/* width: 12px; */ +/* height: 12px; */ +/* } */ + +/* ::-webkit-scrollbar-track { */ +/* background: var(--scrollbar-track-color); */ +/* border-radius: 10px; */ +/* } */ + +/* ::-webkit-scrollbar-thumb { */ +/* background: var(--scrollbar-thumb-color); */ +/* border-radius: 10px; */ +/* } */ + +/* ::-webkit-scrollbar-thumb:hover { */ +/* background: var(--scrollbar-thumb-hover-color); */ +/* } */ + +/* ::-webkit-scrollbar-corner { */ +/* background: var(--scrollbar-corner-color); */ +/* } */ + +/* Links */ +a { + color: var(--link-fg); +} + +/* Content */ +#content { + width: var(--content-width); + padding: 0 var(--content-padding); +} + +@media (min-width: 600px) { + #content { + margin-left: calc(var(--side-width) + var(--body-margin) + 2*var(--content-padding)); + margin-right: var(--body-margin); + border-left: var(--content-border); + } +} + +@media (max-width: 600px) { + #content { + margin-left: 0; + margin-right: 0; + } +} + +@media (min-width: 600px) { + nav { + left: var(--content-padding); + position: fixed; + width: var(--side-width); + } + + nav > ul { + padding: 0; + margin: 0; + list-style-type: none; + display: block; + } + + nav > ul > li { + padding: var(--toc-base-padding) 0; + } + + nav > ul > li:not(:last-of-type) { + border-bottom: 1px solid var(--divider-color); + } + + nav > ul > li > ul { + padding: 0; + text-align: center; + overflow-x: auto; + white-space: nowrap; + -ms-overflow-style: none; /* Internet Explorer 10+ */ + scrollbar-width: none; /* Firefox */ + } + nav > ul > li > ul::-webkit-scrollbar { + display: none; /* Safari and Chrome */ + } + + nav > ul > li > ul > li { + display: inline-block; + } +} + +html { +} + +@media (max-width: 600px) { + nav { + border-bottom: 2px solid var(--divider-color); + } + + nav > ul { + padding: 0; + margin: 0 8px; + list-style-type: none; + display: block; + } + + nav > ul > li { + padding: var(--toc-base-padding) 0; + } + + nav > ul > li:not(:last-of-type) { + border-bottom: 1px solid var(--divider-color); + } + + nav > ul > li > ul { + padding: 0; + text-align: center; + overflow-x: auto; + } + + nav > ul > li > ul > li { + display: inline-block; + } +} + +nav > ul > li > span { + display: none; +} + +code { + color: var(--code-fg); + font-family: var(--code-family); + font-size: var(--code-size); +} + +pre.example { + font-family: var(--example-family); + font-size: var(--example-size); +} + +hr { + border: 1px solid var(--divider-color); + /* border-bottom: 1px solid var(--divider-color); */ +} + +.org-src-container { + border: var(--src-border); + background-color: var(--src-bg); + font-family: var(--src-family); + font-size: var(--src-size); + margin: 10px; +} + +.src-label { + top: 0; + left: 0; + color: var(--src-label-fg); + border-bottom: var(--src-border); + padding: 2px; + padding-left: 4px; + display: flex; + justify-content: space-between +} + +pre.src { + max-height: 50ex; + overflow-x: auto; + overflow-y: auto; + line-height: 2.5ex; + margin: 0px; + padding: 4px; +} + +.org-builtin { + color: var(--src-builtin-fg); + weight: var(--src-builtin-weight); +} + +.org-keyword { + color: var(--src-keyword-fg); + weight: var(--src-keyword-weight); +} + +.org-variable-name { + color: var(--src-variable-name-fg); +} + +.org-string { + color: var(--src-string-fg); +} + +.org-constant { + color: var(--src-constant-fg); +} + +.org-comment { + color: var(--src-comment-fg); + font-style: var(--src-comment-style); +} + +.org-comment-delimiter { + color: var(--src-comment-delimiter-fg); + font-style: var(--src-comment-delimiter-style); +} + +.org-function-name { + color: var(--src-function-name-fg); +} + +.org-regexp-grouping-backslash { + color: var(--src-regexp-grouping-backslash-fg); + font-style: var(--src-regexp-grouping-backslash-style); +} + +.org-regexp-grouping-construct { + color: var(--src-regexp-grouping-construct-fg); + font-style: var(--src-regexp-grouping-construct-style); +} + +.org-doc { + color: var(--src-doc-fg); + font-style: var(--src-doc-style); +} + +.org-type { + color: var(--src-type-fg); + weight: var(--src-type-weight); +} + +/* Basic styling (color, font, shadow) common to global and local TOC */ +#table-of-contents, .org-info-js_local-toc { + font-size: var(--toc-base-font-size); +} + +#org-div-home-and-up { + width: var(--side-width); + border-right: var(--toc-border-right); + justify-content: center; +} + +/* Size (global TOC only) */ +#table-of-contents { + width: calc(var(--side-width) - 2*var(--toc-base-padding)); +} + +/* Fixed vertical table of content */ +@media screen and (min-width: 600px) { + #org-div-home-and-up { + position: fixed; + left: var(--content-padding); + overflow: auto; + padding: var(--toc-base-padding); + } + #table-of-contents { + position: fixed; + left: var(--content-padding); + top: var(--nav-height); + bottom: 0; + padding: 0 var(--toc-base-padding); + overflow: auto; + border-top: 2px solid var(--divider-color); + -ms-overflow-style: none; /* Internet Explorer 10+ */ + scrollbar-width: none; /* Firefox */ + } + #table-of-contents::-webkit-scrollbar { + display: none; /* Safari and Chrome */ + } +} + +@media screen and (min-width: 600px) and (max-width: 1024px) { + #table-of-contents > div > ul > li > ul > li > ul { + display: none; + } +} + +@media screen and (max-width: 600px) { + #table-of-contents { + position: relative; + width: 90%; + margin: auto; + } +} + +#table-of-contents ul, .org-info-js_local-toc ul { + list-style-type: none; + margin: 0; + padding-left: var(--toc-ul-padding-left); +} + +#table-of-contents ul { + font-size: var(--toc-ul-font-size); +} + +.org-info-js_local-toc ul { + font-size: var(--toc-ul-local-font-size); +} + +#table-of-contents > div > ul, .org-info-js_local-toc > div > ul { + list-style-type: none; + margin: 0; + padding-left: var(--toc-extra-padding-x); +} + +#table-of-contents > div > ul > li > ul { + font-size: var(--toc-ul-2-font-size); + vertical-align: middle; +} + +#table-of-contents > div > ul > li > ul > li > ul { + font-size: var(--toc-ul-3-font-size); + vertical-align: middle; +} + +ul { + list-style-type: '- '; +} + +table, td, th { + text-align: left; +} + +table { + border-collapse: collapse; + width: 100%; +} + +th, td { + padding: 3px; +} diff --git a/src/en/articles/gnu+linux-and-emacs-introduction/index.org b/src/en/articles/gnu+linux-and-emacs-introduction/index.org new file mode 100644 index 0000000..38ebc8a --- /dev/null +++ b/src/en/articles/gnu+linux-and-emacs-introduction/index.org @@ -0,0 +1,832 @@ +#+title: GNU/Linux and GNU Emacs Introduction +#+keywords: beginner gnu linux emacs + +* Installing Debian +** Preparations +*** Getting debian +Download Debian [[https://www.debian.org/][installer image]] + +*** Creating installation medium +On =M$= Windows, use a tool like [[https://rufus.ie/en/][Rufus]] to create a bootable USB flash +drive with the downloaded =.iso= file + +*** Allocating disk space +Either get an empty disk or shrink on of your data partitions (toms) to get a continuous region of free space which is at least around 100GB. + +** Installation process +If installing on a laptop, make sure that it's fully charged and keep +the charger plugged in. + +*** Booting from the installation medium +NOTE: You might have to enable booting from USB in BIOS. + +Select the USB from boot menu or change boot order. + +*** The Debian installer +Select the =install= option (not the =Graphical install=) in the GRUB bootloader. + +To navigate the menus, use arrow keys and TAB, to toggle check boxes use spacebar and to press button use the enter key. + +Simple guide: +1. Select region +2. Select localization (US) +3. Select keyboard layout (most likely US/ISO) +4. Select connected if you have Ethernet connection or wireless if you + want to connect to wifi. +5. Choose hostname. +6. Skip domain name. +7. Skip proxy. +8. Select mirror in your region. +9. Set root password. +10. Set user's full name, username and password. +11. Deselect all software packages except base. +12. To dual boot with Windows select guided partitioning (free space). +13. Select =/home= folder on a separate partition. +14. Start the installation. +15. Reboot and check that you can boot everything. + +* Setting up GNU/Linux +** User setup +1. Login as root +1. Edit =/etc/apt/sources= and add =non-free contrib testing unstable= +2. ~apt udpate~ +3. ~apt upgrade~ +4. ~apt install sudo~ +5. ~visudo~ (%wheel ALL=(ALL) NOPASSWD: ALL) +6. ~groupadd wheel~ +7. ~usermod -aG wheel YOUR_USERNAME~ +8. ~exit~ + +** Environment setup +*** Folder setup +#+begin_src sh +cd +rmdir Downloads Desktop ... +mkdir downloads documents multimedia +cd multimedia +mkdir screenshots +mkdir screencasts +#+end_src + +*** Emacs setup +~sudo apt install emacs git vterm-module libtd~ + +Delete =~/.emacs.d= + +Edit =~/.config/emacs/init.el= + +#+name: emacs-server +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(server-start) +#+end_src + +#+name: emacs-straight +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name + "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 6)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + +(straight-use-package 'use-package) +(setq straight-use-package-by-default t + use-package-always-ensure t) +#+end_src + +#+name: emacs-coding +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(prefer-coding-system 'utf-8) +(set-language-environment "UTF-8") +(set-default-coding-systems 'utf-8) +(set-terminal-coding-system 'utf-8) +(setq-default buffer-file-coding-system 'utf-8) +#+end_src + +#+name: emacs-clean-look +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) +#+end_src + +#+name: emacs-misc +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(setq kill-ring-max 10000) +(repeat-mode 1) +(auto-insert-mode 1) +(global-hl-line-mode 1) +(setq display-time-24hr-format t) +(setq default-input-method "russian-computer") +(load-theme 'modus-vivendi t) +(fset 'yes-or-no-p 'y-or-n-p) +(set-face-attribute 'default nil :font "Iosevka" :height 180) +(global-subword-mode) +#+end_src + +#+name: emacs-compilation +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(require 'ansi-color) +(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter) +(add-hook 'compilation-mode-hook 'toggle-truncate-lines) +(define-key global-map (kbd "C-") 'compile) +(define-key global-map (kbd "") 'recompile) +#+end_src + +#+name: emacs-trash +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package trashed) +(setq delete-by-moving-to-trash t) +#+end_src + +#+name: emacs-undo-tree +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package undo-tree + :config + (global-undo-tree-mode)) +#+end_src + +#+name: emacs-page-break-lines +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package page-break-lines + :config + (global-page-break-lines-mode)) +#+end_src + +#+name: emacs-pdf-tools +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package pdf-tools + :demand t + :hook (pdf-view-mode . pdf-view-themed-minor-mode) + :config + ;; Initialize the package + (pdf-tools-install) + ;; Associate pdf-view-mode with PDF files + (add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)) + ;; Enable seamless scrolling between pages + (setq pdf-view-continuous-scroll-mode t) + ;; Use normal Emacs keybindings for scrolling + (setq pdf-view-continuous-scroll-keystrokes nil)) +#+end_src + +#+name: emacs-eglot +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package eglot) +#+end_src + +#+name: emacs-project +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package project) +#+end_src + +#+name: emacs-terminals +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package vterm) +(use-package eat) +#+end_src + +#+name: emacs-telega +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package telega + :custom + (telega-server-libs-prefix "/usr")) +#+end_src + +#+name: emacs-emms +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package emms) +#+end_src + +#+name: emacs-multitran +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package multitran + :bind + (("s-t" . multitran-at-pos))) +#+end_src + +#+name: emacs-savehist +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package savehist + :config + (savehist-mode)) +#+end_src + +#+name: emacs-lorem-ipsum +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package lorem-ipsum) +#+end_src + +#+name: emacs-smartparens +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package smartparens + :init + (smartparens-global-mode t)) +#+end_src + +#+name: emacs-completion +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package vertico + :init + (vertico-mode) + ;; (setq vertico-scroll-margin 0) + ;; (setq vertico-count 20) + ;; (setq vertico-resize t) + (setq vertico-cycle t)) + +(use-package orderless + :init + ;; (setq orderless-style-dispatchers '(+orderless-consult-dispatch + ;; orderless-affix-dispatch) + orderless-component-separator #'orderless-escapable-split-on-space) +(setq completion-styles '(orderless basic) + completion-category-defaults nil + completion-category-overrides '((file (styles partial-completion))))) + +(use-package consult + :bind (;; C-c bindings in `mode-specific-map' + ("C-c M-x" . consult-mode-command) + ("C-c h" . consult-history) + ("C-c k" . consult-kmacro) + ("C-c m" . consult-man) + ("C-c i" . consult-info) + ([remap Info-search] . consult-info) + ;; C-x bindings in `ctl-x-map' + ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command + ("C-x b" . consult-buffer) ;; orig. switch-to-buffer + ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window + ("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame + ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump + ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer + ;; Custom M-# bindings for fast register access + ("M-#" . consult-register-load) + ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated) + ("C-M-#" . consult-register) + ;; Other custom bindings + ("M-y" . consult-yank-pop) ;; orig. yank-pop + ;; M-g bindings in `goto-map' + ("M-g e" . consult-compile-error) + ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck + ("M-g g" . consult-goto-line) ;; orig. goto-line + ("M-g M-g" . consult-goto-line) ;; orig. goto-line + ("M-g o" . consult-outline) ;; Alternative: consult-org-heading + ("M-g m" . consult-mark) + ("M-g k" . consult-global-mark) + ("M-g i" . consult-imenu) + ("M-g I" . consult-imenu-multi) + ;; M-s bindings in `search-map' + ("M-s d" . consult-find) ;; Alternative: consult-fd + ("M-s D" . consult-locate) + ("M-s g" . consult-grep) + ("M-s G" . consult-git-grep) + ("M-s r" . consult-ripgrep) + ("M-s l" . consult-line) + ("M-s L" . consult-line-multi) + ("M-s k" . consult-keep-lines) + ("M-s u" . consult-focus-lines) + ;; Isearch integration + ("M-s e" . consult-isearch-history) + :map isearch-mode-map + ("M-e" . consult-isearch-history) ;; orig. isearch-edit-string + ("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string + ("M-s l" . consult-line) ;; needed by consult-line to detect isearch + ("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch + ;; Minibuffer history + :map minibuffer-local-map + ("M-s" . consult-history) ;; orig. next-matching-history-element + ("M-r" . consult-history)) ;; orig. previous-matching-history-element + + ;; Enable automatic preview at point in the *Completions* buffer. This is + ;; relevant when you use the default completion UI. + :hook (completion-list-mode . consult-preview-at-point-mode) + :init + ;; Optionally configure the register formatting. This improves the register + ;; preview for `consult-register', `consult-register-load', + ;; `consult-register-store' and the Emacs built-ins. + (setq register-preview-delay 0.5 + register-preview-function #'consult-register-format) + + ;; Optionally tweak the register preview window. + ;; This adds thin lines, sorting and hides the mode line of the window. + (advice-add #'register-preview :override #'consult-register-window) + + ;; Use Consult to select xref locations with preview + (setq xref-show-xrefs-function #'consult-xref + xref-show-definitions-function #'consult-xref) + + ;; Configure other variables and modes in the :config section, + ;; after lazily loading the package. + :config + + ;; Optionally configure preview. The default value + ;; is 'any, such that any key triggers the preview. + ;; (setq consult-preview-key 'any) + ;; (setq consult-preview-key "M-.") + ;; (setq consult-preview-key '("S-" "S-")) + ;; For some commands and buffer sources it is useful to configure the + ;; :preview-key on a per-command basis using the `consult-customize' macro. + (consult-customize + consult-theme :preview-key '(:debounce 0.2 any) + consult-ripgrep consult-git-grep consult-grep + consult-bookmark consult-recent-file consult-xref + consult--source-bookmark consult--source-file-register + consult--source-recent-file consult--source-project-recent-file + ;; :preview-key "M-." + :preview-key '(:debounce 0.4 any)) + + ;; Optionally configure the narrowing key. + ;; Both < and C-+ work reasonably well. + (setq consult-narrow-key "<") ;; "C-+" + + ;; Optionally make narrowing help available in the minibuffer. + ;; You may want to use `embark-prefix-help-command' or which-key instead. + ;; (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help) + ) + +(use-package corfu + :custom + (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' + (corfu-auto t) ;; Enable auto completion + (corfu-separator ?\s) ;; Orderless field separator + (corfu-quit-at-boundary nil) ;; Never quit at completion boundary + (corfu-quit-no-match nil) ;; Never quit, even if there is no match + (corfu-preview-current nil) ;; Disable current candidate preview + (corfu-preselect 'prompt) ;; Preselect the prompt + (corfu-on-exact-match nil) ;; Configure handling of exact matches + (corfu-scroll-margin 5) ;; Use scroll margin + :init + (global-corfu-mode)) +#+end_src + +#+name: emacs-dired +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(setq dired-listing-switches "-alh" + dired-dwim-target t + dired-recursive-copies 'always + dired-recursive-deletes 'always) +(use-package dired-single) +#+end_src + +#+name: emacs-emacs +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package emacs + :init + ;; Add prompt indicator to `completing-read-multiple'. + ;; We display [CRM], e.g., [CRM,] if the separator is a comma. + (defun crm-indicator (args) + (cons (format "[CRM%s] %s" + (replace-regexp-in-string + "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" "" + crm-separator) + (car args)) + (cdr args))) + (advice-add #'completing-read-multiple :filter-args #'crm-indicator) + + ;; Do not allow the cursor in the minibuffer prompt + (setq minibuffer-prompt-properties + '(read-only t cursor-intangible t face minibuffer-prompt)) + (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) + + ;; Enable recursive minibuffers + (setq enable-recursive-minibuffers t)) + +;; Save all tempfiles in $TMPDIR/emacs$UID/ +(defconst emacs-tmp-dir (expand-file-name (format "emacs%d" (user-uid)) temporary-file-directory)) +(setq backup-directory-alist + `((".*" . ,emacs-tmp-dir))) +(setq auto-save-file-name-transforms + `((".*" ,emacs-tmp-dir t))) +(setq auto-save-list-file-prefix + emacs-tmp-dir) +#+end_src + +#+name: emacs-multiple-cursors +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package multiple-cursors + :bind + (("C-S-c" . mc/edit-lines) + ("C->" . mc/mark-next-like-this) + ("C-<" . mc/mark-previous-like-this) + ("C-c C-S-c" . mc/mark-all-like-this) + ("C-\"" . mc/skip-to-next-like-this) + ("C-:" . mc/skip-to-previous-like-this))) +#+end_src + +#+name: emacs-expand-region +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package expand-region + :bind + (("C-M-=" . er/expand-region))) +#+end_src + +#+name: emacs-move-text +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package move-text + :bind + (("M-P" . move-text-up) + ("M-N" . move-text-down))) +#+end_src + +#+name: emacs-duplicate +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(keymap-global-set "C-'" 'duplicate-dwim) +(setq duplicate-line-final-position 1) +#+end_src + +#+name: emacs-hl-todo +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package hl-todo + :config + (global-hl-todo-mode 1)) +#+end_src + +#+name: emacs-ligature +#+header: :tangle emacs/init.el +#+begin_src emacs-lisp +(use-package ligature + :config + (ligature-set-ligatures + 't '("-<<" "-<" "-<-" "<--" "<---" "<<-" "<-" "->" "->>" "-->" "--->" "->-" ">-" ">>-" + "=<<" "=<" "=<=" "<==" "<===" "<<=" "<=" "=>" "=>>" "==>" "===>" "=>=" ">=" ">>=" + "<->" "<-->" "<--->" "<---->" "<=>" "<==>" "<===>" "<====>" "::" ":::" "__" + "<~~" "" "/>" "~~>" "==" "!=" "/=" "~=" "<>" "===" "!==" "!===" "=/=" "=!=" + "<:" ":=" "*=" "*+" "<*" "<*>" "*>" "<|" "<|>" "|>" "<." "<.>" ".>" "+*" "=*" "=:" ":>" + "(*" "*)" "/*" "*/" "[|" "|]" "{|" "|}" "++" "+++" "\\/" "/\\" "|-" "-|" "\" \"--->\" \"->-\" \">-\" \">>-\"\n" +" \"=<<\" \"=<\" \"=<=\" \"<==\" \"<===\" \"<<=\" \"<=\" \"=>\" \"=>>\" \"==>\" \"===>\" \"=>=\" \">=\" \">>=\"\n" +" \"<->\" \"<-->\" \"<--->\" \"<---->\" \"<=>\" \"<==>\" \"<===>\" \"<====>\" \"::\" \":::\" \"__\"\n" +" \"<~~\" \"\" \"/>\" \"~~>\" \"==\" \"!=\" \"/=\" \"~=\" \"<>\" \"===\" \"!==\" \"!===\" \"=/=\" \"=!=\"\n" +" \"<:\" \":=\" \"*=\" \"*+\" \"<*\" \"<*>\" \"*>\" \"<|\" \"<|>\" \"|>\" \"<.\" \"<.>\" \".>\" \"+*\" \"=*\" \"=:\" \":>\"\n" +" \"(*\" \"*)\" \"/*\" \"*/\" \"[|\" \"|]\" \"{|\" \"|}\" \"++\" \"+++\" \"\\\\/\" \"/\\\\\" \"|-\" \"-|\" \"\" \"--->\" \"->-\" \">-\" \">>-\"\n" +" \"=<<\" \"=<\" \"=<=\" \"<==\" \"<===\" \"<<=\" \"<=\" \"=>\" \"=>>\" \"==>\" \"===>\" \"=>=\" \">=\" \">>=\"\n" +" \"<->\" \"<-->\" \"<--->\" \"<---->\" \"<=>\" \"<==>\" \"<===>\" \"<====>\" \"::\" \":::\" \"__\"\n" +" \"<~~\" \"\" \"/>\" \"~~>\" \"==\" \"!=\" \"/=\" \"~=\" \"<>\" \"===\" \"!==\" \"!===\" \"=/=\" \"=!=\"\n" +" \"<:\" \":=\" \"*=\" \"*+\" \"<*\" \"<*>\" \"*>\" \"<|\" \"<|>\" \"|>\" \"<.\" \"<.>\" \".>\" \"+*\" \"=*\" \"=:\" \":>\"\n" +" \"(*\" \"*)\" \"/*\" \"*/\" \"[|\" \"|]\" \"{|\" \"|}\" \"++\" \"+++\" \"\\\\/\" \"/\\\\\" \"|-\" \"-|\" \"\" \"--->\" \"->-\" \">-\" \">>-\"\n" +" \"=<<\" \"=<\" \"=<=\" \"<==\" \"<===\" \"<<=\" \"<=\" \"=>\" \"=>>\" \"==>\" \"===>\" \"=>=\" \">=\" \">>=\"\n" +" \"<->\" \"<-->\" \"<--->\" \"<---->\" \"<=>\" \"<==>\" \"<===>\" \"<====>\" \"::\" \":::\" \"__\"\n" +" \"<~~\" \"\" \"/>\" \"~~>\" \"==\" \"!=\" \"/=\" \"~=\" \"<>\" \"===\" \"!==\" \"!===\" \"=/=\" \"=!=\"\n" +" \"<:\" \":=\" \"*=\" \"*+\" \"<*\" \"<*>\" \"*>\" \"<|\" \"<|>\" \"|>\" \"<.\" \"<.>\" \".>\" \"+*\" \"=*\" \"=:\" \":>\"\n" +" \"(*\" \"*)\" \"/*\" \"*/\" \"[|\" \"|]\" \"{|\" \"|}\" \"++\" \"+++\" \"\\\\/\" \"/\\\\\" \"|-\" \"-|\" \"