added editorconfig, pre commit hooks
This commit is contained in:
		
							parent
							
								
									0561f9eb04
								
							
						
					
					
						commit
						266ea2e006
					
				
					 10 changed files with 123 additions and 33 deletions
				
			
		
							
								
								
									
										19
									
								
								.editorconfig
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.editorconfig
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
|  | # EditorConfig is awesome: https://EditorConfig.org | ||||||
|  | 
 | ||||||
|  | # top-most EditorConfig file | ||||||
|  | root = true | ||||||
|  | 
 | ||||||
|  | [*] | ||||||
|  | indent_style = space | ||||||
|  | indent_size = 4 | ||||||
|  | end_of_line = lf | ||||||
|  | charset = utf-8 | ||||||
|  | trim_trailing_whitespace = true | ||||||
|  | insert_final_newline = true | ||||||
|  | 
 | ||||||
|  | [*.{yaml,yml}] | ||||||
|  | indent_size = 2 | ||||||
							
								
								
									
										28
									
								
								.pre-commit-config.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								.pre-commit-config.yaml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
|  | --- | ||||||
|  | repos: | ||||||
|  | - repo: https://github.com/pre-commit/pre-commit-hooks | ||||||
|  |   rev: v4.4.0 | ||||||
|  |   hooks: | ||||||
|  |   - id: check-yaml | ||||||
|  |   - id: end-of-file-fixer | ||||||
|  |   - id: trailing-whitespace | ||||||
|  |   - id: check-merge-conflict | ||||||
|  |   - id: check-byte-order-marker | ||||||
|  | - repo: https://github.com/fsfe/reuse-tool | ||||||
|  |   rev: v2.1.0 | ||||||
|  |   hooks: | ||||||
|  |   - id: reuse | ||||||
|  | - repo: https://github.com/editorconfig-checker/editorconfig-checker.python | ||||||
|  |   rev: '2.7.2' | ||||||
|  |   hooks: | ||||||
|  |   - id: editorconfig-checker | ||||||
|  |     alias: ec | ||||||
|  | - repo: https://github.com/shellcheck-py/shellcheck-py | ||||||
|  |   rev: v0.9.0.6 | ||||||
|  |   hooks: | ||||||
|  |   - id: shellcheck | ||||||
|  | ... | ||||||
|  | @ -1,4 +1,9 @@ | ||||||
| #! /bin/zsh | #! /bin/zsh | ||||||
|  | 
 | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
| # shellcheck shell=bash | # shellcheck shell=bash | ||||||
| 
 | 
 | ||||||
| alias cdiff="colordiff" | alias cdiff="colordiff" | ||||||
|  |  | ||||||
|  | @ -1,4 +1,9 @@ | ||||||
| #! /bin/zsh | #! /bin/zsh | ||||||
|  | 
 | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
| # shellcheck shell=bash | # shellcheck shell=bash | ||||||
| 
 | 
 | ||||||
| alias bathelp='bat --plain --language=help' | alias bathelp='bat --plain --language=help' | ||||||
|  |  | ||||||
|  | @ -1,4 +1,9 @@ | ||||||
| #! /bin/zsh | #! /bin/zsh | ||||||
|  | 
 | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
| # shellcheck shell=bash | # shellcheck shell=bash | ||||||
| 
 | 
 | ||||||
| function escape() { perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$@"; } | function escape() { perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$@"; } | ||||||
|  |  | ||||||
|  | @ -1,4 +1,9 @@ | ||||||
| #! /bin/zsh | #! /bin/zsh | ||||||
|  | 
 | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
| # shellcheck shell=bash | # shellcheck shell=bash | ||||||
| 
 | 
 | ||||||
| # this is ripped off serverfault https://serverfault.com/a/90401 | # this is ripped off serverfault https://serverfault.com/a/90401 | ||||||
|  |  | ||||||
							
								
								
									
										7
									
								
								exa.zsh
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								exa.zsh
									
										
									
									
									
								
							|  | @ -1,5 +1,10 @@ | ||||||
| #! /bin/zsh | #! /bin/zsh | ||||||
| # shellcheck shell=bash | 
 | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
|  | # shellcheck disable=all | ||||||
| 
 | 
 | ||||||
