mirror of
https://github.com/theniceboy/.config.git
synced 2025-12-26 14:44:57 +08:00
cleanup & other updates
This commit is contained in:
parent
abdc9466ec
commit
e76e11f517
3 changed files with 45 additions and 93 deletions
67
.tmux.conf
67
.tmux.conf
|
|
@ -1,6 +1,8 @@
|
|||
# cat << EOF > /dev/null
|
||||
|
||||
# -- general
|
||||
set-option default-path "$PWD"
|
||||
|
||||
setw -g xterm-keys on
|
||||
set -s escape-time 0
|
||||
set -sg repeat-time 300
|
||||
|
|
@ -79,11 +81,6 @@ unbind 0
|
|||
bind -r C-p previous-window
|
||||
bind -r C-n next-window
|
||||
|
||||
bind u split-window -vb -c "#{pane_current_path}"
|
||||
bind e split-window -v -c "#{pane_current_path}"
|
||||
bind n split-window -hb -c "#{pane_current_path}"
|
||||
bind i split-window -h -c "#{pane_current_path}"
|
||||
|
||||
bind -n M-1 select-window -t 1
|
||||
bind -n M-2 select-window -t 2
|
||||
bind -n M-3 select-window -t 3
|
||||
|
|
@ -105,6 +102,11 @@ bind -n M-& join-pane -t :7
|
|||
bind -n M-* join-pane -t :8
|
||||
bind -n M-( join-pane -t :9
|
||||
|
||||
bind u split-window -vb -c "#{pane_current_path}"
|
||||
bind e split-window -v -c "#{pane_current_path}"
|
||||
bind n split-window -hb -c "#{pane_current_path}"
|
||||
bind i split-window -h -c "#{pane_current_path}"
|
||||
|
||||
bind -n M-f resize-pane -Z
|
||||
|
||||
# pane navigation
|
||||
|
|
@ -172,11 +174,6 @@ bind s if-shell '[[ $(tmux show -g status | cut -d\ -f2) == "on" ]]' \
|
|||
'set -g status off' \
|
||||
'set -g status on'
|
||||
|
||||
# -- fzf_url
|
||||
bind l run -b 'cut -c3- ~/.tmux.conf | sh -s fzf_url'
|
||||
|
||||
run 'cut -c3- ~/.tmux.conf | sh -s bind_with_sys_clipboard'
|
||||
|
||||
# -- theme
|
||||
#set -g status off
|
||||
|
||||
|
|
@ -209,53 +206,3 @@ setw -g window-status-bell-style bg=black
|
|||
set-option -g status-left "#(~/.config/tmux/tmux-powerline/powerline.sh left)"
|
||||
set-option -g status-right "#(~/.config/tmux/tmux-powerline/powerline.sh right)"
|
||||
|
||||
run-shell ~/.config/tmux/extrakto/extrakto.tmux
|
||||
#set-option -g status-utf8 on
|
||||
#set -g status-left '#(rainbarf --battery --remaining --bolt --rgb)'
|
||||
|
||||
set-option default-path "$PWD"
|
||||
|
||||
|
||||
# EOF
|
||||
# bind_with_sys_clipboard() {
|
||||
# if [[ -x $(command -v xsel) ]]; then
|
||||
# cmd='xsel -i -b'
|
||||
# elif [[ -x $(command -v xclip) ]]; then
|
||||
# cmd='xclip -i -selection clipboard'
|
||||
# fi
|
||||
# if [[ -n $cmd ]]; then
|
||||
# while IFS= read -r line; do
|
||||
# [[ -z $line ]] && continue
|
||||
# bind_key=$(printf '%s' "$line" |
|
||||
# sed -E "s/copy-selection(-and-cancel)?$/copy-pipe\1 \"$cmd\"/g")
|
||||
# eval "tmux $bind_key"
|
||||
# done <<< $(tmux list-keys | grep -E 'copy-selection|copy-pipe')
|
||||
# fi
|
||||
# }
|
||||
#
|
||||
# fzf_url() {
|
||||
# local ip4_seg="(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
|
||||
# local path_set="[-a-zA-Z0-9@:%_\+\.~#?&//=]"
|
||||
# local url_re="(https?|ftp|file)://($path_set+|(($ip4_seg\.){3,3}$ip4_seg$path_set*))"
|
||||
# local -a url=($(tmux capture-pane -S - -Jp | grep -oE "$url_re"))
|
||||
# if [[ -z $url ]]; then
|
||||
# return 0
|
||||
# else
|
||||
# printf "%s\n" ${url[@]} |
|
||||
# sort -u |
|
||||
# nl -w3 -s ' ' |
|
||||
# fzf-tmux -d 25% --multi --exit-0 --cycle --reverse |
|
||||
# awk '{print $2}' |
|
||||
# xargs -I {} xdg-open {} &> /dev/null
|
||||
# fi
|
||||
# }
|
||||
#
|
||||
# update_env_event() {
|
||||
# local event='client-attached'
|
||||
# local event_dir=${TMUX%%,*}-event
|
||||
# mkdir -p $event_dir 2>/dev/null
|
||||
# rm $event_dir/$event-pane* 2>/dev/null
|
||||
# tmux list-panes -a -F '#D' | sed -E "s|^(.*)$|$event_dir/$event-pane-\1|g" | xargs touch
|
||||
# }
|
||||
#
|
||||
# "$@"
|
||||
|
|
|
|||
65
.yabairc
65
.yabairc
|
|
@ -1,40 +1,43 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
sudo /opt/homebrew/bin/yabai --load-sa
|
||||
yabai -m signal --add event=dock_did_restart action="sudo /opt/homebrew/bin/yabai --load-sa"
|
||||
sudo /Users/david/prog/yabai/bin/yabai --load-sa
|
||||
/Users/david/prog/yabai/bin/yabai -m signal --add event=dock_did_restart action="sudo /Users/david/prog/yabai/bin/yabai --load-sa"
|
||||
|
||||
# global settings
|
||||
yabai -m config mouse_follows_focus off
|
||||
yabai -m config focus_follows_mouse off
|
||||
yabai -m config window_origin_display default
|
||||
yabai -m config window_placement second_child
|
||||
yabai -m config window_topmost on
|
||||
yabai -m config window_shadow on
|
||||
yabai -m config window_opacity off
|
||||
yabai -m config window_opacity_duration 2000.0
|
||||
yabai -m config active_window_opacity 1.0
|
||||
yabai -m config normal_window_opacity 0.85
|
||||
yabai -m config window_border off
|
||||
yabai -m config window_border_width 6
|
||||
yabai -m config active_window_border_color 0xff775759
|
||||
yabai -m config normal_window_border_color 0xff555555
|
||||
yabai -m config insert_feedback_color 0xffd75f5f
|
||||
yabai -m config split_ratio 0.50
|
||||
yabai -m config auto_balance off
|
||||
yabai -m config mouse_modifier fn
|
||||
yabai -m config mouse_action1 move
|
||||
yabai -m config mouse_action2 resize
|
||||
yabai -m config mouse_drop_action swap
|
||||
/Users/david/prog/yabai/bin/yabai -m config mouse_follows_focus off
|
||||
/Users/david/prog/yabai/bin/yabai -m config focus_follows_mouse off
|
||||
/Users/david/prog/yabai/bin/yabai -m config window_origin_display default
|
||||
/Users/david/prog/yabai/bin/yabai -m config window_placement second_child
|
||||
/Users/david/prog/yabai/bin/yabai -m config window_topmost off
|
||||
/Users/david/prog/yabai/bin/yabai -m config window_shadow on
|
||||
/Users/david/prog/yabai/bin/yabai -m config window_opacity off
|
||||
/Users/david/prog/yabai/bin/yabai -m config window_opacity_duration 2000.0
|
||||
/Users/david/prog/yabai/bin/yabai -m config active_window_opacity 1.0
|
||||
/Users/david/prog/yabai/bin/yabai -m config normal_window_opacity 0.85
|
||||
/Users/david/prog/yabai/bin/yabai -m config window_border off
|
||||
/Users/david/prog/yabai/bin/yabai -m config window_border_width 6
|
||||
/Users/david/prog/yabai/bin/yabai -m config active_window_border_color 0xff775759
|
||||
/Users/david/prog/yabai/bin/yabai -m config normal_window_border_color 0xff555555
|
||||
/Users/david/prog/yabai/bin/yabai -m config insert_feedback_color 0xffd75f5f
|
||||
/Users/david/prog/yabai/bin/yabai -m config split_ratio 0.50
|
||||
/Users/david/prog/yabai/bin/yabai -m config --space 1 split_ratio 0.73
|
||||
/Users/david/prog/yabai/bin/yabai -m config --space 2 split_ratio 0.50
|
||||
/Users/david/prog/yabai/bin/yabai -m config auto_balance off
|
||||
/Users/david/prog/yabai/bin/yabai -m config mouse_modifier fn
|
||||
/Users/david/prog/yabai/bin/yabai -m config mouse_action1 move
|
||||
/Users/david/prog/yabai/bin/yabai -m config mouse_action2 resize
|
||||
/Users/david/prog/yabai/bin/yabai -m config mouse_drop_action swap
|
||||
|
||||
# general space settings
|
||||
yabai -m config layout bsp
|
||||
yabai -m config top_padding 10
|
||||
yabai -m config bottom_padding 10
|
||||
yabai -m config left_padding 10
|
||||
yabai -m config right_padding 10
|
||||
yabai -m config window_gap 10
|
||||
/Users/david/prog/yabai/bin/yabai -m config layout bsp
|
||||
/Users/david/prog/yabai/bin/yabai -m config top_padding 00
|
||||
/Users/david/prog/yabai/bin/yabai -m config bottom_padding 00
|
||||
/Users/david/prog/yabai/bin/yabai -m config left_padding 00
|
||||
/Users/david/prog/yabai/bin/yabai -m config right_padding 00
|
||||
/Users/david/prog/yabai/bin/yabai -m config window_gap 10
|
||||
# yabai -m config window_animation_duration 0.00
|
||||
|
||||
yabai -m rule --add app="^iStat*" sticky=on layer=above manage=off border=off
|
||||
yabai -m rule --add app="^System Preferences*" manage=off
|
||||
/Users/david/prog/yabai/bin/yabai -m rule --add app="^iStat*" sticky=on layer=above manage=off border=off
|
||||
/Users/david/prog/yabai/bin/yabai -m rule --add app="^System Preferences*" manage=off
|
||||
|
||||
echo "yabai configuration loaded.."
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ export LOCALBIN=$XDG_CONFIG_HOME/bin
|
|||
export PATH=$PATH:$LOCALBIN
|
||||
export LOCALPROG=$HOME/prog
|
||||
export GOPATH=$HOME/go
|
||||
export PATH=$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin/
|
||||
export PATH=$PATH:$HOME/.gem/ruby/2.6.0
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
export PATH=$PATH:$HOME/go/bin
|
||||
|
|
@ -20,11 +21,12 @@ export PATH=$PATH:/usr/local/opt/node@12/bin
|
|||
export PATH=$PATH:$HOME/Library/Python/3.9/bin
|
||||
#export TERM=xterm-256color
|
||||
export PATH=$PATH:$LOCALPROG/bin
|
||||
export PATH=$PATH:$LOCALPROG/flutter/bin
|
||||
export PATH=$HOME/fvm/default/bin:$PATH
|
||||
export PATH=$PATH:$LOCALPROG/flutter/bin:$PATH
|
||||
export PATH=$PATH:$LOCALPROG/flutter/bin/cache/dart-sdk/bin
|
||||
export PATH="$PATH":"$HOME/.pub-cache/bin"
|
||||
export FLUTTER_ROOT=$LOCALPROG/flutter
|
||||
export TERM=xterm-256color
|
||||
export TERM=xterm-256color-italic
|
||||
export TERM_ITALICS=true
|
||||
export RANGER_LOAD_DEFAULT_RC="false"
|
||||
#export TERM=screen-256color
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue