Tmux3, lot's of cleanup

main
Steffen Rademacker 5 years ago
parent 79d8714ad6
commit a20ea2066a

@ -29,16 +29,6 @@ function focusScreen(screen)
moveMouse()
end
-- Push the window into the center of the screen
local function center(window)
frame = window:screen():frame()
frame.x = frame.w * 0.1
frame.y = frame.h * 0.1
frame.w = frame.w * 0.8
frame.h = frame.h * 0.8
window:setFrame(frame)
end
local function fullsize(window)
frame = window:screen():frame()
frame.x = 0
@ -48,38 +38,7 @@ local function fullsize(window)
window:setFrame(frame)
end
local function size720(window)
frame = window:screen():frame()
frame.x = (frame.w - 1280) / 2
frame.y = (frame.h - 720) / 2
frame.w = 1280
frame.h = 720
window:setFrame(frame)
end
local function size900(window)
frame = window:screen():frame()
frame.x = (frame.w - 1440) / 2
frame.y = (frame.h - 900) / 2
frame.w = 1440
frame.h = 900
window:setFrame(frame)
end
local function size1080(window)
frame = window:screen():frame()
frame.x = (frame.w - 1920) / 2
frame.y = (frame.h - 1080) / 2
frame.w = 1920
frame.h = 1080
window:setFrame(frame)
end
hs.hotkey.bind(hyper, 'f', function() tiling.toggleFloat(center); moveMouse() end)
hs.hotkey.bind(hyper, 'v', function() tiling.toggleFloat(size720); moveMouse() end)
hs.hotkey.bind(hyper, 'b', function() tiling.toggleFloat(size900); moveMouse() end)
hs.hotkey.bind(hyper, 'n', function() tiling.toggleFloat(size1080); moveMouse() end)
hs.hotkey.bind(hyper, 'z', function() fullsize(hs.window.focusedWindow()); moveMouse() end)
hs.hotkey.bind(hyper, 'f', function() tiling.toggleFloat(fullsize); moveMouse() end)
hs.hotkey.bind(hyper, 'r', function() tiling.retile(); moveMouse() end)
hs.hotkey.bind(hyper, 'a', function() tiling.cycle(1); moveMouse() end)
hs.hotkey.bind(hyper, 'w', function() tiling.promote(); moveMouse() end)

@ -2,18 +2,15 @@
# install additional brew packages -- see _install.sh too
brew install composer
brew install curl --with-libssh2 --with-openssl
brew install curl
brew install dnsmasq
brew install ffmpeg --with-fdk-aac
brew install ffmpeg
brew install git-flow
brew install git-ftp
brew install htop
brew install httpd
brew install imagemagick
brew install mariadb
brew install mkcert
brew install mozjpeg
brew install neofetch
brew install nss
brew install openssl
brew install php
@ -25,3 +22,6 @@ echo 'address=/.localhost/127.0.0.1' > /usr/local/etc/dnsmasq.conf
sudo brew services start dnsmasq
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/localhost'
# php
sudo pecl install imagick

@ -60,7 +60,6 @@ brew services start clipper
read -p "Press any key to continue... " -n1 -s
# install deps + plugins for neovim
gem install neovim
pip3 install neovim
curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh
sh installer.sh ~/.config/nvim/dein

@ -21,7 +21,6 @@ mkdir ~/Mail/mailbox
mkdir ~/Mail/viu
mkdir ~/Mail/mf
mkdir ~/Mail/kfi
mkdir ~/Mail/hsv
ln -s ~/dotfiles/office/mutt ~/.mutt
ln -s ~/dotfiles/office/mbsyncrc ~/.mbsyncrc
ln -s ~/dotfiles/office/msmtprc ~/.msmtprc

@ -10,7 +10,6 @@ brew cask install carbon-copy-cloner
brew cask install dash
brew cask install doxie
brew cask install firefox
brew cask install flux
brew cask install google-chrome
brew cask install imagealpha
brew cask install imageoptim
@ -20,7 +19,6 @@ brew cask install libreoffice
brew cask install ngrok
brew cask install qlcolorcode
brew cask install qlstephen
brew cask install sequel-pro
brew cask install signal
brew cask install sketch
brew cask install skype

@ -0,0 +1,232 @@
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500
},
"rules": [
{
"manipulators": [
{
"description": "Change right option to hyper/esc",
"from": {
"key_code": "right_option",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control",
"modifiers": [
"left_command",
"left_option",
"left_shift"
]
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
},
{
"description": "Change caps lock to control/escape",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control",
"modifiers": []
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
},
{
"description": "Change left control lock to control/escape",
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control",
"modifiers": []
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 34304,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": true,
"simple_modifications": []
},
{
"disable_built_in_keyboard_if_exists": true,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 256,
"vendor_id": 2131
},
"ignore": false,
"manipulate_caps_lock_led": false,
"simple_modifications": []
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": {
"key_code": "display_brightness_decrement"
}
},
{
"from": {
"key_code": "f2"
},
"to": {
"key_code": "display_brightness_increment"
}
},
{
"from": {
"key_code": "f3"
},
"to": {
"key_code": "mission_control"
}
},
{
"from": {
"key_code": "f4"
},
"to": {
"key_code": "launchpad"
}
},
{
"from": {
"key_code": "f5"
},
"to": {
"key_code": "illumination_decrement"
}
},
{
"from": {
"key_code": "f6"
},
"to": {
"key_code": "illumination_increment"
}
},
{
"from": {
"key_code": "f7"
},
"to": {
"key_code": "rewind"
}
},
{
"from": {
"key_code": "f8"
},
"to": {
"key_code": "play_or_pause"
}
},
{
"from": {
"key_code": "f9"
},
"to": {
"key_code": "fastforward"
}
},
{
"from": {
"key_code": "f10"
},
"to": {
"key_code": "mute"
}
},
{
"from": {
"key_code": "f11"
},
"to": {
"key_code": "volume_decrement"
}
},
{
"from": {
"key_code": "f12"
},
"to": {
"key_code": "volume_increment"
}
}
],
"name": "Default profile",
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"caps_lock_delay_milliseconds": 0,
"country_code": 0,
"keyboard_type": "ansi"
}
}
]
}

@ -11,7 +11,8 @@
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
@ -220,12 +221,16 @@
}
],
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"caps_lock_delay_milliseconds": 0,
"country_code": 0,
"keyboard_type": "ansi"
"keyboard_type": "ansi",
"mouse_key_xy_scale": 100
}
}
]

@ -0,0 +1,15 @@
set path=.,src
set suffixesadd=.js,.jsx,.scss
function! LoadMainNodeModule(fname)
let nodeModules = "./node_modules/"
let packageJsonPath = nodeModules . a:fname . "/package.json"
if filereadable(packageJsonPath)
return nodeModules . a:fname . "/" . json_decode(join(readfile(packageJsonPath))).main
else
return nodeModules . a:fname
endif
endfunction
set includeexpr=LoadMainNodeModule(v:fname)

@ -6,6 +6,7 @@ call dein#begin(expand('~/.config/nvim/dein'))
call dein#add('Shougo/dein.vim')
call dein#add('Shougo/deoplete.nvim')
call dein#add('Shougo/neosnippet')
call dein#add('ap/vim-css-color')
call dein#add('christoomey/vim-tmux-navigator')
call dein#add('easymotion/vim-easymotion')
call dein#add('editorconfig/editorconfig-vim')
@ -13,7 +14,6 @@ call dein#begin(expand('~/.config/nvim/dein'))
call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' })
call dein#add('junegunn/gv.vim')
call dein#add('maxbrunsfeld/vim-yankstack')
call dein#add('moll/vim-node')
call dein#add('sheerun/vim-polyglot')
call dein#add('terryma/vim-multiple-cursors')
call dein#add('tpope/vim-commentary')
@ -36,6 +36,7 @@ call dein#end()
source ~/.config/nvim/config.vim
source ~/.config/nvim/autocommands.vim
source ~/.config/nvim/statusline.vim
source ~/.config/nvim/gotofile.vim
source ~/.config/nvim/keymappings.vim
source ~/.config/nvim/leaderkeys.vim
source ~/.config/nvim/plugins.vim

@ -31,8 +31,9 @@ command! TogglePrettier call s:TogglePrettier()
" zoomwindow
nnoremap <leader>z :ToggleZoom<CR>
" ale fixing shortcut toggle
" ale
nnoremap <leader>f :TogglePrettier<CR>
nnoremap <leader>e :ALENext<CR>
" open new vertical split and change to split
nnoremap <leader>\ <C-w>v<C-w>l

