Compare commits

...
85 changed files with 5851 additions and 636 deletions

8
.bash_login Normal file
View file

@ -0,0 +1,8 @@
# Executed by bash when a login shell starts
# Mimic bash's default behavior explicitly
if [ -f "$HOME/.profile" ]; then
source "$HOME/.profile"
else
source "$HOME/.bashrc"
fi

View file

@ -1,3 +1,3 @@
#!/bin/bash
# Executed by bash when a login shell exits
. "$XDG_CONFIG_HOME/shell/logout"
source "$HOME/.config/shell/logout.sh"

10
.bash_profile Normal file
View file

@ -0,0 +1,10 @@
# Executed by bash when a login shell starts
# Mimic bash's default behavior explicitly
if [ -f "$HOME/.bash_login" ]; then
source "$HOME/.bash_login"
elif [ -f "$HOME/.profile" ]; then
source "$HOME/.profile"
else
source "$HOME/.bashrc"
fi

193
.bashrc
View file

@ -1,80 +1,86 @@
#!/bin/bash
# `bash`-specific configurations
# Executed by bash when a (non-)login shell starts
# Load configuration files common to all kinds of shells,
# if not already done by a `bash` login shell
[ -z "$PROFILE_LOADED" ] && [ -f "$HOME/.profile" ] && . "$HOME/.profile"
# Ensure bash is running interactively
[[ $- != *i* ]] && return
# Ensure `bash` is running interactively
case $- in
*i*) ;;
*) return;;
esac
# Check if a command can be found on the $PATH
_command_exists() {
command -v "$1" 1>/dev/null 2>&1
}
# Configure the `history`
# Set these environment variables here
# to avoid conflict/overlap with `zsh`
# Enable XON/XOFF software flow control
stty -ixon
# Report status of background jobs immediately
set -o notify
# Show number of running jobs when exiting a shell
shopt -s checkjobs
# Just type the directory to cd into it
shopt -s autocd
# Correct minor spelling mistakes with cd
shopt -s cdspell
# Include hidden files in * glob expansion
shopt -s dotglob
shopt -s extglob
# Expand ** into (recursive) directories
shopt -s globstar
# Ignore case when * expanding
shopt -s nocaseglob
# Update $ROWS and $COLUMNS after each command
shopt -s checkwinsize
# Set these environment variables here (and not in ~/.profile)
# due to conflict/overlap with zsh
export HISTFILE="$XDG_STATE_HOME/bash/history"
export HISTSIZE=999999 # number of lines kept in memory
export HISTFILESIZE=999999 # number of lines kept in $HISTFILE
export HISTSIZE=999999 # Number of lines kept in memory
export HISTFILESIZE=999999 # Number of lines kept in the `$HISTFILE`
# Ignore commands prefixed with a space
# Ignore commands prefixed with a space,
# and ones entered identically just before
# (this mimics zsh's default behavior)
export HISTCONTROL=ignoreboth
shopt -s cmdhist # Remember multi-line commands as just one line
shopt -s histappend # Do not overwrite the `$HISTFILE`
shopt -s histreedit # Allow editing failed history substitutions
shopt -s lithist # Store multi-line commands in history without `;`
# Remember multi-line commands in history as one command
shopt -s cmdhist
# Do not overwrite .bash_history file
shopt -s histappend
# Allow re-editing a failed history substitution
shopt -s histreedit
# Store multi-line commands in history without semicolons
shopt -s lithist
# Make `bash` feel a bit more like `zsh`
shopt -s autocd # Just type the directory to `cd` into it
shopt -s cdspell # Correct minor spelling mistakes with `cd`
shopt -s checkjobs # Show number of running jobs when exiting `bash`
shopt -s checkwinsize # Update `$ROWS` and `$COLUMNS` after commands
shopt -s globstar # Expand ** into recursive directories
# Initialize various utilities and aliases
source "$HOME/.config/shell/init.sh"
stty -ixon # Prevent Ctrl+S from freezing `bash`
# Make `bash` show `chroot`s
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# Make `bash` more colorful
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
fi
# Enable tab completion
# Enable programmable completion features
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
source /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
source /etc/bash_completion
fi
fi
# Enable completions for various tools
_command_exists invoke && eval "$(invoke --print-completion-script=bash)"
_command_exists nox && eval "$(register-python-argcomplete nox)"
_command_exists pip && eval "$(pip completion --bash)"
_command_exists pipx && eval "$(register-python-argcomplete pipx)"
_command_exists poetry && eval "$(poetry completions bash)"
# Add tab completion for all aliases to commands with completion functions
# (must come after bash completions have been set up)
# Source: https://superuser.com/a/437508
@ -134,5 +140,86 @@ _alias_completion() {
new_completion="${new_completion% *} $alias_name"
echo "$new_completion" >> "$tmp_file"
done < <(alias -p | sed -Ene "s/$alias_regex/\1 '\2' '\3'/p")
. "$tmp_file" && \rm -f "$tmp_file"
source "$tmp_file" && \rm -f "$tmp_file"
}; _alias_completion
# Mimic zsh's PowerLevel10k
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
_debian_chroot=$(cat /etc/debian_chroot)
fi
_prompt_git() { # Show a git repo's state
local out ref uncommited unstaged untracked ahead behind
# Check if the pwd contains a git repository and exit early if it does not
ref=$(git rev-parse --abbrev-ref --symbolic-full-name HEAD 2> /dev/null)
[ "$ref" == "" ] && return
# Check if the current HEAD is detached or reachable by a ref
printf "\033[0;37m "
if [ "$ref" == "HEAD" ]; then
ref=$(git rev-parse --short HEAD)
printf "@"
fi
printf "\033[0;32m$ref\033[0m"
# Indicate if local is ahead and/or behind upstream
ahead=0
behind=0
git status 2>/dev/null | (
while read -r line ; do
case "$line" in
*'diverged'*) # For simplicity, a diverged local branch is
ahead=1 ; behind=1 ; break ; ;; # indicated as being
*'ahead'*) # both ahead and behind its upstream
ahead=1 ; ;;
*'behind'*)
behind=1 ; ;;
esac
done
if [ $ahead -gt 0 ] && [ $behind -gt 0 ]; then
printf "\033[0;32m <>\033[0m"
elif [ $ahead -gt 0 ]; then
printf "\033[0;32m >\033[0m"
elif [ $behind -gt 0 ]; then
printf "\033[0;32m <\033[0m"
fi
)
# Indicate stashed files with a *
[ "$(git stash list 2> /dev/null)" != "" ] && printf "\033[0;32m *\033[0m"
# Indicate uncommited/staged with a +
git diff-index --cached --exit-code --quiet HEAD -- 2> /dev/null
[ $? -gt 0 ] && printf "\033[0;33m +\033[0m"
# Indicate unstaged with a !
git diff-files --exit-code --quiet 2> /dev/null
[ $? -gt 0 ] && printf "\033[0;33m !\033[0m"
# Indicate untracked files with a ?
if [ "$(git ls-files --exclude-standard --others 2> /dev/null)" != "" ]; then
printf "\033[0;34m ?\033[0m"
fi
}
_prompt_jobs() { # Indicate running background jobs with a"%"
local running
(( $(jobs -rp | wc -l) )) && printf "\033[0;32m %\033[0m"
}
_prompt_pyenv() { # Mimic zsh's pyenv/venv integration
if [ -n "$VIRTUAL_ENV" ]; then
echo -e "\033[0;36m py $(python -c "import os, sys; (hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix)) and print(os.path.basename(sys.prefix))")\033[0m"
elif [ -n "$PYENV_VERSION" ]; then
if [ "$PYENV_VERSION" != "system" ]; then
echo -e "\033[0;36m py $PYENV_VERSION\033[0m"
fi
elif [ -f "$(pwd)/.python-version" ]; then
echo -e "\033[0;36m py $(cat .python-version | sed ':a;N;$!ba;s/\n/:/g')\033[0m"
fi
}
# Disable the default prompts set by pyenv and venv
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
export VIRTUAL_ENV_DISABLE_PROMPT=1
PS1='${chroot:+($_debian_chroot)}\w$(_prompt_git)$(_prompt_jobs)$(_prompt_pyenv) > '
PS2='... '

