From 5934dc7d83d2877f9c3af5f4f2fcbf4f02feee00 Mon Sep 17 00:00:00 2001 From: Konstantin Bukley Date: Sun, 17 Jan 2021 17:11:26 +0200 Subject: [PATCH] dotfiles: sync from prime --- .gitignore | 3 + alacritty/.config/alacritty/alacritty.yml | 10 +- bash/.bashrc | 14 +- hammerspoon/.hammerspoon/init.lua | 99 +- karabiner/.config/karabiner/karabiner.json | 1483 +++++++++++++++++++- tmux/.tmux.conf | 3 + 6 files changed, 1547 insertions(+), 65 deletions(-) diff --git a/.gitignore b/.gitignore index a0e76af..ade1c59 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .netrwhist +.DS_Store +karabiner/.config/karabiner/automatic_backups/ +karabiner/.config/karabiner/assets/ diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 9af0402..6546ee8 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -7,6 +7,7 @@ window: y: 0 decorations: none startup_mode: Maximized + dynamic_title: true draw_bold_text_with_bright_colors: true font: normal: @@ -18,7 +19,7 @@ font: italic: family: Fira Code style: Light - size: 18.0 + size: 22.0 offset: x: 0 y: 0 @@ -75,14 +76,13 @@ colors: cyan: '0x8FBCBB' white: '0xECEFF4' -visual_bell: - duration: 0 - background_opacity: 1.0 +# visual_bell: +# duration: 0 +# background_opacity: 1.0 mouse: hide_when_typing: true selection: semantic_escape_chars: ",│`|:\"' ()[]{}<>" -dynamic_title: true cursor: style: Block unfocused_hollow: true diff --git a/bash/.bashrc b/bash/.bashrc index 27847d9..72be5be 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -17,17 +17,7 @@ shopt -s checkhash shopt -s cmdhist # save multi-line commands in one export BASH_SILENCE_DEPRECATION_WARNING=1 - -# ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed and these are never upgraded. - -# To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following -# to your /Users/madundead/.bash_profile: -# export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)" - -# Note: this may interfere with building old versions of Ruby (e.g <2.4) that use -# OpenSSL <1.1. - -# export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)" +export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl@1.1" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.:/usr/local/lib export EDITOR=nvim export LANG=en_US.UTF-8 @@ -53,6 +43,7 @@ alias md='mkdir -p' alias gco='git checkout' alias gcom='git checkout master' +alias gcob='git checkout -b' alias gd='git diff' alias gdc='git diff --cached' alias gc='git commit' @@ -130,7 +121,6 @@ function q() { if [ -z "$1" ]; then return 1; fi; kubectl exec -n $1 -it $(kubec function o() { if [ -z "$1" ]; then return 1; fi; kubectl exec -n $1 -it $(kubectl get pods -n $1 -l product=origin,app=origin-rails-webserver -o=custom-columns=NAME:.metadata.name | tail -1) ${@:2}; } function olb() { if [ -z "$1" ]; then return 1; fi; kubectl exec -n $1 -it $(kubectl get pods -n $1 -l product=online-bind,app=online-bind-rails-webserver -o=custom-columns=NAME:.metadata.name | tail -1) ${@:2}; } function qstag() { kubectl exec -n staging -it $(kubectl get pods -n staging -l product=quoting,app=quoting-rails-webserver -o=custom-columns=NAME:.metadata.name | tail -1) ${@:2}; } -# bash ops-deployment/tools/debug quoting production rails c function _calcram() { local sum diff --git a/hammerspoon/.hammerspoon/init.lua b/hammerspoon/.hammerspoon/init.lua index 8671f61..fa68a2b 100644 --- a/hammerspoon/.hammerspoon/init.lua +++ b/hammerspoon/.hammerspoon/init.lua @@ -27,13 +27,14 @@ for i, mapping in ipairs(hyperModeAppMappings) do end -------------------------------------------------------------------------- hs.window.animationDuration = 0 +window = hs.getObjectMetatable("hs.window") -- +-----------------+ -- | | | -- | HERE | | -- | | | -- +-----------------+ -function hs.window.left(win) +function window.left(win) local f = win:frame() local screen = win:screen() local max = screen:frame() @@ -50,7 +51,7 @@ end -- | | HERE | -- | | | -- +-----------------+ -function hs.window.right(win) +function window.right(win) local f = win:frame() local screen = win:screen() local max = screen:frame() @@ -67,7 +68,7 @@ end -- +-----------------+ -- | | -- +-----------------+ -function hs.window.up(win) +function window.up(win) local f = win:frame() local screen = win:screen() local max = screen:frame() @@ -84,7 +85,7 @@ end -- +-----------------+ -- | HERE | -- +-----------------+ -function hs.window.down(win) +function window.down(win) local f = win:frame() local screen = win:screen() local max = screen:frame() @@ -101,7 +102,7 @@ end -- +--------+ | -- | | -- +-----------------+ -function hs.window.upLeft(win) +function window.upLeft(win) local f = win:frame() local screen = win:screen() local max = screen:fullFrame() @@ -118,7 +119,7 @@ end -- +--------+ | -- | HERE | | -- +-----------------+ -function hs.window.downLeft(win) +function window.downLeft(win) local f = win:frame() local screen = win:screen() local max = screen:fullFrame() @@ -135,7 +136,7 @@ end -- | +--------| -- | | HERE | -- +-----------------+ -function hs.window.downRight(win) +function window.downRight(win) local f = win:frame() local screen = win:screen() local max = screen:fullFrame() @@ -153,7 +154,7 @@ end -- | +--------| -- | | -- +-----------------+ -function hs.window.upRight(win) +function window.upRight(win) local f = win:frame() local screen = win:screen() local max = screen:fullFrame() @@ -170,7 +171,7 @@ end -- | | HERE | | -- | | | | -- +---------------+ -function hs.window.centerWithFullHeight(win) +function window.centerWithFullHeight(win) local f = win:frame() local screen = win:screen() local max = screen:fullFrame() @@ -187,7 +188,7 @@ end -- | HERE | | -- | | | -- +-----------------+ -function hs.window.left40(win) +function window.left40(win) local f = win:frame() local screen = win:screen() local max = screen:frame() @@ -204,7 +205,7 @@ end -- | | HERE | -- | | | -- +-----------------+ -function hs.window.right60(win) +function window.right60(win) local f = win:frame() local screen = win:screen() local max = screen:frame() @@ -216,7 +217,7 @@ function hs.window.right60(win) win:setFrame(f) end -function hs.window.nextScreen(win) +function window.nextScreen(win) local currentScreen = win:screen() local allScreens = hs.screen.allScreens() currentScreenIndex = hs.fnutils.indexOf(allScreens, currentScreen) @@ -248,32 +249,9 @@ end local status, windowMappings = pcall(require, 'keyboard.windows-bindings') --- if not status then --- windowMappings = require('keyboard.windows-bindings-defaults') --- end - -local windowMappings = { - modifiers = {'ctrl'}, - showHelp = false, - trigger = 's', - mappings = { - { {}, 'return', 'maximize' }, - { {}, 'space', 'centerWithFullHeight' }, - { {}, 'h', 'left' }, - { {}, 'j', 'down' }, - { {}, 'k', 'up' }, - { {}, 'l', 'right' }, - { {'shift'}, 'h', 'left40' }, - { {'shift'}, 'l', 'right60' }, - { {}, 'i', 'upLeft' }, - { {}, 'o', 'upRight' }, - { {}, ',', 'downLeft' }, - { {}, '.', 'downRight' }, - { {}, 'n', 'nextScreen' }, - { {}, 'right', 'moveOneScreenEast' }, - { {}, 'left', 'moveOneScreenWest' }, - } -} +if not status then + windowMappings = require('keyboard.windows-bindings-defaults') +end local modifiers = windowMappings.modifiers local showHelp = windowMappings.showHelp @@ -323,3 +301,48 @@ end) windowLayoutMode:bind(modifiers, trigger, function() windowLayoutMode:exit() end) + + +-- https://github.com/dbalatero/VimMode.spoon/tree/21805205e39cc693dbf6ea671d47f2c5ba920262#manual-instructions +-------------------------------- +-- TODO: check this out, seems cool +-------------------------------- +--local VimMode = hs.loadSpoon("VimMode") +--local vim = VimMode:new() + +---- Configure apps you do *not* want Vim mode enabled in +---- For example, you don't want this plugin overriding your control of Terminal +---- vim +--vim +-- :disableForApp('Code') +-- :disableForApp('zoom.us') +-- :disableForApp('iTerm') +-- :disableForApp('iTerm2') +-- :disableForApp('Terminal') + +---- If you want the screen to dim (a la Flux) when you enter normal mode +---- flip this to true. +--vim:shouldDimScreenInNormalMode(false) + +---- If you want to show an on-screen alert when you enter normal mode, set +---- this to true +--vim:shouldShowAlertInNormalMode(true) + +---- You can configure your on-screen alert font +--vim:setAlertFont("Courier New") + +---- Enter normal mode by typing a key sequence +--vim:enterWithSequence('jk') + +---- if you want to bind a single key to entering vim, remove the +---- :enterWithSequence('jk') line above and uncomment the bindHotKeys line +---- below: +---- +---- To customize the hot key you want, see the mods and key parameters at: +---- https://www.hammerspoon.org/docs/hs.hotkey.html#bind +---- +---- vim:bindHotKeys({ enter = { {'ctrl'}, ';' } }) + +---------------------------------- +---- END VIM CONFIG +---------------------------------- diff --git a/karabiner/.config/karabiner/karabiner.json b/karabiner/.config/karabiner/karabiner.json index f070b77..34d5958 100644 --- a/karabiner/.config/karabiner/karabiner.json +++ b/karabiner/.config/karabiner/karabiner.json @@ -14,7 +14,1453 @@ "basic.to_if_held_down_threshold_milliseconds": 500, "mouse_motion_to_scroll.speed": 100 }, - "rules": [] + "rules": [ + { + "description": "Tab Modifier Mode [Tab as Trigger Key]", + "manipulators": [ + { + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "tab_modifier", + "value": 1 + } + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "tab_modifier", + "value": 0 + } + } + ], + "to_if_alone": [ + { + "key_code": "tab" + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "1", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "1", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "2", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "2", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "3", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "3", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "4", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "4", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "5", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "5", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "6", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "6", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "7", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "7", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "8", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "8", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "9", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "9", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "0", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "0", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "hyphen", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "equal_sign", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "delete_or_backspace", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "delete_or_backspace", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "q", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "q", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "w", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "w", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "e", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "e", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "bundle_identifiers": [ + "^com\\.jetbrains\\.PhpStorm$", + "^com\\.jetbrains\\.WebStorm$" + ], + "type": "frontmost_application_if" + }, + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "r", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "r", + "modifiers": [ + "left_command", + "left_option" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "r", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "r", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "t", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "t", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "y", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "y", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "u", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "u", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "i", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "i", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "o", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "p", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "open_bracket", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "close_bracket", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "backslash", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "a", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "a", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "s", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "s", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "d", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "d", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "f", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "f", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "g", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "g", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "h", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "h", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "j", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "j", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "k", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "k", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "l", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "l", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "semicolon", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "quote", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "return_or_enter", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "z", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "z", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "x", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "x", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "c", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "c", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "v", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "v", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "b", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "b", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "n", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "n", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "m", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "m", + "modifiers": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "comma", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "shell_command": "osascript -e 'display notification \"Tab-,\" with title \"Triggered:\"'" + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "period", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "shell_command": "osascript -e 'display notification \"Tab-.\" with title \"Triggered:\"'" + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "tab_modifier", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "slash", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "shell_command": "osascript -e 'display notification \"Tab-/\" with title \"Triggered:\"'" + } + ], + "type": "basic" + } + ] + } + ] }, "devices": [ { @@ -173,7 +1619,32 @@ "basic.to_if_held_down_threshold_milliseconds": 500, "mouse_motion_to_scroll.speed": 100 }, - "rules": [] + "rules": [ + { + "manipulators": [ + { + "description": "Change caps_lock to command+control+option+shift.", + "from": { + "key_code": "caps_lock", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_shift", + "modifiers": [ + "left_option" + ] + } + ], + "type": "basic" + } + ] + } + ] }, "devices": [], "fn_function_keys": [ @@ -280,14 +1751,6 @@ }, "selected": false, "simple_modifications": [ - { - "from": { - "key_code": "caps_lock" - }, - "to": { - "key_code": "equal_sign" - } - }, { "from": { "key_code": "right_command" diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 270533e..7f29f64 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -19,6 +19,9 @@ set -g renumber-windows on # https://github.com/tmux/tmux/issues/353#issuecomment-265154018 set -g focus-events off +set-option -g default-terminal "screen-256color" +set-option -ga terminal-overrides ',*-256color*:Tc' + # => Theme set -g status-style fg=white,bg=black set -g window-status-current-style fg=black,bg=white,bold