mirror of
https://github.com/tiyn/dotfiles.git
synced 2026-07-02 20:51:36 +02:00
Compare commits
10 Commits
3118f9d40f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 04f9ac187a | |||
| 803472b1c9 | |||
| 6e00342044 | |||
| d06a7bddf4 | |||
| e32eb6eebd | |||
| 29ac82a412 | |||
| 641a124fe3 | |||
| 71d23fa096 | |||
| 8dde717180 | |||
| a148a5a7a4 |
@@ -74,11 +74,11 @@ alias contacts="khard"
|
||||
# kolourpaint
|
||||
alias paint="kolourpaint"
|
||||
|
||||
# ls(d)
|
||||
alias l="exa --group-directories-first --icons"
|
||||
alias la="exa -la --group-directories-first --icons --git"
|
||||
alias ll="exa -l --group-directories-first --icons --git"
|
||||
alias tree="exa --tree --group-directories-first --icons"
|
||||
# ls
|
||||
alias l="eza --group-directories-first --icons"
|
||||
alias la="eza -la --group-directories-first --icons --git"
|
||||
alias ll="eza -l --group-directories-first --icons --git"
|
||||
alias tree="eza --tree --group-directories-first --icons"
|
||||
|
||||
# mkdir
|
||||
alias mkdir="mkdir -p"
|
||||
@@ -99,9 +99,6 @@ alias octave="octave --persist"
|
||||
# pacman
|
||||
alias pac="sudo pacman"
|
||||
|
||||
# papis
|
||||
alias papis='PYTHONWARNINGS=ignore::DeprecationWarning python -m papis'
|
||||
|
||||
# ping
|
||||
alias ping="ping -c 5"
|
||||
|
||||
|
||||
161
.config/gitignore/python
Normal file
161
.config/gitignore/python
Normal file
@@ -0,0 +1,161 @@
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/venv,python
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
#Pipfile.lock
|
||||
|
||||
# poetry
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
#pdm.lock
|
||||
.pdm.toml
|
||||
|
||||
# PEP 582
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
#.idea/
|
||||
|
||||
### Python Patch ###
|
||||
poetry.toml
|
||||
|
||||
# ruff
|
||||
.ruff_cache/
|
||||
|
||||
# LSP config files
|
||||
pyrightconfig.json
|
||||
|
||||
### venv ###
|
||||
[Bb]in
|
||||
[Ii]nclude
|
||||
[Ll]ib
|
||||
[Ll]ib64
|
||||
[Ll]ocal
|
||||
[Ss]cripts
|
||||
pyvenv.cfg
|
||||
pip-selfcheck.json
|
||||
@@ -30,6 +30,7 @@ Handwerksunternehmen
|
||||
Higher-Up
|
||||
Higher-Ups
|
||||
Homeserver
|
||||
Hot
|
||||
Immigrationsgeschichte
|
||||
Impro
|
||||
Improtheater
|
||||
@@ -53,6 +54,7 @@ Meta
|
||||
Mods
|
||||
Mono
|
||||
Ne
|
||||
Nights
|
||||
Orgas
|
||||
Paper
|
||||
Platformer
|
||||
|
||||
@@ -14,6 +14,7 @@ Arrabbiata
|
||||
Asiahung
|
||||
Aule
|
||||
Aules
|
||||
Autoencoder
|
||||
Babybel
|
||||
Baez
|
||||
Barros
|
||||
@@ -31,6 +32,7 @@ Brusch
|
||||
CAR
|
||||
CATS
|
||||
CDSS
|
||||
CORE
|
||||
CUDA
|
||||
Carré
|
||||
Casper
|
||||
@@ -38,6 +40,7 @@ Caspers
|
||||
Cato
|
||||
CdE
|
||||
CdEs
|
||||
Cewe
|
||||
Chrysalis
|
||||
Color
|
||||
Combi
|
||||
@@ -55,6 +58,7 @@ Destiny
|
||||
Distrobox
|
||||
Doom
|
||||
Doyma
|
||||
Dressler
|
||||
EasyEffects
|
||||
Eckhoff
|
||||
Edain
|
||||
@@ -119,6 +123,8 @@ Kingdoms
|
||||
Kluge
|
||||
KohakuHub
|
||||
Kratom
|
||||
KreativAkademie
|
||||
Kreyenbrück
|
||||
Kreyenhop
|
||||
Kubitschek
|
||||
Käte
|
||||
@@ -164,6 +170,7 @@ Neovim
|
||||
NetworkManager
|
||||
NextCloud
|
||||
Nim
|
||||
Njinmah
|
||||
Nobody
|
||||
Noel
|
||||
North
|
||||
@@ -190,6 +197,7 @@ Pluribus
|
||||
PopOS
|
||||
Portainer
|
||||
Power
|
||||
Pratik
|
||||
Precision
|
||||
Precon
|
||||
Precons
|
||||
@@ -237,6 +245,7 @@ Tornow
|
||||
TrackPoint
|
||||
Traefik
|
||||
UDEV
|
||||
UMAP
|
||||
Umbar
|
||||
V1del
|
||||
VIM
|
||||
@@ -252,6 +261,7 @@ WinterAkademie
|
||||
Writhing
|
||||
X.Org
|
||||
Years
|
||||
Yorma
|
||||
Ziegeleiweg
|
||||
Zimin
|
||||
and
|
||||
|
||||
@@ -102,12 +102,13 @@ uv() {
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
command uv venv || return
|
||||
|
||||
if [[ -f ".venv/bin/activate" ]]; then
|
||||
source .venv/bin/activate
|
||||
fi
|
||||
_auto_venv
|
||||
fi
|
||||
fi
|
||||
elif [[ "$1" == "sync" ]]; then
|
||||
shift
|
||||
command uv sync "$@" || return
|
||||
_auto_venv
|
||||
else
|
||||
command uv "$@"
|
||||
fi
|
||||
@@ -152,9 +153,24 @@ uvshim() {
|
||||
}
|
||||
|
||||
python() { uvshim python "$@"; }
|
||||
|
||||
python3() { uvshim python3 "$@"; }
|
||||
pip() { uvshim pip "$@"; }
|
||||
pytest() { uvshim pytest "$@"; }
|
||||
|
||||
pip() {
|
||||
local uv_root
|
||||
uv_root="$(find_python_root)"
|
||||
|
||||
if [[ -n "$uv_root" ]]; then
|
||||
if [[ "$1" == "install" ]]; then
|
||||
shift
|
||||
uv add "$@"
|
||||
else
|
||||
uv pip "$@"
|
||||
fi
|
||||
else
|
||||
command pip "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
_find_venv_upwards() {
|
||||
local dir="$PWD"
|
||||
@@ -379,7 +395,7 @@ autoload -Uz compinit && compinit
|
||||
|
||||
# open shell with tmux always
|
||||
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
||||
tmux attack-session -t $USER || tmux new-session -s $USER
|
||||
tmux attach-session -t $USER || tmux new-session -s $USER
|
||||
fi
|
||||
|
||||
# thefuck
|
||||
|
||||
136
.local/bin/etc/gitignore
Executable file
136
.local/bin/etc/gitignore
Executable file
@@ -0,0 +1,136 @@
|
||||
#!/bin/sh
|
||||
|
||||
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/gitignore"
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage:
|
||||
gitignore TEMPLATE...
|
||||
Create a new .gitignore from templates.
|
||||
|
||||
gitignore -f TEMPLATE...
|
||||
Overwrite existing .gitignore.
|
||||
|
||||
gitignore --add TEMPLATE...
|
||||
Append templates to existing .gitignore.
|
||||
|
||||
gitignore --list
|
||||
List available templates.
|
||||
|
||||
gitignore --show TEMPLATE
|
||||
Show a template.
|
||||
|
||||
Templates are searched in:
|
||||
$CONFIG_DIR
|
||||
EOF
|
||||
}
|
||||
|
||||
list_templates() {
|
||||
[ -d "$CONFIG_DIR" ] || exit 0
|
||||
|
||||
find "$CONFIG_DIR" -type f -exec basename {} \; | sort
|
||||
}
|
||||
|
||||
show_template() {
|
||||
file="$CONFIG_DIR/$1"
|
||||
|
||||
if [ ! -f "$file" ]; then
|
||||
echo "Unknown template: $1" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat "$file"
|
||||
}
|
||||
|
||||
append_template() {
|
||||
template="$1"
|
||||
file="$CONFIG_DIR/$template"
|
||||
|
||||
if [ ! -f "$file" ]; then
|
||||
echo "Unknown template: $template" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
{
|
||||
echo
|
||||
echo "# --- $template ---"
|
||||
cat "$file"
|
||||
} >> .gitignore
|
||||
}
|
||||
|
||||
create_gitignore() {
|
||||
mode="$1"
|
||||
shift
|
||||
|
||||
if [ -f .gitignore ] && [ "$mode" != "force" ]; then
|
||||
echo ".gitignore already exists." >&2
|
||||
echo "Use -f to overwrite or --add to append." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
: > .gitignore
|
||||
|
||||
for template in "$@"; do
|
||||
append_template "$template"
|
||||
done
|
||||
}
|
||||
|
||||
add_templates() {
|
||||
[ -f .gitignore ] || touch .gitignore
|
||||
|
||||
for template in "$@"; do
|
||||
append_template "$template"
|
||||
done
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--help|-h)
|
||||
usage
|
||||
;;
|
||||
|
||||
--list)
|
||||
list_templates
|
||||
;;
|
||||
|
||||
--show)
|
||||
shift
|
||||
|
||||
[ $# -eq 1 ] || {
|
||||
echo "--show requires exactly one template" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
show_template "$1"
|
||||
;;
|
||||
|
||||
--add)
|
||||
shift
|
||||
|
||||
[ $# -gt 0 ] || {
|
||||
echo "No templates specified" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
add_templates "$@"
|
||||
;;
|
||||
|
||||
-f)
|
||||
shift
|
||||
|
||||
[ $# -gt 0 ] || {
|
||||
echo "No templates specified" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
create_gitignore force "$@"
|
||||
;;
|
||||
|
||||
"")
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
create_gitignore normal "$@"
|
||||
;;
|
||||
esac
|
||||
@@ -7,8 +7,8 @@
|
||||
device=${LOOPBACK_DEVICE:-Easy Effects Source}
|
||||
|
||||
name=$(wpctl status | sed -n '/Sources/,$p' | sed -n '/Filter/q;p' | grep "$device" | sed -e "s/*/\ /g")
|
||||
id=$( echo $name | cut -d '.' -f 1 | cut -c 5-)
|
||||
node=$(wpctl inspect $id | grep node.name | cut -d '=' -f 2)
|
||||
ident=$(wpctl status | sed -n '/Sources/,$p' | sed -n '/Filter/q;p' | grep "$device" | grep -oE '[0-9]+\.' | tr -d '.')
|
||||
node=$(wpctl inspect $ident | grep node.name | cut -d '=' -f 2)
|
||||
|
||||
[ -z "$2" ] && num="5" || num="$2"
|
||||
|
||||
@@ -61,7 +61,7 @@ case "$1" in
|
||||
loop) playerctl loop none
|
||||
sleep 1
|
||||
pkill -RTMIN+9 $STATUSBAR ;;
|
||||
tap) wpctl set-volume $id 1.0
|
||||
tap) wpctl set-volume $ident 1.0
|
||||
touch ~/.local/state/loopback.lock
|
||||
pw-loopback -C $node &
|
||||
notify-send -u low 'sxhkd' "Started loopback of $device" ;;
|
||||
|
||||
Reference in New Issue
Block a user