diff --git a/apps/shell/bash/aliases b/apps/shell/bash/aliases index 5130567..89a4311 100644 --- a/apps/shell/bash/aliases +++ b/apps/shell/bash/aliases @@ -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" diff --git a/apps/shell/bash/bashrc b/apps/shell/bash/bashrc index 3a03152..81fc9d5 100644 --- a/apps/shell/bash/bashrc +++ b/apps/shell/bash/bashrc @@ -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 diff --git a/apps/shell/tmux/tmux.conf b/apps/shell/tmux/tmux.conf index e555288..dd0b16a 100644 --- a/apps/shell/tmux/tmux.conf +++ b/apps/shell/tmux/tmux.conf @@ -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 ~/.tmux-buffer.log" +bind-key O run-shell "~/.config/dotfiles/bin/tmux-save-buffer #S" \; display-message "Saved buffer to ~/..tmux-buffer.log" # pane split line colors set -g pane-active-border-style bg=black,fg=blue diff --git a/bin/optimize-image-for-web b/bin/optimize-image-for-web new file mode 100755 index 0000000..3cc43d9 --- /dev/null +++ b/bin/optimize-image-for-web @@ -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 diff --git a/bin/tmux-save-buffer b/bin/tmux-save-buffer index 329c547..55d2818 100755 --- a/bin/tmux-save-buffer +++ b/bin/tmux-save-buffer @@ -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"