Compare commits
15 Commits
a72b3ca7ca
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
f1e3df69a8
|
|||
|
0370d09946
|
|||
|
017722fdb7
|
|||
|
02c56d31f1
|
|||
|
265960a823
|
|||
|
cf60d9bfde
|
|||
| 034f857c3e | |||
| 2a49623982 | |||
| fd05fde8e4 | |||
| 9aafef9ba3 | |||
| b1d520d666 | |||
| abbf4bf28e | |||
| f36865aa27 | |||
| df74db6373 | |||
| e301fe0494 |
12
.commonrc
12
.commonrc
@@ -4,16 +4,16 @@
|
||||
export MC_SKIN=$HOME/.config/mc/skins/solarized.ini
|
||||
export EDITOR=vim
|
||||
|
||||
cd /opt/homebrew/bin
|
||||
[[ -d "/opt/homebrew/bin" ]] && cd /opt/homebrew/bin
|
||||
|
||||
[[ -f "$HOME/.dotfiles/aliases" ]] && source "$HOME/.dotfiles/aliases"
|
||||
[[ -f "$HOME/.iterm2_shell_integration.zsh" ]] && source "$HOME/.iterm2_shell_integration.zsh"
|
||||
|
||||
if [ ! "$TERM_PROGRAM" = "iTerm.app" ]; then
|
||||
if [ -z "$TMUX" ]; then
|
||||
(tmux ls | grep -vq attached && tmux -2 attach-session -t main) || tmux -2 new-session -s main
|
||||
fi
|
||||
fi
|
||||
#if [ ! "$TERM_PROGRAM" = "iTerm.app" ]; then
|
||||
# if [ -z "$TMUX" ]; then
|
||||
# (tmux ls | grep -vq attached && tmux -2 attach-session -t main) || tmux -2 new-session -s main
|
||||
# fi
|
||||
#fi
|
||||
|
||||
# use ~/.commonrc.local for local changes, proxy etc.
|
||||
[[ -f "$HOME/.commonrc.local" ]] && source "$HOME/.commonrc.local"
|
||||
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -49,3 +49,9 @@
|
||||
[submodule ".vim/bundle/vim-markdown"]
|
||||
path = .vim/bundle/vim-markdown
|
||||
url = https://github.com/plasticboy/vim-markdown.git
|
||||
[submodule ".vim/plugged/vim-floaterm"]
|
||||
path = .vim/plugged/vim-floaterm
|
||||
url = https://github.com/voldikss/vim-floaterm.git
|
||||
[submodule ".vim/plugged/vim-sensible"]
|
||||
path = .vim/plugged/vim-sensible
|
||||
url = https://github.com/tpope/vim-sensible.git
|
||||
|
||||
@@ -61,17 +61,45 @@ function b64_decode() {
|
||||
# height: set output height of the image in character cells, pixels or percent
|
||||
# preserve_aspect_ratio: 0 or 1, if set to 1, fill the specified width and height as much as possible without stretching the image
|
||||
# file: Empty string or file type like "application/json" or ".js".
|
||||
# legacy: 1 to send one giant control sequence, 0 to send many small control sequences.
|
||||
function print_image() {
|
||||
# Send metadata to begin transfer.
|
||||
print_osc
|
||||
printf "1337;File=inline=%s" "$2"
|
||||
printf "1337;"
|
||||
if [[ "$9" -eq 1 ]]; then
|
||||
printf "File"
|
||||
else
|
||||
printf "MultipartFile"
|
||||
fi
|
||||
printf "=inline=%s" "$2"
|
||||
printf ";size=%d" $(printf "%s" "$3" | b64_decode | wc -c)
|
||||
[ -n "$1" ] && printf ";name=%s" "$(printf "%s" "$1" | b64_encode)"
|
||||
[ -n "$5" ] && printf ";width=%s" "$5"
|
||||
[ -n "$6" ] && printf ";height=%s" "$6"
|
||||
[ -n "$7" ] && printf ";preserveAspectRatio=%s" "$7"
|
||||
[ -n "$8" ] && printf ";type=%s" "$8"
|
||||
printf ":%s" "$3"
|
||||
print_st
|
||||
if [[ "$9" -eq 1 ]]; then
|
||||
printf ":%s" "$3"
|
||||
print_st
|
||||
else
|
||||
print_st
|
||||
|
||||
# Split into 200-byte chunks. This helps it get through tmux.
|
||||
parts=$(printf "%s" "$3" | fold -w 200)
|
||||
|
||||
# Send each part.
|
||||
for part in $parts; do
|
||||
print_osc
|
||||
printf '1337;FilePart=%s' "$part"
|
||||
print_st
|
||||
done
|
||||
|
||||
# Indicate completion
|
||||
print_osc
|
||||
printf '1337;FileEnd'
|
||||
print_st
|
||||
fi
|
||||
|
||||
printf '\n'
|
||||
[ "$4" == "1" ] && echo "$1"
|
||||
has_image_displayed=t
|
||||
@@ -104,6 +132,7 @@ function show_help() {
|
||||
errcho " -s, --stretch Stretch image to specified width and height (this option is opposite to -r)"
|
||||
errcho " -W, --width N Set image width to N character cells, pixels or percent (see below)"
|
||||
errcho " -H, --height N Set image height to N character cells, pixels or percent (see below)"
|
||||
errcho " -l, --legacy Use legacy protocol that sends the whole image in a single control sequence"
|
||||
errcho
|
||||
errcho " If you don't specify width or height an appropriate value will be chosen automatically."
|
||||
errcho " The width and height are given as word 'auto' or number N followed by a unit:"
|
||||
@@ -160,6 +189,7 @@ fi
|
||||
check_dependency base64
|
||||
check_dependency wc
|
||||
file_type=""
|
||||
legacy=0
|
||||
|
||||
# Look for command line flags.
|
||||
while [ $# -gt 0 ]; do
|
||||
@@ -190,6 +220,9 @@ while [ $# -gt 0 ]; do
|
||||
-s | --s | --stretch)
|
||||
preserve_aspect_ratio=0
|
||||
;;
|
||||
-l | --l | --legacy)
|
||||
legacy=1
|
||||
;;
|
||||
-f | --f | --file)
|
||||
has_stdin=f
|
||||
is_url=f
|
||||
@@ -221,7 +254,7 @@ while [ $# -gt 0 ]; do
|
||||
exit 2
|
||||
fi
|
||||
has_stdin=f
|
||||
print_image "$1" 1 "$encoded_image" "$print_filename" "$width" "$height" "$preserve_aspect_ratio" "$file_type"
|
||||
print_image "$1" 1 "$encoded_image" "$print_filename" "$width" "$height" "$preserve_aspect_ratio" "$file_type" "$legacy"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
@@ -229,7 +262,7 @@ done
|
||||
|
||||
# Read and print stdin
|
||||
if [ $has_stdin = t ]; then
|
||||
print_image "" 1 "$(cat | b64_encode)" 0 "$width" "$height" "$preserve_aspect_ratio" "$file_type"
|
||||
print_image "" 1 "$(cat | b64_encode)" 0 "$width" "$height" "$preserve_aspect_ratio" "$file_type" "$legacy"
|
||||
fi
|
||||
|
||||
if [ "$has_image_displayed" != "t" ]; then
|
||||
|
||||
@@ -65,7 +65,8 @@ send_tmux() {
|
||||
send_regular() {
|
||||
print_osc
|
||||
inosc=1
|
||||
printf '1337;Copy=:%s' "$data"
|
||||
printf '1337;Copy=:%s'
|
||||
cat
|
||||
print_st
|
||||
inosc=0
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ do
|
||||
wc -c "$fn" | awk '{printf "size=%d",$1}'
|
||||
print_st
|
||||
|
||||
parts=$(b64_encode < "$fn" | fold -w 256)
|
||||
parts=$(b64_encode < "$fn" | fold -w 200)
|
||||
for part in $parts; do
|
||||
print_osc
|
||||
printf '1337;FilePart=%s' "$part"
|
||||
|
||||
@@ -38,7 +38,7 @@ set-option -g bell-action none
|
||||
# set mouse modes
|
||||
if-shell '[[ $(echo "$(tmux -V | cut -d" " -f2) >= 2.1" | bc) -eq 1 ]]' \
|
||||
'set -g mouse on' \
|
||||
'set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on'
|
||||
# 'set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on'
|
||||
|
||||
##########################################
|
||||
### Styling
|
||||
@@ -179,4 +179,4 @@ set -g @resurrect-strategy-vim 'session' # save vim sessions (may require t
|
||||
set -g @resurrect-strategy-nvim 'session' # save neovim sessions (may require the tpope/vim-obsession plugin)
|
||||
set -g @resurrect-capture-pane-contents 'on' # save pane contents
|
||||
set -g @continuum-restore 'on' # restore session on tmux start
|
||||
set -g @continuum-save-interval '5' # save session every 5 minutes (default is 15)
|
||||
set -g @continuum-save-interval '5' # save session every 5 minutes (default is 15)
|
||||
|
||||
25
.zshrc
25
.zshrc
@@ -46,11 +46,16 @@ HIST_STAMPS="dd.mm.yyyy"
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# https://wiki.zshell.dev/docs/getting_started/installation
|
||||
typeset -A ZI
|
||||
ZI[BIN_DIR]="${HOME}/.zi/bin"
|
||||
source "${ZI[BIN_DIR]}/zi.zsh"
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(colored-man-pages git docker sublime sudo zsh-eza git-prompt)
|
||||
plugins=(colored-man-pages git docker sublime sudo git-prompt)
|
||||
# ansible brew colorize common-aliases direnv dnf fig tmux zsh-navigation-tools zsh-syntax-highliting
|
||||
|
||||
# User configuration
|
||||
@@ -90,7 +95,7 @@ setopt nosharehistory
|
||||
. $HOME/.shellrc.load
|
||||
|
||||
# tmux starten
|
||||
#if [ "$TMUX" = "" ]; then exec tmux; fi
|
||||
if [ "$TMUX" = "" ]; then exec tmux; fi
|
||||
clear && udot
|
||||
|
||||
PATH="/Users/eragos/perl5/bin${PATH:+:${PATH}}"; export PATH;
|
||||
@@ -100,3 +105,19 @@ PERL_MB_OPT="--install_base \"/Users/eragos/perl5\""; export PERL_MB_OPT;
|
||||
PERL_MM_OPT="INSTALL_BASE=/Users/eragos/perl5"; export PERL_MM_OPT;
|
||||
|
||||
cd ~
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
if [[ ! -f $HOME/.zi/bin/zi.zsh ]]; then
|
||||
print -P "%F{33}▓▒░ %F{160}Installing (%F{33}z-shell/zi%F{160})…%f"
|
||||
command mkdir -p "$HOME/.zi" && command chmod go-rwX "$HOME/.zi"
|
||||
command git clone -q --depth=1 --branch "main" https://github.com/z-shell/zi "$HOME/.zi/bin" && \
|
||||
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
|
||||
print -P "%F{160}▓▒░ The clone has failed.%f%b"
|
||||
fi
|
||||
source "$HOME/.zi/bin/zi.zsh"
|
||||
autoload -Uz _zi
|
||||
(( ${+_comps} )) && _comps[zi]=_zi
|
||||
# examples here -> https://wiki.zshell.dev/ecosystem/category/-annexes
|
||||
zicompinit # <- https://wiki.zshell.dev/docs/guides/commands
|
||||
|
||||
@@ -17,7 +17,7 @@ This repo is a store my personal Debian and macOS dotfiles. I use zsh as default
|
||||
|
||||
**Warning:** These dotfiles reflect my personal settings. If you want to use it - wellcome! But review the settings and remove things, you don't want to need. Do not use it blindly. Use at your own risk!
|
||||
|
||||

|
||||

|
||||
|
||||
## Features
|
||||
* Dotfile handling via [dotfiles manager (dfm)](https://github.com/justone/dfm). Install, update and uninstall of dotfiles is quiet easy.
|
||||
@@ -55,7 +55,7 @@ I'm currently using [Source Code Pro](https://github.com/adobe-fonts/source-code
|
||||
|
||||
Then, you have configure the fonts in iTerm2:
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
4
aliases
4
aliases
@@ -4,6 +4,7 @@ alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
alias .....='cd ../../../..'
|
||||
alias ~='cd ~'
|
||||
alias home='cd ~'
|
||||
|
||||
# shortcuts
|
||||
alias d='du -h -d=1'
|
||||
@@ -39,6 +40,8 @@ if [ -f /opt/homebrew/bin/eza ]; then
|
||||
alias lx='eza -lbhHigUmuSa@'
|
||||
alias lt='eza --tree $eza_params'
|
||||
alias tree='eza --tree $eza_params'
|
||||
alias lsize='eza --long --total-size --sort=size $eza_params'
|
||||
|
||||
else
|
||||
alias la='ls -laF ${colorflag}'
|
||||
alias ls='ls -Fh ${colorflagI}'
|
||||
@@ -52,3 +55,4 @@ alias cat='bat'
|
||||
alias tig='tig --all'
|
||||
alias lgit='lazygit'
|
||||
alias yy=yt-dlp
|
||||
alias he='home && exit && exit'
|
||||
Reference in New Issue
Block a user