View file

@ -0,0 +1,46 @@
[General]
confirmExternalStorage=true
crashReporter=false
desktopEnterpriseChannel=daily
isVfsEnabled=false
launchOnSystemStartup=true
monoIcons=true
moveToTrash=false
newBigFolderSizeLimit=10000
notifyExistingFoldersOverLimit=false
optionalServerNotifications=false
overrideLocalDir=
overrideServerUrl=
promptDeleteAllFiles=false
showCallNotifications=false
stopSyncingExistingFoldersOverLimit=false
useNewBigFolderSizeLimit=false
[Accounts]
0\Folders\1\ignoreHiddenFiles=false
0\Folders\1\localPath=/home/alexander/Cloud/
0\Folders\1\paused=false
0\Folders\1\targetPath=/
0\Folders\1\version=2
0\Folders\1\virtualFilesMode=off
0\authType=webflow
0\dav_user=alexander
0\networkDownloadLimit=0
0\networkDownloadLimitSetting=-2
0\networkProxyHostName=
0\networkProxyNeedsAuth=false
0\networkProxyPort=0
0\networkProxySetting=0
0\networkProxyType=0
0\networkProxyUser=
0\networkUploadLimit=0
0\networkUploadLimitSetting=-2
0\url=https://getraenkemarkt.cloud
0\user=@Invalid()
0\webflow_user=alexander
[Nextcloud]
autoUpdateCheck=false
[Proxy]
type=2

