├── LICENSE ├── README ├── boot ├── efistub.txt ├── efivarfs.txt └── index.txt ├── community ├── extensions.txt ├── forks.txt ├── index.txt ├── ports.txt ├── projects.txt └── repositories.txt ├── console ├── bkeymaps.txt ├── fonts.txt └── index.txt ├── help ├── about-this-wiki.txt ├── adding-a-page.txt ├── index.txt └── page-template.txt ├── index.txt ├── init ├── busybox.txt ├── changing-init.txt ├── index.txt └── sysmgr.txt ├── kernel ├── config.txt ├── firmware.txt ├── index.txt ├── patches │ └── kernel-no-perl.patch └── thinkpad.txt ├── kiss ├── index.txt └── style-guide.txt ├── software ├── acpid.txt ├── alsa-utils.txt ├── dhcpcd.txt ├── eiwd.txt ├── firefox.txt ├── git.txt ├── index.txt ├── man-pages.txt ├── opendoas.txt ├── openssh.txt ├── tzdata.txt ├── vim.txt └── wpa_supplicant.txt ├── storage ├── disks.txt ├── index.txt ├── zram.txt └── zswap.txt └── wayland ├── alternatives.txt ├── index.txt └── install.txt /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019-2021 Dylan Araps 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | |/ 2 | |\ISS LINUX https://kisslinux.org 3 | ________________________________________________________________________________ 4 | 5 | 6 | Wiki 7 | ________________________________________________________________________________ 8 | 9 | The KISS Wiki. 10 | 11 | Website: https://kisslinux.org/wiki 12 | -------------------------------------------------------------------------------- /boot/efistub.txt: -------------------------------------------------------------------------------- 1 | EFISTUB [0] 2 | ________________________________________________________________________________ 3 | 4 | The Linux kernel has the ability to act as an EFI executable which simplifies 5 | the boot process by removing the need for a bootloader. 6 | 7 | 8 | Prerequisites 9 | ________________________________________________________________________________ 10 | 11 | Begin by first verifying that you have efibootmgr installed: 12 | 13 | +------------------------------------------------------------------------------+ 14 | | | 15 | | $ kiss b efibootmgr | 16 | | | 17 | +------------------------------------------------------------------------------+ 18 | 19 | The kernel must be configured to support acting as an EFISTUB. 20 | 21 | +------------------------------------------------------------------------------+ 22 | | | 23 | | CONFIG_EFI_STUB=y | 24 | | | 25 | +------------------------------------------------------------------------------+ 26 | 27 | The UEFI variables must be mounted. 28 | 29 | See: @/efivarfs 30 | 31 | +------------------------------------------------------------------------------+ 32 | | | 33 | | TIP: Keep your kernel's name as 'vmlinuz' to avoid having to update the | 34 | | EFI entries with each kernel update. | 35 | | | 36 | +------------------------------------------------------------------------------+ 37 | 38 | 39 | Create an UEFI boot entry 40 | ________________________________________________________________________________ 41 | 42 | Use the following command to create a boot entry. Replace /dev/sdXN with your 43 | EFI system partition and /dev/sdYM with your root partition. Check to see that 44 | the entry was added with 'efibootmgr --verbose'. 45 | 46 | +------------------------------------------------------------------------------+ 47 | | | 48 | | $ efibootmgr \ | 49 | | --create \ | 50 | | --disk /dev/sdX \ | 51 | | --part N \ | 52 | | --label KISS \ | 53 | | --loader /vmlinuz \ | 54 | | --unicode 'root=/dev/sdYM' \ | 55 | | --verbose | 56 | | | 57 | +------------------------------------------------------------------------------+ 58 | 59 | The root partition can also be referred to by its partition UUID which can be 60 | found using blkid. 61 | 62 | +------------------------------------------------------------------------------+ 63 | | | 64 | | --unicode 'root=PARTUUID=aaaaaaaa-aaaa-4aaa-aaa-aaaaaaaaaaaa' | 65 | | | 66 | +------------------------------------------------------------------------------+ 67 | 68 | The above command, the --unicode option specifies the parameters passed to the 69 | kernel. If you require other parameters to boot your system, pass them here. 70 | 71 | 72 | Removing a UEFI boot entry 73 | ________________________________________________________________________________ 74 | 75 | To remove an entry, find your entry's boot number using 'efibootmgr --verbose' 76 | and run the following command. 77 | 78 | +------------------------------------------------------------------------------+ 79 | | | 80 | | $ efibootmgr --bootnum XXXX --delete-bootnum | 81 | | | 82 | +------------------------------------------------------------------------------+ 83 | 84 | 85 | References 86 | ________________________________________________________________________________ 87 | 88 | [0] https://www.kernel.org/doc/Documentation/efi-stub.txt 89 | -------------------------------------------------------------------------------- /boot/efivarfs.txt: -------------------------------------------------------------------------------- 1 | EFIVARFS [0] 2 | ________________________________________________________________________________ 3 | 4 | To use efibootmgr and other software to manipulate the UEFI boot entries, the 5 | efivars filesystem must be mounted. This isn't handled automatically by KISS due 6 | to the security implications in doing so. [1] 7 | 8 | +------------------------------------------------------------------------------+ 9 | | Mount efivars. | 10 | +------------------------------------------------------------------------------+ 11 | | | 12 | | $ mount -t efivarfs none /sys/firmware/efi/efivars/ | 13 | | | 14 | +------------------------------------------------------------------------------+ 15 | | Unmount efivars. | 16 | +------------------------------------------------------------------------------+ 17 | | | 18 | | $ umount /sys/firmware/efi/efivars/ | 19 | | | 20 | +------------------------------------------------------------------------------+ 21 | 22 | 23 | References 24 | ________________________________________________________________________________ 25 | 26 | [0] https://www.kernel.org/doc/Documentation/filesystems/efivarfs.txt 27 | [1] https://github.com/systemd/systemd/issues/2402 28 | -------------------------------------------------------------------------------- /boot/index.txt: -------------------------------------------------------------------------------- 1 | BOOT 2 | ________________________________________________________________________________ 3 | 4 | - @/efistub 5 | - @/efivarfs 6 | -------------------------------------------------------------------------------- /community/extensions.txt: -------------------------------------------------------------------------------- 1 | KISS EXTENSIONS 2 | ________________________________________________________________________________ 3 | 4 | Anything in the user's '$PATH' which matches the glob 'kiss-*' will interpreted 5 | as an extension and be directly usable via the package manager. Here are some 6 | extensions written by the community. 7 | 8 | kiss-bin 9 | ________________________________________________________________________________ 10 | 11 | Make dealing with binary package repositories easier. 12 | 13 | Source: $/CarbsLinux/kiss-bin 14 | 15 | 16 | kiss-find 17 | ________________________________________________________________________________ 18 | 19 | Search for packages in all known kiss repositories. 20 | 21 | Source: https://git.ebc.li/kiss/custom/src/branch/main/custom/kiss-find 22 | 23 | 24 | kiss-rmdeps 25 | ________________________________________________________________________________ 26 | 27 | Remove dependencies recursively. 28 | 29 | Source: https://gist.github.com/FriendlyNeighborhoodShane/41593680b39c0c04cd82b5497ca25a26 30 | 31 | 32 | kiss-steal 33 | ________________________________________________________________________________ 34 | 35 | Copy packages from any KISS repo automatically 36 | 37 | Source: https://git.ebc.li/kiss/custom/src/branch/main/custom/kiss-steal 38 | -------------------------------------------------------------------------------- /community/forks.txt: -------------------------------------------------------------------------------- 1 | FORKS OF KISS 2 | ________________________________________________________________________________ 3 | 4 | Members of the Community have forked KISS to create their own distributions with 5 | differing software, ideas, goals, etc. 6 | 7 | 8 | Wyvertux 9 | ________________________________________________________________________________ 10 | 11 | Wyvertux is an experimental Linux distribution that aims to completely remove 12 | GNU utilities (if it's even possible) from the Linux build system. 13 | 14 | Source: $/wyvertux/wyvertux 15 | 16 | 17 | Carbs Linux 18 | ________________________________________________________________________________ 19 | 20 | Carbs Linux is an in-development Linux distribution with a suckless mindset. The 21 | base system will consist of only the necessary programs to create a Linux 22 | distribution. 23 | 24 | Source: https://carbslinux.org/ 25 | 26 | 27 | pine linux 28 | ________________________________________________________________________________ 29 | 30 | An experimental linux distro with the goal of being secure, fast, and fully 31 | suckless. 32 | 33 | Source: https://sr.ht/~fultonbrowne/Pine-linux/ 34 | 35 | 36 | Mue Linux 37 | ________________________________________________________________________________ 38 | 39 | Mue Linux is an attempt at a minimalistic linux system with strong ideals. 40 | You can find more information about the ideals here https://muevoid.org/ideals 41 | 42 | Source: https://github.com/muevoid/mue-linux/ 43 | 44 | 45 | Glasnost Linux 46 | ________________________________________________________________________________ 47 | 48 | Glasnost Linux is a Linux® distribution using the Clang/LLVM toolchain and musl 49 | libc. 50 | 51 | Source: https://www.glasnost.org/ 52 | -------------------------------------------------------------------------------- /community/index.txt: -------------------------------------------------------------------------------- 1 | THE COMMUNITY 2 | ________________________________________________________________________________ 3 | 4 | - @/repositories 5 | - @/projects 6 | - @/ports 7 | - @/forks 8 | - @/extensions 9 | -------------------------------------------------------------------------------- /community/ports.txt: -------------------------------------------------------------------------------- 1 | COMMUNITY ARCHITECTURE PORTS 2 | ________________________________________________________________________________ 3 | 4 | KISS has been ported to various architectures by the Community. The following 5 | projects are not affiliated with KISS. While KISS only officially supports 6 | x86_64, Changes are made to KISS (where possible) to make the porting process 7 | easier. 8 | 9 | 10 | AARCH64 11 | ________________________________________________________________________________ 12 | 13 | Source: $/jedavies-dev/kiss-aarch64 14 | 15 | 16 | ARMV7 17 | ________________________________________________________________________________ 18 | 19 | Source: $/jedavies-dev/kiss-armv7 20 | 21 | 22 | PPC64LE 23 | ________________________________________________________________________________ 24 | 25 | Source: $/jedavies-dev/kiss-ppc64le 26 | 27 | 28 | I686 29 | ________________________________________________________________________________ 30 | 31 | Source: $/arvl130/kiss32-repo (musl) 32 | $/arvl130/kiss32-uclibc-repo (uclibc) 33 | $/arvl130/kiss32-glibc-repo (glibc) 34 | 35 | -------------------------------------------------------------------------------- /community/projects.txt: -------------------------------------------------------------------------------- 1 | COMMUNITY PROJECTS 2 | ________________________________________________________________________________ 3 | 4 | Software created by the Community. 5 | 6 | 7 | TINYRAMFS 8 | ________________________________________________________________________________ 9 | 10 | A tiny initramfs generator written in POSIX shell with support for LUKS, LVM, 11 | mdev, mdevd, udev, etc. 12 | 13 | Source: $/illiliti/tinyramfs 14 | 15 | 16 | SYSMGR 17 | ________________________________________________________________________________ 18 | 19 | A simplistic system-supervisor. 20 | 21 | POSIX sh: $/cemkeylan/sysmgr (deprecated) 22 | C: $/cemkeylan/sm 23 | 24 | 25 | SHINIT 26 | ________________________________________________________________________________ 27 | 28 | Basic init daemon in POSIX sh with only 5 lines of code. It supports acting upon 29 | signals. | 30 | 31 | Source: $/cemkeylan/shinit 32 | 33 | 34 | TUITUBE 35 | ________________________________________________________________________________ 36 | 37 | A minimal TUI YouTube (invidious) frontend made in c++. 38 | 39 | Source: $/djt3/tuitube 40 | -------------------------------------------------------------------------------- /community/repositories.txt: -------------------------------------------------------------------------------- 1 | COMMUNITY REPOSITORIES 2 | ________________________________________________________________________________ 3 | 4 | Software repositories created and maintained by members of the KISS Community. 5 | 6 | 7 | PERIISH'S REPOSITORIES 8 | ________________________________________________________________________________ 9 | 10 | These repositories by Periish contain everything from DBus, PulseAudio and Bluez 11 | to XFCE4, podman and more. 12 | 13 | Source: $/periish/kiss-all 14 | 15 | 16 | KDE 17 | ________________________________________________________________________________ 18 | 19 | A KISS repository for KDE and friends. 20 | 21 | Source: $/dilyn-corner/KISS-kde 22 | 23 | 24 | GAMES 25 | ________________________________________________________________________________ 26 | 27 | 50+ open source games from a myriad of genres. 28 | 29 | Source: $/sdsddsd1/kiss-games 30 | 31 | 32 | LLVM 33 | ________________________________________________________________________________ 34 | 35 | A kiss-repo structure to build standalone LLVM. 36 | 37 | Source: $/konimex/kiss-llvm 38 | 39 | 40 | ZFS 41 | ________________________________________________________________________________ 42 | 43 | This repository provides ZFS on Linux and contains the userland, utilities, 44 | kernel modules and event daemon (zed). 45 | 46 | Source: $/jedavies-dev/kiss-zfs 47 | 48 | 49 | WYVERKISS 50 | ________________________________________________________________________________ 51 | 52 | Wyverkiss is an alternative rootfs for KISS Linux. If KISS goes GNU, we go the 53 | opposite. 54 | 55 | Source: $/wyvertux/wyverkiss 56 | 57 | 58 | FLATPAK 59 | ________________________________________________________________________________ 60 | 61 | Flatpak and friends. 62 | 63 | Source: $/dylanaraps/kiss-flatpak 64 | 65 | 66 | FONTS 67 | ________________________________________________________________________________ 68 | 69 | Fonts packaged for KISS Linux. 70 | 71 | Source: $/Himmalerin/kiss-fonts 72 | 73 | 74 | DOCKER 75 | -------------------------------------------------------------------------------- 76 | 77 | Docker and its dependencies. 78 | 79 | Source: $/cemkeylan/cpt-docker 80 | 81 | -------------------------------------------------------------------------------- /console/bkeymaps.txt: -------------------------------------------------------------------------------- 1 | BKEYMAPS [0] 2 | ________________________________________________________________________________ 3 | 4 | Binary keymaps to set the keyboard layout. 5 | 6 | 7 | Install keymaps 8 | ________________________________________________________________________________ 9 | 10 | 11 | Begin by verifying that you have bkeymaps installed from the Community 12 | repository. 13 | 14 | +------------------------------------------------------------------------------+ 15 | | | 16 | | $ kiss b bkeymaps | 17 | | | 18 | +------------------------------------------------------------------------------+ 19 | 20 | Available keymaps are in /usr/share/bkeymaps. 21 | 22 | 23 | Load Keymaps at login 24 | ________________________________________________________________________________ 25 | 26 | To load a keymap at login, add the following command to your .profile. 27 | 28 | +------------------------------------------------------------------------------+ 29 | | Load keymap using busybox's loadkmap. | 30 | +------------------------------------------------------------------------------+ 31 | | | 32 | | $ loadkmap < file | 33 | | | 34 | +------------------------------------------------------------------------------+ 35 | | Load keymap using kbd's loadkeys. | 36 | +------------------------------------------------------------------------------+ 37 | | | 38 | | $ loadkeys file | 39 | | | 40 | +------------------------------------------------------------------------------+ 41 | 42 | 43 | References 44 | ________________________________________________________________________________ 45 | 46 | [0] https://dev.alpinelinux.org/bkeymaps/ 47 | -------------------------------------------------------------------------------- /console/fonts.txt: -------------------------------------------------------------------------------- 1 | CHANGING THE CONSOLE FONT 2 | ________________________________________________________________________________ 3 | 4 | The Linux console font can be changed using the setfont utility (part of busybox 5 | and installed by default). 6 | 7 | 8 | Available Fonts 9 | ________________________________________________________________________________ 10 | 11 | Currently packaged Linux console fonts. 12 | 13 | - terminus-font (Community). 14 | - spleen-font (Community). 15 | - unifont (Community). 16 | 17 | 18 | Changing the Console Font 19 | ________________________________________________________________________________ 20 | 21 | Use the following command to set the console font _after_ a user has logged in. 22 | Add it to your ~/.profile or /etc/profile to make the change permanent. 23 | 24 | +------------------------------------------------------------------------------+ 25 | | | 26 | | [ "$DISPLAY" ] || setfont /usr/share/consolefonts/FONT_NAME | 27 | | | 28 | +------------------------------------------------------------------------------+ 29 | 30 | To change the console font _before_ a user has logged in, add the following to 31 | your /etc/inittab or /etc/rc.conf. 32 | 33 | +------------------------------------------------------------------------------+ 34 | | /etc/rc.conf | 35 | +------------------------------------------------------------------------------+ 36 | | | 37 | | /usr/bin/setfont /usr/share/consolefonts/FONT_NAME -C /dev/tty1 | 38 | | | 39 | +------------------------------------------------------------------------------+ 40 | -------------------------------------------------------------------------------- /console/index.txt: -------------------------------------------------------------------------------- 1 | CONSOLE 2 | ________________________________________________________________________________ 3 | 4 | - @/bkeymaps 5 | - @/console-font 6 | -------------------------------------------------------------------------------- /help/about-this-wiki.txt: -------------------------------------------------------------------------------- 1 | ABOUT THIS WIKI 2 | ________________________________________________________________________________ 3 | 4 | This Wiki is generated from plain .txt files and supports some basic formatting 5 | options. Any formatting is simply substituted using a call to 'sed' during site 6 | generation. 7 | 8 | The custom syntax is designed to be unobtrusive as white-space controls layout. 9 | Full HTML is also supported in pages though it should only be used if 100% 10 | necessary. 11 | 12 | [0.0] Index 13 | ________________________________________________________________________________ 14 | 15 | - Repository layout [1.0] 16 | - Relative links [2.0] 17 | - Reference links [3.0] 18 | - Links to Github [4.0] 19 | - HTML [4.0] 20 | 21 | 22 | [1.0] Repository layout 23 | ________________________________________________________________________________ 24 | 25 | The Wiki lives in a separate repository ($/kisslinux/wiki). It is then imported 26 | as a submodule inside of the website's repository ($/kisslinux/website). This 27 | keeps things neat and tidy. It also makes contribution easier as it's less 28 | daunting compared to nesting it inside the website's tree. 29 | 30 | 31 | [2.0] Relative links 32 | ________________________________________________________________________________ 33 | 34 | Links to other wiki pages can be written in the following way: 35 | 36 | @/help/wiki-syntax 37 | 38 | Which is turned into: 39 | 40 | @/<a href="/wiki/help/wiki-syntax">wiki-syntax</a> 41 | 42 | 43 | [3.0] Reference links 44 | ________________________________________________________________________________ 45 | 46 | Adding [0] to some text will create an anchor link to a corresponding reference. 47 | This corresponding reference must also be created by the writer of the document. 48 | The build system will simply link them together for you. [1] 49 | 50 | The above table of contents [0.0] is simply the same concept but in reverse. 51 | This simple find/replace ends up being a very powerful tool. 52 | 53 | [0] Clicking the above reference will scroll the page to these anchor links. 54 | [1] Links such as this one must start at column zero. 55 | 56 | 57 | [4.0] Links to Github 58 | ________________________________________________________________________________ 59 | 60 | Links to GitHub repositories can be written in the following way: 61 | 62 | $/username 63 | $/username/repo 64 | $/username/repo/commits/etc 65 | 66 | Which is turned into: 67 | 68 | $/<a href="https://github.com/username">username</a> 69 | 70 | 71 | [5.0] HTML 72 | ________________________________________________________________________________ 73 | 74 | Writing HTML directly is also supported as these .txt files will be inserted 75 | into a HTML template during the build process. Usage of HTML should be avoided 76 | as it makes the plain text files themselves less readable. 77 | 78 | When writing the greater-than or less-than characters, use the HTML entities in 79 | place of the characters to prevent them being interpreted as HTML. 80 | -------------------------------------------------------------------------------- /help/adding-a-page.txt: -------------------------------------------------------------------------------- 1 | ADDING A PAGE 2 | ________________________________________________________________________________ 3 | 4 | Adding a page to the Wiki and integrating it into the home page/listing pages is 5 | rather simple (albeit manual for the time being). This may be automated (to a 6 | realistic extent) over time. 7 | 8 | Copy an existing page or start from the @/page-template.txt and begin writing. 9 | When you're ready to submit your page, the following steps must be followed. 10 | 11 | 12 | Requirements 13 | ________________________________________________________________________________ 14 | 15 | 1. Lines must not exceed 80 columns in width. This is a comfortable size for 16 | reading while not being too narrow for writing. This is a nice sweet spot. 17 | 18 | 2. Include references where applicable. [0] 19 | 20 | 3. Pages must be written in English and without error. If this Wiki would like 21 | to one day be known as a high quality resource, we must write to the best 22 | of our ability. [1] 23 | 24 | 4. Do not submit pull requests with spelling mistakes. These will be immediately 25 | closed. Do spend a minute spell checking your work prior. [2] 26 | 27 | 5. One space after each sentence. 28 | 29 | 6. Use only the 128 ASCII characters. [3] 30 | 31 | 32 | [0] References work like this. Square brackets and a number in two locations. 33 | The build system will automatically link these together (via an anchor). 34 | 35 | [1] Fixes to existing pages and suggestions are welcome. If you see anything 36 | low-quality, incorrect or in need of fixing, please submit edits. 37 | 38 | [2] Exceptions are made for words which only exist in this technological bubble 39 | of ours. This is common sense. 40 | 41 | [3] https://en.wikipedia.org/wiki/ASCII 42 | 43 | 44 | Adding a new category: 45 | ________________________________________________________________________________ 46 | 47 | $ cd wiki 48 | $ mkdir -p category 49 | $ cp help/index.txt category 50 | 51 | # Rewrite the index to match the new category. 52 | $ vi category/index.txt 53 | 54 | 55 | Page Creation 56 | ________________________________________________________________________________ 57 | 58 | Adding a new page: 59 | 60 | $ cd wiki 61 | $ cp help/page-template.txt category/page-name.txt 62 | 63 | # Start writing your page. 64 | $ vi category/page-name.txt 65 | 66 | # Update the category's index.txt to include the new page. 67 | $ vi category/index.txt 68 | 69 | # Update the Wiki's home page to include the new page. 70 | $ vi index.txt 71 | -------------------------------------------------------------------------------- /help/index.txt: -------------------------------------------------------------------------------- 1 | HELP 2 | ________________________________________________________________________________ 3 | 4 | - @/about-this-wiki 5 | - @/adding-a-page 6 | - @/page-template 7 | -------------------------------------------------------------------------------- /help/page-template.txt: -------------------------------------------------------------------------------- 1 | SOFTWARE_NAME [0] 2 | ________________________________________________________________________________ 3 | 4 | DESCRIPTION 5 | 6 | 7 | Index (recommended for larger pages) 8 | ________________________________________________________________________________ 9 | 10 | - Usage [0.0] 11 | 12 | - Heading [1.0] 13 | - Subheading [1.1] 14 | 15 | - Heading [2.0] 16 | - Heading [3.0] 17 | - References [4.0] 18 | 19 | 20 | [0.0] Usage 21 | ________________________________________________________________________________ 22 | 23 | Begin by first verifying that you have SOFTWARE_NAME installed: 24 | 25 | +------------------------------------------------------------------------------+ 26 | | | 27 | | $ kiss b SOFTWARE_NAME | 28 | | | 29 | +------------------------------------------------------------------------------+ 30 | 31 | 32 | [1.0] Heading 33 | ________________________________________________________________________________ 34 | 35 | WORDS 36 | 37 | +------------------------------------------------------------------------------+ 38 | | | 39 | | $ cmd | 40 | | | 41 | +------------------------------------------------------------------------------+ 42 | 43 | 44 | [1.1] Subheading 45 | ____________________________________________________________________________ 46 | 47 | WORDS [1] 48 | 49 | +--------------------------------------------------------------------------+ 50 | | | 51 | | $ cmd | 52 | | | 53 | +--------------------------------------------------------------------------+ 54 | 55 | 56 | [2.0] Heading 57 | ________________________________________________________________________________ 58 | 59 | WORDS 60 | 61 | +------------------------------------------------------------------------------+ 62 | | Do the thing! | 63 | +------------------------------------------------------------------------------+ 64 | | | 65 | | $ cmd | 66 | | | 67 | +------------------------------------------------------------------------------+ 68 | 69 | 70 | [3.0] Heading 71 | ________________________________________________________________________________ 72 | 73 | WORDS 74 | 75 | +------------------------------------------------------------------------------+ 76 | | | 77 | | TIP: I am a helpful tip! | 78 | | | 79 | +------------------------------------------------------------------------------+ 80 | 81 | 82 | [4.0] References 83 | ________________________________________________________________________________ 84 | 85 | [0] https://example.com 86 | [1] https://example.com 87 | -------------------------------------------------------------------------------- /index.txt: -------------------------------------------------------------------------------- 1 | +------------------------------------------------------------------------------+ 2 | | | 3 | | _ _____ ___ ___ __ _____ _ _____ | 4 | | | |/ /_ _/ __/ __\ \ \ / /_ _| |/ /_ _| | 5 | | | ' < | |\__ \__ \ \ \/\/ / | || ' < | | | 6 | | |_|\_\___|___/___/ \_/\_/ |___|_|\_\___| | 7 | | | 8 | | Welcome to the KISS WIKI. Documentation and information | 9 | | about KISS and Linux in general. Written by the Community. | 10 | | | 11 | | | 12 | | | 13 | | .--------------------------------------------------------. | 14 | | | | | 15 | | | The wiki is incomplete, help by expanding it! | | 16 | | | | .--. | 17 | | '-------------------------------------------------------\\|o_o | | 18 | | |:_/ | | 19 | | Sources: $/kisslinux/wiki // \ \ | 20 | | (| | ) | 21 | +------------------------------------------------------------------------------+ 22 | 23 | +-------------------------------------+ +-------------------------------------+ 24 | | | | | 25 | | DISTRIBUTION | | WIKI | 26 | | | | | 27 | | @/kiss/style-guide | | @/help/about-this-wiki | 28 | | | | @/help/adding-a-page | 29 | | | | @/help/page-template | 30 | | | | | 31 | +-------------------------------------+ +-------------------------------------+ 32 | 33 | +-----------------------+ +------------------------+ +-----------------------+ 34 | | | | | | | 35 | | KERNEL | | INIT SYSTEMS | | BOOT | 36 | | | | | | | 37 | | @/kernel/config | | @/init/busybox | | @/boot/efistub | 38 | | | | @/init/changing-init | | @/boot/efivarfs | 39 | | | | @/init/sysmgr | | | 40 | | | | | | | 41 | +-----------------------+ +------------------------+ +-----------------------+ 42 | 43 | +-------------------------------------+ +-------------------------------------+ 44 | | | | ;;;;;;;;;;;;;| 45 | | WAYLAND | | XORG ;\;;;\\;;;|;;| 46 | | | | ;\\;;|;|;;||| 47 | | @/wayland/alternatives | | ;'| ' ;|| 48 | | @/wayland/install | | .---. | | | || 49 | | | |;;; [ ] ;;@ | | ' || 50 | | | |@;@;; | X | ;@;;;;_/ | \| 51 | | | |;;;@;;@ | | ;;;;;;@/ /;;\ | 52 | +-------------------------------------+ +-------------------------------------+ 53 | 54 | +------------------------------------------------------------------------------+ 55 | | | 56 | | SOFTWARE | 57 | | | 58 | | @/software/firefox @/software/man-pages | 59 | | @/software/git @/software/openssh | 60 | | @/software/wpa_supplicant @/software/dhcpcd | 61 | | @/software/acpid @/software/tzdata | 62 | | @/software/vim @/software/eiwd | 63 | | | 64 | +------------------------------------------------------------------------------+ 65 | 66 | +------------------------------------------------------------------------------+ 67 | | | 68 | | COMMUNITY | 69 | | | 70 | | @/community/repositories Software repositories maintained by members of | 71 | | the Community. Highlights include Wayland, KDE, | 72 | | XFCE4, Bluez, dbus and PulseAudio. | 73 | | | 74 | | @/community/ports Ports of KISS to different architectures. | 75 | | @/community/projects Community software projects. | 76 | | @/community/forks Forks of KISS Linux. | 77 | | @/community/extensions Extensions for the KISS package manager. | 78 | | | 79 | +------------------------------------------------------------------------------+ 80 | 81 | +-----------------------+ +------------------------+ +-----------------------+ 82 | | | | | | | 83 | | CONSOLE | | DESKTOPS | | STORAGE | 84 | | | | | | | 85 | | @/console/bkeymaps | | | | @/storage/disks | 86 | | @/console/fonts | | | | @/storage/zram | 87 | | | | | | @/storage/zswap | 88 | | | | | | | 89 | +-----------------------+ +------------------------+ +-----------------------+ 90 | 91 | -------------------------------------------------------------------------------- /init/busybox.txt: -------------------------------------------------------------------------------- 1 | MANAGING SERVICES WITH BUSYBOX 2 | ________________________________________________________________________________ 3 | 4 | KISS uses busybox's init with busybox's runit utilities for services by default. 5 | 6 | 7 | Basic usage 8 | ________________________________________________________________________________ 9 | 10 | +---------+--------------------------------------------------------------------+ 11 | | Action | Command | 12 | |---------+--------------------------------------------------------------------| 13 | | List | $ ls /etc/sv/ | 14 | | | | 15 | | Enable | $ ln -s /etc/sv/SERVICE_NAME/ /var/service | 16 | | Disable | $ unlink /var/service/SERVICE_NAME | 17 | | | | 18 | | Stop | $ sv down SERVICE_NAME | 19 | | Start | $ sv up SERVICE_NAME | 20 | | | | 21 | +---------+--------------------------------------------------------------------+ 22 | 23 | See https://git.busybox.net/busybox/tree/runit/sv.c for full usage. 24 | 25 | 26 | Running commands during boot/shutdown 27 | ________________________________________________________________________________ 28 | 29 | This can be accomplished in a generic way (using /etc/rc.d) or by modifying the 30 | busybox-init only /etc/inittab file. 31 | 32 | 33 | Using /etc/rc.d 34 | ____________________________________________________________________________ 35 | 36 | This method of configuration works with every init system which uses the 37 | KISS init framework. See $/kisslinux/init 38 | 39 | +--------------------------------------------------------------------------+ 40 | | Run command during boot. | 41 | +--------------------------------------------------------------------------+ 42 | | | 43 | | # Load the iwlwifi kernel module. | 44 | | echo "modprobe iwlwifi" > /etc/rc.d/wifi.boot | 45 | | | 46 | +--------------------------------------------------------------------------+ 47 | | Run command during shutdown. | 48 | +--------------------------------------------------------------------------+ 49 | | | 50 | | # Save system time to hwclock. | 51 | | echo "hwclock -w" > /etc/rc.d/hwclock.pre.shutdown | 52 | | | 53 | +--------------------------------------------------------------------------+ 54 | | | 55 | | TIP: .post.shutdown can also be used. | 56 | | | 57 | +--------------------------------------------------------------------------+ 58 | 59 | 60 | Using /etc/inittab 61 | ____________________________________________________________________________ 62 | 63 | +--------------------------------------------------------------------------+ 64 | | Run command during boot. | 65 | +--------------------------------------------------------------------------+ 66 | | | 67 | | # Load the iwlwifi kernel module. | 68 | | ::once:/bin/modprobe iwlwifi | 69 | | | 70 | +--------------------------------------------------------------------------+ 71 | | Run command during shutdown. | 72 | +--------------------------------------------------------------------------+ 73 | | | 74 | | # Save system time to hwclock. | 75 | | ::shutdown:/bin/hwclock -w | 76 | | | 77 | +--------------------------------------------------------------------------+ 78 | 79 | -------------------------------------------------------------------------------- /init/changing-init.txt: -------------------------------------------------------------------------------- 1 | Changing Init Systems 2 | ________________________________________________________________________________ 3 | 4 | KISS' default init system and service manager are provided by busybox. The 5 | service manager being an independent implementation of runit's utilities. This 6 | default should work with all system configurations though one may still wish to 7 | swap to the init system and service manager of their choosing. 8 | 9 | This is very easily done via the package manager's alternatives system as 10 | nothing is tightly coupled or dependent on a specific init or service manager. 11 | 12 | 13 | [0.0] Index 14 | ________________________________________________________________________________ 15 | 16 | - Rebooting after switching init systems [1.0] 17 | - runit [2.0] 18 | - Hummingbird [3.0] 19 | - Setting up runsvdir [3.1] 20 | 21 | 22 | [1.0] Rebooting after switching init systems 23 | ________________________________________________________________________________ 24 | 25 | After switching init systems, your running init system may not accept the 26 | new poweroff commands. You will need to reboot/poweroff using the running init's 27 | utilities for the new utilities to work. These commands are for the init system 28 | currently running on your system and not the one you are switching to. 29 | 30 | +------------------------------------------------------------------------------+ 31 | | Busybox | 32 | +------------------------------------------------------------------------------+ 33 | | | 34 | | $ busybox reboot | 35 | | | 36 | +------------------------------------------------------------------------------+ 37 | | Runit | 38 | +------------------------------------------------------------------------------+ 39 | | | 40 | | $ runit-init 6 | 41 | | | 42 | +------------------------------------------------------------------------------+ 43 | | sinit/shinit and Hummingbird | 44 | +------------------------------------------------------------------------------+ 45 | | | 46 | | $ kill -s INT 1 | 47 | | | 48 | +------------------------------------------------------------------------------+ 49 | 50 | 51 | [2.0] runit 52 | ________________________________________________________________________________ 53 | 54 | Begin by first verifying that runit is installed. 55 | 56 | +------------------------------------------------------------------------------+ 57 | | | 58 | | # Available in the Community repository. | 59 | | $ kiss b runit | 60 | | | 61 | +------------------------------------------------------------------------------+ 62 | 63 | Finally, use the alternatives system to swap to runit. 64 | 65 | +------------------------------------------------------------------------------+ 66 | | | 67 | | # See #/package-manager#3.2 for more information. | 68 | | $ kiss a runit /usr/bin/init | 69 | | $ kiss a runit /usr/bin/poweroff | 70 | | $ kiss a runit /usr/bin/reboot | 71 | | | 72 | +------------------------------------------------------------------------------+ 73 | 74 | 75 | [3.0] Hummingbird 76 | ________________________________________________________________________________ 77 | 78 | Make sure to install Hummingbird. 79 | 80 | +------------------------------------------------------------------------------+ 81 | | | 82 | | # Available in the Community repository. | 83 | | $ kiss b hummingbird-git | 84 | | | 85 | +------------------------------------------------------------------------------+ 86 | 87 | Then, swap to Hummingbird by using the alternatives system. 88 | 89 | +------------------------------------------------------------------------------+ 90 | | | 91 | | $ kiss a hummingbird-git /usr/bin/init | 92 | | $ kiss a hummingbird-git /usr/bin/reboot | 93 | | | 94 | +------------------------------------------------------------------------------+ 95 | 96 | Once you have booted using Hummingbird, take note that the command used to 97 | turn the system off is "shutdown". 98 | 99 | 100 | [3.1] Setting up runsvdir 101 | ____________________________________________________________________________ 102 | 103 | Hummingbird doesn't provide a service manager, and doesn't read from 104 | inittab either. Some people find it useful to have one, such as runsvdir. 105 | 106 | +--------------------------------------------------------------------------+ 107 | | | 108 | | $ mkdir /etc/rc.d | 109 | | $ echo 'runsvdir -P /var/service &' > /etc/rc.d/runsvdir.boot | 110 | | | 111 | +--------------------------------------------------------------------------+ 112 | -------------------------------------------------------------------------------- /init/index.txt: -------------------------------------------------------------------------------- 1 | INIT 2 | ________________________________________________________________________________ 3 | 4 | - @/busybox 5 | -------------------------------------------------------------------------------- /init/sysmgr.txt: -------------------------------------------------------------------------------- 1 | Managing services with SYSMGR 2 | ________________________________________________________________________________ 3 | 4 | sysmgr is an alternative service supervisor written in POSIX sh. It is similar 5 | in usage to runit. 6 | 7 | 8 | Installation 9 | ________________________________________________________________________________ 10 | 11 | Begin by first verifying that you have sysmgr installed. 12 | 13 | +------------------------------------------------------------------------------+ 14 | | | 15 | | # Available in the Community repository. | 16 | | $ kiss b sysmgr | 17 | | | 18 | +------------------------------------------------------------------------------+ 19 | 20 | 21 | Basic usage 22 | ________________________________________________________________________________ 23 | 24 | As mentioned above, the usage of sysmgr is similar to runit. 25 | 26 | +---------+--------------------------------------------------------------------+ 27 | | Action | Command | 28 | +---------+--------------------------------------------------------------------+ 29 | | List | $ ls /etc/sysmgr/ | 30 | | | | 31 | | Enable | $ ln -s /etc/sysmgr/SERVICE_NAME /var/sysmgr | 32 | | Disable | $ unlink /var/sysmgr/SERVICE_NAME | 33 | | | | 34 | | Stop | $ svctl stop SERVICE_NAME | 35 | | Start | $ svctl start SERVICE_NAME | 36 | | | | 37 | +---------+--------------------------------------------------------------------+ 38 | 39 | See svctl(1) for more usage information. 40 | 41 | 42 | Running sysmgr on startup 43 | ________________________________________________________________________________ 44 | 45 | sysmgr can be run at boot via /etc/inittab or a hook in /etc/rc.d. 46 | 47 | +------------------------------------------------------------------------------+ 48 | | Enabling on inittab | 49 | +------------------------------------------------------------------------------+ 50 | | | 51 | | ::respawn:/usr/bin/sysmgr | 52 | | | 53 | +------------------------------------------------------------------------------+ 54 | | Enabling from /etc/rc.d/sysmgr.boot | 55 | +------------------------------------------------------------------------------+ 56 | | | 57 | | while :; do /usr/bin/sysmgr; done & | 58 | | | 59 | +------------------------------------------------------------------------------+ 60 | 61 | 62 | Switching from runit 63 | ________________________________________________________________________________ 64 | 65 | In order to switch from runit to sysmgr, copy the contents of the /var/service 66 | directory to /var/sysmgr, and the same for /etc/sv to /etc/sysmgr. 67 | 68 | +------------------------------------------------------------------------------+ 69 | | Create the service directory for sysmgr | 70 | +------------------------------------------------------------------------------+ 71 | | | 72 | | $ mkdir -p /etc/sysmgr | 73 | | | 74 | +------------------------------------------------------------------------------+ 75 | | Copy runit services | 76 | +------------------------------------------------------------------------------+ 77 | | | 78 | | for service in /etc/sv/*; do | 79 | | cp "$service/run" "/etc/sysmgr/${service##*/}" | 80 | | done | 81 | | | 82 | +------------------------------------------------------------------------------+ 83 | | Copy all enabled services | 84 | +------------------------------------------------------------------------------+ 85 | | | 86 | | for service in /var/service/*; do | 87 | | ln -sf /etc/sysmgr/${service##*/} /var/sysmgr | 88 | | done | 89 | | | 90 | +------------------------------------------------------------------------------+ 91 | -------------------------------------------------------------------------------- /kernel/config.txt: -------------------------------------------------------------------------------- 1 | KERNEL CONFIGURATION GUIDE 2 | ________________________________________________________________________________ 3 | 4 | Configuring the Linux kernel is arguably the hardest step in the installation 5 | process. The kernel is humongous and figuring out what to enable in the 6 | seemingly endless option list can be a daunting task. 7 | 8 | The most important factor for success is how well one knows their hardware. 9 | Spend a little time doing some research prior to configuring the kernel. Knowing 10 | what is inside one's system is of immense value in all contexts. 11 | 12 | The physical realm however, is only part of the equation. Configuration extends 13 | to general features, file-systems, networking protocols, cryptography, security, 14 | processor features and more. 15 | 16 | This Wiki page will document kernel options, their requirement level 17 | (conditional, recommended or mandatory), a brief description and a rationale if 18 | necessary. Information about pre-built hardware as a whole will not be covered. 19 | 20 | 21 | [0.0] Index 22 | ________________________________________________________________________________ 23 | 24 | - Getting a config [1.0] 25 | - Modifying a config [2.0] 26 | - Busybox compatibility [3.0] 27 | - Never lose your .config ever again [4.0] 28 | - Removing the perl requirement [5.0] 29 | 30 | 31 | [1.0] Getting a config 32 | ________________________________________________________________________________ 33 | 34 | The first step in this process is creating a .config file in the Linux source 35 | tree. It is essentially just a text file containing KEY=value pairs (along with 36 | comments), each of which control something in the linux build process. 37 | 38 | An important subset of the options control "drivers"; sections of code that give 39 | the kernel the capability to interact with filesystems, protocols and hardware 40 | components. These options typically have three possible values: "n" to not 41 | compile the driver, "y" to compile it into the kernel binary and "m" to compile 42 | the driver as a module (.ko files stored in /usr/lib/modules). Modules can be 43 | loaded/unloaded dynamically by the kernel as needed. 44 | 45 | A fairly generic and compatible base configuration for your architecture can be 46 | created by running the following command. This handles a large portion of the 47 | work required during the configuration stage. 48 | 49 | +------------------------------------------------------------------------------+ 50 | | | 51 | | $ make defconfig | 52 | | | 53 | +------------------------------------------------------------------------------+ 54 | 55 | There are countless flows of configuring the Linux kernel, and there are fun 56 | things to try scattered all over the internet. Good luck! 57 | 58 | 59 | [2.0] Modifying a config 60 | ________________________________________________________________________________ 61 | 62 | There are several ways to modify an existing config file that are more 63 | convenient than editing each of them by hand, most of them very well 64 | documented. They arrange all of the config options in neat menus and submenus 65 | and provide descriptions for each of them, allowing the Linux kernel to be 66 | comprehended by mere mortals. 67 | 68 | +------------------------------------------------------------------------------+ 69 | | Terminal based configuration tools (requires ncurses) | 70 | +------------------------------------------------------------------------------+ 71 | | | 72 | | $ make menuconfig | 73 | | $ make nconfig | 74 | | | 75 | +------------------------------------------------------------------------------+ 76 | | Graphical configuration tools (requires a working Xorg server and QT/GTK) | 77 | +------------------------------------------------------------------------------+ 78 | | | 79 | | $ make xconfig # Requires qt5. | 80 | | $ make gconfig # Requires gtk+3. | 81 | | | 82 | +------------------------------------------------------------------------------+ 83 | 84 | Another option you may find very useful to easily trim down general (default, 85 | distro, etc.) configuration files is: 86 | 87 | +------------------------------------------------------------------------------+ 88 | | | 89 | | $ make localyesconfig | 90 | | | 91 | +------------------------------------------------------------------------------+ 92 | 93 | This modifies the current .config to only compile whatever drivers are loaded in 94 | the host kernel's current state. Running this after connecting all the hardware 95 | you will be using is a pretty quick way to come up with a pretty lean 96 | configuration. 97 | 98 | 99 | [3.0] Busybox compatibility 100 | ________________________________________________________________________________ 101 | 102 | Various parts of the Linux build system use non-standard options with core 103 | utilities, this causes a build failure when using busybox. Thankfully, this non- 104 | standard usage depends on unimportant and rarely used kernel features. 105 | 106 | When these options are disabled (is the case by default unless 'allyesconfig' is 107 | used), the kernel builds just fine. 108 | 109 | +------------------------------------------------------------------------------+ 110 | | | 111 | | The following options are mandatory (when using busybox) (=n). | 112 | | | 113 | | CONFIG_IKHEADERS This option enables access to the in-kernel | 114 | | headers that are generated during the build | 115 | | process. These can be used to build eBPF tracing, | 116 | | or similar programs. | 117 | | | 118 | +------------------------------------------------------------------------------+ 119 | 120 | 121 | [4.0] Never lose your .config ever again 122 | ________________________________________________________________________________ 123 | 124 | The kernel can be configured to store its configuration file to later make it 125 | accessible via /proc/config.gz. Storing the .config in the kernel ensures that 126 | you will never lose your config so long as you have its kernel. 127 | 128 | +------------------------------------------------------------------------------+ 129 | | | 130 | | The following options are recommended (=y). | 131 | | | 132 | | CONFIG_IKCONFIG Store the .config in the kernel. | 133 | | CONFIG_IKCONFIG_PROC Make the .config accessible as /proc/config.gz | 134 | | | 135 | +------------------------------------------------------------------------------+ 136 | 137 | 138 | [5.0] Removing the perl requirement 139 | ________________________________________________________________________________ 140 | 141 | Perl is needed by the build_OID_registry script which will be executed during 142 | the compilation process in most systems. This makes perl a mandatory dependency 143 | to build the kernel. 144 | 145 | A patch can be applied which adds a POSIX shell implementation of the perl 146 | script. This fully removes the perl requirement. 147 | 148 | @/patches/kernel-no-perl.patch (Written by $/E5ten) 149 | 150 | +------------------------------------------------------------------------------+ 151 | | | 152 | | TIP: All links like this one are also available via 'kiss help'! | 153 | | | 154 | +------------------------------------------------------------------------------+ 155 | -------------------------------------------------------------------------------- /kernel/index.txt: -------------------------------------------------------------------------------- 1 | KERNEL 2 | ________________________________________________________________________________ 3 | 4 | - @/config 5 | - @/firmware 6 | -------------------------------------------------------------------------------- /kernel/patches/kernel-no-perl.patch: -------------------------------------------------------------------------------- 1 | --- a/lib/Makefile 2 | +++ b/lib/Makefile 3 | @@ -271,7 +271,7 @@ 4 | $(call cmd,build_OID_registry) 5 | 6 | quiet_cmd_build_OID_registry = GEN $@ 7 | - cmd_build_OID_registry = perl $(srctree)/$(src)/build_OID_registry $< $@ 8 | + cmd_build_OID_registry = $(CONFIG_SHELL) $(srctree)/$(src)/build_OID_registry <$< >$@ 9 | 10 | clean-files += oid_registry_data.c 11 | 12 | --- a/lib/build_OID_registry 13 | +++ b/lib/build_OID_registry 14 | @@ -1,4 +1,4 @@ 15 | -#!/usr/bin/perl -w 16 | +#!/bin/sh 17 | # SPDX-License-Identifier: GPL-2.0-or-later 18 | # 19 | # Build a static ASN.1 Object Identified (OID) registry 20 | @@ -7,197 +7,93 @@ 21 | # Written by David Howells (dhowells@redhat.com) 22 | # 23 | 24 | -use strict; 25 | - 26 | -my @names = (); 27 | -my @oids = (); 28 | - 29 | -if ($#ARGV != 1) { 30 | - print STDERR "Format: ", $0, " \n"; 31 | - exit(2); 32 | -} 33 | - 34 | # 35 | -# Open the file to read from 36 | +# Read OID lines and determine the lengths of the encoded data arrays. 37 | # 38 | -open IN_FILE, "<$ARGV[0]" || die; 39 | -while () { 40 | - chomp; 41 | - if (m!\s+OID_([a-zA-z][a-zA-Z0-9_]+),\s+/[*]\s+([012][.0-9]*)\s+[*]/!) { 42 | - push @names, $1; 43 | - push @oids, $2; 44 | - } 45 | -} 46 | -close IN_FILE || die; 47 | +set -f -- # use "$@" array for data 48 | +total_length=0 IFS='.' 49 | +while IFS=' ' read -r line; do 50 | + if [ "${line#OID_[a-z]}" != "$line" ]; then 51 | + name="${line#*_}" name="${name%,*}" oid="${line#*/* }" oid="${oid% */}" 52 | + # shellcheck disable=SC2086 53 | + size="$(set -- $oid; printf '%u' "$(($# - 1))")" 54 | + for c in $oid; do 55 | + # We will base128 encode the number 56 | + : "$((size += c ? $(awk "BEGIN{print int(log($c)/log(2)/7)}") : 0))" 57 | + done 58 | + set -- "$@" "$name:$oid:$total_length" 59 | + : "$((total_length += size))" 60 | + fi 61 | +done 62 | 63 | # 64 | -# Open the files to write into 65 | -# 66 | -open C_FILE, ">$ARGV[1]" or die; 67 | -print C_FILE "/*\n"; 68 | -print C_FILE " * Automatically generated by ", $0, ". Do not edit\n"; 69 | -print C_FILE " */\n"; 70 | - 71 | -# 72 | -# Split the data up into separate lists and also determine the lengths of the 73 | -# encoded data arrays. 74 | -# 75 | -my @indices = (); 76 | -my @lengths = (); 77 | -my $total_length = 0; 78 | - 79 | -for (my $i = 0; $i <= $#names; $i++) { 80 | - my $name = $names[$i]; 81 | - my $oid = $oids[$i]; 82 | - 83 | - my @components = split(/[.]/, $oid); 84 | - 85 | - # Determine the encoded length of this OID 86 | - my $size = $#components; 87 | - for (my $loop = 2; $loop <= $#components; $loop++) { 88 | - my $c = $components[$loop]; 89 | - 90 | - # We will base128 encode the number 91 | - my $tmp = ($c == 0) ? 0 : int(log($c)/log(2)); 92 | - $tmp = int($tmp / 7); 93 | - $size += $tmp; 94 | - } 95 | - push @lengths, $size; 96 | - push @indices, $total_length; 97 | - $total_length += $size; 98 | -} 99 | - 100 | -# 101 | # Emit the look-up-by-OID index table 102 | # 103 | -print C_FILE "\n"; 104 | -if ($total_length <= 255) { 105 | - print C_FILE "static const unsigned char oid_index[OID__NR + 1] = {\n"; 106 | -} else { 107 | - print C_FILE "static const unsigned short oid_index[OID__NR + 1] = {\n"; 108 | -} 109 | -for (my $i = 0; $i <= $#names; $i++) { 110 | - print C_FILE "\t[OID_", $names[$i], "] = ", $indices[$i], ",\n" 111 | -} 112 | -print C_FILE "\t[OID__NR] = ", $total_length, "\n"; 113 | -print C_FILE "};\n"; 114 | +printf '/*\n * Automatically generated by %s. Do not edit\n */\n\n' "$0" 115 | +if [ "$total_length" -le 255 ]; then 116 | + printf 'static const unsigned char oid_index[OID__NR + 1] = {\n' 117 | +else 118 | + printf 'static const unsigned short oid_index[OID__NR + 1] = {\n' 119 | +fi 120 | +for i do 121 | + printf '\t[OID_%s] = %u,\n' "${i%%:*}" "${i##*:}" 122 | +done 123 | +printf '\t[OID__NR] = %u\n};\n\n' "$total_length" 124 | 125 | # 126 | -# Encode the OIDs 127 | +# Encode the OIDs and emit the OID data 128 | # 129 | -my @encoded_oids = (); 130 | +printf 'static const unsigned char oid_data[%u] = {\n' "$total_length" 131 | +for i do 132 | + IFS='.' j=0 i="${i%:*}" 133 | + for c in ${i##*:}; do 134 | + case "$((j += 1))" in 135 | + 1) o="$((c * 40))";; 136 | + 2) : "$((o += c))";; 137 | + *) 138 | + # Base128 encode the number 139 | + tmp="$((c ? $(awk "BEGIN{print int(log($c)/log(2)/7)+1}") : 1))" 140 | + while [ "$((tmp -= 1))" -gt 0 ]; do 141 | + o="$o.$((c >> tmp * 7 & 127 | 128))" 142 | + done 143 | + o="$o.$((c & 127))" 144 | + esac 145 | + done 146 | 147 | -for (my $i = 0; $i <= $#names; $i++) { 148 | - my @octets = (); 149 | + set -- "$@" "${i%:*}:$o" 150 | + shift 151 | 152 | - my @components = split(/[.]/, $oids[$i]); 153 | + printf '\t' 154 | + printf '%s, ' $o 155 | + printf '\t// %s\n' "${i%:*}" 156 | +done 157 | +printf '};\n\n' 158 | 159 | - push @octets, $components[0] * 40 + $components[1]; 160 | +printf 'static const struct {\n\tunsigned char hash;\n' 161 | +printf '\tenum OID oid : %u;\n} oid_search_table[OID__NR] = {' \ 162 | + "$(($# <= 255 ? 8 : 16))" 163 | 164 | - for (my $loop = 2; $loop <= $#components; $loop++) { 165 | - my $c = $components[$loop]; 166 | - 167 | - # Base128 encode the number 168 | - my $tmp = ($c == 0) ? 0 : int(log($c)/log(2)); 169 | - $tmp = int($tmp / 7); 170 | - 171 | - for (; $tmp > 0; $tmp--) { 172 | - push @octets, (($c >> $tmp * 7) & 0x7f) | 0x80; 173 | - } 174 | - push @octets, $c & 0x7f; 175 | - } 176 | - 177 | - push @encoded_oids, \@octets; 178 | -} 179 | - 180 | # 181 | -# Create a hash value for each OID 182 | +# Create a hash value for each OID and build and emit the search index and hash 183 | +# value table (ordered by length then hash then content) 184 | # 185 | -my @hash_values = (); 186 | -for (my $i = 0; $i <= $#names; $i++) { 187 | - my @octets = @{$encoded_oids[$i]}; 188 | - 189 | - my $hash = $#octets; 190 | - foreach (@octets) { 191 | - $hash += $_ * 33; 192 | - } 193 | - 194 | - $hash = ($hash >> 24) ^ ($hash >> 16) ^ ($hash >> 8) ^ ($hash); 195 | - 196 | - push @hash_values, $hash & 0xff; 197 | -} 198 | - 199 | -# 200 | -# Emit the OID data 201 | -# 202 | -print C_FILE "\n"; 203 | -print C_FILE "static const unsigned char oid_data[", $total_length, "] = {\n"; 204 | -for (my $i = 0; $i <= $#names; $i++) { 205 | - my @octets = @{$encoded_oids[$i]}; 206 | - print C_FILE "\t"; 207 | - print C_FILE $_, ", " foreach (@octets); 208 | - print C_FILE "\t// ", $names[$i]; 209 | - print C_FILE "\n"; 210 | -} 211 | -print C_FILE "};\n"; 212 | - 213 | -# 214 | -# Build the search index table (ordered by length then hash then content) 215 | -# 216 | -my @index_table = ( 0 .. $#names ); 217 | - 218 | -@index_table = sort { 219 | - my @octets_a = @{$encoded_oids[$a]}; 220 | - my @octets_b = @{$encoded_oids[$b]}; 221 | - 222 | - return $hash_values[$a] <=> $hash_values[$b] 223 | - if ($hash_values[$a] != $hash_values[$b]); 224 | - return $#octets_a <=> $#octets_b 225 | - if ($#octets_a != $#octets_b); 226 | - for (my $i = $#octets_a; $i >= 0; $i--) { 227 | - return $octets_a[$i] <=> $octets_b[$i] 228 | - if ($octets_a[$i] != $octets_b[$i]); 229 | - } 230 | - return 0; 231 | - 232 | -} @index_table; 233 | - 234 | -# 235 | -# Emit the search index and hash value table 236 | -# 237 | -print C_FILE "\n"; 238 | -print C_FILE "static const struct {\n"; 239 | -print C_FILE "\tunsigned char hash;\n"; 240 | -if ($#names <= 255) { 241 | - print C_FILE "\tenum OID oid : 8;\n"; 242 | -} else { 243 | - print C_FILE "\tenum OID oid : 16;\n"; 244 | -} 245 | -print C_FILE "} oid_search_table[OID__NR] = {\n"; 246 | -for (my $i = 0; $i <= $#names; $i++) { 247 | - my @octets = @{$encoded_oids[$index_table[$i]]}; 248 | - printf(C_FILE "\t[%3u] = { %3u, OID_%-35s }, // ", 249 | - $i, 250 | - $hash_values[$index_table[$i]], 251 | - $names[$index_table[$i]]); 252 | - printf C_FILE "%02x", $_ foreach (@octets); 253 | - print C_FILE "\n"; 254 | -} 255 | -print C_FILE "};\n"; 256 | - 257 | -# 258 | -# Emit the OID debugging name table 259 | -# 260 | -#print C_FILE "\n"; 261 | -#print C_FILE "const char *const oid_name_table[OID__NR + 1] = {\n"; 262 | -# 263 | -#for (my $i = 0; $i <= $#names; $i++) { 264 | -# print C_FILE "\t\"", $names[$i], "\",\n" 265 | -#} 266 | -#print C_FILE "\t\"Unknown-OID\"\n"; 267 | -#print C_FILE "};\n"; 268 | - 269 | -# 270 | -# Polish off 271 | -# 272 | -close C_FILE or die; 273 | +i=-1 274 | +for j do 275 | + IFS='.' 276 | + # shellcheck disable=SC2086 277 | + count="$(set -- ${j##*:}; printf '%u' "$(($# - 1))")" 278 | + hash="$count" 279 | + set -- # use as array for reversing octet set 280 | + for k in ${j##*:}; do 281 | + : "$((hash += k * 33))" 282 | + set -- "$k" "$@" 283 | + done 284 | + hash="$((hash >> 24 ^ hash >> 16 ^ hash >> 8 ^ hash & 255))" 285 | + IFS=':' 286 | + printf '%u:%s:%s:%u:%s\n' "$hash" "${j##*:}" "${j%%:*}" "$count" "$*" 287 | +done | sort -nt: -k1,1 -k4,4 -k5 | while IFS=':' read -r num octets name _; do 288 | + printf '\n\t[%3u] = { %3u, OID_%-35s }, // ' "$((i += 1))" "$num" "$name" 289 | + # shellcheck disable=SC2086 290 | + printf '%02x' $octets 291 | +done 292 | +printf '\n};\n' 293 | -------------------------------------------------------------------------------- /kernel/thinkpad.txt: -------------------------------------------------------------------------------- 1 | Kernel configuration for IBM ThinkPad 2 | ________________________________________________________________________________ 3 | 4 | 5 | X230 6 | ________________________________________________________________________________ 7 | 8 | A defconfig is sufficent for the machine to boot. Sound and WIFI must be manu- 9 | ally enabled. A firmware blob for INTEL Centrino Advanced-N 6205 is necessary. 10 | It can be found in the root directory of the proprietary kernel firmware. Think- 11 | Pad specific ACPI options _can_ be enabled. 12 | 13 | +------------------------------------------------------------------------------+ 14 | | | 15 | | $ make defconfig | 16 | | $ cp iwlwifi-6000g2a-6.ucode /usr/lib/firmware | 17 | | | 18 | +------------------------------------------------------------------------------+ 19 | 20 | +------------------------------------------------------------------------------+ 21 | | .config | 22 | +------------------------------------------------------------------------------+ 23 | | | 24 | | CONFIG_IWLWIFI=y | 25 | | CONFIG_IWLDVM=y | 26 | | CONFIG_EXTRA_FIRMWARE="iwlwifi-6000g2a-6.ucode" | 27 | | CONFIG_EXTRA_FIRMWARE_DIR="/usr/lib/firmware" | 28 | | CONFIG_SND_HDA_CODEC_REALTEK=y | 29 | | CONFIG_THINKPAD_ACPI=y | 30 | | | 31 | +------------------------------------------------------------------------------+ 32 | -------------------------------------------------------------------------------- /kiss/index.txt: -------------------------------------------------------------------------------- 1 | KISS 2 | ________________________________________________________________________________ 3 | 4 | - @/style-guide 5 | -------------------------------------------------------------------------------- /kiss/style-guide.txt: -------------------------------------------------------------------------------- 1 | PACKAGE STYLE GUIDE 2 | ________________________________________________________________________________ 3 | 4 | This document is a style guide which will double as documentation for a possible 5 | package linter in the future. Every package in the Official Repositories and the 6 | Community repository adheres to this style guide. 7 | 8 | NOTE: Exceptions are made where it makes sense. 9 | 10 | 11 | MAINTAINERSHIP 12 | ________________________________________________________________________________ 13 | 14 | * Each package has a set maintainer stored via git commits. Use 'git log' or 15 | 'kiss-maintainer pkg' to find the maintainer's contact information. 16 | 17 | * Only the maintainer of a package has the ability to make changes to said 18 | package. Any pull requests by a non-maintainer for a package will be closed. 19 | 20 | * If you would like to make a change to an existing package, contact the 21 | maintainer and they will do so on your behalf. 22 | 23 | * If the maintainer leaves a package out of date and does not respond in a 24 | reasonable time frame, the package will be orphaned and up for grabs. 25 | 26 | * If no one steps forward to adopt an orphaned package, it will be dropped from 27 | the repositories. 28 | 29 | 30 | GENERAL 31 | ________________________________________________________________________________ 32 | 33 | 34 | [0000]---------------------------------------------------------------------- 35 | 36 | Package is not suitable for inclusion in the Community repository. The same 37 | rules above may apply to other software at the discretion of the BDFL. 38 | 39 | Examples: dbus, systemd, polkit, gettext, intltool, pulseaudio, pipewire, 40 | pam, wayland, logind, ConsoleKit, libsn, electron and all 41 | Desktop Environments. 42 | 43 | 44 | [0001]---------------------------------------------------------------------- 45 | 46 | No new packages shall use GTK2 as it will be removed once Firefox drops it 47 | as a dependency. 48 | 49 | 50 | [0002]---------------------------------------------------------------------- 51 | 52 | No new packages shall use Python 2 as it will be removed once Firefox drops 53 | it as a dependency. 54 | 55 | 56 | [0003]---------------------------------------------------------------------- 57 | 58 | Packages which are binaries should contain the suffix '-bin' to reflect 59 | this fact. Similarly, packages which pull from git should contain the 60 | suffix '-git'. The version of git packages should also be set to 'git'. 61 | 62 | 63 | 64 | BUILD 65 | ________________________________________________________________________________ 66 | 67 | 68 | [0200]---------------------------------------------------------------------- 69 | 70 | This guide should be used alongside shellcheck and not in place of it. 71 | 72 | 73 | [0201]---------------------------------------------------------------------- 74 | 75 | All shell code must pass the shellcheck linter. Any false-positives or 76 | intended behavior must have a rationale attached with the exclusion. 77 | 78 | # Disable warning as CFLAGS must work this way. 79 | # shellcheck disable=2086 80 | "${CC:-cc}" $CFLAGS ... 81 | 82 | 83 | [0202]---------------------------------------------------------------------- 84 | 85 | Use 4 spaces for indentation. 86 | 87 | 88 | [0203]---------------------------------------------------------------------- 89 | 90 | Lines should not exceed 80 characters in length. 91 | 92 | 93 | [0204]---------------------------------------------------------------------- 94 | 95 | All packages must use the POSIX shell shebang with '-e' to exit on error. 96 | Additionally, '-ef' can be used if word-splitting is required. 97 | 98 | There must also be a blank line directly below the shebang. 99 | 100 | #!/bin/sh -e 101 | 102 | # Code starts here. 103 | 104 | 105 | [0205]---------------------------------------------------------------------- 106 | 107 | All comments must start with a capital letter and use proper spelling, 108 | grammar and punctuation. 109 | 110 | # This is a comment. 111 | 112 | 113 | [0206]---------------------------------------------------------------------- 114 | 115 | Leave comments to explain *why* the code is needed and not *what* it does. 116 | 117 | Bad: 118 | 119 | # Create a directory. 120 | mkdir -p "$1/usr/bin" 121 | 122 | Good: 123 | 124 | # 'make install' doesn't create the directory. 125 | mkdir -p "$1/usr/bin" 126 | 127 | 128 | [0207]---------------------------------------------------------------------- 129 | 130 | Avoid adding braces around variables if unneeded. 131 | 132 | Bad: printf '%s\n' "${var}" 133 | Good: printf '%s\n' "$var" 134 | Good: printf '%s\n' "${var}.${var2}" 135 | 136 | 137 | [0208]---------------------------------------------------------------------- 138 | 139 | Avoid quotes when unneeded. 140 | 141 | Bad: [ "$var" = "test" ] 142 | Good: [ "$var" = test ] 143 | 144 | Bad: install -Dm755 "file" "$1/usr/bin/file" 145 | Good: install -Dm755 file "$1/usr/bin/file" 146 | 147 | 148 | [0209]---------------------------------------------------------------------- 149 | 150 | Quote entire strings instead of variables. 151 | 152 | Bad: install -Dm644 cat "$1"/usr/bin/cat 153 | Good: install -Dm644 cat "$1/usr/bin/cat" 154 | 155 | 156 | [0210]---------------------------------------------------------------------- 157 | 158 | Align arguments in blocks of command calls. 159 | 160 | Bad: 161 | 162 | install -D file.h "$1/usr/include/file.h" 163 | install -D libfile.so "$1/usr/lib/libfile.so" 164 | 165 | Good: 166 | 167 | install -D file.h "$1/usr/include/file.h" 168 | install -D libfile.so "$1/usr/lib/libfile.so" 169 | 170 | 171 | [0211]---------------------------------------------------------------------- 172 | 173 | Use 'install' instead of ... 174 | 175 | Bad: 176 | 177 | mkdir -p "$1/usr/bin" 178 | cp ls "$1/usr/bin/" 179 | 180 | Good: 181 | 182 | install -Dm755 ls "$1/usr/bin/ls" 183 | 184 | 185 | [0212]---------------------------------------------------------------------- 186 | 187 | Prefer $CC to ... 188 | 189 | Bad: gcc -o file file.c 190 | Good: "${CC:-cc}" -o file file.c 191 | 192 | 193 | [0213]---------------------------------------------------------------------- 194 | 195 | Always use '-p' with 'mkdir'. 196 | 197 | 198 | 199 | GNU AUTOTOOLS 200 | ________________________________________________________________________________ 201 | 202 | 203 | [0400]---------------------------------------------------------------------- 204 | 205 | Use the following style: 206 | 207 | ./configure \ 208 | --prefix=/usr \ 209 | --more_args_here 210 | 211 | make 212 | make DESTDIR="$1" install 213 | 214 | 215 | [0401]---------------------------------------------------------------------- 216 | 217 | Avoid running ./autogen.sh, autoreconf or similar tools prior to starting 218 | the build process. If there are no pre-generated configure or Makefiles, an 219 | alternate source must be sought. 220 | 221 | An exception can be made for packages in which no such source exists. If 222 | autogen.sh or autoreconf are required, prefer autoreconf. 223 | 224 | 225 | 226 | MESON 227 | ________________________________________________________________________________ 228 | 229 | 230 | [0600]---------------------------------------------------------------------- 231 | 232 | Use the following style: 233 | 234 | export DESTDIR="$1" 235 | 236 | meson \ 237 | --prefix=/usr \ 238 | -Dexample=false \ 239 | . output 240 | 241 | ninja -C output 242 | ninja -C output install 243 | 244 | 245 | 246 | CMAKE 247 | ________________________________________________________________________________ 248 | 249 | 250 | [0800]---------------------------------------------------------------------- 251 | 252 | Use the following style: 253 | 254 | export DESTDIR="$1" 255 | 256 | cmake -B build \ 257 | -DCMAKE_INSTALL_PREFIX=/usr \ 258 | -DFLAG=1 259 | 260 | cmake --build build 261 | cmake --install build 262 | 263 | 264 | 265 | MAKE 266 | ________________________________________________________________________________ 267 | 268 | 269 | [1000]---------------------------------------------------------------------- 270 | 271 | Use one of the following style when applicable: 272 | 273 | make 274 | make DESTDIR="$1" PREFIX=/usr install 275 | 276 | 277 | make PREFIX=/usr 278 | make DESTDIR="$1" install 279 | 280 | 281 | make PREFIX=/usr 282 | make DESTDIR="$1" PREFIX=/usr install 283 | 284 | 285 | For packages which require a few variables be set, prefer this style. 286 | 287 | make \ 288 | PREFIX=/usr \ 289 | SBINDIR=/usr/bin \ 290 | OPT="$CFLAGS" 291 | 292 | make \ 293 | DESTDIR="$1" \ 294 | PREFIX=/usr \ 295 | install 296 | 297 | 298 | For packages which require the variables be set for all calls to make, 299 | prefer this style. 300 | 301 | mk() { 302 | make \ 303 | PREFIX=/usr \ 304 | DESTDIR="$1" \ 305 | EXAMPLE=1 \ 306 | "$@" 307 | } 308 | 309 | mk 310 | mk install 311 | 312 | 313 | 314 | RUST 315 | ________________________________________________________________________________ 316 | 317 | 318 | [1050]---------------------------------------------------------------------- 319 | 320 | Use the following style: 321 | 322 | cargo build --release 323 | 324 | install -Dm755 target/release/rg "$1/usr/bin/rg" 325 | 326 | 327 | 328 | GO 329 | ________________________________________________________________________________ 330 | 331 | 332 | [1100]---------------------------------------------------------------------- 333 | 334 | Use the following style: 335 | 336 | export GOPATH="$PWD/go" 337 | export GO111MODULE=on 338 | 339 | go build \ 340 | -modcacherw \ 341 | -trimpath 342 | 343 | install -Dm755 lazygit "$1/usr/bin/lazygit" 344 | 345 | 346 | 347 | PYTHON 348 | ________________________________________________________________________________ 349 | 350 | 351 | [1150]---------------------------------------------------------------------- 352 | 353 | Use the following style: 354 | 355 | python setup.py build 356 | python setup.py install --prefix=/usr --root="$1" 357 | 358 | 359 | 360 | DEPENDS 361 | ________________________________________________________________________________ 362 | 363 | 364 | [1201]---------------------------------------------------------------------- 365 | 366 | This dependency is unneeded and can be removed. 367 | 368 | 369 | [1202]---------------------------------------------------------------------- 370 | 371 | This dependency is implicit. Some packages are assumed to always be 372 | available. This dependency can be removed. 373 | 374 | Examples: gcc, make, musl. 375 | 376 | 377 | [1203]---------------------------------------------------------------------- 378 | 379 | This dependency needs 'make' as it is only required during build time. 380 | 381 | Common Examples: autoconf, automake, cmake, meson. 382 | 383 | 384 | [1204]---------------------------------------------------------------------- 385 | 386 | This dependency doesn't need 'make' as it is required during runtime. 387 | 388 | 389 | [1205]---------------------------------------------------------------------- 390 | 391 | The depends list must be sorted. 392 | 393 | 394 | [1206]---------------------------------------------------------------------- 395 | 396 | The depends file is empty and should be removed. 397 | 398 | 399 | 400 | SOURCES 401 | ________________________________________________________________________________ 402 | 403 | 404 | [1401]---------------------------------------------------------------------- 405 | 406 | Use a HTTPS source if at all possible. 407 | 408 | 409 | [1402]---------------------------------------------------------------------- 410 | 411 | Don't specify patches remotely. Store them as a part of the package's 412 | repository files. 413 | 414 | Bad: https://example.com/fix-build.patch 415 | Good: patches/fix-build.patch 416 | 417 | 418 | [1403]---------------------------------------------------------------------- 419 | 420 | Don't use a git repository in place of a release tarball unless it makes 421 | sense to do so. 422 | 423 | 424 | [1404]---------------------------------------------------------------------- 425 | 426 | Drop www. and .git from all sources if possible. 427 | 428 | 429 | 430 | VERSION 431 | ________________________________________________________________________________ 432 | 433 | 434 | [1601]---------------------------------------------------------------------- 435 | 436 | Version doesn't match upstream. 437 | 438 | 439 | [1602]---------------------------------------------------------------------- 440 | 441 | Use 'git' in place of '9999'. 442 | 443 | 444 | [1603]---------------------------------------------------------------------- 445 | 446 | Missing relative version number. 447 | 448 | Bad: 1.0.0 449 | Good: 1.0.0 1 450 | 451 | 452 | 453 | PATCHES 454 | ________________________________________________________________________________ 455 | 456 | 457 | [1800]---------------------------------------------------------------------- 458 | 459 | Use the following style: 460 | 461 | patch -p1 < patch.patch 462 | 463 | # If there is more than one patch. 464 | for patch in *.patch; do 465 | patch -p1 < "$patch" 466 | done 467 | 468 | 469 | [1801]---------------------------------------------------------------------- 470 | 471 | All patches should use the same strip amount. If this is not possible, 472 | modify the patches. Strip amount is controlled by the -p flag. 473 | -------------------------------------------------------------------------------- /software/acpid.txt: -------------------------------------------------------------------------------- 1 | ACPID 2 | ________________________________________________________________________________ 3 | 4 | Acpid is a daemon that executes certain actions whenever ACPI events are 5 | received. Depending on your hardware and kernel configuration, these events 6 | include closing a laptop lid, connecting to an AC power adapter, pressing 7 | buttons and more. 8 | 9 | 10 | Index 11 | ________________________________________________________________________________ 12 | 13 | - Usage [0.0] 14 | - Kernel Setup [1.0] 15 | - Busybox acpid [2.0] 16 | - acpid2 [3.0] 17 | 18 | 19 | [0.0] Usage 20 | ________________________________________________________________________________ 21 | 22 | KISS Linux offers two options for acpid management: busybox acpid, which is 23 | installed by default, and acpid2 [1], which can be installed with the acpid 24 | package. To use either version of acpid, you will need to enable a few kernel 25 | options and enable the acpid service. See @/init/busybox. 26 | 27 | 28 | [1.0] Kernel Setup 29 | ________________________________________________________________________________ 30 | 31 | ACPI-related kernel drivers must be enabled for acpid to function properly. In 32 | menuconfig, these options are found under Power management and ACPI options 33 | > Power Management support > ACPI support. Most of the drivers are 34 | self-explanatory, but the following notable options can be safely disabled: 35 | 36 | +------------------------------------------------------------------------------+ 37 | | | 38 | | CONFIG_ACPI_PROCFS_POWER This option is deprecated | 39 | | CONFIG_ACPI_EC_DEBUGFS Potentially interferes with reboot | 40 | | CONFIG_ACPI_TABLE_UPGRADE KISS does not use an initrd by default | 41 | | CONFIG_ACPI_DEBUG Adds 50k to kernel size | 42 | | CONFIG_ACPI_PCI_SLOT Usually unnecessary | 43 | | CONFIG_ACPI_CUSTOM_METHOD Potential security flaw | 44 | | | 45 | +------------------------------------------------------------------------------+ 46 | 47 | 48 | [2.0] Busybox acpid 49 | ________________________________________________________________________________ 50 | 51 | When events are received, acpid checks /etc/acpi.map for a matching event and 52 | /etc/acpid.conf for a corresponding handler script in /etc/acpi/ to execute. 53 | 54 | Create the files below to suspend your laptop whenever the lid is closed: 55 | 56 | +------------------------------------------------------------------------------+ 57 | | /etc/acpi.map | 58 | +------------------------------------------------------------------------------+ 59 | | | 60 | | EV_SW 0x05 SW_LID 0 1 button/lid LID0 00000080 | 61 | | | 62 | +------------------------------------------------------------------------------+ 63 | | /etc/acpid.conf | 64 | +------------------------------------------------------------------------------+ 65 | | | 66 | | LID0 LID/00000080 | 67 | | | 68 | +------------------------------------------------------------------------------+ 69 | | /etc/acpi/LID/00000080 | 70 | +------------------------------------------------------------------------------+ 71 | | | 72 | | #!/bin/sh | 73 | | | 74 | | printf mem > /sys/power/state | 75 | | | 76 | +------------------------------------------------------------------------------+ 77 | 78 | Each line in /etc/acpi.map has six space-delimited fields: 79 | 1. Type name (EV_SW), 80 | 2. Type numerical value (0x05) 81 | 3. Keycode name (SW_LID) 82 | 4. Keycode numerical value (0) 83 | 5. Value (1) 84 | 6. Description (button/lid LID0 00000080) 85 | 86 | Event types and keycodes are listed in /usr/include/linux/input-event-codes.h. 87 | For example, a keyboard WLAN button event would use EV_KEY 0x05 and KEY_WLAN 88 | 238. The event value should be 1 and the event description can be any string 89 | potentially including spaces. 90 | 91 | Each line in /etc/acpid.conf has a key (LID0) and an action (LID/00000080). The 92 | key is any unique substring of the event description in /etc/acpi.map and the 93 | action is the relative path to an executable script in /etc/acpi/. 94 | 95 | To see if a configured event is received, check /var/log/acpid.log for output 96 | lines that list the path of your handler scripts. 97 | 98 | 99 | [3.0] acpid2 100 | ________________________________________________________________________________ 101 | 102 | acpid2 is a more user-friendly version of acpid that avoids the tedious process 103 | of mapping events with flexible configuration and better documentation. The 104 | acpid package also installs acpi_listen which prints events as they occur. For 105 | example, pressing the volume mute button will print something like this: 106 | 107 | +------------------------------------------------------------------------------+ 108 | | | 109 | | button/mute MUTE 00000080 00000000 K | 110 | | | 111 | +------------------------------------------------------------------------------+ 112 | 113 | When events are received, acpid2 checks files in /etc/acpi/event/ for a matching 114 | event and a corresponding handler script to execute. Create the following files 115 | to handle the mute button event by toggling the Master audio channel: 116 | 117 | +------------------------------------------------------------------------------+ 118 | | /etc/acpi/event/anything | 119 | +------------------------------------------------------------------------------+ 120 | | | 121 | | event=.* | 122 | | action=/etc/acpi/handler.sh %e | 123 | | | 124 | +------------------------------------------------------------------------------+ 125 | | /etc/acpi/handler.sh | 126 | +------------------------------------------------------------------------------+ 127 | | | 128 | | #!/bin/sh | 129 | | | 130 | | case $1 in | 131 | | button/mute) | 132 | | amixer sset Master toggle | 133 | | ;; | 134 | | esac | 135 | | | 136 | +------------------------------------------------------------------------------+ 137 | 138 | Files in /etc/acpi/event/ match events using event=REGEX with an action to 139 | execute. In this example, .* matches all events and the action executes 140 | /etc/acpi/handler.sh. The argument %e expands to five event parameters: 141 | $1=button/mute, $2=MUTE, $3=00000080, $4=00000000, $5=K. The event parameters 142 | provide an easy way to handle all events in a single script instead of the more 143 | complex multi-file system used by busybox. 144 | 145 | 146 | References 147 | ________________________________________________________________________________ 148 | 149 | [0] https://sourceforge.net/projects/acpid2 150 | -------------------------------------------------------------------------------- /software/alsa-utils.txt: -------------------------------------------------------------------------------- 1 | ALSA-UTILS [0] 2 | ________________________________________________________________________________ 3 | 4 | The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI 5 | functionality to the Linux operating system. 6 | 7 | 8 | Configuration 9 | ________________________________________________________________________________ 10 | 11 | First verify that you have alsa-utils installed: 12 | 13 | +------------------------------------------------------------------------------+ 14 | | | 15 | | $ kiss b alsa-utils | 16 | | | 17 | +------------------------------------------------------------------------------+ 18 | 19 | By default, ALSA routes audio to card "0" and device "0" (see /etc/asound.conf 20 | file), which may not be preferred. Luckily, we can change this behavior via 21 | local user configuration: 22 | 23 | +------------------------------------------------------------------------------+ 24 | | ~/.asoundrc, simple example | 25 | +------------------------------------------------------------------------------+ 26 | | | 27 | | defaults.pcm!card 1 | 28 | | defaults.pcm.!device 7 | 29 | | | 30 | +------------------------------------------------------------------------------+ 31 | 32 | In the example, the numeric device name is specified. When multiple sound cards 33 | are in use, the device numbers could be reordered across boots, such that using 34 | a descriptive device name is preferred. 35 | 36 | You can then test your local sound card configuration with the command below: 37 | 38 | +------------------------------------------------------------------------------+ 39 | | | 40 | | $ speaker-test -c 2 | 41 | | | 42 | +------------------------------------------------------------------------------+ 43 | 44 | Note: Replace the "2" to match the number of channels in your sound card. 45 | 46 | 47 | Tips and Tricks 48 | ________________________________________________________________________________ 49 | 50 | - Use the following command to obtain a list of available sound card and device 51 | numbers: 52 | 53 | +----------------------------------------------------------------------------+ 54 | | | 55 | | $ aplay -L | 56 | | | 57 | +----------------------------------------------------------------------------+ 58 | 59 | - A list of descriptive device names can be obtained with the following command: 60 | 61 | +----------------------------------------------------------------------------+ 62 | | | 63 | | $ cat /sys/class/sound/card*/id | 64 | | | 65 | +----------------------------------------------------------------------------+ 66 | 67 | - Use the following command to open an easy to use, terminal based alsa control interface: 68 | 69 | +----------------------------------------------------------------------------+ 70 | | | 71 | | $ alsamixer | 72 | | | 73 | +----------------------------------------------------------------------------+ 74 | 75 | - More "complex" .asoundrc configuration file examples can be found on the 76 | Gentoo Wiki [1] and Arch Linux Wiki [2]. 77 | 78 | 79 | References 80 | ________________________________________________________________________________ 81 | 82 | [0] https://www.alsa-project.org/wiki/Main_Page 83 | [1] https://wiki.gentoo.org/wiki/ALSA 84 | [2] https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture 85 | -------------------------------------------------------------------------------- /software/dhcpcd.txt: -------------------------------------------------------------------------------- 1 | DHCPCD [0] 2 | ________________________________________________________________________________ 3 | 4 | Dynamic Host Configuration Protocol Client Daemon is a popular DHCP client 5 | capable of handling both IPv4 and IPv6 configuration. 6 | 7 | 8 | Dynamic IP Configuration 9 | ________________________________________________________________________________ 10 | 11 | Begin by first verifying that you have dhcpcd installed: 12 | 13 | +------------------------------------------------------------------------------+ 14 | | | 15 | | $ kiss b dhcpcd | 16 | | | 17 | +------------------------------------------------------------------------------+ 18 | 19 | Once installed, dhcpcd can be used to automatically configure a network device 20 | interface: 21 | 22 | +------------------------------------------------------------------------------+ 23 | | | 24 | | $ dhcpcd INTERFACE | 25 | | | 26 | +------------------------------------------------------------------------------+ 27 | 28 | Remember to replace INTERFACE in the command above with the name of the device 29 | that you wish to configure. 30 | 31 | A network device's interface status can be inspected via ip-link: 32 | 33 | +------------------------------------------------------------------------------+ 34 | | | 35 | | $ ip link show dev INTERFACE | 36 | | | 37 | +------------------------------------------------------------------------------+ 38 | 39 | ip-link can also be used to enable or disable an interface: 40 | 41 | +------------------------------------------------------------------------------+ 42 | | | 43 | | $ ip link set INTERFACE down # disable the interface | 44 | | $ ip link set INTERFACE up # enable the interface | 45 | | | 46 | +------------------------------------------------------------------------------+ 47 | 48 | 49 | Static IP Configuration 50 | ________________________________________________________________________________ 51 | 52 | Continuing from the previous section, we can use ip-address to display the 53 | current DHCP address information: 54 | 55 | +------------------------------------------------------------------------------+ 56 | | | 57 | | $ ip address show | 58 | | | 59 | +------------------------------------------------------------------------------+ 60 | 61 | Using the output of the previous command, add the following lines to the 62 | /etc/dhcpcd.conf file using your preferred text editor: 63 | 64 | +------------------------------------------------------------------------------+ 65 | | | 66 | | interface INTERFACE | 67 | | static ip_address=STATIC_IP | 68 | | static routers=GATEWAY | 69 | | static domain_name_servers=DNS_SERVER | 70 | | | 71 | +------------------------------------------------------------------------------+ 72 | 73 | Remember to replace the INTERFACE, STATIC_IP, GATEWAY and DNS_SERVER in the 74 | block above with your own parameters. 75 | 76 | 77 | Hostname 78 | ________________________________________________________________________________ 79 | 80 | A system's hostname can be set by simply creating a /etc/hostname file: 81 | 82 | +------------------------------------------------------------------------------+ 83 | | | 84 | | $ echo "HOSTNAME" > /etc/hostname | 85 | | | 86 | +------------------------------------------------------------------------------+ 87 | 88 | Remember to replace HOSTNAME with the string of your choosing. 89 | 90 | Note: Valid characters for hostnames include ASCII letters from A to Z, digits 91 | from 0 to 9, and the hyphen character (-). A hostname may not start with 92 | a hyphen. 93 | 94 | 95 | Managed via runsv 96 | ________________________________________________________________________________ 97 | 98 | Busybox's runsv can be used to create a new managed service with the following 99 | command: 100 | 101 | +------------------------------------------------------------------------------+ 102 | | | 103 | | $ ln -s /etc/sv/dhcpcd/ /var/service | 104 | | | 105 | +------------------------------------------------------------------------------+ 106 | 107 | To start the new managed service, use the following command: 108 | 109 | +------------------------------------------------------------------------------+ 110 | | | 111 | | $ sv up dhcpcd | 112 | | | 113 | +------------------------------------------------------------------------------+ 114 | 115 | 116 | Tips and Tricks 117 | ________________________________________________________________________________ 118 | 119 | * A list of possible INTERFACE names can be obtained by running the following: 120 | 121 | +----------------------------------------------------------------------------+ 122 | | | 123 | | $ ls /sys/class/net | 124 | | | 125 | +----------------------------------------------------------------------------+ 126 | 127 | * The ping command can be used to verify connectivity with a network device 128 | interface: 129 | 130 | +----------------------------------------------------------------------------+ 131 | | | 132 | | $ ping www.google.com | 133 | | | 134 | +----------------------------------------------------------------------------+ 135 | 136 | * Some network administrators require that the hostname and domain name provided 137 | by the DHCP server is used by the system. In that case, pass the "-HD" switch: 138 | 139 | +----------------------------------------------------------------------------+ 140 | | | 141 | | $ dhcpcd -HD INTERFACE | 142 | | | 143 | +----------------------------------------------------------------------------+ 144 | 145 | * If you are not sure what to put in the STATIC_IP, GATEWAY and DNS_SERVER, you 146 | can use the following example for reference: 147 | 148 | +----------------------------------------------------------------------------+ 149 | | | 150 | | interface eth0 | 151 | | static ip_address=192.168.0.4/24 | 152 | | static routers=192.168.0.1 | 153 | | static domain_name_servers=192.168.0.1 | 154 | | | 155 | +----------------------------------------------------------------------------+ 156 | 157 | Notice the "/24" suffix, which is an abbreviation for the subnet mask 158 | 255.255.255.0. Also, GATEWAY and DNS_SERVER are the same in this example. 159 | 160 | 161 | References 162 | ________________________________________________________________________________ 163 | 164 | [0] https://github.com/rsmarples/dhcpcd 165 | [1] https://wiki.archlinux.org/index.php/Network_configuration 166 | [2] https://wiki.gentoo.org/wiki/Dhcpcd 167 | -------------------------------------------------------------------------------- /software/eiwd.txt: -------------------------------------------------------------------------------- 1 | EIWD [0] 2 | ________________________________________________________________________________ 3 | 4 | eiwd is iNet Wireless Daemon (iwd) without dbus. iNet Wireless Daemon aims to 5 | replace @/wpa_supplicant while providing the following benefits: 6 | 7 | * Simplification of network management. 8 | * Faster network discovery. 9 | * Fast and reliable roaming. 10 | * Use less system resources. 11 | * Use features offered by the linux kernel. 12 | * Support for enterprise security methods like EAP. 13 | * Support for kernel asymetric key rings and trusted platform modules (TPM). 14 | * Support for multiple clients. 15 | 16 | 17 | Configuration 18 | ________________________________________________________________________________ 19 | 20 | Ensure that you have the following dependencies installed: 21 | 22 | +------------------------------------------------------------------------------+ 23 | | | 24 | | $ kiss b eiwd | 25 | | $ kiss b openresolv | 26 | | | 27 | +------------------------------------------------------------------------------+ 28 | 29 | Create a new daemon configuration file: 30 | 31 | +------------------------------------------------------------------------------+ 32 | | | 33 | | $ mkdir -p /etc/iwd | 34 | | $ touch /etc/iwd/main.conf | 35 | | | 36 | +------------------------------------------------------------------------------+ 37 | 38 | Add the following lines to the main.conf file created above: 39 | 40 | +------------------------------------------------------------------------------+ 41 | | | 42 | | [General] | 43 | | EnableNetworkConfiguration=true | 44 | | | 45 | | [Network] | 46 | | RoutePriorityOffset=200 | 47 | | NameResolvingService=resolvconf | 48 | | | 49 | +------------------------------------------------------------------------------+ 50 | 51 | 52 | Service management with sv 53 | ________________________________________________________________________________ 54 | 55 | Busybox's runsv can be used to create a new managed service with the following 56 | command: 57 | 58 | +------------------------------------------------------------------------------+ 59 | | | 60 | | $ ln -s /etc/sv/eiwd/ /var/service | 61 | | | 62 | +------------------------------------------------------------------------------+ 63 | 64 | To start the new managed service, use the following command: 65 | 66 | +------------------------------------------------------------------------------+ 67 | | | 68 | | $ sv up eiwd | 69 | | | 70 | +------------------------------------------------------------------------------+ 71 | 72 | 73 | Tips and Tricks 74 | ________________________________________________________________________________ 75 | 76 | * To prevent iwd from continuous scanning while not connected, add the following 77 | to your main.conf file: 78 | 79 | +----------------------------------------------------------------------------+ 80 | | | 81 | | [Scan] | 82 | | DisablePeriodicScan=true | 83 | | | 84 | +----------------------------------------------------------------------------+ 85 | 86 | * To prevent iwd from destroying / recreating wireless interfaces at startup, 87 | add the following to your main.conf file: 88 | 89 | +----------------------------------------------------------------------------+ 90 | | | 91 | | [General] | 92 | | UseDefaultInterface=true | 93 | | | 94 | +----------------------------------------------------------------------------+ 95 | 96 | * If iwd fails to start, check to make that you have the required kernel 97 | options: 98 | 99 | CONFIG_CRYPTO_USER_API_HASH 100 | CONFIG_CRYPTO_USER_API_SKCIPHER 101 | CONFIG_KEY_DH_OPERATIONS 102 | CONFIG_CRYPTO_ECB 103 | CONFIG_CRYPTO_MD5 104 | CONFIG_CRYPTO_CBC 105 | CONFIG_CRYPTO_SHA256 106 | CONFIG_CRYPTO_AES 107 | CONFIG_CRYPTO_DES 108 | CONFIG_CRYPTO_CMAC 109 | CONFIG_CRYPTO_HMAC 110 | CONFIG_CRYPTO_SHA512 111 | CONFIG_CRYPTO_ARC4 112 | CONFIG_CRYPTO_SHA1 113 | 114 | 115 | References 116 | ________________________________________________________________________________ 117 | 118 | [0] https://github.com/dylanaraps/eiwd 119 | [1] https://wiki.gentoo.org/wiki/Iwd 120 | [2] https://manpages.debian.org/testing/iwd/iwd.config.5.en.html 121 | -------------------------------------------------------------------------------- /software/firefox.txt: -------------------------------------------------------------------------------- 1 | FIREFOX 2 | ________________________________________________________________________________ 3 | 4 | Firefox is a free and open-source web browser developed by the Mozilla 5 | Foundation and its subsidiary, the Mozilla Corporation. 6 | 7 | 8 | Installation 9 | ________________________________________________________________________________ 10 | 11 | +------------------------------------------------------------------------------+ 12 | | | 13 | | $ kiss b firefox | 14 | | | 15 | +------------------------------------------------------------------------------+ 16 | | TIP: Additionally install firefox-privacy to further harden firefox. | 17 | +------------------------------------------------------------------------------+ 18 | | | 19 | | $ kiss b firefox-privacy | 20 | | | 21 | +------------------------------------------------------------------------------+ 22 | 23 | 24 | Runtime 25 | ________________________________________________________________________________ 26 | 27 | +------------------------------------------------------------------------------+ 28 | | An icon theme is required or things may not work correctly. | 29 | +------------------------------------------------------------------------------+ 30 | | | 31 | | $ kiss b hicolor-icon-theme | 32 | | $ kiss b adwaita-icon-theme | 33 | | | 34 | +------------------------------------------------------------------------------+ 35 | 36 | 37 | Wayland 38 | ________________________________________________________________________________ 39 | 40 | The following environment variable must be set for Firefox to work on Wayland. 41 | 42 | +------------------------------------------------------------------------------+ 43 | | .shellrc or .profile | 44 | +------------------------------------------------------------------------------+ 45 | | | 46 | | export MOZ_ENABLE_WAYLAND=1 | 47 | | | 48 | +------------------------------------------------------------------------------+ 49 | 50 | 51 | VAAPI 52 | ________________________________________________________________________________ 53 | 54 | For VAAPI to work the following about:config options must be set. 55 | 56 | +------------------------------------------------------------------------------+ 57 | | about:config | 58 | +------------------------------------------------------------------------------+ 59 | | | 60 | | gfx.webrender.all=true | 61 | | media.av1.enabled=false | 62 | | media.ffmpeg.dmabuf-textures.disabled=false | 63 | | media.ffmpeg.vaapi.enabled=true | 64 | | media.ffvpx.enabled=false | 65 | | | 66 | +------------------------------------------------------------------------------+ 67 | 68 | If using AMDGPU, the following kernel option must be enabled. [1] 69 | 70 | +------------------------------------------------------------------------------+ 71 | | .config | 72 | +------------------------------------------------------------------------------+ 73 | | | 74 | | CONFIG_CHECKPOINT_RESTORE=y | 75 | | | 76 | +------------------------------------------------------------------------------+ 77 | 78 | You may also need to set the following environment variable. 79 | 80 | +------------------------------------------------------------------------------+ 81 | | .shellrc or .profile | 82 | +------------------------------------------------------------------------------+ 83 | | | 84 | | export MOZ_WAYLAND_DRM_DEVICE=/dev/dri/renderD128 | 85 | | | 86 | +------------------------------------------------------------------------------+ 87 | 88 | 89 | References 90 | ________________________________________________________________________________ 91 | 92 | [1] https://lwn.net/Articles/845448/ 93 | 94 | -------------------------------------------------------------------------------- /software/git.txt: -------------------------------------------------------------------------------- 1 | GIT [0] 2 | ________________________________________________________________________________ 3 | 4 | Git is a free and open source distributed version control system designed to 5 | handle everything from small to very large projects with speed and efficiency. 6 | 7 | 8 | [0.0] Index 9 | ________________________________________________________________________________ 10 | 11 | - Git Commands [1.0] 12 | - Example 1: Staying Up-to-Date [2.0] 13 | - Example 2: Squashing Your Latest Commits Into One [3.0] 14 | - Example 3: Writing a new KISS Wiki article [4.0] 15 | - References [5.0] 16 | 17 | 18 | [1.0] Git Commands 19 | ________________________________________________________________________________ 20 | 21 | New KISS users may have various levels of exposure to git and other forms of 22 | version control systems. The following is intended to be a "quick" reference 23 | sheet of git commands. 24 | 25 | +-------------------+----------------------------------------------------------+ 26 | | Action | Command | 27 | +-------------------+----------------------------------------------------------+ 28 | | | | 29 | | Set Default | $ git config --global user.name "FIRSTNAME LASTNAME" | 30 | | Username | # stored in ~/.gitconfig | 31 | | | | 32 | | Set Default | $ git config --global user.email "EMAIL@EXAMPLE.COM" | 33 | | Email Address | # stored in ~/.gitconfig | 34 | | | | 35 | | Set Default | $ git config --global core.editor vim | 36 | | Text Editor | # stored in ~/.gitconfig | 37 | | | | 38 | | Store User | $ git config credential.helper store | 39 | | Credentials | # credentials saved in ~/.git-credentials | 40 | | | | 41 | | Clone Repo. | $ git clone GIT_URL | 42 | | | | 43 | | Clone Branch | $ git clone GIT_URL -b BRANCH_NAME | 44 | | | | 45 | | Repo. Status | $ git status | 46 | | | | 47 | | Add/Update | $ git add FILE_OR_PATH | 48 | | Project Files | | 49 | | | | 50 | | Apply a patch | $ git apply PATH_FILE | 51 | | | | 52 | | Remove | $ git add FILE_OR_PATH | 53 | | Project Files | | 54 | | | | 55 | | Checkout | $ git checkout BRANCH_NAME | 56 | | | # switch branches or restore working tree files | 57 | | | | 58 | | Commit | $ git commit | 59 | | | # records changes to the repository | 60 | | | | 61 | | Push | $ git push | 62 | | | # updates remote refs along with associated objects | 63 | | | | 64 | | Pull | $ git pull | 65 | | | # fetch and integrate with another repository/branch | 66 | | | | 67 | | Fetch | $ git fetch | 68 | | | # download objects and refs from another repository | 69 | | | | 70 | | Merge | $ git merge | 71 | | | # join two or more development histories together | 72 | | | | 73 | | Rebase | $ git rebase | 74 | | | # reapply commits on top of another base tip | 75 | | | | 76 | +-------------------+----------------------------------------------------------+ 77 | 78 | 79 | [2.0] Example 1: Staying Up-to-Date [1] 80 | ________________________________________________________________________________ 81 | 82 | In a standard setup, you generally have an origin and an upstream remote - the 83 | latter being the gatekeeper of the project or the source of truth to which you 84 | wish to contribute. 85 | 86 | First, verify that you have already setup a remote for the upstream repository, 87 | and hopefully an origin too: 88 | 89 | +------------------------------------------------------------------------------+ 90 | | | 91 | | $ git remote -v | 92 | | | 93 | +------------------------------------------------------------------------------+ 94 | 95 | If you don't have an upstream you can easily add it with the remote command: 96 | 97 | +------------------------------------------------------------------------------+ 98 | | | 99 | | $ git remote add upstream UPSTREAM_URL | 100 | | | 101 | +------------------------------------------------------------------------------+ 102 | 103 | Now you can collect the latest changes of the upstream repository with fetch. 104 | Repeat this every time you want to get updates: 105 | 106 | +------------------------------------------------------------------------------+ 107 | | | 108 | | $ git fetch upstream | 109 | | | 110 | +------------------------------------------------------------------------------+ 111 | 112 | Generally, you want to keep your local master branch as a close mirror of the 113 | upstream master and execute any work in feature branches, as they might later 114 | become pull requests. 115 | 116 | At this point, it does not matter if you use merge or rebase, as the result 117 | will typically be the same. Let's use merge: 118 | 119 | +------------------------------------------------------------------------------+ 120 | | | 121 | | $ git checkout master | 122 | | $ git merge upstream/master | 123 | | | 124 | +------------------------------------------------------------------------------+ 125 | 126 | 127 | [3.0] Example 2: Squashing Your Latest Commits Into One [2] 128 | ________________________________________________________________________________ 129 | 130 | With git it’s possible to squash previous commits into one. This is a great way 131 | to group certain changes together before sharing them with others. Let’s say 132 | this is your current git log: 133 | 134 | +------------------------------------------------------------------------------+ 135 | | | 136 | | * df71a27 - (HEAD feature_x) Updated CSS for new elements (4 minutes ago) | 137 | | * ba9dd9a - Added new elements to page design (15 minutes ago) | 138 | | * f392171 - Added new feature X (1 day ago) | 139 | | * d7322aa - (origin/feature_x) Proof of concept for feature X (3 days ago) | 140 | | | 141 | +------------------------------------------------------------------------------+ 142 | 143 | You have a branch “feature_x” here. You’ve already pushed d7322aa with the proof 144 | of concept of the new feature X. After that you’ve been working to add new 145 | element to the feature, including some changes in CSS. Now, you want to squash 146 | your last three commits in one to make your history look pretty. 147 | 148 | The command to accomplish that is: 149 | 150 | +------------------------------------------------------------------------------+ 151 | | | 152 | | $ git rebase -i HEAD~3 | 153 | | | 154 | +------------------------------------------------------------------------------+ 155 | 156 | This will open up your editor with the following: 157 | 158 | +------------------------------------------------------------------------------+ 159 | | | 160 | | pick f392171 Added new feature X | 161 | | pick ba9dd9a Added new elements to page design | 162 | | pick df71a27 Updated CSS for new elements | 163 | | | 164 | +------------------------------------------------------------------------------+ 165 | 166 | Now you can tell git what to do with each commit. Let’s keep the commit f392171, 167 | the one were we added our feature. We’ll squash the following two commits into 168 | the first one - leaving us with one clean commit with features X in it, 169 | including the added element and CSS. 170 | 171 | Change your file to this: 172 | 173 | +------------------------------------------------------------------------------+ 174 | | | 175 | | pick f392171 Added new feature X | 176 | | squash ba9dd9a Added new elements to page design | 177 | | squash df71a27 Updated CSS for new elements | 178 | | | 179 | +------------------------------------------------------------------------------+ 180 | 181 | When done, save and quit your editor. Git will now squash the commits into one. 182 | 183 | Note: Do not squash commits that you’ve already shared with others. You are 184 | changing history and it will cause trouble for others. 185 | 186 | 187 | [4.0] Example 3: Writing a new KISS Wiki article. 188 | ________________________________________________________________________________ 189 | 190 | Note: The method described below requires a GitHub user account. If you do not 191 | have a GitHub user account or do not wish to create one, you can still 192 | submit your articles or ideas directly to dylan.araps@gmail.com. 193 | 194 | Lets say you are interested in writing a new article for the KISS Wiki. The 195 | process is fairly straight forward! 196 | 197 | Begin by first creating a fork of the KISS Wiki repository. One way to do this 198 | is from a web browser by going to the https://github.com/kisslinux/wiki page, 199 | clicking the "Fork" button in the upper right corner of the page. Doing so 200 | should create a copy of the KISS Wiki repository on your user account (e.g. 201 | https://github.com/USERNAME/wiki). 202 | 203 | Clone the forked repository to your PC with the following command. Remember to 204 | replace USERNAME with your actual GitHub username. 205 | 206 | +------------------------------------------------------------------------------+ 207 | | | 208 | | $ git clone https://github.com/USERNAME/wiki.git | 209 | | | 210 | +------------------------------------------------------------------------------+ 211 | 212 | Once cloned to your PC, navigate to the wiki directory: 213 | 214 | +------------------------------------------------------------------------------+ 215 | | | 216 | | $ cd wiki | 217 | | | 218 | +------------------------------------------------------------------------------+ 219 | 220 | Add your new article in this directory per the #/wiki/help/adding-a-page 221 | guidelines. Once you are ready to publish your newly created article, you need 222 | to add/update your forked repository. From the main wiki directory, you can 223 | check the status of all changes or newly created files: 224 | 225 | +------------------------------------------------------------------------------+ 226 | | | 227 | | $ git status | 228 | | | 229 | +------------------------------------------------------------------------------+ 230 | 231 | Using the output of command above, update/add the new files your forked 232 | repository that are ready to be published: 233 | 234 | +------------------------------------------------------------------------------+ 235 | | | 236 | | $ git add FILE_NAME1 FILE_NAME | 237 | | | 238 | +------------------------------------------------------------------------------+ 239 | 240 | Alternatively, you can add ALL newly updated/created files in a single command: 241 | 242 | +------------------------------------------------------------------------------+ 243 | | | 244 | | $ git add * | 245 | | | 246 | +------------------------------------------------------------------------------+ 247 | 248 | Next, you will commit your changes. 249 | 250 | +------------------------------------------------------------------------------+ 251 | | | 252 | | $ git commit -m "YOUR_COMMIT_MSG" | 253 | | | 254 | +------------------------------------------------------------------------------+ 255 | 256 | Replace YOUR_COMMIT_MSG with a short description of change(s) or the new article 257 | (i.e. "git: new article" or "git: add new git example"). 258 | 259 | At this point you are ready to push your changes to the GitHub server with the 260 | following command. 261 | 262 | +------------------------------------------------------------------------------+ 263 | | | 264 | | $ git push | 265 | | | 266 | +------------------------------------------------------------------------------+ 267 | 268 | Upon doing so, you will be prompted to enter your GitHub user credentials. Once 269 | entered, the latest changes will be uploaded to your forked Wiki repository 270 | on GitHub. 271 | 272 | The last step is to initiate a Pull Request (PR). A PR can be initiated via a 273 | web browser by going to the https://github.com/USERNAME/wiki page and pressing 274 | the "New pull request" button near the top of the page. In the Title field, 275 | enter the reason for initiating a PR (i.e. "git: new article") and press the 276 | "Create pull request" button. 277 | 278 | Note: Pay attention to which branch is being merged into the master branch of 279 | the repository :kisslinux/wiki". 280 | 281 | 282 | [5.0] References 283 | ________________________________________________________________________________ 284 | 285 | [0] https://git-scm.com 286 | [1] https://www.atlassian.com/git/tutorials/git-forks-and-upstreams 287 | [2] https://www.devroom.io/2011/07/05/git-squash-your-latests-commits-into-one/ 288 | -------------------------------------------------------------------------------- /software/index.txt: -------------------------------------------------------------------------------- 1 | SOFTWARE 2 | ________________________________________________________________________________ 3 | 4 | - @/alsa-utils 5 | - @/acpid 6 | - @/dhcpcd 7 | - @/firefox 8 | - @/git 9 | - @/man-pages 10 | - @/opendoas 11 | - @/openssh 12 | - @/tzdata 13 | - @/vim 14 | - @/wpa_supplicant 15 | -------------------------------------------------------------------------------- /software/man-pages.txt: -------------------------------------------------------------------------------- 1 | MAN PAGES 2 | ________________________________________________________________________________ 3 | 4 | A man page (short for manual page) is a form of software documentation usually 5 | found on a Unix or Unix-like operating systems. Topics covered include computer 6 | programs (including library and system calls), formal standards and conventions, 7 | and even abstract concepts. A user may invoke a man page by issuing the man 8 | command. [0] 9 | 10 | 11 | The man utility 12 | ________________________________________________________________________________ 13 | 14 | The 'mandoc' [1] package is the default provider of the 'man' utility. 15 | 16 | +------------------------------------------------------------------------------+ 17 | | Install mandoc | 18 | +------------------------------------------------------------------------------+ 19 | | | 20 | | $ kiss b mandoc | 21 | | | 22 | +------------------------------------------------------------------------------+ 23 | 24 | By default, man typically uses a terminal pager program such as more or less to 25 | display its output. This can be configured via the $PAGER environment variable. 26 | 27 | 28 | Linux manuals 29 | ________________________________________________________________________________ 30 | 31 | The Linux man-pages project [2] documents the Linux kernel and C library 32 | interfaces that are employed by user-space programs. 33 | 34 | +------------------------------------------------------------------------------+ 35 | | Install man-pages | 36 | +------------------------------------------------------------------------------+ 37 | | | 38 | | $ kiss b man-pages | 39 | | | 40 | +------------------------------------------------------------------------------+ 41 | 42 | 43 | POSIX manuals 44 | ________________________________________________________________________________ 45 | 46 | These are pages from POSIX.1-2008, Technical Corrigendum 1. Since TC1 appeared 47 | in 2013, it is also known as POSIX.1-2013. The man pages contain descriptions of 48 | the headers, the utilities, and the functions documented in that standard. 49 | 50 | +------------------------------------------------------------------------------+ 51 | | Install man-pages-posix | 52 | +------------------------------------------------------------------------------+ 53 | | | 54 | | $ kiss b man-pages-posix | 55 | | | 56 | +------------------------------------------------------------------------------+ 57 | 58 | 59 | References 60 | ________________________________________________________________________________ 61 | 62 | [0] https://en.wikipedia.org/wiki/Man_page 63 | [1] https://mandoc.bsd.lv/ 64 | [2] https://kernel.org/doc/man-pages/ 65 | -------------------------------------------------------------------------------- /software/opendoas.txt: -------------------------------------------------------------------------------- 1 | OPENDOAS [0] 2 | ________________________________________________________________________________ 3 | 4 | doas is a minimal replacement for the venerable sudo. It was initially written 5 | by Ted Unangst of the OpenBSD project to provide 95% of the features of sudo 6 | with a fraction of the codebase. 7 | 8 | 9 | Configuration 10 | ________________________________________________________________________________ 11 | 12 | Begin by first verifying that you have opendoas installed: 13 | 14 | +------------------------------------------------------------------------------+ 15 | | | 16 | | $ kiss b opendoas | 17 | | | 18 | +------------------------------------------------------------------------------+ 19 | 20 | Using your preferred text editor, modify the /etc/doas.conf file. Within the 21 | doas.conf, there are plenty of examples of rules to choose from and modify. 22 | 23 | Below are a few examples of *basic* rules that could be set: 24 | 25 | +------------------------------------------------------------------------------+ 26 | | Allow a specific regular user, USER, to escalate to root permissions. | 27 | +------------------------------------------------------------------------------+ 28 | | | 29 | | permit USER | 30 | | | 31 | +------------------------------------------------------------------------------+ 32 | | Allow a specific group (i.e. "wheel") to escalate to root permissions. | 33 | +------------------------------------------------------------------------------+ 34 | | | 35 | | permit wheel | 36 | | | 37 | +------------------------------------------------------------------------------+ 38 | | You can also allow privilege escalation without a password. | 39 | +------------------------------------------------------------------------------+ 40 | | | 41 | | permit nopass [GROUP OR USER] | 42 | | | 43 | +------------------------------------------------------------------------------+ 44 | 45 | Refer to OpenBSD doas.conf manual page [1] for more information. 46 | 47 | 48 | References 49 | ________________________________________________________________________________ 50 | 51 | [0] https://github.com/Duncaen/OpenDoas 52 | [1] https://man.openbsd.org/doas.conf.5 53 | -------------------------------------------------------------------------------- /software/openssh.txt: -------------------------------------------------------------------------------- 1 | OPENSSH [0] 2 | ________________________________________________________________________________ 3 | 4 | OpenSSH (also known as OpenBSD Secure Shell) is a suite of secure networking 5 | utilities based on the Secure Shell (SSH) protocol, which provides a secure 6 | channel over an unsecured network in a client-server architecture. 7 | 8 | 9 | Remote Server Configuration 10 | ________________________________________________________________________________ 11 | 12 | Begin by first verifying that you have openssh installed on the remote server: 13 | 14 | +------------------------------------------------------------------------------+ 15 | | | 16 | | $ kiss b openssh | 17 | | | 18 | +------------------------------------------------------------------------------+ 19 | 20 | Using busybox's runsv, create a new managed service for the ssh daemon: 21 | 22 | +------------------------------------------------------------------------------+ 23 | | | 24 | | $ ln -s /etc/sv/sshd /var/service | 25 | | | 26 | +------------------------------------------------------------------------------+ 27 | 28 | At this point, you can either restart the remote server or manually start the 29 | SSH daemon: 30 | 31 | +------------------------------------------------------------------------------+ 32 | | | 33 | | $ sv up sshd | 34 | | | 35 | +------------------------------------------------------------------------------+ 36 | 37 | 38 | Client Authentication 39 | ________________________________________________________________________________ 40 | 41 | From an SSH client, use the following command to connect to the remote SSH 42 | server: 43 | 44 | +------------------------------------------------------------------------------+ 45 | | | 46 | | $ ssh USERNAME@SERVER | 47 | | | 48 | +------------------------------------------------------------------------------+ 49 | 50 | Replace USERNAME with the name of a regular user and SERVER with the hostname or 51 | IP address of the SSH remote server. Upon pressing return, you will also be 52 | prompted to enter the password of the regular user specified. 53 | 54 | 55 | Passwordless Authentication (Optional) 56 | ________________________________________________________________________________ 57 | 58 | Passwordless login to a remove server can be achieved by creating a key pair. 59 | From the SSH client, use the following command to generate the key: 60 | 61 | +------------------------------------------------------------------------------+ 62 | | | 63 | | $ ssh-keygen -t rsa | 64 | | | 65 | +------------------------------------------------------------------------------+ 66 | 67 | Copy the id_rsa.pub file generated from the previous step into the remote 68 | server's ~/.ssh/authorized_keys with the following command: 69 | 70 | +------------------------------------------------------------------------------+ 71 | | | 72 | | $ ssh-copy-id USERNAME@SERVER | 73 | | | 74 | +------------------------------------------------------------------------------+ 75 | 76 | Replace USERNAME with the name of a regular user and SERVER with the hostname or 77 | IP address of the SSH remote server. Upon pressing return, you will also be 78 | prompted to enter the password of the regular user specified. 79 | 80 | Verify that the key was copied to the remote server and passwordless login works 81 | by entering the following command from the previous section: 82 | 83 | +------------------------------------------------------------------------------+ 84 | | | 85 | | $ ssh USERNAME@SERVER | 86 | | | 87 | +------------------------------------------------------------------------------+ 88 | 89 | Once passwordless login has been verified, disable password authentication on 90 | the remote server: 91 | 92 | +------------------------------------------------------------------------------+ 93 | | | 94 | | $ echo "PasswordAuthentication no" >> /etc/ssh/sshd_config | 95 | | | 96 | +------------------------------------------------------------------------------+ 97 | 98 | 99 | Tips and Tricks 100 | ________________________________________________________________________________ 101 | 102 | * When connecting to an SSH server, there are three different levels of debug 103 | modes that can help with troubleshooting issues. Use the "-v" switch when 104 | connecting to print the debugging messages: 105 | 106 | +------------------------------------------------------------------------------+ 107 | | | 108 | | $ ssh USERNAME@SERVER -v | 109 | | $ ssh USERNAME@SERVER -vv | 110 | | $ ssh USERNAME@SERVER -vvv | 111 | | | 112 | +------------------------------------------------------------------------------+ 113 | 114 | 115 | troubleshooting 116 | ________________________________________________________________________________ 117 | 118 | * you can fix errors such as this one 119 | 120 | +------------------------------------------------------------------------------+ 121 | | | 122 | | top error: Error opening terminal: xterm-256color | 123 | | | 124 | +------------------------------------------------------------------------------+ 125 | 126 | By running this command in your ssh session 127 | 128 | +------------------------------------------------------------------------------+ 129 | | | 130 | | $ export TERM=xterm | 131 | | | 132 | +------------------------------------------------------------------------------+ 133 | 134 | References 135 | ________________________________________________________________________________ 136 | 137 | [0] https://www.openssh.com/openbsd.html 138 | [1] https://wiki.gentoo.org/wiki/SSH 139 | -------------------------------------------------------------------------------- /software/tzdata.txt: -------------------------------------------------------------------------------- 1 | TZDATA [0] 2 | ________________________________________________________________________________ 3 | 4 | The Time Zone Database (called tz, tzdb or zoneinfo) contains code and data that 5 | represent the history of local time for many representative locations around the 6 | globe. 7 | 8 | 9 | Configuration 10 | ________________________________________________________________________________ 11 | 12 | Begin by first verifying that you have tzdata installed: 13 | 14 | +------------------------------------------------------------------------------+ 15 | | | 16 | | $ kiss b tzdata | 17 | | | 18 | +------------------------------------------------------------------------------+ 19 | 20 | Look for the available timezones in /usr/share/zoneinfo/: 21 | 22 | +------------------------------------------------------------------------------+ 23 | | | 24 | | $ ls /usr/share/zoneinfo | 25 | | | 26 | +------------------------------------------------------------------------------+ 27 | 28 | Write your preferred timezone to the /etc/timezone file: 29 | 30 | +------------------------------------------------------------------------------+ 31 | | | 32 | | $ echo "TZ" > /etc/timezone | 33 | | | 34 | +------------------------------------------------------------------------------+ 35 | 36 | Remember to replace TZ with with your preferred timezone. For example, if I 37 | lived in the US Eastern timezone, I would replace TZ with "US/Eastern". 38 | 39 | Lastly, copy the preferred timezone file to /etc/localtime: 40 | 41 | +------------------------------------------------------------------------------+ 42 | | | 43 | | $ cp TZ_PATH /etc/localtime | 44 | | | 45 | +------------------------------------------------------------------------------+ 46 | 47 | Remember to replace TZ_PATH with with the complete timezone path. For the 48 | example given above, the complete TZ_PATH for "US/Eastern" would be 49 | "/usr/share/zoneinfo/US/Eastern". 50 | 51 | As an optional final step, remove the tzdata package. 52 | 53 | +------------------------------------------------------------------------------+ 54 | | | 55 | | $ kiss r tzdata | 56 | | | 57 | +------------------------------------------------------------------------------+ 58 | 59 | 60 | References 61 | ________________________________________________________________________________ 62 | 63 | [0] https://github.com/eggert/tz 64 | [1] https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Timezone 65 | [2] https://wiki.archlinux.org/index.php/System_time 66 | -------------------------------------------------------------------------------- /software/vim.txt: -------------------------------------------------------------------------------- 1 | VIM [0] 2 | ________________________________________________________________________________ 3 | 4 | Vim is an improved version of the good old UNIX editor, vi. Many new features 5 | have been added: multi-level undo, syntax highlighting, command line history, 6 | on-line help, spell checking, filename completion, block operations, script 7 | language, etc. There is also a Graphical User Interface (GUI) available. Still, 8 | vi compatibility is maintained, those who have vi "in the fingers" will feel at 9 | home. 10 | 11 | Configuration 12 | ________________________________________________________________________________ 13 | 14 | Vim configuration is stored in a local user's ~/.vimrc file. The contents of 15 | this file are based on the user's preferences. 16 | 17 | The following configuration is an example based on Sven Gucke's [1] published 18 | vim setup and modified to satisfy the KISS #/kiss/style-guide. 19 | 20 | Note: There are no "fancy" text decorations or highlighting. Just a core set of 21 | features selected to assist in code and article writing. 22 | 23 | +------------------------------------------------------------------------------+ 24 | | Sven Gucke's Modified VIMRC | 25 | +------------------------------------------------------------------------------+ 26 | | | 27 | | set ai nocp digraph ek hid ru sc vb wmnu noeb noet nosol | 28 | | syntax on | 29 | | set bs=2 fo=cqrt ls=2 shm=at tw=80 sw=4 ts=4 sts=4 ww=<,>,h,l | 30 | | set comments=b:#,:%,n:> | 31 | | set list listchars=tab:»·,trail:· | 32 | | autocmd FileType markdown,text setlocal spell | 33 | | | 34 | +------------------------------------------------------------------------------+ 35 | 36 | The following is an explanation of each parameter. You can learn more about each 37 | by using the ":help OPTION" command in vim. 38 | 39 | +------------------------+-----------------------------------------------------+ 40 | | Command | Description | 41 | +------------------------+-----------------------------------------------------+ 42 | | | | 43 | | nocompatible | This changes the values of many options, | 44 | | set nocp | enabling features which are not vi compatible | 45 | | | (but really really nice). | 46 | | | | 47 | | digraph | Enables input of special characters by a | 48 | | set digraph | combination of two characters. Example: Type | 49 | | | 'a', erase it by typing CTRL-H - and then type | 50 | | | ':' - this results in the umlaut: ä So Vim | 51 | | | remembers the character you have erased and | 52 | | | combines it with the character you have typed | 53 | | | "over" the previous one. | 54 | | | | 55 | | esckeys | Enables recognition of arrow key codes which | 56 | | set ek | start off with an ESC. This would normally end | 57 | | | your current mode (insert/append/open mode) and | 58 | | | return you command mode (aka normal mode), and | 59 | | | the rest of the code would trigger commands. | 60 | | | | 61 | | hidden | Allows hidden buffers even though they contain | 62 | | set hid | modifications which have not yet been written | 63 | | | back to the associated file. | 64 | | | | 65 | | ruler | Shows the "ruler" for the cursor (i.e, its | 66 | | set ru | current position with line+column and the | 67 | | | percentage within the buffer). | 68 | | | | 69 | | showcmd | Show the input of an *incomplete* command. So | 70 | | set sc | while you are typing the command "y23dd" you | 71 | | | will see "y23dd before you type the last 'd' | 72 | | | which completes the command. Makes learning Vi | 73 | | | much simpler as you get some feedback to what | 74 | | | you have already typed. | 75 | | | | 76 | | visualbell | Chose "visual bell" effect rather than | 77 | | set vb | "beeping". | 78 | | | | 79 | | wildmenu | Make use of the "status line" to show possible | 80 | | set wmnu | completions of command line commands, file | 81 | | | names and more. Allows one to cycle forward and | 82 | | | backward through the list. | 83 | | | | 84 | | noerrorbells | Turn off the bell. You do know the "beep" you | 85 | | set noeb | get when you type ESC in normal mode? | 86 | | | Be nice to your co-workers - turn it off! ;-) | 87 | | | | 88 | | noexpandtab | When inserting text, do not expand TABs to | 89 | | set noet | spaces. You can always make vim expand the TABs | 90 | | | later (using the ":retab" command). | 91 | | | | 92 | | nostartofline | Prevent the cursor from changing the current | 93 | | set nosol | column when jumping to other lines within the | 94 | | | window. | 95 | | | | 96 | | syntax on | Enable syntax highlighting. | 97 | | | | 98 | | autoindent | Automatic indentation. This automatically | 99 | | set ai | inserts the indentation from the current line | 100 | | | when you start a new line; in insert mode you | 101 | | | would start a new line by ending the current | 102 | | | one by inserting CTRL-J or CTRL-M - and in | 103 | | | command mode you'd "open" a new line with | 104 | | | either 'o' or 'O' for below or above the | 105 | | | current line, respectively. | 106 | | | | 107 | | backspace | Backspace with this value allows to use the | 108 | | set bs=2 | backspace character (aka CTRL-H or "<-"). | 109 | | | for moving the cursor over automatically | 110 | | | inserted indentation and over the start/end of | 111 | | | a line (see also the whichwrap option). | 112 | | | | 113 | | formatoptions | The format options affect the built-in "text | 114 | | set fo=cqrt | formatting" command. The default value omits | 115 | | | the "flag" 'r', which makes vim insert a | 116 | | | "comment leader" when starting a new line. This | 117 | | | allows to add text to a comment and still be | 118 | | | within the comment after you start a new line. | 119 | | | It also allows to break the line within a | 120 | | | comment without breaking the comment. | 121 | | | | 122 | | laststatus | This makes vim show a status line even when | 123 | | set ls=2 | only one window is visible. | 124 | | | | 125 | | shortmess | This shortens about every message to a minimum | 126 | | set shm=at | and thus avoids scrolling within the output of | 127 | | | messages and the "press a key" prompt that goes | 128 | | | with these. | 129 | | | | 130 | | tabstop | Effectively, how many columns of whitespace a | 131 | | ts=4 | \t is worth. | 132 | | | | 133 | | softtabstop | How many columns of whitespace a tab keypress | 134 | | sts=4 | or a backspace keypress is worth. | 135 | | | | 136 | | shiftwidth | How many columns of whitespace a “level of | 137 | | sw=4 | indentation” is worth or a backspace keypress | 138 | | | is worth. | 139 | | | | 140 | | textwidth | This explicitly sets the width of text to 80 | 141 | | set tw=80 | characters. After each completion of a word in | 142 | | | insert mode, vim checks whether its end is past | 143 | | | this width; if so then it will break the word | 144 | | | onto the next line. Note that vim will remove | 145 | | | trailing spaces when applying the word wrap - | 146 | | | a feature which many editors are missing (and | 147 | | | which will leave trailing spaces, of course). | 148 | | | | 149 | | | NOTE: The word wrap applies only when the | 150 | | | *completed* word goes over the line; when you | 151 | | | insert a word before that which moves other | 152 | | | words over the line then vim will *not* break | 153 | | | the words at the end of the line onto the next | 154 | | | line! Programmers certainly don't want that. | 155 | | | It's a feature!! | 156 | | | | 157 | | | | 158 | | whichwrap | There are several commands which move the | 159 | | set ww=<,>,h,l | cursor within a line. When you get to the | 160 | | | start/end of a line then these commands will | 161 | | | fail as you cannot goon. However, many users | 162 | | | expect the cursor to be moved onto the | 163 | | | previous/next line. Vim allows you to chose | 164 | | | which commands will "wrap" the cursor around | 165 | | | the line borders. In this particular example | 166 | | | left/right, as well as the 'h' and 'l', | 167 | | | keys to do that. | 168 | | | | 169 | | comments | Vim can reformat text and preserve comments | 170 | | set com=b:#,:%,n:> | (i.e. commented lines) even when several kinds | 171 | | | of comment indentations "nest" within. This is | 172 | | | particularly useful for reformatting quoted | 173 | | | text in Email and News. | 174 | | | | 175 | | list listchars | This option is cool! Or let's say that "other | 176 | | set list | editors don't have at all". These characters | 177 | | set lcs=tab:»· | are called "list characters" as they are | 178 | | set lcs+=trail:· | related to the list option of vanilla vi. | 179 | | | This will show the end-of-lines by adding a '$' | 180 | | | sign after the last character of each line, and | 181 | | | by replacing all TABs by '^I'. However, it is | 182 | | | much nicer to have TABs shown in expanded form. | 183 | | | Vim takes it one step further by also making | 184 | | | trailing spaces visible. Being able to see | 185 | | | EOLs, TABs, and trailing space has become an | 186 | | | absolute MUST with every editor. | 187 | | | | 188 | +------------------------+-----------------------------------------------------+ 189 | 190 | In summary, there are MANY configurations that can be applied to vim in just a 191 | few lines of text! As a best practice, test vim out without any configuration 192 | applied, then slowly add in needed features. A good *starter* configuration file 193 | might look something like this: 194 | 195 | +------------------------------------------------------------------------------+ 196 | | Starter VIMRC | 197 | +------------------------------------------------------------------------------+ 198 | | | 199 | | set ai nocp hid ru sc | 200 | | filetype plugin indent on | 201 | | syntax on | 202 | | set bs=2 ls=2 shm=at tw=72 sw=4 ts=4 sts=4 ww=<,>,h,l | 203 | | | 204 | +------------------------------------------------------------------------------+ 205 | 206 | 207 | References 208 | ________________________________________________________________________________ 209 | 210 | [0] https://github.com/vim/vim 211 | [1] http://www.guckes.net/vim/setup.html 212 | -------------------------------------------------------------------------------- /software/wpa_supplicant.txt: -------------------------------------------------------------------------------- 1 | WPA_SUPPLICANT [0] 2 | ________________________________________________________________________________ 3 | 4 | wpa_supplicant is a cross-platform supplicant with support for WEP, WPA and WPA2 5 | (IEEE 802.11i). It is suitable for desktops, laptops and embedded systems. It is 6 | the IEEE 802.1X/WPA component that is used in the client stations. It implements 7 | key negotiation with a WPA authenticator and it controls the roaming and IEEE 8 | 802.11 authentication/association of the wireless driver. 9 | 10 | 11 | Configuration 12 | ________________________________________________________________________________ 13 | 14 | Begin by first verifying that you have wpa_supplicant installed: 15 | 16 | +------------------------------------------------------------------------------+ 17 | | | 18 | | $ kiss b wpa_supplicant | 19 | | | 20 | +------------------------------------------------------------------------------+ 21 | 22 | At this point, you will want to create a wpa_supplicant file to store your 23 | wireless network information and credentials: 24 | 25 | +------------------------------------------------------------------------------+ 26 | | | 27 | | $ mkdir -p /etc/wpa_supplicant | 28 | | $ touch /etc/wpa_supplicant/wpa_supplicant.conf | 29 | | | 30 | +------------------------------------------------------------------------------+ 31 | 32 | The following wpa_supplicant.conf can be used as a *starter* configuration 33 | file. Remember to replace the BSSID and PASSWORD with your actual wireless 34 | network credentials. 35 | 36 | +------------------------------------------------------------------------------+ 37 | | | 38 | | # Allow users in the 'wheel' group to control wpa_supplicant | 39 | | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel | 40 | | | 41 | | # Make this file writable for wpa_gui / wpa_cli | 42 | | update_config=1 | 43 | | | 44 | | network={ | 45 | | ssid="BSSID" | 46 | | psk="PASSWORD" | 47 | | } | 48 | | | 49 | +------------------------------------------------------------------------------+ 50 | 51 | For additional network requirements, refer to the "wpa_supplicant" Arch Linux 52 | Wiki page [0]. 53 | 54 | 55 | Generating a Passphrase 56 | ________________________________________________________________________________ 57 | 58 | NOTE: This section is not required but HIGHLY recommended since storing your 59 | password in clear text is not good practice. 60 | 61 | To allow for quicker connections to a network whose BSSID is already known, we 62 | can make use of wpa_passphrase, a command line tool which generates the minimal 63 | configuration needed by wpa_supplicant: 64 | 65 | +------------------------------------------------------------------------------+ 66 | | | 67 | | $ wpa_passphrase BSSID PASSWORD | 68 | | | 69 | +------------------------------------------------------------------------------+ 70 | 71 | Replace BSSID and PASSWORD with your actual wireless network credentials. The 72 | output of this command can then be used to replace the network section of the 73 | wpa_supplicant.conf file created in the previous section (just remember to 74 | delete the line containing your password in clear text). 75 | 76 | 77 | Manual Wireless Connection 78 | ________________________________________________________________________________ 79 | 80 | A new wireless connection can be manually started with the following command: 81 | 82 | +------------------------------------------------------------------------------+ 83 | | | 84 | | $ wpa_supplicant -B -i INTERFACE \ | 85 | | -c /etc/wpa_supplicant/wpa_supplicant.conf | 86 | | | 87 | +------------------------------------------------------------------------------+ 88 | 89 | Replace INTERFACE with your appropriate wireless LAN interface name. After, 90 | use your preferred method to manually obtain an IP address. For example, when 91 | using dhcpcd, run the following: 92 | 93 | +------------------------------------------------------------------------------+ 94 | | | 95 | | $ dhcpcd INTERFACE | 96 | | | 97 | +------------------------------------------------------------------------------+ 98 | 99 | The wireless status connection can be verified by reviewing the output of the 100 | following command: 101 | 102 | +------------------------------------------------------------------------------+ 103 | | | 104 | | $ ifconfig | 105 | | | 106 | +------------------------------------------------------------------------------+ 107 | 108 | 109 | Managed Wireless Connection via dhcpcd 110 | ________________________________________________________________________________ 111 | 112 | Assuming that dhcpcd is already installed, busybox's runsv can be used to create 113 | new managed services for wpa_supplicant and dhcpcd: 114 | 115 | +------------------------------------------------------------------------------+ 116 | | | 117 | | $ ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant \ | 118 | | /usr/lib/dhcpcd/dhcpcd-hooks/ | 119 | | $ ln -s /etc/sv/dhcpcd/ /var/service | 120 | | | 121 | +------------------------------------------------------------------------------+ 122 | 123 | 124 | Tips and Tricks 125 | ________________________________________________________________________________ 126 | 127 | * A list of possible INTERFACE names can be obtained by running the following: 128 | 129 | +----------------------------------------------------------------------------+ 130 | | | 131 | | $ ls /sys/class/net | 132 | | | 133 | +----------------------------------------------------------------------------+ 134 | 135 | * While testing arguments/configuration it may be helpful to launch 136 | wpa_supplicant in the foreground (i.e. without the -B option) for better 137 | debugging messages. 138 | 139 | 140 | References 141 | ________________________________________________________________________________ 142 | 143 | [0] https://wiki.archlinux.org/index.php/wpa_supplicant 144 | -------------------------------------------------------------------------------- /storage/index.txt: -------------------------------------------------------------------------------- 1 | STORAGE 2 | ________________________________________________________________________________ 3 | 4 | - @/disks 5 | - @/zram 6 | - @/zswap 7 | -------------------------------------------------------------------------------- /storage/zram.txt: -------------------------------------------------------------------------------- 1 | ZRAM [0] 2 | ________________________________________________________________________________ 3 | 4 | zram is a kernel feature which allows for the creation of compressible ramdisks, 5 | or RAM-based block devices. These virtual devices can be used to extend the 6 | amount of RAM available on a system by utilizing in-RAM compression, in a 7 | similar sense to how swap is used in low-memory conditions. Unlike zswap, zram 8 | does not require a swapfile or swap partition to exist on a drive. As a result, 9 | zram can be incredibly useful on systems where memory availability is low and 10 | disk-space is at a premium. 11 | 12 | 13 | Prerequisites 14 | ________________________________________________________________________________ 15 | 16 | zram is managed by the kernel and requires very little user intervention to 17 | enable and configure. First, ensure zram is enabled in the kernel: 18 | 19 | +------------------------------------------------------------------------------+ 20 | | | 21 | | General setup ---> | 22 | | <*> Support for paging of anonymous memory (swap) | 23 | | | 24 | | Memory Management options ---> | 25 | | <*> Memory allocator for compressed pages | 26 | | | 27 | | Device Drivers ---> | 28 | | <*> Block devices ---> | 29 | | Compressed RAM block device support | 30 | | | 31 | | # To use the lz4 algorithm with zram, | 32 | | Cryptographic API ---> | 33 | | <*> LZ4 compression algorithm | 34 | | | 35 | | | 36 | +------------------------------------------------------------------------------+ 37 | 38 | lz4 is available in community. The default compression algorithm is lzo and 39 | CONFIG_CRYPTO_LZO=y/m is forced when CONFIG_ZRAM=y/m. 40 | 41 | Building compressed RAM block devices as a module is recommended because it 42 | enables runtime block device creation. If it is built-in to the kernel, pass 43 | zram.num_devices=X in the kernel commandline (bootloader or built-in). 44 | 45 | 46 | Setup 47 | ________________________________________________________________________________ 48 | 49 | Compressed block devices can be setup on-the-fly or at boot-time. A quick 50 | method using an /etc/rc.d/zram.{boot,pre.shutdown} script is shown below. 51 | Because multiple ramdisks are allowed, it might be preferable to create 52 | multiple zram devices for better utilization on multicore systems. 53 | 54 | The compression used on zram block devices cannot be changed once the device is 55 | initialized. This means that you cannot swap compression algorithms at run-time, 56 | unlike with zswap. 57 | 58 | $SIZE below can be given in bytes or suffixed by M,G. 59 | 60 | +------------------------------------------------------------------------------+ 61 | | /etc/rc.d/zram.boot | 62 | +------------------------------------------------------------------------------+ 63 | | #!/bin/sh -e | 64 | | | 65 | | # Create four zram devices for swap, one for tmpfs | 66 | | | 67 | | modprobe zram num_devices=5 | 68 | | | 69 | | # create zram devices of $SIZE 2G | 70 | | # Use lz4 compression on the devices | 71 | | # Mark the devices as swap devices | 72 | | # Enable the swap devices | 73 | | | 74 | | for dev in 0 1 2 3; do | 75 | | echo lz4 > "/sys/block/zram$dev/comp_algorithm" | 76 | | echo 2G > "/sys/block/zram$dev/disksize" | 77 | | mkswap "/dev/zram$dev" | 78 | | swapon "/dev/zram$dev" -p 10 | 79 | | done | 80 | | | 81 | | # Create a 4G ext4 zram device to use as tmpfs with lz4 compression | 82 | | | 83 | | echo lz4 > /sys/block/zram4/comp_algorithm | 84 | | echo 4G > /sys/block/zram4/disksize | 85 | | mkfs.ext4 /dev/zram4 | 86 | | mount /dev/zram4 /tmp | 87 | | | 88 | | # /tmp requires sticky bit permissions for nonroot user access | 89 | | chmod 1777 /tmp | 90 | | | 91 | +------------------------------------------------------------------------------+ 92 | 93 | +------------------------------------------------------------------------------+ 94 | | /etc/rc.d/zram.pre.shutdown | 95 | +------------------------------------------------------------------------------+ 96 | | #!/bin/sh -e | 97 | | | 98 | | # Disable the swap devices | 99 | | # Reset the swap devices | 100 | | for dev in 0 1 2 3; do | 101 | | swapoff "/dev/zram$dev" | 102 | | echo 1 > "/sys/block/zram$dev/reset" | 103 | | done | 104 | | | 105 | | # Unmount /tmp, reset zram device | 106 | | umount /dev/zram4 | 107 | | echo 1 > /sys/block/zram4/reset | 108 | | | 109 | +------------------------------------------------------------------------------+ 110 | 111 | Note: because zram has a 2:1 compression ratio, a total disk size of no more 112 | than twice the amount of available RAM should be selected - otherwise, space 113 | will be wasted. 114 | 115 | In addition to manipulating values in /sys/block/zramX/*, users can use the 116 | zramctl program provided by util-linux to manage their zram devices. See [1] for 117 | more information. 118 | 119 | 120 | References 121 | ________________________________________________________________________________ 122 | 123 | [0] https://kernel.org/doc/Documentation/blockdev/zram.txt 124 | [1] https://man7.org/linux/man-pages/man8/zramctl.8.html 125 | -------------------------------------------------------------------------------- /storage/zswap.txt: -------------------------------------------------------------------------------- 1 | ZSWAP [0] 2 | ________________________________________________________________________________ 3 | 4 | zswap is a feature built-in to the Linux kernel [1] which allows users to 5 | utilize compressed caches in RAM as swap pages. Instead of the kernel 6 | immediately swapping pages in RAM and writing them to the hard drive, wasting 7 | time on I/O operations, it compresses them into a pool in RAM. Only when the 8 | available RAM is exhausted will the kernel then write-out the least recently 9 | used page as an uncompressed file to swap on the drive. 10 | 11 | When swap will be used, zswap should provide performance improvements. 12 | 13 | 14 | Prerequisites 15 | ________________________________________________________________________________ 16 | 17 | zswap works in conjuction with swap and is handled entirely by the kernel. As 18 | such, there are only two requirements: zswap enabled in the kernel and a 19 | swapfile or swap partition on the system. 20 | 21 | Several compression options are available for zswap. The choice is use-case 22 | dependent, with the primary trade-offs being speed or size. See [2] for example 23 | benchmarks of compressors in general. 24 | 25 | Ensure zswap (CONFIG_ZSWAP) support and a compressor are enabled in the kernel: 26 | 27 | +------------------------------------------------------------------------------+ 28 | | | 29 | | Memory Management options ---> | 30 | | <*> Compressed cache for swap pages | 31 | | Compressed cache for swap pages default compressor (xxx) | 32 | | Compressed cache for swap pages default allocator (xxx) | 33 | | <*> Enable the compression cache for swap pages by default | 34 | | | 35 | +------------------------------------------------------------------------------+ 36 | 37 | Either set CONFIG_ZSWAP_DEFAULT_ON=y in the kernel config or add zswap_enabled=1 38 | to your kernel command line (via the bootloader or the built-in command line) to 39 | have zswap enabled at boot-time. To enable zswap at runtime, 40 | 41 | +------------------------------------------------------------------------------+ 42 | | | 43 | | $ echo 1 > /sys/module/zswap/parameters/enabled | 44 | | | 45 | +------------------------------------------------------------------------------+ 46 | 47 | zswap has many options that can also be configured at runtime, including which 48 | compressor is in use. To see them all, 49 | 50 | +------------------------------------------------------------------------------+ 51 | | | 52 | | $ grep -R . /sys/module/zswap/parameters | 53 | | | 54 | +------------------------------------------------------------------------------+ 55 | 56 | For information on setting up a swapfile or swap partition, see @/storage/disks. 57 | 58 | 59 | zbud versus z3fold versus zsmalloc 60 | ________________________________________________________________________________ 61 | 62 | There are three different allocators to choose from for compressed pages: 63 | 64 | +-------------+----------------------------------------------------------------+ 65 | | Allocator | Description | 66 | |-------------+----------------------------------------------------------------| 67 | | | | 68 | | zbud | Uses a 2:1 compressed:uncompressed page allocation (legacy) | 69 | | z3fold | Uses a 3:1 ratio | 70 | | zsmalloc | Designed for zram - better under low memory conditions | 71 | | | | 72 | +-------------+----------------------------------------------------------------+ 73 | 74 | In general, z3fold should be preferred to zbud; the latter is supported solely 75 | for compatibility purposes. z3fold provides a better compression ratio and 76 | should be preferred when possible. 77 | 78 | zsmalloc has a very different page allocation method than either zbud or z3fold, 79 | and provides for greater storage density. However, zsmalloc does not implement 80 | compressed page eviction; it can only reject new pages when full. 81 | 82 | For more information on z3fold and zsmalloc, see [3] and [4]. 83 | 84 | 85 | References 86 | ________________________________________________________________________________ 87 | 88 | [0] https://kernel.org/doc/html/latest/vm/zswap.html 89 | [1] https://lkml.iu.edu/hypermail/linux/kernel/1212.1/01472.html 90 | [2] https://github.com/lz4/lz4 91 | [3] https://kernel.org/doc/html/latest/vm/z3fold.html 92 | [4] https://kernel.org/doc/html/latest/vm/zsmalloc.html 93 | -------------------------------------------------------------------------------- /wayland/alternatives.txt: -------------------------------------------------------------------------------- 1 | WAYLAND ALTERNATIVES TO XORG SOFTWARE [0] [1] 2 | ________________________________________________________________________________ 3 | 4 | 5 | [0.0] Index 6 | ________________________________________________________________________________ 7 | 8 | - Compositors (or Display Servers) [1.0] 9 | - Terminal Emulators [2.0] 10 | - Web Browsers [3.0] 11 | - Clipboard Managers [4.0] 12 | - Display Configuration [5.0] 13 | - Image Viewers [6.0] 14 | - Application Launchers [7.0] 15 | - Screen Lockers [8.0] 16 | - Screenshot tools [9.0] 17 | - Status Bars [10.0] 18 | - Notification Daemons [11.0] 19 | - Wallpaper Setters [12.0] 20 | - Other [13.0] 21 | 22 | 23 | [1.0] Compositors (or Display Servers) 24 | ________________________________________________________________________________ 25 | 26 | Display servers that implement the Wayland display server protocol are also 27 | called Wayland compositors because they additionally perform the task of a 28 | compositing window manager. - Wikipedia [2] 29 | 30 | 31 | [1.1] sway 32 | ____________________________________________________________________________ 33 | 34 | i3-compatible Wayland compositor 35 | 36 | https://github.com/swaywm/sway 37 | 38 | 39 | [1.2] hikari 40 | ____________________________________________________________________________ 41 | 42 | hikari [ja. Light] is a stacking Wayland compositor which is actively 43 | developed on FreeBSD but also supports Linux. 44 | 45 | https://hikari.acmelabs.space/ 46 | 47 | 48 | [1.3] dwl 49 | ____________________________________________________________________________ 50 | 51 | dwl is a compact, hackable compositor for Wayland based on wlroots. It is 52 | intended to fill the same space in the Wayland world that dwm does in X11, 53 | primarily in terms of philosophy, and secondarily in terms of functionality. 54 | 55 | https://github.com/djpohly/dwl 56 | 57 | 58 | [1.4] japokwm 59 | ____________________________________________________________________________ 60 | 61 | Japokwm is a dynamic tiling wayland compositor where you are able to create 62 | new layouts without the hassle of editing the source code. You just give it 63 | information about where windows go and it will handle stuff such as resizing 64 | all by itself 65 | 66 | https://github.com/werererer/japokwm 67 | 68 | 69 | [1.5] labwc 70 | ____________________________________________________________________________ 71 | 72 | Labwc is a wlroots-based stacking compositor for Wayland. It aims to be 73 | light-weight and independent, with a focus on simply stacking windows well 74 | and rendering some window decorations. Where practicable, it uses clients 75 | for wall-paper, panels, screenshots, and so on. 76 | 77 | https://github.com/johanmalm/labwc 78 | 79 | 80 | [1.6] taiwins 81 | ____________________________________________________________________________ 82 | 83 | Taiwins is a dynamic wayland window manager, supports both tiling and 84 | floating layout. It is designed to be modern and modular. It is extensible 85 | through lua script and it has built-in shell and widgets implementation 86 | through nuklear GUI. It also supports popular tiling window manager features 87 | like gapping. 88 | 89 | https://github.com/taiwins/taiwins 90 | 91 | 92 | [1.7] waybox 93 | ____________________________________________________________________________ 94 | 95 | An Openbox clone on Wayland (WIP) 96 | 97 | https://github.com/wizbright/waybox 98 | 99 | 100 | [1.7] wayfire 101 | ____________________________________________________________________________ 102 | 103 | Wayfire is a 3D Wayland compositor, inspired by Compiz and based on wlroots. 104 | It aims to create a customizable, extendable and lightweight environment 105 | without sacrificing its appearance. 106 | 107 | https://github.com/WayfireWM/wayfire 108 | 109 | 110 | [2.0] Terminal Emulators 111 | ________________________________________________________________________________ 112 | 113 | 114 | [2.1] foot 115 | ____________________________________________________________________________ 116 | 117 | The fast, lightweight and minimalistic Wayland terminal emulator. 118 | 119 | https://codeberg.org/dnkl/foot 120 | 121 | 122 | [2.2] wayst 123 | ____________________________________________________________________________ 124 | 125 | Simple terminal emulator for Wayland and X11 with OpenGL rendering and 126 | minimal dependencies. 127 | 128 | https://github.com/91861/wayst 129 | 130 | 131 | [2.3] ate 132 | ____________________________________________________________________________ 133 | 134 | Awesome terminal emulator. 135 | 136 | https://github.com/andir/ate 137 | 138 | 139 | [2.4] havoc 140 | ____________________________________________________________________________ 141 | 142 | A minimal terminal emulator for Wayland on Linux. 143 | 144 | https://github.com/ii8/havoc 145 | 146 | 147 | [2.5] wterm 148 | ____________________________________________________________________________ 149 | 150 | st fork for Wayland. 151 | 152 | https://github.com/majestrate/wterm 153 | 154 | 155 | [2.6] alacritty 156 | ____________________________________________________________________________ 157 | 158 | Alacritty is a modern terminal emulator that comes with sensible defaults, 159 | but allows for extensive configuration. By integrating with other 160 | applications, rather than reimplementing their functionality, it manages to 161 | provide a flexible set of features with high performance. 162 | 163 | https://github.com/alacritty/alacritty 164 | 165 | 166 | [2.7] kitty 167 | ____________________________________________________________________________ 168 | 169 | The fast, feature-rich, cross-platform, GPU based terminal. 170 | 171 | https://github.com/kovidgoyal/kitty 172 | 173 | 174 | 175 | [3.0] Web Browsers (without X11 dependency) 176 | ________________________________________________________________________________ 177 | 178 | 179 | [3.1] firefox 180 | ____________________________________________________________________________ 181 | 182 | Firefox, is a free and open-source web browser developed by the Mozilla 183 | Foundation and its subsidiary, the Mozilla Corporation. 184 | 185 | https://www.mozilla.org/en-US/firefox/new/ 186 | 187 | 188 | [3.2] qutebrowser 189 | ____________________________________________________________________________ 190 | 191 | Qutebrowser is a keyboard-focused browser with a minimal GUI. It’s based on 192 | Python and PyQt5 and free software, licensed under the GPL. 193 | 194 | https://github.com/qutebrowser/qutebrowser 195 | 196 | 197 | [4.0] Clipboard Managers 198 | ________________________________________________________________________________ 199 | 200 | 201 | [4.1] wl-clipboard 202 | ____________________________________________________________________________ 203 | 204 | This project implements two command-line Wayland clipboard utilities, 205 | wl-copy and wl-paste, that let you easily copy data between the clipboard 206 | and Unix pipes, sockets, files and so on. 207 | 208 | https://github.com/bugaevc/wl-clipboard 209 | 210 | 211 | [5.0] Display Configuration 212 | ________________________________________________________________________________ 213 | 214 | 215 | [5.1] wlr-randr 216 | ____________________________________________________________________________ 217 | 218 | Utility to manage outputs of a Wayland compositor. 219 | 220 | https://github.com/emersion/wlr-randr 221 | 222 | 223 | [5.2] kanshi 224 | ____________________________________________________________________________ 225 | 226 | kanshi allows you to define output profiles that are automatically enabled 227 | and disabled on hotplug. For instance, this can be used to turn a laptop's 228 | internal screen off when docked. 229 | 230 | https://github.com/emersion/kanshi 231 | 232 | 233 | [6.0] Image Viewers 234 | ________________________________________________________________________________ 235 | 236 | 237 | [6.1] imv 238 | ____________________________________________________________________________ 239 | 240 | A command line image viewer intended for use with tiling window managers. 241 | 242 | https://github.com/eXeC64/imv 243 | 244 | 245 | [6.2] mpv 246 | ____________________________________________________________________________ 247 | 248 | mpv is a free (as in freedom) media player for the command line. It 249 | supports a wide variety of media file formats, audio and video codecs, and 250 | subtitle types. 251 | 252 | https://github.com/mpv-player/mpv 253 | 254 | 255 | [7.0] Application Launchers 256 | ________________________________________________________________________________ 257 | 258 | 259 | [7.1] bemenu 260 | ____________________________________________________________________________ 261 | 262 | Dynamic menu library and client program inspired by dmenu 263 | 264 | https://github.com/Cloudef/bemenu 265 | 266 | 267 | [7.2] fuzzel 268 | ____________________________________________________________________________ 269 | 270 | A Wayland-native application launcher, similar to rofi's drun mode. 271 | 272 | https://codeberg.org/dnkl/fuzzel 273 | 274 | 275 | [7.3] wofi 276 | ____________________________________________________________________________ 277 | 278 | Wofi is a launcher/menu program for wlroots based wayland compositors. 279 | 280 | https://hg.sr.ht/~scoopta/wofi 281 | 282 | 283 | 284 | [8.0] Screen Lockers 285 | ________________________________________________________________________________ 286 | 287 | 288 | [8.1] swaylock 289 | ____________________________________________________________________________ 290 | 291 | A screen locking utility for Wayland compositors. 292 | 293 | https://github.com/swaywm/swaylock 294 | 295 | 296 | [8.2] swayidle 297 | ____________________________________________________________________________ 298 | 299 | This is sway's idle management daemon, swayidle. It is compatible with any 300 | Wayland compositor which implements the KDE idle protocol. 301 | 302 | https://github.com/swaywm/swayidle 303 | 304 | 305 | [9.0] Screenshot tools 306 | ________________________________________________________________________________ 307 | 308 | 309 | [9.1] grim 310 | ____________________________________________________________________________ 311 | 312 | Grab images from a Wayland compositor. 313 | 314 | https://github.com/emersion/grim 315 | 316 | 317 | [9.2] slurp 318 | ____________________________________________________________________________ 319 | 320 | Select a region in a Wayland compositor and print it to the standard output. 321 | 322 | https://github.com/emersion/slurp 323 | 324 | 325 | [10.0] Status Bars 326 | ________________________________________________________________________________ 327 | 328 | 329 | [10.1] yambar 330 | ____________________________________________________________________________ 331 | 332 | Modular status panel for X11 and Wayland. 333 | 334 | https://codeberg.org/dnkl/yambar 335 | 336 | 337 | [10.2] sfwbar 338 | ____________________________________________________________________________ 339 | 340 | SFWBar (Sway Floating Window Bar) is a flexible taskbar application 341 | designed with a stacking layout in mind. 342 | 343 | https://github.com/LBCrion/sfwbar 344 | 345 | 346 | [10.3] waybar 347 | ____________________________________________________________________________ 348 | 349 | Highly customizable Wayland bar for Sway and Wlroots based compositors. 350 | 351 | https://github.com/Alexays/Waybar 352 | 353 | 354 | 355 | [11.0] Notification Daemons 356 | ________________________________________________________________________________ 357 | 358 | 359 | [11.1] fnott 360 | ____________________________________________________________________________ 361 | 362 | Keyboard driven and lightweight Wayland notification daemon for 363 | wlroots-based compositors. 364 | 365 | https://codeberg.org/dnkl/fnott 366 | 367 | 368 | [11.2] mako 369 | ____________________________________________________________________________ 370 | 371 | A lightweight notification daemon for Wayland. 372 | 373 | https://github.com/emersion/mako 374 | 375 | 376 | [12.0] Wallpaper Setters 377 | ________________________________________________________________________________ 378 | 379 | 380 | [12.1] wbg 381 | ____________________________________________________________________________ 382 | 383 | Super simple wallpaper application for Wayland compositors implementing 384 | the layer-shell protocol. 385 | 386 | https://codeberg.org/dnkl/wbg 387 | 388 | 389 | [12.2] swaybg 390 | ____________________________________________________________________________ 391 | 392 | A wallpaper utility for Wayland compositors. 393 | 394 | https://github.com/swaywm/swaybg 395 | 396 | 397 | [13.0] Other 398 | ________________________________________________________________________________ 399 | 400 | 401 | [13.1] wlsunset 402 | ____________________________________________________________________________ 403 | 404 | Day/night gamma adjustments for Wayland compositors supporting 405 | wlr-gamma-control-unstable-v1. 406 | 407 | https://git.sr.ht/~kennylevinsen/wlsunset 408 | 409 | 410 | [13.2] greetd 411 | ____________________________________________________________________________ 412 | 413 | A minimal and flexible login manager daemon that makes no assumptions about 414 | what you want to launch. 415 | 416 | https://sr.ht/~kennylevinsen/greetd/ 417 | 418 | 419 | [13.3] wtype 420 | ____________________________________________________________________________ 421 | 422 | xdotool type for wayland. 423 | 424 | https://github.com/atx/wtype 425 | 426 | 427 | [13.4] ydotool 428 | ____________________________________________________________________________ 429 | 430 | Generic Linux command-line automation tool (no X!). 431 | 432 | https://github.com/ReimuNotMoe/ydotool 433 | 434 | 435 | [14.0] References 436 | ________________________________________________________________________________ 437 | 438 | [0] https://github.com/natpen/awesome-wayland 439 | [1] https://arewewaylandyet.com/ 440 | [2] https://en.wikipedia.org/wiki/Wayland_(display_server_protocol) 441 | -------------------------------------------------------------------------------- /wayland/index.txt: -------------------------------------------------------------------------------- 1 | Wayland 2 | ________________________________________________________________________________ 3 | 4 | - @/alternatives 5 | - @/install 6 | 7 | -------------------------------------------------------------------------------- /wayland/install.txt: -------------------------------------------------------------------------------- 1 | INSTALL WAYLAND 2 | ________________________________________________________________________________ 3 | 4 | Wayland [0] is a display protocol that aims to be a simpler and modern 5 | replacement for the X Window System. [1] The Wayland protocol follows a 6 | client–server model in which clients are the graphical applications requesting 7 | the display of pixel buffers on the screen, and the server (compositor) is the 8 | service provider controlling the display of these buffers. [2] 9 | 10 | Unlike Xorg, which is at the center of the universe (and everyone must talk to), 11 | Wayland puts the Linux kernel and its components (DRI, DRM, etc) in the middle. 12 | This effectively leaves the Wayland compositor off in the corner as its little 13 | more than a special application. [3] 14 | 15 | Wayland has been in development since September of 2008 [4] and is usable today 16 | for a large number of use-cases. Some hardware configurations (namely NVIDIA 17 | GPUs) [5] [6] and a number of features are not currently supported by 18 | compositors. 19 | 20 | 21 | Installing Wayland 22 | ________________________________________________________________________________ 23 | 24 | First, pick a wayland compositor. If unsure, see @/alternatives 25 | 26 | +------------------------------------------------------------------------------+ 27 | | | 28 | | $ kiss b sway | 29 | | | 30 | +------------------------------------------------------------------------------+ 31 | 32 | Second, pick a terminal emulator. 33 | 34 | +------------------------------------------------------------------------------+ 35 | | | 36 | | $ kiss b foot | 37 | | | 38 | +------------------------------------------------------------------------------+ 39 | 40 | 41 | Setup XDG_RUNTIME_DIR 42 | ________________________________________________________________________________ 43 | 44 | The XDG_RUNTIME_DIR environment variable must be set and its value must be a 45 | directory writable by your user. 46 | 47 | +------------------------------------------------------------------------------+ 48 | | .shellrc or .profile | 49 | +------------------------------------------------------------------------------+ 50 | | | 51 | | export XDG_RUNTIME_DIR=/run/user/$(id -u) | 52 | | | 53 | +------------------------------------------------------------------------------+ 54 | 55 | Create the runtime directory. 56 | 57 | +------------------------------------------------------------------------------+ 58 | | | 59 | | $ mkdir -m 0700 -p "$XDG_RUNTIME_DIR" | 60 | | | 61 | +------------------------------------------------------------------------------+ 62 | 63 | 64 | Setup Groups 65 | ________________________________________________________________________________ 66 | 67 | Your user must be a member of the video and audio groups. 68 | 69 | +------------------------------------------------------------------------------+ 70 | | | 71 | | $ addgroup USERNAME video | 72 | | $ addgroup USERNAME audio | 73 | | | 74 | +------------------------------------------------------------------------------+ 75 | 76 | 77 | Launching Compositor on login 78 | ________________________________________________________________________________ 79 | 80 | +------------------------------------------------------------------------------+ 81 | | .profile | 82 | +------------------------------------------------------------------------------+ 83 | | | 84 | | # Method 1: with prompt. | 85 | | [ "$WAYLAND_DISPLAY" ] || { | 86 | | printf 'start wayland?' | 87 | | ! read -r || exec sway | 88 | | } | 89 | | | 90 | | # Method 2: auto if not running. | 91 | | [ "$WAYLAND_DISPLAY" ] || exec sway | 92 | | | 93 | +------------------------------------------------------------------------------+ 94 | 95 | 96 | Further Steps 97 | ________________________________________________________________________________ 98 | 99 | Refer to the documentation of your chosen compositor. 100 | 101 | 102 | 103 | References 104 | ________________________________________________________________________________ 105 | 106 | [0] https://wayland.freedesktop.org/ 107 | [1] https://wayland.freedesktop.org/faq.html#heading_toc_j_4 108 | [2] https://en.wikipedia.org/wiki/Wayland_(display_server_protocol) 109 | [3] https://lwn.net/Articles/413335/ 110 | [4] https://cgit.freedesktop.org/wayland/wayland/commit/?id=97f1ebe8d5c2e166fabf757182c289fed266a45a 111 | [5] https://github.com/swaywm/sway/issues/490 112 | [6] https://drewdevault.com/2017/10/26/Fuck-you-nvidia.html 113 | --------------------------------------------------------------------------------