Compare commits
2 Commits
master
...
92940db3f5
| Author | SHA1 | Date | |
|---|---|---|---|
| 92940db3f5 | |||
|
|
5475150cdf |
@@ -6,7 +6,7 @@
|
|||||||
[ -z "$ZSH_VERSION" ] && export SHELL=/bin/zsh && exec /bin/zsh -l
|
[ -z "$ZSH_VERSION" ] && export SHELL=/bin/zsh && exec /bin/zsh -l
|
||||||
|
|
||||||
# path
|
# path
|
||||||
PATH=$PATH:$HOME/bin:$HOME/.dotfiles/scripte:
|
PATH=$PATH:$HOME/bin:
|
||||||
|
|
||||||
# colors
|
# colors
|
||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
|
|||||||
17
.commonrc
17
.commonrc
@@ -1,25 +1,22 @@
|
|||||||
|
|
||||||
|
|
||||||
# Solarized (mostly) dark skin for Midnight Commander
|
# Solarized (mostly) dark skin for Midnight Commander
|
||||||
export MC_SKIN=$HOME/.config/mc/skins/solarized.ini
|
export MC_SKIN=$HOME/.config/mc/skins/solarized.ini
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
|
|
||||||
[[ -d "/opt/homebrew/bin" ]] && cd /opt/homebrew/bin
|
cd /opt/homebrew/bin
|
||||||
|
|
||||||
[[ -f "$HOME/.dotfiles/aliases" ]] && source "$HOME/.dotfiles/aliases"
|
[[ -f "$HOME/.dotfiles/aliases" ]] && source "$HOME/.dotfiles/aliases"
|
||||||
[[ -f "$HOME/.iterm2_shell_integration.zsh" ]] && source "$HOME/.iterm2_shell_integration.zsh"
|
[[ -f "$HOME/.iterm2_shell_integration.zsh" ]] && source "$HOME/.iterm2_shell_integration.zsh"
|
||||||
|
|
||||||
#if [ ! "$TERM_PROGRAM" = "iTerm.app" ]; then
|
if [ ! "$TERM_PROGRAM" = "iTerm.app" ]; then
|
||||||
# if [ -z "$TMUX" ]; then
|
if [ -z "$TMUX" ]; then
|
||||||
# (tmux ls | grep -vq attached && tmux -2 attach-session -t main) || tmux -2 new-session -s main
|
(tmux ls | grep -vq attached && tmux -2 attach-session -t main) || tmux -2 new-session -s main
|
||||||
# fi
|
fi
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
# use ~/.commonrc.local for local changes, proxy etc.
|
# use ~/.commonrc.local for local changes, proxy etc.
|
||||||
[[ -f "$HOME/.commonrc.local" ]] && source "$HOME/.commonrc.local"
|
[[ -f "$HOME/.commonrc.local" ]] && source "$HOME/.commonrc.local"
|
||||||
|
|
||||||
if [[ $OSTYPE == 'darwin'* ]]; then
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
os:
|
|
||||||
editCommand: 'floterm'
|
|
||||||
|
|
||||||
gui:
|
|
||||||
theme:
|
|
||||||
selectedLineBgColor:
|
|
||||||
- underline
|
|
||||||
selectedRangeBgColor:
|
|
||||||
- underline
|
|
||||||
|
|
||||||
git:
|
|
||||||
paging:
|
|
||||||
colorArg: never
|
|
||||||
pager: delta --dark --paging=never
|
|
||||||
@@ -26,8 +26,6 @@ bin/dfm chmod 0755
|
|||||||
.tmux/sidebar.tmux 0755
|
.tmux/sidebar.tmux 0755
|
||||||
.tmux/zoom 0755
|
.tmux/zoom 0755
|
||||||
|
|
||||||
scripte/README 0644
|
|
||||||
|
|
||||||
.dotfiles/.iterm2 skip
|
.dotfiles/.iterm2 skip
|
||||||
.DS_Store skip
|
.DS_Store skip
|
||||||
.gitmodules skip
|
.gitmodules skip
|
||||||
|
|||||||
20
.gitignore
vendored
20
.gitignore
vendored
@@ -1,24 +1,8 @@
|
|||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
.config/mc/hotlist
|
.config/mc/hotlist
|
||||||
.fzf/
|
.fzf/
|
||||||
.oh-my-zsh/
|
|
||||||
.tmux.conf.bak
|
.tmux.conf.bak
|
||||||
.tmux/plugins/tmux-copycat/
|
.tmux/resurrect
|
||||||
.tmux/plugins/tmux-prefix-highlight/
|
.vim/.netrwhist
|
||||||
.tmux/plugins/tmux-resurrect/
|
|
||||||
.tmux/resurrect/
|
|
||||||
.vim/.netrwhist/
|
|
||||||
.vim/bundle/ack.vim/
|
|
||||||
.vim/bundle/gundo.vim/
|
|
||||||
.vim/bundle/nerdtree-git-plugin/
|
|
||||||
.vim/bundle/nerdtree/
|
|
||||||
.vim/bundle/supertab
|
|
||||||
.vim/bundle/syntastic/
|
|
||||||
.vim/bundle/vim-airline/
|
|
||||||
.vim/bundle/vim-fugitive/
|
|
||||||
.vim/bundle/vim-markdown/
|
|
||||||
.vim/bundle/vim-tmux/
|
|
||||||
iTerm2
|
iTerm2
|
||||||
misc/Cobalt2-iterm/
|
|
||||||
package-lock.json
|
|
||||||
tmux.start.sh
|
tmux.start.sh
|
||||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -49,9 +49,3 @@
|
|||||||
[submodule ".vim/bundle/vim-markdown"]
|
[submodule ".vim/bundle/vim-markdown"]
|
||||||
path = .vim/bundle/vim-markdown
|
path = .vim/bundle/vim-markdown
|
||||||
url = https://github.com/plasticboy/vim-markdown.git
|
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,45 +61,17 @@ function b64_decode() {
|
|||||||
# height: set output height of the image in character cells, pixels or percent
|
# 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
|
# 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".
|
# 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() {
|
function print_image() {
|
||||||
# Send metadata to begin transfer.
|
|
||||||
print_osc
|
print_osc
|
||||||
printf "1337;"
|
printf "1337;File=inline=%s" "$2"
|
||||||
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)
|
printf ";size=%d" $(printf "%s" "$3" | b64_decode | wc -c)
|
||||||
[ -n "$1" ] && printf ";name=%s" "$(printf "%s" "$1" | b64_encode)"
|
[ -n "$1" ] && printf ";name=%s" "$(printf "%s" "$1" | b64_encode)"
|
||||||
[ -n "$5" ] && printf ";width=%s" "$5"
|
[ -n "$5" ] && printf ";width=%s" "$5"
|
||||||
[ -n "$6" ] && printf ";height=%s" "$6"
|
[ -n "$6" ] && printf ";height=%s" "$6"
|
||||||
[ -n "$7" ] && printf ";preserveAspectRatio=%s" "$7"
|
[ -n "$7" ] && printf ";preserveAspectRatio=%s" "$7"
|
||||||
[ -n "$8" ] && printf ";type=%s" "$8"
|
[ -n "$8" ] && printf ";type=%s" "$8"
|
||||||
if [[ "$9" -eq 1 ]]; then
|
printf ":%s" "$3"
|
||||||
printf ":%s" "$3"
|
print_st
|
||||||
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'
|
printf '\n'
|
||||||
[ "$4" == "1" ] && echo "$1"
|
[ "$4" == "1" ] && echo "$1"
|
||||||
has_image_displayed=t
|
has_image_displayed=t
|
||||||
@@ -132,7 +104,6 @@ function show_help() {
|
|||||||
errcho " -s, --stretch Stretch image to specified width and height (this option is opposite to -r)"
|
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 " -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 " -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
|
||||||
errcho " If you don't specify width or height an appropriate value will be chosen automatically."
|
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:"
|
errcho " The width and height are given as word 'auto' or number N followed by a unit:"
|
||||||
@@ -189,7 +160,6 @@ fi
|
|||||||
check_dependency base64
|
check_dependency base64
|
||||||
check_dependency wc
|
check_dependency wc
|
||||||
file_type=""
|
file_type=""
|
||||||
legacy=0
|
|
||||||
|
|
||||||
# Look for command line flags.
|
# Look for command line flags.
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
@@ -220,9 +190,6 @@ while [ $# -gt 0 ]; do
|
|||||||
-s | --s | --stretch)
|
-s | --s | --stretch)
|
||||||
preserve_aspect_ratio=0
|
preserve_aspect_ratio=0
|
||||||
;;
|
;;
|
||||||
-l | --l | --legacy)
|
|
||||||
legacy=1
|
|
||||||
;;
|
|
||||||
-f | --f | --file)
|
-f | --f | --file)
|
||||||
has_stdin=f
|
has_stdin=f
|
||||||
is_url=f
|
is_url=f
|
||||||
@@ -254,7 +221,7 @@ while [ $# -gt 0 ]; do
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
has_stdin=f
|
has_stdin=f
|
||||||
print_image "$1" 1 "$encoded_image" "$print_filename" "$width" "$height" "$preserve_aspect_ratio" "$file_type" "$legacy"
|
print_image "$1" 1 "$encoded_image" "$print_filename" "$width" "$height" "$preserve_aspect_ratio" "$file_type"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
@@ -262,7 +229,7 @@ done
|
|||||||
|
|
||||||
# Read and print stdin
|
# Read and print stdin
|
||||||
if [ $has_stdin = t ]; then
|
if [ $has_stdin = t ]; then
|
||||||
print_image "" 1 "$(cat | b64_encode)" 0 "$width" "$height" "$preserve_aspect_ratio" "$file_type" "$legacy"
|
print_image "" 1 "$(cat | b64_encode)" 0 "$width" "$height" "$preserve_aspect_ratio" "$file_type"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$has_image_displayed" != "t" ]; then
|
if [ "$has_image_displayed" != "t" ]; then
|
||||||
|
|||||||
@@ -65,8 +65,7 @@ send_tmux() {
|
|||||||
send_regular() {
|
send_regular() {
|
||||||
print_osc
|
print_osc
|
||||||
inosc=1
|
inosc=1
|
||||||
printf '1337;Copy=:%s'
|
printf '1337;Copy=:%s' "$data"
|
||||||
cat
|
|
||||||
print_st
|
print_st
|
||||||
inosc=0
|
inosc=0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ do
|
|||||||
wc -c "$fn" | awk '{printf "size=%d",$1}'
|
wc -c "$fn" | awk '{printf "size=%d",$1}'
|
||||||
print_st
|
print_st
|
||||||
|
|
||||||
parts=$(b64_encode < "$fn" | fold -w 200)
|
parts=$(b64_encode < "$fn" | fold -w 256)
|
||||||
for part in $parts; do
|
for part in $parts; do
|
||||||
print_osc
|
print_osc
|
||||||
printf '1337;FilePart=%s' "$part"
|
printf '1337;FilePart=%s' "$part"
|
||||||
|
|||||||
190
.tigrc
190
.tigrc
@@ -19,19 +19,19 @@ bind generic b view-refs
|
|||||||
#
|
#
|
||||||
# # Blame view
|
# # Blame view
|
||||||
bind generic <Esc>b view-blame
|
bind generic <Esc>b view-blame
|
||||||
#
|
|
||||||
# # Cursor
|
# # Cursor
|
||||||
# bind generic J move-page-down
|
bind generic J move-page-down
|
||||||
# bind generic K move-page-up
|
bind generic K move-page-up
|
||||||
#
|
|
||||||
# # Copy commit id
|
# Copy commit id
|
||||||
# bind generic ` @bash -c "echo -n '%(commit)' | pbcopy"
|
bind generic ` @bash -c "echo -n '%(commit)' | pbcopy"
|
||||||
#
|
|
||||||
# # Quit tig
|
# Quit tig
|
||||||
# bind generic <Esc><Enter> quit
|
bind generic <Esc><Enter> quit
|
||||||
|
|
||||||
# === Commands ===
|
# === Commands ===
|
||||||
# # Commit
|
# Commit
|
||||||
bind generic C !git commit
|
bind generic C !git commit
|
||||||
bind refs C !git commit
|
bind refs C !git commit
|
||||||
bind main C !git commit
|
bind main C !git commit
|
||||||
@@ -44,90 +44,90 @@ bind generic P ?git push -u %(remote) %(repo:head)
|
|||||||
bind generic <Esc>p ?git push -u -f %(remote) %(repo:head)
|
bind generic <Esc>p ?git push -u -f %(remote) %(repo:head)
|
||||||
|
|
||||||
# Pull
|
# Pull
|
||||||
# bind generic U ?git pull %(remote)
|
bind generic U ?git pull %(remote)
|
||||||
#
|
|
||||||
# # Fetch
|
# Fetch
|
||||||
# bind generic F ?git fetch %(remote)
|
bind generic F ?git fetch %(remote)
|
||||||
# bind main F ?git fetch %(remote)
|
bind main F ?git fetch %(remote)
|
||||||
#
|
#
|
||||||
# # Reflog
|
# # Reflog
|
||||||
# bind generic L !sh -c "git reflog --pretty=raw | tig --pretty=raw"
|
bind generic L !sh -c "git reflog --pretty=raw | tig --pretty=raw"
|
||||||
# bind generic _ ?git reset --hard HEAD@{"%(prompt Enter HEAD@{} number: )"}
|
bind generic _ ?git reset --hard HEAD@{"%(prompt Enter HEAD@{} number: )"}
|
||||||
#
|
|
||||||
# # Reset --hard
|
# Reset --hard
|
||||||
# bind main H ?git reset --hard %(commit)
|
bind main H ?git reset --hard %(commit)
|
||||||
# bind refs H ?git reset --hard %(commit)
|
bind refs H ?git reset --hard %(commit)
|
||||||
# bind status H ?git checkout -- %(file)
|
bind status H ?git checkout -- %(file)
|
||||||
#
|
|
||||||
# # Checkout(move) to branch
|
# Checkout(move) to branch
|
||||||
# bind main = ?git checkout %(branch)
|
bind main = ?git checkout %(branch)
|
||||||
# bind refs = ?git checkout %(branch)
|
bind refs = ?git checkout %(branch)
|
||||||
# # 前に使用していたブランチへ戻る
|
# 前に使用していたブランチへ戻る
|
||||||
# bind generic <Esc>= ?git checkout -
|
bind generic <Esc>= ?git checkout -
|
||||||
#
|
|
||||||
# # Merge
|
# Merge
|
||||||
# bind main M ?git merge %(branch)
|
bind main M ?git merge %(branch)
|
||||||
# bind diff M ?git merge %(branch)
|
bind diff M ?git merge %(branch)
|
||||||
# bind refs M ?git merge %(branch)
|
bind refs M ?git merge %(branch)
|
||||||
# bind main <Esc>m ?git merge %(commit)
|
bind main <Esc>m ?git merge %(commit)
|
||||||
# bind diff <Esc>m ?git merge %(commit)
|
bind diff <Esc>m ?git merge %(commit)
|
||||||
#
|
|
||||||
# # Rebase
|
# Rebase
|
||||||
# bind main R ?git rebase %(branch)
|
bind main R ?git rebase %(branch)
|
||||||
# bind diff R ?git rebase %(branch)
|
bind diff R ?git rebase %(branch)
|
||||||
# bind refs R ?git rebase %(branch)
|
bind refs R ?git rebase %(branch)
|
||||||
# bind main <Esc>r ?git rebase %(commit)
|
bind main <Esc>r ?git rebase %(commit)
|
||||||
# bind diff <Esc>r ?git rebase %(commit)
|
bind diff <Esc>r ?git rebase %(commit)
|
||||||
#
|
|
||||||
# # Rebase -i
|
# Rebase -i
|
||||||
# bind main <Esc>i ?git rebase -i %(branch)
|
bind main <Esc>i ?git rebase -i %(branch)
|
||||||
# bind diff <Esc>i ?git rebase -i %(branch)
|
bind diff <Esc>i ?git rebase -i %(branch)
|
||||||
# bind refs <Esc>i ?git rebase -i %(branch)
|
bind refs <Esc>i ?git rebase -i %(branch)
|
||||||
# bind main i ?git rebase -i %(commit)
|
bind main i ?git rebase -i %(commit)
|
||||||
# bind diff i ?git rebase -i %(commit)
|
bind diff i ?git rebase -i %(commit)
|
||||||
#
|
|
||||||
# # Rebase options
|
# Rebase options
|
||||||
# bind generic <Esc>y ?git rebase --continue
|
bind generic <Esc>y ?git rebase --continue
|
||||||
# bind generic <Esc>c ?git rebase --abort
|
bind generic <Esc>c ?git rebase --abort
|
||||||
#
|
|
||||||
#
|
|
||||||
# # diff
|
# diff
|
||||||
# bind main D ?sh -c "git diff %(commit)..%(prompt Enter commit ID: ) | tig"
|
bind main D ?sh -c "git diff %(commit)..%(prompt Enter commit ID: ) | tig"
|
||||||
# bind diff D ?sh -c "git diff %(commit)..%(prompt Enter commit ID: ) | tig"
|
bind diff D ?sh -c "git diff %(commit)..%(prompt Enter commit ID: ) | tig"
|
||||||
#
|
|
||||||
# # Remove branch
|
# Remove branch
|
||||||
# bind refs D ?git branch -d %(branch)
|
bind refs D ?git branch -d %(branch)
|
||||||
# bind refs <Esc>D ?git branch -D %(branch)
|
bind refs <Esc>D ?git branch -D %(branch)
|
||||||
#
|
|
||||||
# # Stash
|
# Stash
|
||||||
# bind generic S !git stash
|
bind generic S !git stash
|
||||||
#
|
|
||||||
# # Revert
|
# Revert
|
||||||
# bind main ! ?git revert %(commit)
|
bind main ! ?git revert %(commit)
|
||||||
#
|
|
||||||
# # Cherry-pick
|
# Cherry-pick
|
||||||
# bind main <Esc>k ?git cherry-pick %(commit)
|
bind main <Esc>k ?git cherry-pick %(commit)
|
||||||
# bind diff <Esc>k ?git cherry-pick %(commit)
|
bind diff <Esc>k ?git cherry-pick %(commit)
|
||||||
#
|
|
||||||
# # Create branch
|
# Create branch
|
||||||
# bind main B ?git checkout -b "%(prompt Enter branch name: )" %(branch)
|
bind main B ?git checkout -b "%(prompt Enter branch name: )" %(branch)
|
||||||
# bind refs B ?git checkout -b "%(prompt Enter branch name: )" %(branch)
|
bind refs B ?git checkout -b "%(prompt Enter branch name: )" %(branch)
|
||||||
# bind main <Esc>b ?git checkout -b "%(prompt Enter branch name: )" %(commit)
|
bind main <Esc>b ?git checkout -b "%(prompt Enter branch name: )" %(commit)
|
||||||
#
|
|
||||||
#
|
|
||||||
# # === Github ===
|
# === Github ===
|
||||||
# # Open to brouse
|
# Open to brouse
|
||||||
# bind main ; @hub browse -- commit/%(commit)
|
bind main ; @hub browse -- commit/%(commit)
|
||||||
# bind blame ; @hub browse -- commit/%(commit)
|
bind blame ; @hub browse -- commit/%(commit)
|
||||||
# bind diff ; @hub browse -- commit/%(commit)
|
bind diff ; @hub browse -- commit/%(commit)
|
||||||
# bind tree ; @hub browse -- blob/%(branch)/%(file)
|
bind tree ; @hub browse -- blob/%(branch)/%(file)
|
||||||
# bind blob ; @hub browse -- blob/%(branch)/%(file)
|
bind blob ; @hub browse -- blob/%(branch)/%(file)
|
||||||
# bind grep ; @hub browse -- blob/%(branch)/%(file)
|
bind grep ; @hub browse -- blob/%(branch)/%(file)
|
||||||
#
|
|
||||||
# # Pull request
|
# Pull request
|
||||||
# bind main w @hub browse -- compare/%(branch)?expand=1
|
bind main w @hub browse -- compare/%(branch)?expand=1
|
||||||
# bind diff w @hub browse -- compare/%(branch)?expand=1
|
bind diff w @hub browse -- compare/%(branch)?expand=1
|
||||||
# bind refs w @hub browse -- compare/%(branch)?expand=1
|
bind refs w @hub browse -- compare/%(branch)?expand=1
|
||||||
#
|
|
||||||
# # === Theme ===
|
# === Theme ===
|
||||||
# # General colors
|
# General colors
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ set-option -g bell-action none
|
|||||||
# set mouse modes
|
# set mouse modes
|
||||||
if-shell '[[ $(echo "$(tmux -V | cut -d" " -f2) >= 2.1" | bc) -eq 1 ]]' \
|
if-shell '[[ $(echo "$(tmux -V | cut -d" " -f2) >= 2.1" | bc) -eq 1 ]]' \
|
||||||
'set -g mouse on' \
|
'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
|
### 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-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 @resurrect-capture-pane-contents 'on' # save pane contents
|
||||||
set -g @continuum-restore 'on' # restore session on tmux start
|
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)
|
||||||
File diff suppressed because it is too large
Load Diff
Submodule .vim/plugged/vim-floaterm deleted from 4e28c8dd02
Submodule .vim/plugged/vim-sensible deleted from 0ce2d843d6
8
.vimrc
8
.vimrc
@@ -383,14 +383,6 @@ set pastetoggle=<F1>
|
|||||||
execute pathogen#infect()
|
execute pathogen#infect()
|
||||||
" enable powerline fonts
|
" enable powerline fonts
|
||||||
let g:airline_powerline_fonts = 1
|
let g:airline_powerline_fonts = 1
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
||||||
" PLUGINS
|
|
||||||
"
|
|
||||||
call plug#begin()
|
|
||||||
" List your plugins here
|
|
||||||
Plug 'tpope/vim-sensible'
|
|
||||||
Plug 'voldikss/vim-floaterm'
|
|
||||||
" call plug#end()
|
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" => Helper functions
|
" => Helper functions
|
||||||
|
|||||||
69
.zshrc
69
.zshrc
@@ -1,4 +1,3 @@
|
|||||||
echo ".zshrc"
|
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH=$HOME/.oh-my-zsh
|
export ZSH=$HOME/.oh-my-zsh
|
||||||
|
|
||||||
@@ -16,10 +15,10 @@ ZSH_THEME="../../misc/Cobalt2-iterm/cobalt2"
|
|||||||
# HYPHEN_INSENSITIVE="true"
|
# HYPHEN_INSENSITIVE="true"
|
||||||
|
|
||||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||||
DISABLE_AUTO_UPDATE="false"
|
#DISABLE_AUTO_UPDATE="true"
|
||||||
|
|
||||||
# Uncomment the following line to change how often to auto-update (in days).
|
# Uncomment the following line to change how often to auto-update (in days).
|
||||||
export UPDATE_ZSH_DAYS=12
|
export UPDATE_ZSH_DAYS=13
|
||||||
|
|
||||||
# Uncomment the following line to disable colors in ls.
|
# Uncomment the following line to disable colors in ls.
|
||||||
# DISABLE_LS_COLORS="true"
|
# DISABLE_LS_COLORS="true"
|
||||||
@@ -28,7 +27,7 @@ export UPDATE_ZSH_DAYS=12
|
|||||||
# DISABLE_AUTO_TITLE="true"
|
# DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
# Uncomment the following line to enable command auto-correction.
|
# Uncomment the following line to enable command auto-correction.
|
||||||
ENABLE_CORRECTION="false"
|
ENABLE_CORRECTION="true"
|
||||||
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||||
COMPLETION_WAITING_DOTS="true"
|
COMPLETION_WAITING_DOTS="true"
|
||||||
@@ -41,25 +40,24 @@ COMPLETION_WAITING_DOTS="true"
|
|||||||
# Uncomment the following line if you want to change the command execution time
|
# Uncomment the following line if you want to change the command execution time
|
||||||
# stamp shown in the history command output.
|
# stamp shown in the history command output.
|
||||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||||
HIST_STAMPS="dd.mm.yyyy"
|
# HIST_STAMPS="dd.mm.yyyy"
|
||||||
|
|
||||||
# Would you like to use another custom folder than $ZSH/custom?
|
# Would you like to use another custom folder than $ZSH/custom?
|
||||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
# 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/*)
|
# 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/
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(colored-man-pages git docker sublime sudo git-prompt)
|
plugins=(colored-man-pages git docker sublime sudo)
|
||||||
# ansible brew colorize common-aliases direnv dnf fig tmux zsh-navigation-tools zsh-syntax-highliting
|
|
||||||
|
|
||||||
# User configuration
|
# User configuration
|
||||||
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/homebrew/bin/brew:$HOME/bin:$HOME/.dotfiles/scripte:"
|
|
||||||
|
export BW_CLIENTID="user.3f9a1ec0-9e1c-4eed-aae6-b59e7e5c2b4f"
|
||||||
|
export BW_CLIENTSECRET="YblTE9IG1f55OH6NYMvIH4XOsGnxRv"
|
||||||
|
|
||||||
|
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/homebrew/bin/brew:$HOME/bin:"
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
# make less more friendly for non-text input files, see lesspipe(1)
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
@@ -69,24 +67,9 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
[[ -f "$HOME/.dotfiles/functions" ]] && source "$HOME/.dotfiles/functions"
|
[[ -f "$HOME/.dotfiles/functions" ]] && source "$HOME/.dotfiles/functions"
|
||||||
[[ -f "$HOME/.dotfiles/.commonrc" ]] && source "$HOME/.dotfiles/.commonrc"
|
[[ -f "$HOME/.dotfiles/.commonrc" ]] && source "$HOME/.dotfiles/.commonrc"
|
||||||
|
|
||||||
if [[ $OSTYPE == 'darwin'* ]]; then
|
# ntfy
|
||||||
# load private api-keys
|
eval "$(ntfy shell-integration)"
|
||||||
source .api-keys
|
export AUTO_NTFY_DONE_IGNORE="vim screen meld"
|
||||||
|
|
||||||
# ntfy
|
|
||||||
eval "$(ntfy shell-integration)"
|
|
||||||
export AUTO_NTFY_DONE_IGNORE="vim screen meld"
|
|
||||||
|
|
||||||
# some homebrew things
|
|
||||||
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
||||||
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
||||||
|
|
||||||
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
|
|
||||||
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
||||||
export PATH="/opt/homebrew/opt/sqlite/bin:$PATH"
|
|
||||||
export HOMEBREW_AUTO_UPDATE_SECS="86400"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# not saving history immediately
|
# not saving history immediately
|
||||||
setopt noincappendhistory
|
setopt noincappendhistory
|
||||||
@@ -94,30 +77,18 @@ setopt nosharehistory
|
|||||||
|
|
||||||
. $HOME/.shellrc.load
|
. $HOME/.shellrc.load
|
||||||
|
|
||||||
|
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
|
||||||
|
|
||||||
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
|
export PATH="/opt/homebrew/opt/sqlite/bin:$PATH"
|
||||||
|
|
||||||
# tmux starten
|
# tmux starten
|
||||||
if [ "$TMUX" = "" ]; then exec tmux; fi
|
if [ "$TMUX" = "" ]; then exec tmux; fi
|
||||||
clear && udot
|
clear && udot
|
||||||
|
|
||||||
|
|
||||||
PATH="/Users/eragos/perl5/bin${PATH:+:${PATH}}"; export PATH;
|
PATH="/Users/eragos/perl5/bin${PATH:+:${PATH}}"; export PATH;
|
||||||
PERL5LIB="/Users/eragos/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
|
PERL5LIB="/Users/eragos/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
|
||||||
PERL_LOCAL_LIB_ROOT="/Users/eragos/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
|
PERL_LOCAL_LIB_ROOT="/Users/eragos/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
|
||||||
PERL_MB_OPT="--install_base \"/Users/eragos/perl5\""; export PERL_MB_OPT;
|
PERL_MB_OPT="--install_base \"/Users/eragos/perl5\""; export PERL_MB_OPT;
|
||||||
PERL_MM_OPT="INSTALL_BASE=/Users/eragos/perl5"; export PERL_MM_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
|
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -1,11 +1,11 @@
|
|||||||
<pre>
|
<pre>
|
||||||
____ ___ _____ _____ _ U _____ u ____
|
____ U ___ u _____ _____ _ U _____ u ____
|
||||||
| _ \ \/ _ \ |_ " _| |" ___| ___ |"| \| ___"| / __"|
|
| _"\ \/"_ \/|_ " _| |" ___| ___ |"| \| ___"|// __"| u
|
||||||
| | | | | | | | | | U| |_ u |_"_| U | | | _|" <\___ \
|
/| | | | | | | | | | U| |_ u |_"_| U | | u | _|" <\___ \/
|
||||||
| |_| |\.-,_| |_| | /| |\ \| _|/ | | \| |/__ | |___ u___) |
|
U| |_| |\.-,_| |_| | /| |\ \| _|/ | | \| |/__ | |___ u___) |
|
||||||
|____/ u \_)-\___/ u |_| u |_| u/| |\u |_____| |_____| |____/
|
|____/ u \_)-\___/ u |_|U |_| U/| |\u |_____| |_____| |____/>>
|
||||||
|||_ \\ _// \\_ ) ( \\,-.-,_ // \\ )( (__)
|
|||_ \\ _// \\_ )(\\,-.-,_|___|_,-.// \\ << >> )( (__)
|
||||||
(__)_) (__) (__) (__) (_) (_/ \_) (_/ (__) (__) (_/ \_)
|
(__)_) (__) (__) (__)(__)(_/ \_)-' '-(_/(_")("_)(__) (__)(__)
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@@ -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!
|
**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
|
## Features
|
||||||
* Dotfile handling via [dotfiles manager (dfm)](https://github.com/justone/dfm). Install, update and uninstall of dotfiles is quiet easy.
|
* 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:
|
Then, you have configure the fonts in iTerm2:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|||||||
23
aliases
23
aliases
@@ -4,12 +4,10 @@ alias ...='cd ../..'
|
|||||||
alias ....='cd ../../..'
|
alias ....='cd ../../..'
|
||||||
alias .....='cd ../../../..'
|
alias .....='cd ../../../..'
|
||||||
alias ~='cd ~'
|
alias ~='cd ~'
|
||||||
alias home='cd ~'
|
|
||||||
|
|
||||||
# shortcuts
|
# shortcuts
|
||||||
alias d='du -h -d=1'
|
alias d='du -h -d=1'
|
||||||
alias g='git'
|
alias g='git'
|
||||||
alias history='history -E'
|
|
||||||
alias h='history'
|
alias h='history'
|
||||||
alias ipt='iptables -L -n --line-numbers'
|
alias ipt='iptables -L -n --line-numbers'
|
||||||
alias nginxtest='docker exec -it nginx nginx -t'
|
alias nginxtest='docker exec -it nginx nginx -t'
|
||||||
@@ -30,22 +28,8 @@ else # OS X `ls`
|
|||||||
colorflag="-G"
|
colorflag="-G"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /opt/homebrew/bin/eza ]; then
|
alias la='ls -laF ${colorflag}'
|
||||||
alias ls='eza $eza_params'
|
alias ls='ls -Fh ${colorflag}'
|
||||||
alias l='eza --git-ignore $eza_params'
|
|
||||||
alias ll='eza --all --header --long $eza_params'
|
|
||||||
alias llm='eza --all --header --long --sort=modified $eza_params'
|
|
||||||
#alias la='eza -lbhHigUmuSa'
|
|
||||||
alias la='eza -lbhHgma'
|
|
||||||
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}'
|
|
||||||
fi
|
|
||||||
|
|
||||||
alias tmux='tmux -2'
|
alias tmux='tmux -2'
|
||||||
alias view='vim -p -R'
|
alias view='vim -p -R'
|
||||||
@@ -53,6 +37,3 @@ alias vp='vim -p'
|
|||||||
alias cat='bat'
|
alias cat='bat'
|
||||||
|
|
||||||
alias tig='tig --all'
|
alias tig='tig --all'
|
||||||
alias lgit='lazygit'
|
|
||||||
alias yy=yt-dlp
|
|
||||||
alias he='home && exit && exit'
|
|
||||||
19
functions
19
functions
@@ -7,14 +7,15 @@ udot() {
|
|||||||
remote=$(git ls-remote origin | awk "/HEAD/ {print \$1}")
|
remote=$(git ls-remote origin | awk "/HEAD/ {print \$1}")
|
||||||
gstatus=$(git status --porcelain)
|
gstatus=$(git status --porcelain)
|
||||||
|
|
||||||
echo -e ' ____ ___ _____ _____ _ U _____ u ____ '
|
echo -e ""
|
||||||
echo -e ' | _ \ \/ _ \ |_ " _| |" ___| ___ |"| \| ___"| / __"| '
|
echo -e ' ____ U ___ u _____ _____ _ U _____ u ____ '
|
||||||
echo -e ' | | | | | | | | | | U| |_ u |_"_| U | | | _|" <\___ \ '
|
echo -e ' | _"\ \/"_ \/|_ " _| |" ___| ___ |"| \| ___"|// __"| u '
|
||||||
echo -e ' | |_| |\.-,_| |_| | /| |\ \| _|/ | | \| |/__ | |___ u___) | '
|
echo -e ' /| | | | | | | | | | U| |_ u |_"_| U | | u | _|" <\___ \/ '
|
||||||
echo -e ' |____/ u \_)-\___/ u |_| u |_| u/| |\u |_____| |_____| |____/ '
|
echo -e ' U| |_| |\.-,_| |_| | /| |\ \| _|/ | | \| |/__ | |___ u___) | '
|
||||||
echo -e ' |||_ \\ _// \\\\_ ) ( \\,-.-,_ // \\\\ )( (__) '
|
echo -e ' |____/ u \_)-\___/ u |_|U |_| U/| |\\u |_____| |_____| |____/>> '
|
||||||
echo -e ' (__)_) (__) (__) (__) (_) (_/ \_) (_/ (__) (__) (_/ \_) '
|
echo -e ' |||_ \\\\ _// \\\\_ )(\\\\,-.-,_|___|_,-.// \\\\ << >> )( (__)'
|
||||||
echo -e ''
|
echo -e ' (__)_) (__) (__) (__)(__)(_/ \_)-´ `-(_/(_")("_)(__) (__)(__) '
|
||||||
|
echo -e ""
|
||||||
echo -e "$info"
|
echo -e "$info"
|
||||||
echo -e ""
|
echo -e ""
|
||||||
|
|
||||||
@@ -36,10 +37,8 @@ udot() {
|
|||||||
fi
|
fi
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "Update submodules..."
|
echo -e "Update submodules..."
|
||||||
cd ~/.dotfiles
|
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
cd ~
|
|
||||||
echo -e ""
|
echo -e ""
|
||||||
tmux source-file ~/.tmux.conf > /dev/null 2>&1
|
tmux source-file ~/.tmux.conf > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# GPL (c) 2025 by Michael Förster <mfo1009@googlemail.com>
|
|
||||||
|
|
||||||
PERCENT=`pmset -g batt | grep -Eo "\d+%" | cut -d% -f1`
|
|
||||||
RESULT=0
|
|
||||||
|
|
||||||
if [ $PERCENT -lt 21 ]; then
|
|
||||||
RESULT=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $PERCENT -gt 79 ]; then
|
|
||||||
RESULT=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $RESULT
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# GPL (c) 2025 by Michael Förster <mfo1009@googlemail.com>
|
|
||||||
|
|
||||||
CPU=`/opt/homebrew/bin/tmux-mem-cpu-load -g 5 | cut -d '%' -f 1 | cut -d ']' -f 2 | cut -d '.' -f 1`
|
|
||||||
RESULT=0
|
|
||||||
|
|
||||||
if [ $CPU -gt 50 ]; then
|
|
||||||
RESULT=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $RESULT
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# Für diverse Scripte
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
PS3='Bitte wählen: '
|
|
||||||
options=("SSH Helix" "SSH Pi-Hole" "Quit")
|
|
||||||
select opt in "${options[@]}"
|
|
||||||
|
|
||||||
do
|
|
||||||
case $opt in
|
|
||||||
"SSH Helix")
|
|
||||||
ssh helix.lan
|
|
||||||
;;
|
|
||||||
"SSH Pi-Hole")
|
|
||||||
ssh pi@raspberry.lan
|
|
||||||
;;
|
|
||||||
"Quit")
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
*) echo "Ungültige Auswahl $REPLY";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
Reference in New Issue
Block a user