1
0
mirror of https://github.com/tiyn/wiki.git synced 2025-04-19 14:07:46 +02:00

Compare commits

..

2 Commits

Author SHA1 Message Date
b0f109b605 git: client separated and moved to linux 2023-07-14 00:12:36 +02:00
b82daa46b7 fonts: added fonts and guide for linux 2023-07-13 23:52:44 +02:00
4 changed files with 233 additions and 53 deletions

17
wiki/font.md Normal file
View File

@ -0,0 +1,17 @@
# Font
A fonts is the particular size, weight and style of a typeface.
Operating systems based on [Linux](/wiki/linux/linux.md) handle fonts by the
[fontconfig package](/wiki/linux/font_configuration.md).
## Typefaces
Typefaces or font families can be roughly divided into the following styles:
- Serif typefaces use serifs - the small feature at the end of the strokes
within letters.
- Sans-serif typefaces do not use serifs.
- Monospace typefaces are typefaces with all glyphs having the same width.
Depending on the usage and definition japanese, chinese and korean fonts can be
seen as a separate style.

View File

@ -5,15 +5,13 @@ It's easy and can be lightweight, but also has tons of possibilities for using g
## Setup
Git consists of two parts: [a client](#client) and [a server](#server)
Git consists of two parts: [a client](#client) and [a server](#server).
### Client
The client is pretty simple to understand.
With only a handfull of commands you should be able to get your versioning going.
For servers with web interfaces there are different cli tools to control it
without using a browser.
For most linux distributions it is packaged with the `git` package.
The Git client for [Linux-based operating systems](/wiki/linux/linux.md) has a
separate article in this wiki which is called
[Git client](/wiki/linux/git_\(client\).md).
### Server
@ -37,50 +35,3 @@ If you don't need a bloated web-interface a more basic approach is more than eno
- [git-server-docker](./docker-images/jkarlos_-_git-server-docker.md) is a pretty
basic docker-container for git.
## Usage
This section addresses various use cases and problems solvable with git.
There is also an interactive
[fixup guide by Seth Robertson](https://sethrobertson.github.io/GitFixUm/fixup.html).
### Ignore files having local changes
If you need to make changes to a file that are local you can run
`config update-index --skip-worktree <file>`.
Following this the file won't show up as having changes from the upstream.
Note that files tagged with this command are checked out sparsly, so you need
to watch out for changes yourself if there are any.
To revert this run `config update-index --no-skip-worktree <file>`.
### Authentication via SSH
Authentication by default is done via a username and a password.
For some services such as Github.
it is not possible to use password as an authentication method.
The other possibility to authenticate to git is by using
[SSH](/wiki/linux/ssh.md).
For this a
[SSH certificate has to be created](/wiki/linux/ssh.md#generate-new-keys) and
[added to the authentication agent](/wiki/linux/ssh.md#adding-keys-to-authentication-agent).
Afterwards it the public SSH key to be added to the git server.
For Github there is
[a guide on that topic](https://docs.github.com/en/get-started/getting-started-with-git/why-is-git-always-asking-for-my-password).
Following these the git repositories have to be cloned in a special way to use
SSH instead of password and username.
The following shows both the normal way and the SSH way to clone git
repositories.
```ssh
git clone ssh://git@github.com:tiyn/wiki
git clone https://github.com/tiyn/wiki
```
By using the SSH config file the clone command can be shortened to
`git clone github:tiyn/wiki`.
For this follow the
[corresponding section in the SSH entry](/wiki/linux/ssh.md#shorten-ssh-connection-commands).
Set `Host` to `github`, `HostName` to `github.com` and `User` to `git`.

View File

@ -0,0 +1,121 @@
# Font Configuration
This entry addresses the handling of [fonts](/wiki/font.md) for
[Linux-based](/wiki/linux/linux.md) operating systems.
## Setup
Fontconfig is the standard library used to customize and configure.
On most [Linux](/wiki/linux/linux.md) distributions fontconfig can be setup by
installing the package `fontconfig`.
### Configuration
The configuration file is usually stored in the file
`~/.config/fontconfig/fonts.conf`.
A configuration typically looks like the following lines.
```xml
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Linux Libertine</family>
<family>Joy Pixels</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Linux Biolinum</family>
<family>Joy Pixels</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>JetBrainsMono Nerd Font Mono</family>
<family>Joy Pixels</family>
</prefer>
</alias>
</fontconfig>
```
This configuration requires some fonts that are not necessarily present in any
Linux installation so they may have to be installed.
Follow the section on [adding new fonts](#adding-new-font) and
[recommended fonts](#recommended-fonts) as needed.
## Usage
This section addresses important commands and packages for the configuration of
fonts.
### List or Find Font Family
A list of all fonts can be displayed using the command `fc-match -a`.
If the name of the font is not clear the command
`fc-match -a | grep <search term>` can be used to get an overview of the fonts
available.
For matching the command `fc-match -s <search term>` is be used.
This will display a list of font families that match best with the given search
term.
### Adding New Font
A new font can be added by placing its name inside `<family>`/`</family>`-tags.
Make sure to place it inside the correct [font family](/wiki/font.md#typefaces).
If you want to add a font into the configuration make sure its name
[matches](#list-or-find-font-family) correctly.
### Recommended Fonts
In this section various fonts are listed for the different typefaces.
Make sure to follow [the adding new fonts section](#adding-new-font) after
installing new fonts.
#### Monospace
For monospace the font `JetBrainsMono Nerd Font Mono` that is also used
IntelliJ and other JetBrains software is recommended.
As an additional feature it can be used packaged as a
[Nerd Font](https://www.nerdfonts.com/).
For some distributions it is available in the `ttf-jetbrains-mono-nerd` package.
alternatively it can be downloaded from the
[Nerd Fonts download page](https://www.nerdfonts.com/font-downloads).
#### CJK
CJK fonts can be installed together by using Google Noto CJK fonts.
They are typically inside a package named `noto-fonts-cjk` but can also be
retrieved from their [website](https://fonts.google.com/noto).
An alternative to this are the Adobe fonts.
They are typically installed separately.
The repository is split into
[source han sans](https://github.com/adobe-fonts/source-han-sans),
[source han serif](https://github.com/adobe-fonts/source-han-serif) and
[source han mono](https://github.com/adobe-fonts/source-han-mono) .
On some [package managers](/wiki/linux/package_manager.md) the fonts are further
split depending on [typeface](/wiki/font.md#typefaces) and language.
The following list shows the name of the
[Arch Linux packages](/wiki/linux/arch-linux/arch-linux.md).
The names on other distributions can vary slightly.
- `adobe-source-han-sans-jp-fonts` is for japanese sans style fonts.
- `adobe-source-han-serif-jp-fonts` is for japanese sans style fonts.
- `adobe-source-han-mono-jp-fonts` is for japanese mono style fonts.
- `adobe-source-han-sans-kr-fonts` is for korean sans font.
- `adobe-source-han-serif-kr-fonts` is for korean serif font.
- `adobe-source-han-mono-kr-fonts` is for korean mono font.
#### Emojis
Emojis are typically unicode characters that need special packages to be
displayed properly.
[JoyPixels](https://joypixels.com) feature many emoji icons.
The fonts can be obtained from their [website](https://joypixels.com/download)
or for most distributions from the `ttf-joypixels` package.

View File

@ -0,0 +1,91 @@
# Git (Client)
This entry deals with the Git client used in
[Linux-based systems](/wiki/linux/linux.md).
The client is pretty simple to understand.
With only a handfull of commands you should be able to get your versioning going.
For servers with web interfaces there are different cli tools to control it
without using a browser.
## Setup
On most linux distributions BlueZ can be installed with the `bluez` package.
## Usage
This section addresses various use cases of git.
There is also an interactive
[fixup guide by Seth Robertson](https://sethrobertson.github.io/GitFixUm/fixup.html).
### Ignore files having local changes
If you need to make changes to a file that are local you can run
`config update-index --skip-worktree <file>`.
Following this the file won't show up as having changes from the upstream.
Note that files tagged with this command are checked out sparsly, so you need
to watch out for changes yourself if there are any.
To revert this run `config update-index --no-skip-worktree <file>`.
### Authentication via SSH
Authentication by default is done via a username and a password.
For some services such as Github.
it is not possible to use password as an authentication method.
The other possibility to authenticate to git is by using
[SSH](/wiki/linux/ssh.md).
For this a
[SSH certificate has to be created](/wiki/linux/ssh.md#generate-new-keys) and
[added to the authentication agent](/wiki/linux/ssh.md#adding-keys-to-authentication-agent).
Afterwards it the public SSH key to be added to the git server.
For Github there is
[a guide on that topic](https://docs.github.com/en/get-started/getting-started-with-git/why-is-git-always-asking-for-my-password).
Following these the git repositories have to be cloned in a special way to use
SSH instead of password and username.
The following shows both the normal way and the SSH way to clone git
repositories.
```ssh
git clone ssh://git@github.com:tiyn/wiki
git clone https://github.com/tiyn/wiki
```
By using the SSH config file the clone command can be shortened to
`git clone github:tiyn/wiki`.
For this follow the
[corresponding section in the SSH entry](/wiki/linux/ssh.md#shorten-ssh-connection-commands).
Set `Host` to `github`, `HostName` to `github.com` and `User` to `git`.
### Improved `git diff`
[Diff So Fancy](https://github.com/so-fancy/diff-so-fancy) is a drop in
replacement for the default `git diff` look.
It can be installed via the
[repository](https://github.com/so-fancy/diff-so-fancy) or the `diff-so-fancy`
package.
Afterwards the following lines need to be run to complete the configuration.
```sh
# switch to diff-so-fancy
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
git config --global interactive.diffFilter "diff-so-fancy --patch"
# color improvements
git config --global color.ui true
git config --global color.diff-highlight.oldNormal "red bold"
git config --global color.diff-highlight.oldHighlight "red bold 52"
git config --global color.diff-highlight.newNormal "green bold"
git config --global color.diff-highlight.newHighlight "green bold 22"
git config --global color.diff.meta "11"
git config --global color.diff.frag "magenta bold"
git config --global color.diff.func "146 bold"
git config --global color.diff.commit "yellow bold"
git config --global color.diff.old "red bold"
git config --global color.diff.new "green bold"
git config --global color.diff.whitespace "red reverse"
```