View file

@ -0,0 +1,52 @@
# This file contains fixed global exclude patterns
*~
~$*
.~lock.*
~*.tmp
]*.~*
]Icon\r*
].DS_Store
].ds_store
*.textClipping
._*
]Thumbs.db
]photothumb.db
System Volume Information
.*.sw?
.*.*sw?
].TemporaryItems
].Trashes
].DocumentRevisions-V100
].Trash-*
.fseventd
.apdisk
.Spotlight-V100
.directory
*.part
*.filepart
*.crdownload
*.kate-swp
*.gnucash.tmp-*
.synkron.*
.sync.ffs_db
.symform
.symform-store
.fuse_hidden*
*.unison
.nfs*
My Saved Places.
\#*#
*.sb-*
# LibreOffice's lock files
.lock

View file

@ -0,0 +1,56 @@
[colors]
draw_bold_text_with_bright_colors = true
[cursor]
blink_interval = 500
thickness = 0.1
unfocused_hollow = true
[cursor.style]
blinking = "On"
shape = "Block"
[font]
size = 12.0
[font.bold]
family = "FiraCode Nerd Font"
style = "Bold"
[font.bold_italic]
family = "FiraCode Nerd Font"
style = "Semibold"
[font.italic]
family = "FiraCode Nerd Font"
style = "Light"
[font.normal]
family = "FiraCode Nerd Font"
style = "Regular"
[font.offset]
x = 0
y = 0
[[keyboard.bindings]]
action = "SpawnNewInstance"
key = "Return"
mods = "Control|Shift"
[scrolling]
history = 9999
multiplier = 10
[terminal.shell]
args = ["-l"]
program = "/usr/bin/zsh"
[window]
decorations = "none"
dynamic_padding = true
opacity = 0.95
[window.padding]
x = 10
y = 10

View file

@ -0,0 +1,11 @@
[Desktop Entry]
Name=Nextcloud
GenericName=File Synchronizer
Exec="/usr/bin/nextcloud" --background
Terminal=false
Icon=Nextcloud
Categories=Network
Type=Application
StartupNotify=false
X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=10

7
.config/bpython/config Normal file
View file

@ -0,0 +1,7 @@
[general]
# Make `bpython` and `python` share their history
hist_file = ~/.python_history
# No limit
hist_length = 0

View file

@ -0,0 +1,11 @@
[General]
contrastOpacity=188
disabledTrayIcon=true
drawColor=#ff0000
drawThickness=3
filenamePattern=%F_%H-%M-%S
saveAsFileExtension=png
savePath=/home/alexander/data/uploads/screenshots
showHelp=false
startupLaunch=false
uiColor=#ff3a00

View file

@ -1,18 +1,38 @@
# SUBJECT -> What does the commit do?
# - Imperative mood, no "." at the end
# - Start with "Add", "Fix", "Make", "Remove", ...
#=================================================|
# SUBJECT ========================================|
#=================================================|
# - what does the commit do
# - capitalize the first word
# - use imperative mood (e.g., "Add" over "Adds")
# - do not end the line with a period
# - start with "Fix" for any fixes
#---------- 50 characters / 1 line ---------------|
# BODY -> The why and how
# - Use plain text without formatting
# + Use "-" and "+" as bullets
# - "See: URL" to link to external resources
#---------- 72 characters / multiple lines -----------------------------|
#-------------------------------------------------|
# ISSUE TRACKER -> Uncomment one of the lines below
# Closes #41
# Fixes #42
# Resolves #43
#=======================================================================|
# BODY (optional) ======================================================|
#=======================================================================|
# - explain what the commit does, why it does it, and how
# - do not format the text (e.g., Markdown)
# - use multiple lines starting with "-" as bullet points
# + first sub-level
# * second sub-level
# - link to external resources for more context
#---------- 72 characters / multiple lines (and paragraphs) ------------|
#=======================================================================|
# ISSUE TRACKER (optional) =============================================|
#=======================================================================|
# - uncomment and adapt one of the lines below
# - use the "closes" keyword if applicable
# (see https://help.github.com/articles/closing-issues-using-keywords)
#-----------------------------------------------------------------------|
# Closes #41 on the issue tracker
# Fixes #42 on the issue tracker
# Resolves #43 on the issue tracker

