|
@@ -92,6 +92,27 @@ pb () {
|
|
curl -F "file=@-" http://chate.io:669
|
|
curl -F "file=@-" http://chate.io:669
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+# For use with emacs vterm
|
|
|
|
+# See: https://github.com/akermu/emacs-libvterm
|
|
|
|
+vterm_printf(){
|
|
|
|
+ if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ] ); then
|
|
|
|
+ # Tell tmux to pass the escape sequences through
|
|
|
|
+ printf "\ePtmux;\e\e]%s\007\e\\" "$1"
|
|
|
|
+ elif [ "${TERM%%-*}" = "screen" ]; then
|
|
|
|
+ # GNU screen (screen, screen-256color, screen-256color-bce)
|
|
|
|
+ printf "\eP\e]%s\007\e\\" "$1"
|
|
|
|
+ else
|
|
|
|
+ printf "\e]%s\e\\" "$1"
|
|
|
|
+ fi
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
|
|
|
|
+ function clear(){
|
|
|
|
+ vterm_printf "51;Evterm-clear-scrollback";
|
|
|
|
+ tput clear;
|
|
|
|
+ }
|
|
|
|
+fi
|
|
|
|
+
|
|
# Case defines platform specific configs
|
|
# Case defines platform specific configs
|
|
# Platform agnostic configs above
|
|
# Platform agnostic configs above
|
|
case $(hostname) in
|
|
case $(hostname) in
|
|
@@ -128,7 +149,15 @@ case $(hostname) in
|
|
alias ssh-old="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1"
|
|
alias ssh-old="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1"
|
|
alias sleep-open="sudo zzz && slock"
|
|
alias sleep-open="sudo zzz && slock"
|
|
alias ssh-aws="ssh -i ~/.ssh/aws_key"
|
|
alias ssh-aws="ssh -i ~/.ssh/aws_key"
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ tmux_init () {
|
|
|
|
+ $TMUX_PATH new -s services -d
|
|
|
|
+ $TMUX_PATH new -s admin -d
|
|
|
|
+ $TMUX_PATH new -s personal -d
|
|
|
|
+ $TMUX_PATH new -s music -d
|
|
|
|
+ $TMUX_PATH new -s lisp-koans -d
|
|
|
|
+ }
|
|
|
|
+
|
|
# Load non tracked aliases for work specific things
|
|
# Load non tracked aliases for work specific things
|
|
source ~/Work/secure_shell_aliases
|
|
source ~/Work/secure_shell_aliases
|
|
|
|
|