mirror of
https://github.com/JanJastrow/.dotfiles.git
synced 2024-11-22 02:29:57 +01:00
Compare commits
No commits in common. "37dc883e1ea91bb99d5f5d1ebd171e02e37262c7" and "074d7abd35f0e1a0c91bfb15092e51efa48905b0" have entirely different histories.
37dc883e1e
...
074d7abd35
16
gitconfig
16
gitconfig
@ -9,22 +9,14 @@
|
|||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
[alias]
|
[alias]
|
||||||
a = add
|
|
||||||
br = branch
|
br = branch
|
||||||
c = commit
|
c = commit
|
||||||
ca = c -a
|
|
||||||
co = checkout
|
co = checkout
|
||||||
conflict = diff --name-only --diff-filter=U
|
ca = c -a
|
||||||
d = diff
|
|
||||||
hash = !git rev-parse HEAD | cut -c 1-8
|
|
||||||
l = log --all --color --graph --pretty=format:'%Cred%h%Creset %G?%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit # Colorful and easy to read log
|
|
||||||
last = log -1 HEAD --stat
|
|
||||||
p = pull
|
p = pull
|
||||||
rv = remote -v
|
l = log --all --color --graph --pretty=format:'%Cred%h%Creset %G?%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit # Colorful and easy to read log
|
||||||
se = !git rev-list --all | xargs git grep -F
|
conflict = diff --name-only --diff-filter=U
|
||||||
st = status -sb
|
hash = !git rev-parse HEAD | cut -c 1-8
|
||||||
undo = !f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f
|
undo = !f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f
|
||||||
[branch]
|
[branch]
|
||||||
sort = -committerdate
|
sort = -committerdate
|
||||||
[help]
|
|
||||||
autocorrect = 30
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
||||||
brew doctor
|
|
||||||
|
|
||||||
# Install some default tools
|
|
||||||
brew update
|
|
||||||
brew install tmux mosh eza lsd ffmpeg aria2 bat dog f3 gping btop imagemagick iperf3 ncdu p7zip pigz rclone rsync screen thefuck tldr unzip yt-dlp zstd
|
|
||||||
brew install --cask balenaetcher cryptomator iina handbrake imageoptim libreoffice losslesscut mgba mkvtoolnix nextcloud obs rar retroarch-metal secretive ultimaker-cura vlc vscodium zed signal transmission
|
|
@ -1,22 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Add Docker's official GPG key:
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install ca-certificates curl
|
|
||||||
sudo install -m 0755 -d /etc/apt/keyrings
|
|
||||||
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
|
||||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
|
||||||
|
|
||||||
# Add the repository to Apt sources:
|
|
||||||
echo \
|
|
||||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
|
||||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
|
||||||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
|
|
||||||
# Install docker from source
|
|
||||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
|
||||||
|
|
||||||
# Run test command
|
|
||||||
sudo docker run hello-world
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
sudo mkdir -p /etc/apt/keyrings
|
|
||||||
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg
|
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
|
|
||||||
sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y eza
|
|
@ -1,12 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Add the release PGP keys:
|
|
||||||
sudo mkdir -p /etc/apt/keyrings
|
|
||||||
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
|
|
||||||
|
|
||||||
# Add the "stable" channel to your APT sources:
|
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
|
|
||||||
|
|
||||||
# Update and install syncthing:
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install syncthing
|
|
26
zsh/alias
26
zsh/alias
@ -2,12 +2,32 @@
|
|||||||
# filename: /zsh/alias
|
# filename: /zsh/alias
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
||||||
|
# Better LS
|
||||||
|
if [[ $platform == 'Linux' ]]; then
|
||||||
|
alias bls='pwd; ls -lahp --color=auto --group-directories-first'
|
||||||
|
elif [[ $platform == 'macOS' && -x $(which gls) ]]; then
|
||||||
|
alias bls='pwd; gls -lahpG --group-directories-first'
|
||||||
|
elif [[ $platform == 'macOS' ]]; then
|
||||||
|
alias bls='/bin/ls -lahG'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Better eza
|
||||||
|
if [[ -x $(which eza) ]]; then
|
||||||
|
alias eza='pwd; eza --long --all --all --group-directories-first --git --group'
|
||||||
|
# --all (2x) to show `.` and `..` directories as well
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Better lsd
|
||||||
|
if [[ -x $(which lsd) ]]; then
|
||||||
|
alias lsd='pwd; lsd -laF --group-dirs=first --icon=never'
|
||||||
|
fi
|
||||||
|
|
||||||
# Update tools/OS aliases
|
# Update tools/OS aliases
|
||||||
if [[ -x $(which brew) ]]; then
|
if [[ -x $(which brew) ]]; then
|
||||||
alias brewupdate='brew update; brew upgrade; brew upgrade --cask; brew cleanup'
|
alias brewupdate='brew update; brew upgrade; brew upgrade --cask; brew cleanup'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -x $(which apt) ]]; then
|
if [[ $platform == 'Linux' ]]; then
|
||||||
alias aptupdate='sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt clean'
|
alias aptupdate='sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt clean'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -44,7 +64,7 @@ alias random32='echo $(date +%s | md5sum | head -c 32)'
|
|||||||
alias untargz='tar -xzvf'
|
alias untargz='tar -xzvf'
|
||||||
|
|
||||||
# (macOS) start Firefox Profile manager
|
# (macOS) start Firefox Profile manager
|
||||||
if [[ -x '/Applications/Firefox.app/Contents/MacOS/firefox-bin' ]]; then
|
if test -x '/Applications/Firefox.app/Contents/MacOS/firefox-bin'; then
|
||||||
alias firefox-pm='/Applications/Firefox.app/Contents/MacOS/firefox-bin -P'
|
alias firefox-pm='/Applications/Firefox.app/Contents/MacOS/firefox-bin -P'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -70,6 +90,6 @@ alias makeitmine='sudo chown -R $(whoami) ./'
|
|||||||
# ---
|
# ---
|
||||||
# .dotfiles
|
# .dotfiles
|
||||||
|
|
||||||
alias dotfiles='cd ~/.dotfiles'
|
alias dotf='cd ~/.dotfiles'
|
||||||
alias dotfu='cd ~/.dotfiles; git pull; cd -; source ~/.zshrc'
|
alias dotfu='cd ~/.dotfiles; git pull; cd -; source ~/.zshrc'
|
||||||
alias reload-zsh='source ~/.zshrc'
|
alias reload-zsh='source ~/.zshrc'
|
||||||
|
25
zsh/env
25
zsh/env
@ -11,36 +11,19 @@ export LC_TYPE=en_US.UTF-8
|
|||||||
# set default editor
|
# set default editor
|
||||||
export EDITOR="nano"
|
export EDITOR="nano"
|
||||||
|
|
||||||
# set `ll` alias
|
# set `ll` command - b(etter)ls per default
|
||||||
# eza > lsd > bls
|
|
||||||
alias ll=bls
|
alias ll=bls
|
||||||
|
if test -x "$(which eza)"; then
|
||||||
if [[ -x $(which lsd) ]]; then
|
|
||||||
alias ll=lsd
|
|
||||||
alias lsd='pwd; lsd -laF --group-dirs=first --icon=never'
|
|
||||||
fi
|
|
||||||
if [[ -x $(which eza) ]]; then
|
|
||||||
alias ll=eza
|
alias ll=eza
|
||||||
alias eza='pwd; eza --long --all --all --group-directories-first --git --group'
|
|
||||||
fi
|
fi
|
||||||
|
if test -x "$(which lsd)"; then
|
||||||
## Better LS
|
alias ll=lsd
|
||||||
if [[ $platform == 'Linux' ]]; then
|
|
||||||
alias bls='pwd; ls -lahp --color=auto --group-directories-first'
|
|
||||||
elif [[ $platform == 'macOS' && -x $(which gls) ]]; then
|
|
||||||
alias bls='pwd; gls -lahpG --group-directories-first'
|
|
||||||
elif [[ $platform == 'macOS' ]]; then
|
|
||||||
alias bls='pwd; /bin/ls -lahGp'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Path additions
|
# Path additions
|
||||||
#
|
#
|
||||||
|
|
||||||
if test -d "$HOME/.dotfiles/scripts"; then
|
|
||||||
export PATH="$HOME/.dotfiles/scripts:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -d "/opt/homebrew/"; then
|
if test -d "/opt/homebrew/"; then
|
||||||
export PATH="/opt/homebrew/bin:$PATH"
|
export PATH="/opt/homebrew/bin:$PATH"
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
|
@ -65,7 +65,7 @@ function png2jpeg() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function jpeg1024() {
|
function jpeg1024() {
|
||||||
magick "$1" -resize '1024x1024\>' -background black -flatten TGA:- | cjpeg -targo -optimize -progressive -quality 90 -outfile "$1".jpg
|
magick "$1" -resize '1024x1024\>' -background black -flatten TGA:- | cjpeg -targo -optimize -progressive -quality 90 -outfile "$1".jpg
|
||||||
}
|
}
|
||||||
|
|
||||||
# Make PDFs look like scanned
|
# Make PDFs look like scanned
|
||||||
@ -104,11 +104,11 @@ function extract () {
|
|||||||
# Download provided url to $HOME/Downloads
|
# Download provided url to $HOME/Downloads
|
||||||
function dl() {
|
function dl() {
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "usage: dl url --- downloads to $HOME/Downloads"
|
echo "usage: dl url (directory)"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ -x $(which aria2c) ]]; then
|
if [[ -x $(which aria2c) ]]; then
|
||||||
aria2c --dir="$HOME/Downloads" --continue=true --max-connection-per-server=4 "$1"
|
aria2c --dir="$HOME/Downloads" --continue=true --max-connection-per-server=5 "$1"
|
||||||
else
|
else
|
||||||
(cd "$HOME/Downloads" && curl -O "$1")
|
(cd "$HOME/Downloads" && curl -O "$1")
|
||||||
fi
|
fi
|
||||||
|
1
zshrc
1
zshrc
@ -17,7 +17,6 @@ source "$HOME/.dotfiles/zsh/settings"
|
|||||||
#
|
#
|
||||||
if [[ $- =~ i ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_TTY" ]]; then
|
if [[ $- =~ i ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_TTY" ]]; then
|
||||||
tmux attach-session -t default || tmux new-session -s default
|
tmux attach-session -t default || tmux new-session -s default
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define platform
|
# Define platform
|
||||||
|
Loading…
Reference in New Issue
Block a user