View file

@ -1,160 +1,132 @@
[alias]
# Note that ~/.config/shell/aliases loads all `git` aliases with
# Important: ~/.config/shell/aliases.sh loads all git aliases with
# less than 7 characters into the shell's "namespace" with a "g" prefix
# Example: `git add` <=> `git a` <=> `ga`
# Example: git add <=> git a <=> ga
a = add
ap = add --patch
bi = bisect
br = branch
bra = branch --all
brd = branch --delete
brdd = branch --delete --force
brm = branch --move
cf = cat-file
ci = commit
cim = commit --message
cl = clone
checkout-all = "!f() { for branch in $(git branch -r | grep -v '\\->'); do git branch --track ${branch#origin/} $branch; done; git fetch --all; }; f"
co = checkout
coa = checkout-all
cob = checkout -b
cod = checkout develop
com = checkout main
com = checkout master
cp = cherry-pick
de = describe --tags
df = diff
fe = fetch
lg = log
lga = log --all
mb = merge-base
me = merge
mea = merge --abort
mec = merge --continue
mefeat = "!f() { if [ $# -eq 0 ]; then echo "Must specify a branch to merge in"; exit 1; fi; git check-pull; if [ $? -gt 0 ]; then echo "$1 must be rebased first"; exit 1; fi; cb=$(git current-branch) && printf '# SUBJECT\n# =======\n# - what does the commit do\n# - capitalize the first word and use the\n# imperative mood (e.g. "Add" vs "Adds")\n# - do not end the line with a period\n# - start with "Fix" for any hotfixes\n# ========= 50 characters / 1 line ============= |\nMerge in \"%s\"\n# ============================================== |\n\n\n# BODY (optional)\n# ===============\n# - explain what the commit does, why it does it, and how\n# - do not format the text (e.g., Markdown or reStructuredText)\n# - use multiple lines starting with "-" as bullet points\n# - link to external resources for even more context where appropriate\n# ========= 72 characters / multiple lines (and paragraphs) ========== |\nMerge branch \"%s\" into \"%s\"\n\nSummary of the merged in commits:\n' $1 $1 $cb > .merge_msg.txt.tmp && git log --format=format:' * %h: %s' $cb..$1 >> .merge_msg.txt.tmp && printf '\n\n\n# ==================================================================== |\n\n\n# GITHUB ISSUE (optional)\n# =======================\n# - uncomment and adapt one of the lines below\n# - use the "closes" keyword if applicable\n# (see https://help.github.com/en/articles/closing-issues-using-keywords)\n#\n# Related GitHub issue: #21\n# This commit closes #42 on the GitHub issue tracker\n\n\n#\n# END\n#\n' >> .merge_msg.txt.tmp && git merge --no-ff --no-commit $1 && SKIP=no-commit-to-branch git commit --edit --file=.merge_msg.txt.tmp; rm -f .merge_msg.txt.tmp; }; f"
meff = merge --ff-only
menoff = merge --no-ff
pl = pull
plrb = pull --rebase
ps = push
psf = push --force
rb = rebase --committer-date-is-author-date
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive
rbq = rebase --quit
rbs = rebase --skip
rl = reflog
rm = rm # to make it available as the `grm` alias in the shell
rm = rm # To make it available as the grm alias
rp = rev-parse
rs = reset
rv = revert
s = status
ss = status --short
sh = show
st = stash
sta = stash push --include-untracked # "push" does not go into the shortcut!
sta = stash push --include-untracked # push does not go into the shortcut!
stam = stash push --include-untracked --message
stapp = stash apply
stl = stash list
stp = stash pop
stsh = stash show
# Synonyms as "specified" in the `git status` header
# Provide an overview of all aliases. Second one is for use in ~/.bashrc
aliases = config --get-regexp 'alias.*'
internal-aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1/' | sort
# Provide synonyms as "specified" in the git status header
discard = checkout --
unstage = reset HEAD --
amend-commit = !git log -n 1 --pretty=tformat:%B | git commit -F - --amend # Keep the commit message
# Common tasks with tedious or non-intuitive flags
amend-commit = !git log -n 1 --pretty=tformat:%B | git commit -F - --amend # Keep the commit message
check-pull = "!f() { git fetch; upstream=${1:-'@{u}'}; local=$(git rev-parse @); remote=$(git rev-parse "$upstream"); base=$(git merge-base @ "$upstream"); if [ $local = $remote ]; then echo "Up-to-date"; exit 0; elif [ $local = $base ]; then echo "Local branch is behind upstream"; elif [ $remote = $base ]; then echo "Local branch is ahead of upstream"; else echo "Local and remote branches diverged"; fi; exit 1; }; f"
current-branch = !git rev-parse --abbrev-ref HEAD
project-root = rev-parse --show-toplevel
uncommit = reset --soft HEAD~1
project-root = rev-parse --show-toplevel
uncommit = reset --soft HEAD~1
# Sync the working directory into the index
sync-deleted = !git ls-files -z --deleted | xargs -r -0 git rm
sync = !git sync-deleted && git add . --all
rm-deleted = !git ls-files -z --deleted | xargs -r -0 git rm
sync-pwd-to-index = !git rm-deleted && git add . --all
sy = !git sync-pwd-to-index
# Make minimal diff the default
diff-minimal = diff --color-words=. --ws-error-highlight=all
d = !git diff-minimal
dlc = diff --color-words=. --ws-error-highlight=all HEAD
ds = diff --color-words=. --ws-error-highlight=all --staged
d = diff --color-words=. --ws-error-highlight=all
dlc = diff --color-words=. --ws-error-highlight=all HEAD
ds = diff --color-words=. --ws-error-highlight=all --staged
# Clean the project folder with intuitive commands
clean-all = !git reset --hard && git clean-ignored && git clean-untracked
clean-ignored = "!f() { if [ -f .python-version ]; then mv .python-version .python-version.XYZ; fi; if [ -f .env ]; then mv .env .env.XYZ; fi; git clean -X -d -f "$@"; if [ -f .python-version.XYZ ]; then mv .python-version.XYZ .python-version; fi; if [ -f .env.XYZ ]; then mv .env.XYZ .env; fi }; f"
clean-untracked = !git clean -x -d -e ".python-version" -e ".env" -f # because the "-e" flag does not work with "-X"
# Delete EVERYTHING not reachable from a branch from the repository
# Always keep the .python-version file, which is also often in ~.gitignore
clean-all = !git reset --hard && git clean-ignored && git clean-untracked
clean-ignored = "!f() { if [ -f .python-version ]; then mv .python-version .python-version.XYZ; fi; if [ -f .env ]; then mv .env .env.XYZ; fi; git clean -X -d -f "$@"; if [ -f .python-version.XYZ ]; then mv .python-version.XYZ .python-version; fi; if [ -f .env.XYZ ]; then mv .env.XYZ .env; fi }; f"
clean-untracked = !git clean -x -d -e ".python-version" -e ".env" -f # The -e flag does not work with -X
# Delete everything not reachable from a branch from the repository
gc-everything = "!f() { git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"; }; f"
# Make the logs look nice by default
log-format1 = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%an @ %ad => %ar%n' --date=format:'%a %Y-%m-%d %H:%M:%S %z'
log-format2 = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%aN @ %ad => %ar%n%+b' --date=format:'%a %Y-%m-%d %H:%M:%S %z'
last-commit = !git log-format2 -1 -p --stat
lc = !git last-commit
history = !git log-format2 --graph
hi = !git history
hia = !git history --all
summary = !git log-format1 --graph
su = !git summary
sua = !git summary --all
oneline = log --pretty='%C(auto)%h: %s%d' --graph
ol = !git oneline
ola = !git oneline --all
last-commit = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%aN @ %ad => %ar%n%+b' --date=format:'%a %Y-%m-%d %H:%M:%S %z' -1 -p --stat
lc = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%aN @ %ad => %ar%n%+b' --date=format:'%a %Y-%m-%d %H:%M:%S %z' -1 -p --stat
history = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%aN @ %ad => %ar%n%+b' --date=format:'%a %Y-%m-%d %H:%M:%S %z' --graph
hi = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%aN @ %ad => %ar%n%+b' --date=format:'%a %Y-%m-%d %H:%M:%S %z' --graph
hia = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%aN @ %ad => %ar%n%+b' --date=format:'%a %Y-%m-%d %H:%M:%S %z' --graph --all
summary = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%an @ %ad => %ar%n' --date=format:'%a %Y-%m-%d %H:%M:%S %z' --graph
su = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%an @ %ad => %ar%n' --date=format:'%a %Y-%m-%d %H:%M:%S %z' --graph
sua = log --pretty='%C(auto)%h: %s%d%Creset%n%C(dim)%an @ %ad => %ar%n' --date=format:'%a %Y-%m-%d %H:%M:%S %z' --graph --all
oneline = log --pretty='%C(auto)%h: %s%d' --graph
ol = log --pretty='%C(auto)%h: %s%d' --graph
ola = log --pretty='%C(auto)%h: %s%d' --graph --all
# Search the repository
grep-code = grep --break --context 1 --full-name --heading --line-number --show-function
grepc = !git grep-code
grep-log = log --all --regexp-ignore-case --pretty='%C(auto)%h: %s%+D%Creset%n%C(reverse)%C(dim)%aN @ %ad = %ar%Creset%n%+b' --date=format:'%a %Y-%m-%d %H:%M:%S' --grep
grepl = !git grep-log
grepc = grep --break --context 1 --full-name --heading --line-number --show-function
grep-log = log --all --regexp-ignore-case --pretty='%C(auto)%h: %s%+D%Creset%n%C(reverse)%C(dim)%aN @ %ad = %ar%Creset%n%+b' --date=format:'%a %Y-%m-%d %H:%M:%S' --grep
grepl = log --all --regexp-ignore-case --pretty='%C(auto)%h: %s%+D%Creset%n%C(reverse)%C(dim)%aN @ %ad = %ar%Creset%n%+b' --date=format:'%a %Y-%m-%d %H:%M:%S' --grep
grep-text = grep --break --context 1 --full-name --heading --ignore-case --line-number
grept = !git grep-text
# Prune local branches that were deleted remotely
grept = grep --break --context 1 --full-name --heading --ignore-case --line-number
# Push current branch to origin
push-to-origin = "!f(){ git push --set-upstream origin $(git current-branch) "$@"; }; f"
pso = "!f(){ git push --set-upstream origin $(git current-branch) "$@"; }; f"
prune-gone = "!git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}'"
prune-delete = "!git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -d"
prune-show = "!git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}'"
aliases = config --get-regexp 'alias.*'
aliases-internal = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1/' | sort # used in ~/.config/shell/aliases
[clean]
requireforce = true
[color "branch"]
current = cyan dim bold reverse
local = green bold
remote = red bold
[color "decorate"]
HEAD = cyan dim bold reverse
branch = green bold
remoteBranch = red bold
stash = magenta dim bold reverse
tag = magenta bold
[color "diff"]
context = white
frag = blue dim bold reverse
meta = yellow dim bold reverse
@ -162,9 +134,7 @@ new = green bold
old = red bold
whitespace = red dim bold reverse
[color "grep"]
context = white
filename = yellow dim bold reverse
function = white bold
@ -173,17 +143,13 @@ match = red bold
selected = white
separator = blue dim bold reverse
[color "interactive"]
error = red dim bold reverse
header = white
help = yellow bold
prompt = white dim bold reverse
[color "status"]
added = green bold
branch = cyan dim bold reverse
changed = yellow bold
@ -194,80 +160,53 @@ remoteBranch = red bold
unmerged = yellow dim bold reverse
untracked = red bold
[commit]
cleanup = strip
gpgSign = true
template = ~/.config/git/commit_msg_template.txt
verbose = true
[core]
editor = vim
excludesfile = ~/.config/git/ignore
pager = less --chop-long-lines --ignore-case --LONG-PROMPT --status-column --quit-if-one-screen
whitespace = -space-before-tab,tab-in-indent
[diff]
renames = true
submodule = log
[help]
autocorrect = 50
[init]
defaultBranch = main
[merge]
conflictstyle = diff3
ff = only
[pull]
ff = only
rebase = true
[push]
autoSetupRemote = true
default = upstream
recursesubmodules = check
[rerere]
enabled = true
[url "https://bitbucket.org/"]
insteadOf = bb:
[url "https://github.com/"]
insteadOf = gh:
[url "https://gitlab.com/"]
insteadOf = gl:
[user]
name = Alexander Hess
email = alexander@webartifex.biz
signingKey = alexander@webartifex.biz
signingKey = AB5C0E319D77350FBA6CF143344EA5AB10D868E0