| alias exa='exa -FHhg@ --git --binary --time-style long-iso' | alias exa='exa -FHhg@ --git --binary --time-style long-iso' | ||||||
| alias exal='exa -l' | alias exal='exa -l' | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								fzf.zsh
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								fzf.zsh
									
										
									
									
									
								
							|  | @ -1,5 +1,11 @@ | ||||||
| #! /bin/zsh | #! /bin/zsh | ||||||
|  | 
 | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
| # shellcheck shell=bash | # shellcheck shell=bash | ||||||
|  | # shellcheck disable=1091 | ||||||
| 
 | 
 | ||||||
| export FZF_COMPLETION_OPTS='--border --info=inline' | export FZF_COMPLETION_OPTS='--border --info=inline' | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,5 +1,10 @@ | ||||||
| #! /bin/zsh | #! /bin/zsh | ||||||
| # shellcheck shell=bash | 
 | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
|  | # shellcheck disable=all | ||||||
| 
 | 
 | ||||||
| user_commands=( | user_commands=( | ||||||
|     list-units is-active status show help list-unit-files |     list-units is-active status show help list-unit-files | ||||||
|  |  | ||||||
							
								
								
									
										27
									
								
								zinit.zsh
									
										
									
									
									
								
							
							
						
						
									
										27
									
								
								zinit.zsh
									
										
									
									
									
								
							|  | @ -1,21 +1,28 @@ | ||||||
| #! /bin/zsh | #! /bin/zsh | ||||||
|  | 
 | ||||||
|  | # SPDX-FileCopyrightText: 2023 Tobias Schmidl | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  | 
 | ||||||
| # shellcheck shell=bash | # shellcheck shell=bash | ||||||
|  | # shellcheck disable=SC1091 | ||||||
| 
 | 
 | ||||||
| [ -z "$EDITOR" ] && export EDITOR=sensible-editor | [ -z "$EDITOR" ] && export EDITOR=sensible-editor | ||||||
| 
 | 
 | ||||||
| export LESS="-F -R" | export LESS="-F -R" | ||||||
| 
 | 
 | ||||||
| [ -r "$HOME/.config/user-dirs.dirs" -a \ | [ -r "$HOME/.config/user-dirs.dirs" ]  &&\ | ||||||
|     -z "$XDG_DESKTOP_DIR" -a \ |     [ -z "$XDG_DESKTOP_DIR" ] && \ | ||||||
|     -z "$XDG_DOWNLOAD_DIR" -a \ |     [ -z "$XDG_DOWNLOAD_DIR" ] && \ | ||||||
|     -z "$XDG_TEMPLATES_DIR" -a \ |     [ -z "$XDG_TEMPLATES_DIR" ] && \ | ||||||
|     -z "$XDG_PUBLICSHARE_DIR" -a \ |     [ -z "$XDG_PUBLICSHARE_DIR" ] && \ | ||||||
|     -z "$XDG_DOCUMENTS_DIR" -a \ |     [ -z "$XDG_DOCUMENTS_DIR" ] && \ | ||||||
|     -z "$XDG_MUSIC_DIR" -a \ |     [ -z "$XDG_MUSIC_DIR" ] && \ | ||||||
|     -z "$XDG_PICTURES_DIR" -a \ |     [ -z "$XDG_PICTURES_DIR" ] && \ | ||||||
|     -z "$XDG_VIDEOS_DIR" ] && . "$HOME/.config/user-dirs.dirs" |     [ -z "$XDG_VIDEOS_DIR" ] && \ | ||||||
|  |     . "$HOME/.config/user-dirs.dirs" | ||||||
| 
 | 
 | ||||||
| export MAILCHECK=1 | export MAILCHECK=1 | ||||||
| 
 | 
 | ||||||
| which fortune >/dev/null && which cowsay > /dev/null && fortune -e debian house-harkonnen house-atreides pratchett | cowsay -f tux -W 76 -n | which fortune >/dev/null && which cowsay > /dev/null && fortune -u debian house-harkonnen house-atreides pratchett | cowsay -f tux -W 76 -n | ||||||
| which todo > /dev/null && todo ls | which todo > /dev/null && todo ls | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue