From 0774d4db61b352173f3a57436f333aae89f9247b Mon Sep 17 00:00:00 2001 From: Jisu Kim Date: Mon, 17 Aug 2020 09:36:12 +0900 Subject: [PATCH] =?UTF-8?q?Tmux=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linux/bspwm/layout_monitor.sh | 8 ++++---- linux/bspwm/udev_monitor.sh | 35 ++++++++++++++++++++--------------- linux/nvim/init.vim | 3 +++ mapping.ts | 1 + tmux.conf | 29 +++++++++++++++++++++++++++++ 5 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 tmux.conf diff --git a/linux/bspwm/layout_monitor.sh b/linux/bspwm/layout_monitor.sh index d2c2a3d..71aa04b 100755 --- a/linux/bspwm/layout_monitor.sh +++ b/linux/bspwm/layout_monitor.sh @@ -7,14 +7,14 @@ function node_monitor { xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0 else bspc query -N -d | while read -r node; do - xprop -id "$node" -remove _PICOM_ROUNDED - done + xprop -id "$node" -remove _PICOM_ROUNDED + done fi elif [ $1 = "remove" ];then if [ $num = "1" ];then bspc query -N -d | while read -r node; do - xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0 - done + xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0 + done fi fi done diff --git a/linux/bspwm/udev_monitor.sh b/linux/bspwm/udev_monitor.sh index 8676674..cffc64e 100755 --- a/linux/bspwm/udev_monitor.sh +++ b/linux/bspwm/udev_monitor.sh @@ -1,20 +1,25 @@ #!/bin/bash +function set-props { + # Elan input setting + xinput set-prop 'Elan Touchpad' 'libinput Tapping Enabled' 1 + xinput set-prop 'Elan Touchpad' 'libinput Natural Scrolling Enabled' 1 + xinput set-prop 'Elan TrackPoint' 'libinput Accel Speed' -0.3 + # Magic Trackpad 2 + xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Natural Scrolling Enabled' 1 + xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Accel Speed' 0.5 + # Macbook Pro Trackpad + xinput set-prop "bcm5974" "libinput Natural Scrolling Enabled" 1 + xinput set-prop "bcm5974" "libinput Accel Speed" 0.5 + # Logitech G402 + xinput set-prop 'Logitech Gaming Mouse G402' 'libinput Accel Speed' -0.8 + # Logitech G102 + xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Natural Scrolling Enabled' 1 + xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Accel Speed' -0.5 +} + +set-props udevadm monitor -u | while read -r _ _ tag _; do if [ "$tag" = "bind" ];then - # Elan input setting - xinput set-prop 'Elan Touchpad' 'libinput Tapping Enabled' 1 - xinput set-prop 'Elan Touchpad' 'libinput Natural Scrolling Enabled' 1 - xinput set-prop 'Elan TrackPoint' 'libinput Accel Speed' -0.3 - # Magic Trackpad 2 - xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Natural Scrolling Enabled' 1 - xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Accel Speed' 0.5 - # Macbook Pro Trackpad - xinput set-prop "bcm5974" "libinput Natural Scrolling Enabled" 1 - xinput set-prop "bcm5974" "libinput Accel Speed" 0.5 - # Logitech G402 - xinput set-prop 'Logitech Gaming Mouse G402' 'libinput Accel Speed' -0.8 - # Logitech G102 - xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Natural Scrolling Enabled' 1 - xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Accel Speed' -0.5 + set-props fi done diff --git a/linux/nvim/init.vim b/linux/nvim/init.vim index 11eaf08..b9c8921 100644 --- a/linux/nvim/init.vim +++ b/linux/nvim/init.vim @@ -13,6 +13,9 @@ Plug 'preservim/nerdtree' " NERDTree icon color Plug 'tiagofumo/vim-nerdtree-syntax-highlight' +" Restore Session +Plug 'tpope/vim-obsession' + " fuzzy finder Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' diff --git a/mapping.ts b/mapping.ts index 29845a5..3a6ffae 100644 --- a/mapping.ts +++ b/mapping.ts @@ -39,6 +39,7 @@ const linux: DotOption = { ".config/systemd": "linux/systemd", ".config/wallpaper": "wallpaper", ".config/nvim": "linux/nvim", + ".tmux.conf": "tmux.conf", ".tmux/themes": "tmux/themes", ".xinitrc": "linux/xinitrc", ".pam_environment": "linux/pam_environment", diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..219673b --- /dev/null +++ b/tmux.conf @@ -0,0 +1,29 @@ +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-pain-control' +set -g @plugin 'tmux-plugins/tmux-yank' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run -b '~/.tmux/plugins/tpm/tpm' + +set -g @themepack 'powerline/block/red' +set-option -g @pane_resize "1" +set -g @yank_selection_mouse 'clipboard' +set -g @continuum-boot 'on' +set -g @resurrect-strategy-nvim 'session' +set -g @resurrect-capture-pane-contents 'on' + +set -g mouse on +set -g default-terminal screen-256color + +source-file ~/.tmux/themes/tomorrow.tmux + +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' + + +# bind -n End send-key C-e +# bind -n Home send-key C-a +