View file

@ -5,6 +5,28 @@
*.temp
*.tmp
# LibreOffice
# Source: https://github.com/github/gitignore/blob/main/Global/LibreOffice.gitignore
#
# Locks
.~lock.*#
# Linux typical files we do not want under version control
# Source: https://github.com/github/gitignore/blob/main/Global/Linux.gitignore
#
*~
# Temporary files created if a process still has a handle open to a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder possibly appearing on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# pyenv
.python-version
# Vim
# Source: https://github.com/github/gitignore/blob/main/Global/Vim.gitignore
#

View file

@ -0,0 +1,7 @@
# Gnome Settings
This folder contains my Gnome settings
split into several \*.ini files by logical group.
Load them into Gnome with `dconf load / < <file>`.
It is important to always load them in anchored at the root (i.e., `/`).

View file

@ -0,0 +1,53 @@
[org/gnome/desktop/app-folders]
folder-children=['Browsers', 'Communication', 'Develop', 'Files', 'Multimedia', 'Office', 'Remote', 'Settings', 'Terminal', 'Utilities']
[org/gnome/desktop/app-folders/folders/Browsers]
apps=['google-chrome.desktop', 'org.mozilla.firefox.desktop']
name='Browsers'
translate=true
[org/gnome/desktop/app-folders/folders/Communication]
apps=['org.mozilla.thunderbird.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Evolution.desktop', 'org.telegram.desktop.desktop', 'Zoom.desktop']
name='Communication'
translate=true
[org/gnome/desktop/app-folders/folders/Develop]
apps=['com.jetbrains.PyCharm-Professional.desktop', 'org.gnome.Boxes.desktop', 'rstudio.desktop', 'texmaker.desktop', 'scrcpy.desktop', 'scrcpy-console.desktop', 'sqlitebrowser.desktop']
name='Develop'
translate=true
[org/gnome/desktop/app-folders/folders/Files]
apps=['fr.romainvigier.MetadataCleaner.desktop', 'org.cryptomator.Cryptomator.desktop', 'org.gnome.Evince.desktop', 'org.gnome.FileRoller.desktop', 'org.gnome.Loupe.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.TextEditor.desktop', 'simple-scan.desktop']
name='Files'
translate=true
[org/gnome/desktop/app-folders/folders/Multimedia]
apps=['com.obsproject.Studio.desktop', 'com.spotify.Client.desktop', 'org.gnome.Rhythmbox3.desktop', 'vlc.desktop']
name='Multimedia'
translate=true
[org/gnome/desktop/app-folders/folders/Office]
apps=['libreoffice-base.desktop', 'libreoffice-calc.desktop', 'libreoffice-draw.desktop', 'libreoffice-impress.desktop', 'libreoffice-math.desktop', 'libreoffice-startcenter.desktop', 'libreoffice-writer.desktop', 'simple-scan.desktop']
name='Office'
translate=true
[org/gnome/desktop/app-folders/folders/Remote]
apps=['org.remmina.Remmina.desktop', 'rustdesk.desktop', 'scrcpy.desktop', 'scrcpy-console.desktop']
name='Remote'
translate=true
[org/gnome/desktop/app-folders/folders/Settings]
apps=['ca.desrt.dconf-editor.desktop', 'com.github.joseexposito.touche.desktop', 'com.system76.keyboardconfigurator.desktop', 'firewall-config.desktop', 'gnome-language-selector.desktop', 'gnome-session-properties.desktop', 'gnome-system-monitor.desktop', 'im-config.desktop', 'menulibre.desktop', 'nm-connection-editor.desktop', 'nvidia-settings.desktop', 'org.bleachbit.BleachBit.desktop', 'org.gnome.Extensions.desktop', 'org.gnome.PowerStats.desktop', 'org.gnome.Settings.desktop', 'org.gnome.Software.desktop', 'org.gnome.tweaks.desktop', 'org.pulseaudio.pavucontrol.desktop', 'software-properties-gnome.desktop', 'system76-driver.desktop', 'system76-firmware.desktop']
name='Settings'
translate=true
[org/gnome/desktop/app-folders/folders/Terminal]
apps=['Alacritty.desktop', 'htop.desktop', 'org.gnome.Terminal.desktop', 'ranger.desktop']
name='Terminal'
translate=true
[org/gnome/desktop/app-folders/folders/Utilities]
apps=['com.github.donadigo.eddy.desktop', 'com.system76.Popsicle.desktop', 'gparted.desktop', 'gucharmap.desktop', 'info.desktop', 'java-17-openjdk-17.0.4.0.8-1.fc36.x86_64-jconsole.desktop', 'org.gnome.baobab.desktop', 'org.gnome.Characters.desktop', 'org.gnome.DiskUtility.desktop', 'org.gnome.eog.desktop', 'org.gnome.font-viewer.desktop', 'org.gnome.Logs.desktop', 'org.gnome.Screenshot.desktop', 'org.gnome.seahorse.Application.desktop', 'org.gnome.Totem.desktop', 'pop-cosmic-applications.desktop', 'pop-cosmic-launcher.desktop', 'pop-cosmic-workspaces.desktop', 'screenkey.desktop', 'yelp.desktop']
name='Utilities'
translate=true

