Compare commits

17 Commits

Author SHA1 Message Date
Fabian Ising
51249a271d [GIT] Auto rebase/stash 2025-10-27 09:55:52 +01:00
Fabian Ising
9c1360d9d5 [NVIM] Rework folding 2025-10-27 09:55:31 +01:00
Fabian Ising
c90a8a783a Fix update script 2025-10-27 09:55:02 +01:00
Fabian Ising
ff125f4c7a [ZSH] Fix virt-manager 2025-10-27 09:53:45 +01:00
Fabian Ising
cda37c3415 [tmux] Fix clipboard 2025-08-26 11:16:44 +02:00
Fabian Ising
6fd62c340d [NVIM] Run YCM install script on update 2025-08-06 11:04:27 +02:00
Fabian Ising
4718c8cccc [ZSH] Add OSC52 var 2025-08-06 10:51:09 +02:00
Fabian Ising
022895d1b2 [TERM] Add xshift for curved monitor visibility 2025-08-05 14:53:27 +02:00
murgi
fb8dc68cfd [ZSH] Fix autopull 2025-08-05 14:36:11 +02:00
Fabian Ising
a13204c4b5 [ZSH] Add autopull for repo 2025-08-05 12:33:05 +02:00
Fabian Ising
e4400b13a8 [ZSH] Add completion rehash 2025-08-04 11:47:52 +02:00
Fabian Ising
b26a9904a5 [ZSH] Optimize History handling 2025-07-31 15:24:28 +02:00
Fabian Ising
ec6b42cb65 [VIM] Disable OCS52 for vscode 2025-07-31 15:24:07 +02:00
Fabian Ising
f76728180a [VIM] Change to osc52 2025-05-08 08:58:53 +02:00
Fabian Ising
950d1d371d [VIM] Fix ctags 2025-04-17 08:56:46 +02:00
Fabian Ising
ea019a8e23 [All] Add virtualenv hooks 2025-04-17 08:56:15 +02:00
Fabian Ising
d599275642 Better copy and mouse handling 2025-04-17 08:55:14 +02:00
13 changed files with 118 additions and 18 deletions

View File

@@ -39,6 +39,12 @@ program = "alacritty"
[scrolling]
history = 0
[selection]
save_to_clipboard = false
[terminal]
osc52 = "OnlyCopy"
[terminal.shell]
args = ["-c", "$HOME/.tmux/tmux_attach.sh"]
program = "/bin/zsh"
@@ -48,5 +54,5 @@ dynamic_title = true
option_as_alt = "None"
[window.padding]
x = 0
x = 2
y = 0

View File

