Compare commits

...

3 Commits

Author SHA1 Message Date
Jan Jastrow 275476066f Added PDF 'scan' script 2022-04-19 17:48:35 +02:00
Jan Jastrow 52d9fc29d3 Remove old tmux configs 2022-04-19 15:43:16 +02:00
Jan 36769a2411 All hail TMUX 2022-04-19 15:34:47 +02:00
4 changed files with 55 additions and 0 deletions

View File

@ -6,6 +6,7 @@ fi
rm ~/.zshrc
ln -s ~/.dotfiles/zshrc ~/.zshrc
ln -s ~/.dotfiles/tmux/tmux.conf ~/.tmux.conf
touch ~/.dotfiles/zsh/device-specific
sudo chsh -s $(which zsh) $USER

42
tmux/tmux.conf Normal file
View File

@ -0,0 +1,42 @@
# Reload config
bind-key C-r source-file ~/.tmux.conf \; display "Config reloaded!"
# Split Panes (additional shortcuts)
bind-key | split-window -h -c "#{pane_current_path}" # let's open pane with current directory with -c option
bind-key _ split-window -v -c "#{pane_current_path}"
# Move to other panes with Alt+[ArrowKey]
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Mouse support
set -g mouse on
bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -n WheelDownPane select-pane -t= \; send-keys -M
# Bigger history
set -g history-limit 10000
# Start windows/panes at 1 instead of 0
set-option -g base-index 1 # window index will start with 1
set-window-option -g pane-base-index 1 # pane index will start with 1
set-option -g renumber-windows on
# Colors
# Pane divider
set-window-option -g pane-border-style fg=colour11,bg=colour234
set-window-option -g pane-active-border-style fg=colour118,bg=colour234
# Cool trick: Let's dim out any pane that's not active.
set-window-option -g window-style fg=white,bg=colour236
set-window-option -g window-active-style fg=white,bg=colour235
# Command / Message line
set-window-option -g message-style fg=#111111,bold,bg=#eeeeee
# Status Bar
set-option -g status-style fg=white,bg=#8317dd
set-window-option -g window-status-separator |

View File

@ -30,6 +30,9 @@ if [[ $platform == 'Linux' ]]; then
alias aptupdate='sudo apt update; sudo apt upgrade; sudo apt autoremove; sudo apt autoclean'
fi
# tmux
alias tm='tmux attach -t default || tmux new -s default'
# For fun
alias fucking='sudo'
alias please='sudo'

View File

@ -38,3 +38,12 @@ function png2web() {
function jpeg1024() {
magick "$1" -resize '1024x1024\>' -background black -flatten TGA:- | cjpeg -targo -quality 75 -optimize -progressive -outfile $1.jpg
}
# Make PDFs look like scanned
# src: https://gist.github.com/andyrbell/25c8632e15d17c83a54602f6acde2724?permalink_comment_id=3295405#gistcomment-3295405
function pdf-like-scanned () {
OUT=$(basename "$1" .pdf)
convert -density 150 "$1" -rotate "$([ $((RANDOM % 2)) -eq 1 ] && echo -)0.$(($RANDOM % 4 + 5))" \
-attenuate 0.4 +noise Multiplicative -attenuate 0.03 +noise Multiplicative -sharpen 0x1.0 \
-colorspace Gray "$OUT"_scanned.pdf
}