@ -13,7 +13,7 @@ function! s:deoplete_cr_function() abort
endfunction
" fugitive
nnoremap <silent> <leader>gs :Gstatus<CR><C-w>20+
nnoremap <silent> <leader>gs :G<CR><C-w>20+
nnoremap <silent> <leader>gd :Gvdiff<CR><C-w>20+
nnoremap <silent> <leader>gc :Gcommit<CR><C-w>20+
nnoremap <silent> <leader>gw :Gwrite<CR><C-w>20+
@ -32,21 +32,29 @@ xmap <C-j> <Plug>(neosnippet_expand_target)
" ale
let g:ale_lint_on_save=1
let g:ale_lint_on_text_changed=0
let g:ale_lint_on_text_changed='never'
let g:ale_lint_on_insert_leave=0
let g:ale_lint_on_enter=1
let g:ale_linters = {
\ 'css': [],
\ 'html': ['htmlhint'],
\ 'javascript': ['eslint'],
\ 'javascriptreact': ['eslint'],
\ 'json': ['jsonlint'],
\ 'jsx': ['eslint'],
\ 'php': ['php'],
\ 'scss': ['sasslint'],
\ 'typescript': ['tslint'],
\}
let g:ale_fixers = {
\ 'css': ['prettier'],
\ 'javascript': ['prettier'],
\ 'javascriptreact': ['prettier'],
\ 'json': ['prettier'],
\ 'jsx': ['prettier'],
\ 'markdown': ['prettier'],
\ 'scss': ['prettier'],
\ 'typescript': ['prettier'],
\ 'yaml': ['prettier'],
\}
let g:ale_linters_explicit = 1

@ -32,7 +32,7 @@ bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "nc localhost 837
bind-key -T copy-mode-vi Escape send -X cancel
# Saner window splitting / new windows
bind-key \ split-window -h -c "#{pane_current_path}"
bind-key '\' split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
bind-key c new-window -c "#{pane_current_path}"
@ -52,7 +52,7 @@ bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Mouse support
set -g mouse on

@ -75,7 +75,6 @@ alias dnsflush='sudo dscacheutil -flushcache'
alias lock="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# imagemagick downsampling shortcuts (c&p retina folder, run, done!)
alias jpegoptim='for i (*.jpg) mozjpeg -copy none -optimize -scans ~/dotfiles/other/scans.txt -outfile $i $i'
alias jpg25='mogrify -format jpg -resize 25% -strip -quality 80 *.jpg'
alias jpg50='mogrify -format jpg -resize 50% -strip -quality 80 *.jpg'
alias png25='mogrify -format png -resize 25% -strip -quality 80 *.png'

@ -16,9 +16,13 @@ export SHELL=/usr/local/bin/zsh
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
# paths
export PATH=/usr/local/opt/ruby/bin:$PATH
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export PATH=/usr/local/opt/curl/bin:$PATH
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export PATH=/usr/local/opt/ruby/bin:$PATH
export PATH=/usr/local/lib/ruby/gems/2.6.0/bin:$PATH
# manpath
export MANPATH=/usr/local/share/man:$MANPATH
# disable stupid ._ and dsstore files

@ -4,6 +4,10 @@ function webvideo() {
ffmpeg -i $1 -movflags +faststart -acodec libfdk_aac -ac 2 -b:a 128k -ar 44100 -vcodec libx264 -vprofile high -preset slow -pix_fmt yuv420p -r 25 -b:v 2M -maxrate 2M -bufsize 4M -s 1280x720 $1.mp4
}
function webvideonew() {
ffmpeg -i $1 -preset slow -codec:a libfdk_aac -b:a 128k -codec:v libx264 -pix_fmt yuv420p -b:v 4500k -minrate 4500k -maxrate 9000k -bufsize 9000k -vf scale=-1:1080 $1.mp4
}
function webvideohigh() {
ffmpeg -i $1 -acodec libvorbis -ac 2 -b:a 160k -ar 44100 -vcodec libvpx -pix_fmt yuv420p -r 25 -qmin 10 -qmax 42 -cpu-used 0 -threads 2 -quality good -b:v 3M -maxrate 3M -bufsize 6M -s 1280x720 $1--high.webm
ffmpeg -i $1 -movflags +faststart -acodec libfdk_aac -ac 2 -b:a 160k -ar 44100 -vcodec libx264 -vprofile high -preset slow -pix_fmt yuv420p -r 25 -b:v 3M -maxrate 3M -bufsize 6M -s 1280x720 $1--high.mp4

@ -1 +1 @@
Subproject commit cf565254e26bb7ce03f51889e9a29953b955b1fb
Subproject commit 8def5f15835f294ec6a1bf220fb330efddbe2575

@ -1 +1 @@
Subproject commit 82cf2527fc13fefee6e87f99171c1b368f0abdb9
Subproject commit e7d3fbc50b0209cb9f9b0812fd40298be03c7808
Loading…
Cancel
Save