@@ -13,3 +13,4 @@ ln -Tsv $PWD/tmux $HOME/.tmux
ln -Tsv ~/.tmux/.tmux.conf $HOME/.tmux.conf
ln -Tsv $PWD/nvim $HOME/.config/nvim
ln -Tsv $PWD/.config/alacritty $HOME/.config/alacritty
ln -fsv $PWD/virtualenvwrapper/* $VIRTUALENVWRAPPER_HOOK_DIR

View File

@@ -16,4 +16,5 @@ gln -Tsv $PWD/.config/alacritty $HOME/.config/alacritty
gln -Tsv $PWD/zsh/.p10k.zsh_mac.example $PWD/zsh/.p10k.mac.zsh
gln -Tsv $PWD/zsh/.mac_config.example $PWD/zsh/.mac_config
gln -Tsv $PWD/zsh/.virtual_env_config.zsh_mac.example $PWD/zsh/.virtual_env_config.zsh
gln -fsv $PWD/virtualenvwrapper/* $VIRTUALENVWRAPPER_HOOK_DIR
gln -Tsv $PWD/update_mac.sh $HOME/update_mac.sh

0
compile_ycm.sh Normal file → Executable file
View File

View File

@@ -33,3 +33,7 @@ email = github@murgi.de
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[rebase]
autoStash = true
[pull]
rebase = true

View File

@@ -10,6 +10,7 @@ if has("macunix")
else
let g:python_interpreter="/usr/local/bin/python3"
endif
let g:tagbar_ctags="/opt/homebrew/bin/ctags"
else
let g:python_interpreter = 'python3'
endif
@@ -64,7 +65,7 @@ function! BuildYCM(info)
" - name: name of the plugin
" - status: 'installed', 'updated', or 'unchanged'
" - force: set on PlugInstall! or PlugUpdate!
if a:info.status == 'installed' || a:info.force
if a:info.status == 'installed' || a:info.status == 'updated' || a:info.force
execute '!' . g:python_interpreter . ' ./install.py --all'
endif
endfunction
@@ -241,6 +242,37 @@ nmap <Leader>t :call TextWrapToggle()<CR>
"augroup END
"Copying
if !exists('g:vscode')
lua << EOF
vim.g.clipboard = {
name = 'OSC 52',
copy = {
['+'] = require('vim.ui.clipboard.osc52').copy('+'),
['*'] = require('vim.ui.clipboard.osc52').copy('*'),
},
paste = {
['+'] = require('vim.ui.clipboard.osc52').paste('+'),
['*'] = require('vim.ui.clipboard.osc52').paste('*'),
},
}
if vim.env.TMUX ~= nil then
local copy = {'tmux', 'load-buffer', '-w', '-'}
local paste = {'bash', '-c', 'tmux refresh-client -l && sleep 0.05 && tmux save-buffer -'}
vim.g.clipboard = {
name = 'tmux',
copy = {
['+'] = copy,
['*'] = copy,
},
paste = {
['+'] = paste,
['*'] = paste,
},
cache_enabled = 0,
}
end
EOF
endif
set clipboard=unnamedplus,unnamed " Copy/Paste
" Airline
@@ -297,16 +329,16 @@ let g:UltiSnipsEditSplit="vertical"
set rtp+=~/.config/nvim/my-snippets
" Folding
set foldmethod=syntax
set foldmethod=indent
set foldlevel=100
" Use F9 to toggle folding
" Use F9 or <Leader>z to toggle folding
inoremap <F9> <C-O>za
nnoremap <F9> za
onoremap <F9> <C-C>za
vnoremap <F9> zf
nnoremap <Leader>a za
onoremap <Leader>a <C-C>za
vnoremap <Leader>a zf
nnoremap <Leader>z za
onoremap <Leader>z <C-C>za
vnoremap <Leader>z zf
try
source ~/.config/nvim/.vimrc_config_expand_region

View File

@@ -47,7 +47,7 @@ bind k clear-history\; display "History cleared"
bind-key a set-window-option synchronize-panes
bind r source-file ~/.tmux.conf\; display "Conf reloaded!"
bind r source-file ~/.tmux.conf\; display "Tmux conf reloaded!"
set -g mouse on
set-option -g focus-events on
@@ -74,11 +74,13 @@ bind-key C-o send-keys C-o
# move tmux copy buffer into x clipboard
# Vi copypaste mode
set-window-option -g mode-keys vi
set-option -s set-clipboard on
set -g allow-passthrough on
set-option -g set-clipboard on
set -g @yank_with_mouse off
set -g @yank_action 'copy-pipe'
bind-key -Tcopy-mode-vi 'C-right' send -X next-word
bind-key -Tcopy-mode-vi 'C-left' send -X previous-word
unbind-key -T copy-mode-vi MouseDragEnd1Pane
if '[ `uname` == Darwin ]' \
'source-file ~/.tmux/.mac_config'
@@ -95,7 +97,10 @@ set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/double/blue'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @themepack 'powerline/double/green'
set -g @tpm-clean 'u'
setenv -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins/"

View File

@@ -11,10 +11,10 @@ function set_permissions {
echo "----------"
echo "Disabling Quarantine for Casks ..."
echo "----------"
find $PREFIX/Caskroom -name *.app -exec bash -c "xattr -d com.apple.quarantine {} 2> /dev/null" \;
find $PREFIX/Caskroom -type f -perm +111 -exec bash -c "xattr -d com.apple.quarantine {} 2> /dev/null" \;
find /Applications/ -name *.app -exec bash -c 'xattr -d com.apple.quarantine "{}" 2> /dev/null' \;
find /Applications/ -type f -perm +111 -exec bash -c 'xattr -d com.apple.quarantine "{}" 2> /dev/null' \;
sudo find $PREFIX/Caskroom -name *.app -exec bash -c "xattr -d com.apple.quarantine {} 2> /dev/null" \;
sudo find $PREFIX/Caskroom -type f -perm +111 -exec bash -c "xattr -d com.apple.quarantine {} 2> /dev/null" \;
sudo find /Applications/ -name *.app -exec bash -c 'xattr -d com.apple.quarantine "{}" 2> /dev/null' \;
sudo find /Applications/ -type f -perm +111 -exec bash -c 'xattr -d com.apple.quarantine "{}" 2> /dev/null' \;
}
function software_update {
@@ -29,18 +29,18 @@ function update_brew {
echo "Updating brew software"
echo "----------"
brew update
brew upgrade
sudo -u $USER brew upgrade
echo "----------"
echo "Updating casks"
echo "----------"
brew upgrade --cask --greedy --verbose
sudo -u $USER brew upgrade --cask --greedy --verbose
}
function cleanup {
echo "----------"
echo "Running cleanup"
echo "----------"
brew cleanup -s
sudo -u $USER brew cleanup -s
}
function diagnostics {

View File

@@ -0,0 +1,6 @@
#!/bin/zsh
# This hook is sourced after every virtualenv is activated.
if [[ -n "$TMUX" ]]; then
tmux set-environment VIRTUAL_ENV $VIRTUAL_ENV
fi

View File

@@ -0,0 +1,6 @@
#!/bin/zsh
# This hook is sourced after every virtualenv is deactivated.
if [[ -n "$TMUX" ]]; then
tmux set-environment -r VIRTUAL_ENV
fi

View File

@@ -0,0 +1,4 @@
#!/bin/zsh
# This hook is sourced after a new virtualenv is activated.
pip3 install neovim

View File

@@ -19,3 +19,13 @@ export PATH="$HOMEBREWPREFIX/opt/coreutils/libexec/gnubin:$HOME/.local/bin:$HOME
# Research
# export PATH="/Users/fabian/Labor/Research/code_signing/02-tools:$PATH"
alias tailscale=/Applications/Tailscale.app/Contents/MacOS/Tailscale
alias virt-manager="LD_PRELOAD=/opt/homebrew/Cellar/glib/2.86.0/lib virt-manager"
HOMEBREW_COMMAND_NOT_FOUND_HANDLER="$(brew --repository)/Library/Homebrew/command-not-found/handler.sh"
if [ -f "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER" ]; then
source "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER";
fi
export DYLD_FALLBACK_LIBRARY_PATH="$HOMEBREW_PREFIX/lib:${DYLD_FALLBACK_LIBRARY_PATH}"
export GI_TYPELIB_PATH="$HOMEBREW_PREFIX/lib/girepository-1.0:${GI_TYPELIB_PATH}"
export PKG_CONFIG_PATH="$HOMEBREW_PREFIX/lib/pkgconfig:$HOMEBREW_PREFIX/share/pkgconfig:${PKG_CONFIG_PATH}"

View File

@@ -6,6 +6,15 @@
[[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh
[[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config
update_dotfiles() {
cd ~/dotfiles || return
if git fetch --dry-run 2>&1 | grep -q .; then
git pull > /dev/null 2>&1
fi
}
update_dotfiles 2>&1 &!
export LC_OSC52=1
# Load Antidote
mkdir -p ${ZDOTDIR:-~}/.cache/zsh
@@ -18,12 +27,28 @@ fi
zstyle ':completion:*:ssh:*' hosts off
zstyle ':completion:*:scp:*' hosts off
# Run rehash for external commands
zstyle ":completion:*:commands" rehash 1
# source antidote and load plugins from `${ZDOTDIR:-~}/.zsh_plugins.txt`
source ${ZDOTDIR:-~}/.antidote/antidote.zsh
antidote load ${plugins_txt} ${static_file}
setopt interactivecomments
setopt HIST_IGNORE_SPACE
# History options
HISTSIZE=100000 # Set the amount of lines you want saved
SAVEHIST=100000 # This is required to actually save them, needs to match with HISTSIZE
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don\'t record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don\'t record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS # Don\'t write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
# Clear screen by ctrl+q
bindkey '^q' clear-screen