View file

@ -0,0 +1,144 @@
# This file contains settings for various individual desktop apps
[ca/desrt/dconf-editor]
# Always start at dconf's root
saved-pathbar-path='/'
saved-view='/'
show-warning=false
[org/gnome/Contacts]
did-initial-setup=true
[org/gnome/TextEditor]
auto-indent=true
highlight-current-line=true
indent-style='space'
restore-session=false
show-grid=true
show-map=true
tab-width=4
wrap-text=false
[org/gnome/calendar]
active-view='week'
[org/gnome/control-center]
last-panel='info-overview'
# [org/gnome/gedit]
[org/gnome/gedit/plugins/filebrowser]
tree-view=true
[org/gnome/gedit/preferences/ui]
show-tabs-mode='auto'
[org/gnome/gnome-system-monitor]
cpu-smooth-graph=true
cpu-stacked-area-chart=false
disks-interval=1000
graph-update-interval=250
maximized=false
network-in-bits=true
show-all-fs=true
show-dependencies=false
show-whose-processes='user'
update-interval=1000
# [org/gnome/nautilus]
[org/gnome/nautilus/compression]
default-compression-format='zip'
[org/gnome/nautilus/icon-view]
captions=['size', 'none', 'none']
[org/gnome/nautilus/list-view]
default-column-order=['name', 'size', 'type', 'owner', 'group', 'permissions', 'where', 'date_modified', 'date_modified_with_time', 'date_accessed', 'recency', 'starred', 'detailed_type']
default-visible-columns=['name', 'size', 'date_modified', 'starred']
use-tree-view=true
[org/gnome/nautilus/preferences]
always-use-location-entry=true
default-folder-viewer='list-view'
search-filter-time-type='last_modified'
search-view='list-view'
show-create-link=false
show-delete-permanently=true
[org/gnome/software]
allow-updates=false
check-timestamp=0
download-updates=false
download-updates-notify=false
first-run=false
install-timestamp=0
online-updates-timestamp=0
security-timestamp=0
update-notification-timestamp=0
upgrade-notification-timestamp=0
# [org/gnome/terminal]
[org/gnome/terminal/legacy]
confirm-close=false
# [org/gnome/terminal/legacy/keybindings]
# See ~/.config/gnome-settings/key-bindings.ini for the key bindings
[org/gnome/terminal/legacy/profiles:]
default='b1dcc9dd-5262-4d8d-a863-c897e6d979b9'
list=['b1dcc9dd-5262-4d8d-a863-c897e6d979b9']
[org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
audible-bell=false
background-color='rgb(0,0,0)'
bold-is-bright=true
custom-command='/usr/bin/zsh'
foreground-color='rgb(255,255,255)'
login-shell=false
use-custom-command=true
use-theme-colors=true
visible-name='Default'
[org/gnome/tweaks]
show-extensions-notice=false
# [org/gtk/*/settings/file-chooser]
# This is Gnome Files
[org/gtk/gtk4/settings/file-chooser]
# Keep in sync with [org/gtk/settings/file-chooser]
date-format='regular'
location-mode='path-bar'
show-hidden=false
show-size-column=true
show-type-column=true
sort-column='name'
sort-directories-first=true
sort-order='ascending'
type-format='category'
[org/gtk/settings/file-chooser]
# Keep in sync with [org/gtk/gtk4/settings/file-chooser]
date-format='regular'
location-mode='path-bar'
show-hidden=false
show-size-column=true
show-type-column=true
sort-column='name'
sort-directories-first=true
sort-order='ascending'
type-format='category'

View file

@ -0,0 +1,5 @@
# Elgato Key Lights
The Python files in this folder are hooked as keyboard shortcuts in Gnome.
They allow to toggle the key lights in my office.
In the long-run, these scripts should be improved a bit.

View file

@ -0,0 +1,12 @@
#!/usr/bin/env python
import leglight
LEFT_KEYLIGHT_IP = "192.168.190.62"
RIGHT_KEYLIGHT_IP = "192.168.190.63"
left = leglight.LegLight(LEFT_KEYLIGHT_IP, port=9123)
right = leglight.LegLight(RIGHT_KEYLIGHT_IP, port=9123)
left.decBrightness(5)
right.decBrightness(5)

View file

@ -0,0 +1,12 @@
#!/usr/bin/env python
import leglight
LEFT_KEYLIGHT_IP = "192.168.190.62"
RIGHT_KEYLIGHT_IP = "192.168.190.63"
left = leglight.LegLight(LEFT_KEYLIGHT_IP, port=9123)
right = leglight.LegLight(RIGHT_KEYLIGHT_IP, port=9123)
left.decColor(200)
right.decColor(200)

View file

@ -0,0 +1,12 @@
#!/usr/bin/env python
import leglight
LEFT_KEYLIGHT_IP = "192.168.190.62"
RIGHT_KEYLIGHT_IP = "192.168.190.63"
left = leglight.LegLight(LEFT_KEYLIGHT_IP, port=9123)
right = leglight.LegLight(RIGHT_KEYLIGHT_IP, port=9123)
left.incBrightness(5)
right.incBrightness(5)

Some files were not shown because too many files have changed in this diff Show more