Utility updates
This commit is contained in:
parent
ae350894af
commit
825d91b462
5 changed files with 39 additions and 3 deletions
|
@ -28,7 +28,17 @@ function ltl() {
|
|||
echo "$l"
|
||||
}
|
||||
|
||||
function ltld() {
|
||||
local d="${1-$PWD}"
|
||||
unset -v l
|
||||
for f in "$d"/*; do
|
||||
[[ $f -nt $l ]] && [[ -d $f ]] && l="$f"
|
||||
done
|
||||
echo "$l"
|
||||
}
|
||||
|
||||
alias vltl="vim \"\$(ltl)\""
|
||||
alias cdltl="cd \"\$(ltld)\""
|
||||
alias ltlv="vltl"
|
||||
|
||||
# navigation aliases
|
||||
|
@ -41,7 +51,8 @@ function c() {
|
|||
}
|
||||
alias cd..="cd .."
|
||||
alias cdd="cd \"\$DOTFILES_PATH\"" # go to dotfiles
|
||||
alias cdc="cd \"\$XDG_CONFIG_HOME\"" # go to
|
||||
alias cde="cd \"\$ENV_DOTFILES_PATH\"" # go to env dotfiles
|
||||
alias cdc="cd \"\$XDG_CONFIG_HOME\"" # go to ~/.config
|
||||
alias cdn="cd \"\$NOTES_PATH\""
|
||||
alias cdl="cd \"\$NICE_HOME/dl\""
|
||||
alias cdg="cd \"\$NICE_HOME/games\""
|
||||
|
@ -109,6 +120,7 @@ alias logs="sudo journalctl"
|
|||
alias logsr="sudo journalctl -r"
|
||||
alias logsf="sudo journalctl -f"
|
||||
alias btctl="sudo bluetoothctl"
|
||||
alias pbcopy="clip"
|
||||
alias pt="htop -t" # experimental htop tree-view-by-default
|
||||
alias resrc="source \$HOME/.bashrc"
|
||||
alias redshift="redshift -r -l 39.0997:-94.5786 -t 6500K:2500K"
|
||||
|
|
|
@ -120,3 +120,9 @@ export ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_file_byte
|
|||
_make_paths
|
||||
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||
|
||||
if [[ -d ~/.asdf/ ]] && [[ -f ~/.asdf/asdf.sh ]]; then
|
||||
source "~/.asdf/asdf.sh"
|
||||
elif [[ -d /opt/asdf-vm/ ]] && [[ -f /opt/asdf-vm/asdf.sh ]]; then
|
||||
source "/opt/asdf-vm/asdf.sh"
|
||||
fi
|
||||
|
|
|
@ -62,7 +62,7 @@ set -g status-right "#[fg=colour4]#W#[fg=default]#[bg=default] #H"
|
|||
set -g status-left-length 200
|
||||
set -g status-left "#[fg=colour7]#(~/.config/dotfiles/bin/tmux-session-list #S)"
|
||||
|
||||
bind-key O run-shell "~/.config/dotfiles/bin/tmux-save-buffer #S" \; display-message "Saved buffer to ~/<date>.tmux-buffer.log"
|
||||
bind-key O run-shell "~/.config/dotfiles/bin/tmux-save-buffer #S" \; display-message "Saved buffer to ~/<date>.<session-name>.tmux-buffer.log"
|
||||
|
||||
# pane split line colors
|
||||
set -g pane-active-border-style bg=black,fg=blue
|
||||
|
|
18
bin/optimize-image-for-web
Executable file
18
bin/optimize-image-for-web
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
mogrify \
|
||||
-filter Triangle \
|
||||
-define filter:support=2 \
|
||||
-resize 2000x2000\> \
|
||||
-unsharp 0.25x0.08+8.3+0.045 \
|
||||
-dither None \
|
||||
-posterize 136 \
|
||||
-quality 82 \
|
||||
-define jpeg:fancy-upsampling=off \
|
||||
-define png:compression-filter=5 \
|
||||
-define png:compression-level=9 \
|
||||
-define png:compression-strategy=1 \
|
||||
-define png:exclude-chunk=all \
|
||||
-interlace none \
|
||||
-colorspace sRGB \
|
||||
$1
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
sess="$1"; shift
|
||||
d="$(date +%Y-%m-%d_%H-%M-%S)"
|
||||
f="$HOME/$d.tmux-buffer.log"
|
||||
f="${HOME}/${d}.${sess}.tmux-buffer.log"
|
||||
touch "$f"
|
||||
chmod 600 "$f"
|
||||
tmux capture-pane -pS -1000000000 > "$f"
|
||||
|
|
Reference in a new issue