mirror of
https://github.com/JanJastrow/.dotfiles.git
synced 2024-12-22 06:51:54 +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]
|
||||
defaultBranch = main
|
||||
[alias]
|
||||
a = add
|
||||
br = branch
|
||||
c = commit
|
||||
ca = c -a
|
||||
co = checkout
|
||||
conflict = diff --name-only --diff-filter=U
|
||||
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
|
||||
ca = c -a
|
||||
p = pull
|
||||
rv = remote -v
|
||||
se = !git rev-list --all | xargs git grep -F
|
||||
st = status -sb
|
||||
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
|
||||
conflict = diff --name-only --diff-filter=U
|
||||
hash = !git rev-parse HEAD | cut -c 1-8
|
||||
undo = !f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f
|
||||
[branch]
|
||||
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
|
||||
#--------------------------------
|
||||
|
||||
# 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
|
||||
if [[ -x $(which brew) ]]; then
|
||||
alias brewupdate='brew update; brew upgrade; brew upgrade --cask; brew cleanup'
|
||||
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'
|
||||
fi
|
||||
|
||||
@ -44,7 +64,7 @@ alias random32='echo $(date +%s | md5sum | head -c 32)'
|
||||
alias untargz='tar -xzvf'
|
||||
|
||||
# (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'
|
||||
fi
|
||||
|
||||
@ -70,6 +90,6 @@ alias makeitmine='sudo chown -R $(whoami) ./'
|
||||
# ---
|
||||
# .dotfiles
|
||||
|
||||
alias dotfiles='cd ~/.dotfiles'
|
||||
alias dotf='cd ~/.dotfiles'
|
||||
alias dotfu='cd ~/.dotfiles; git pull; cd -; 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
|
||||
export EDITOR="nano"
|
||||
|
||||
# set `ll` alias
|
||||
# eza > lsd > bls
|
||||
# set `ll` command - b(etter)ls per default
|
||||
alias ll=bls
|
||||
|
||||
if [[ -x $(which lsd) ]]; then
|
||||
alias ll=lsd
|
||||
alias lsd='pwd; lsd -laF --group-dirs=first --icon=never'
|
||||
fi
|
||||
if [[ -x $(which eza) ]]; then
|
||||
if test -x "$(which eza)"; then
|
||||
alias ll=eza
|
||||
alias eza='pwd; eza --long --all --all --group-directories-first --git --group'
|
||||
fi
|
||||
|
||||
## 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='pwd; /bin/ls -lahGp'
|
||||
if test -x "$(which lsd)"; then
|
||||
alias ll=lsd
|
||||
fi
|
||||
|
||||
#
|
||||
# Path additions
|
||||
#
|
||||
|
||||
if test -d "$HOME/.dotfiles/scripts"; then
|
||||
export PATH="$HOME/.dotfiles/scripts:$PATH"
|
||||
fi
|
||||
|
||||
if test -d "/opt/homebrew/"; then
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
|
@ -65,7 +65,7 @@ function png2jpeg() {
|
||||
}
|
||||
|
||||
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
|
||||
@ -104,11 +104,11 @@ function extract () {
|
||||
# Download provided url to $HOME/Downloads
|
||||
function dl() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: dl url --- downloads to $HOME/Downloads"
|
||||
echo "usage: dl url (directory)"
|
||||
return
|
||||
fi
|
||||
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
|
||||
(cd "$HOME/Downloads" && curl -O "$1")
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user