mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 17:44:52 +00:00
iterm removed
This commit is contained in:
parent
ae03d21fea
commit
cc8007b01c
@ -1,213 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Ansi 0 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.5725490196078431</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.5725490196078431</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.5725490196078431</real>
|
||||
</dict>
|
||||
<key>Ansi 1 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.45098039215686275</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.45098039215686275</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.88627450980392153</real>
|
||||
</dict>
|
||||
<key>Ansi 10 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.6705882352941176</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.87058823529411766</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.74117647058823533</real>
|
||||
</dict>
|
||||
<key>Ansi 11 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.62745098039215685</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.86274509803921573</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
<key>Ansi 12 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.96470588235294119</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.84705882352941175</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.69411764705882351</real>
|
||||
</dict>
|
||||
<key>Ansi 13 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.85490196078431369</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.98431372549019602</real>
|
||||
</dict>
|
||||
<key>Ansi 14 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.6588235294117647</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.69803921568627447</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.10196078431372549</real>
|
||||
</dict>
|
||||
<key>Ansi 15 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Green Component</key>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
<key>Ansi 2 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.47450980392156861</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.72549019607843135</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.58039215686274503</real>
|
||||
</dict>
|
||||
<key>Ansi 3 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.4823529411764706</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.72941176470588232</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
<key>Ansi 4 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.86274509803921573</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.74509803921568629</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.59215686274509804</real>
|
||||
</dict>
|
||||
<key>Ansi 5 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.98039215686274506</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.75294117647058822</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.88235294117647056</real>
|
||||
</dict>
|
||||
<key>Ansi 6 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.55686274509803924</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.59607843137254901</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.0</real>
|
||||
</dict>
|
||||
<key>Ansi 7 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.87058823529411766</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.87058823529411766</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.87058823529411766</real>
|
||||
</dict>
|
||||
<key>Ansi 8 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.74117647058823533</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.74117647058823533</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.74117647058823533</real>
|
||||
</dict>
|
||||
<key>Ansi 9 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.63137254901960782</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.63137254901960782</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
<key>Background Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.070588235294117646</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.070588235294117646</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.070588235294117646</real>
|
||||
</dict>
|
||||
<key>Bold Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Green Component</key>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
<key>Cursor Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.37647059559822083</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.64705878496170044</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
<key>Cursor Text Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>1</real>
|
||||
<key>Green Component</key>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
<key>Foreground Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.87058823529411766</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.87058823529411766</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.87058823529411766</real>
|
||||
</dict>
|
||||
<key>Selected Text Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.95686274509803915</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.95686274509803915</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.95686274509803915</real>
|
||||
</dict>
|
||||
<key>Selection Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.56862745098039214</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.30588235294117649</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.27843137254901962</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
File diff suppressed because it is too large
Load Diff
153
iterm/imgcat
153
iterm/imgcat
@ -1,153 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
|
||||
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
|
||||
# only accepts ESC backslash for ST. We use TERM instead of TMUX because TERM
|
||||
# gets passed through ssh.
|
||||
function print_osc() {
|
||||
if [[ $TERM == screen* ]] ; then
|
||||
printf "\033Ptmux;\033\033]"
|
||||
else
|
||||
printf "\033]"
|
||||
fi
|
||||
}
|
||||
|
||||
# More of the tmux workaround described above.
|
||||
function print_st() {
|
||||
if [[ $TERM == screen* ]] ; then
|
||||
printf "\a\033\\"
|
||||
else
|
||||
printf "\a"
|
||||
fi
|
||||
}
|
||||
|
||||
function load_version() {
|
||||
if [ -z ${IMGCAT_BASE64_VERSION+x} ]; then
|
||||
export IMGCAT_BASE64_VERSION=$(base64 --version 2>&1)
|
||||
fi
|
||||
}
|
||||
|
||||
function b64_encode() {
|
||||
load_version
|
||||
if [[ "$IMGCAT_BASE64_VERSION" =~ GNU ]]; then
|
||||
# Disable line wrap
|
||||
base64 -w0
|
||||
else
|
||||
base64
|
||||
fi
|
||||
}
|
||||
|
||||
function b64_decode() {
|
||||
load_version
|
||||
if [[ "$IMGCAT_BASE64_VERSION" =~ fourmilab ]]; then
|
||||
BASE64ARG=-d
|
||||
elif [[ "$IMGCAT_BASE64_VERSION" =~ GNU ]]; then
|
||||
BASE64ARG=-di
|
||||
else
|
||||
BASE64ARG=-D
|
||||
fi
|
||||
base64 $BASE64ARG
|
||||
}
|
||||
|
||||
# print_image filename inline base64contents print_filename
|
||||
# filename: Filename to convey to client
|
||||
# inline: 0 or 1
|
||||
# base64contents: Base64-encoded contents
|
||||
# print_filename: If non-empty, print the filename
|
||||
# before outputting the image
|
||||
function print_image() {
|
||||
print_osc
|
||||
printf '1337;File='
|
||||
if [[ -n "$1" ]]; then
|
||||
printf 'name='`printf "%s" "$1" | b64_encode`";"
|
||||
fi
|
||||
|
||||
printf "%s" "$3" | b64_decode | wc -c | awk '{printf "size=%d",$1}'
|
||||
printf ";inline=$2"
|
||||
printf ":"
|
||||
printf "%s" "$3"
|
||||
print_st
|
||||
printf '\n'
|
||||
if [[ -n "$4" ]]; then
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
function error() {
|
||||
echo "ERROR: $*" 1>&2
|
||||
}
|
||||
|
||||
function show_help() {
|
||||
echo "Usage: imgcat [-p] filename ..." 1>& 2
|
||||
echo " or: cat filename | imgcat" 1>& 2
|
||||
}
|
||||
|
||||
function check_dependency() {
|
||||
if ! (builtin command -V "$1" > /dev/null 2>& 1); then
|
||||
echo "imgcat: missing dependency: can't find $1" 1>& 2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
## Main
|
||||
|
||||
if [ -t 0 ]; then
|
||||
has_stdin=f
|
||||
else
|
||||
has_stdin=t
|
||||
fi
|
||||
|
||||
# Show help if no arguments and no stdin.
|
||||
if [ $has_stdin = f -a $# -eq 0 ]; then
|
||||
show_help
|
||||
exit
|
||||
fi
|
||||
|
||||
check_dependency awk
|
||||
check_dependency base64
|
||||
check_dependency wc
|
||||
|
||||
# Look for command line flags.
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-h|--h|--help)
|
||||
show_help
|
||||
exit
|
||||
;;
|
||||
-p|--p|--print)
|
||||
print_filename=1
|
||||
;;
|
||||
-u|--u|--url)
|
||||
check_dependency curl
|
||||
encoded_image=$(curl -s "$2" | b64_encode) || (error "No such file or url $2"; exit 2)
|
||||
has_stdin=f
|
||||
print_image "$2" 1 "$encoded_image" "$print_filename"
|
||||
set -- ${@:1:1} "-u" ${@:3}
|
||||
if [ "$#" -eq 2 ]; then
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
-*)
|
||||
error "Unknown option flag: $1"
|
||||
show_help
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
if [ -r "$1" ] ; then
|
||||
has_stdin=f
|
||||
print_image "$1" 1 "$(b64_encode < "$1")" "$print_filename"
|
||||
else
|
||||
error "imgcat: $1: No such file or directory"
|
||||
exit 2
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Read and print stdin
|
||||
if [ $has_stdin = t ]; then
|
||||
print_image "" 1 "$(cat | b64_encode)" ""
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user