├── .gitignore ├── README.md ├── chromatica └── syntax │ └── chromatica.vim ├── firefox └── firefox.css ├── kitty ├── kitty.conf └── kitty_rpaths.sh ├── mpv └── mpv.conf ├── nvim ├── after │ └── syntax │ │ └── c.vim ├── autoload │ └── airline │ │ └── themes │ │ └── koe.vim ├── colors │ └── koe.vim ├── init.vim └── syntax │ ├── asm.vim │ ├── c.vim │ ├── cocoa_keywords.vim │ ├── cpp.vim │ ├── html.vim │ └── objc.vim ├── qutebrowser └── config.py ├── scripts ├── binclock.py ├── dark_menu.applescript ├── day-mode ├── disable-mouseaccel ├── flash.sh ├── key-repeat.sh ├── light_menu.applescript ├── night-mode ├── qtb.sh ├── stfu └── wallchange.applescript ├── skhd └── skhdrc ├── tmux └── tmux.conf ├── vifm └── vifmrc ├── yabai └── yabairc └── zshrc /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #### dotfiles 2 | 3 | ![img](https://user-images.githubusercontent.com/6175959/76802655-70208e00-67d8-11ea-9451-9954326229c2.png) 4 | -------------------------------------------------------------------------------- /chromatica/syntax/chromatica.vim: -------------------------------------------------------------------------------- 1 | hi default Typedef ctermfg=Yellow gui=bold guifg=#BBBB00 2 | hi default AutoType ctermfg=Yellow guifg=#cb4b16 3 | 4 | hi default link chromaticaRef Type 5 | 6 | hi default link chromaticaDeclRefExprCall Type 7 | hi default link chromaticaStructDecl Type 8 | hi default link chromaticaUnionDecl Type 9 | hi default link chromaticaClassDecl Type 10 | hi default link chromaticaEnumDecl Type 11 | hi default link chromaticaFunctionDecl Function 12 | hi default link chromaticaTypedefDecl Type 13 | hi default link chromaticaCXXMethod Function 14 | hi default link chromaticaConstructor Function 15 | hi default link chromaticaDestructor Function 16 | hi default link chromaticaConversionFunction Function 17 | hi default link chromaticaTemplateTypeParameter Type 18 | hi default link chromaticaTemplateTemplateParameter Type 19 | hi default link chromaticaFunctionTemplate Function 20 | hi default link chromaticaClassTemplate Type 21 | hi default link chromaticaClassTemplatePartialSpecialization Type 22 | hi default link chromaticaUsingDirective Type 23 | hi default link chromaticaUsingDeclaration Type 24 | hi default link chromaticaTypeAliasDecl Type 25 | hi default link chromaticaTypeRef Type 26 | hi default link chromaticaCXXBaseSpecifier Type 27 | hi default link chromaticaTemplateRef Type 28 | hi default link chromaticaOverloadedDeclRef Function 29 | hi default link chromaticaCallExpr Function 30 | hi default link chromaticaType Type 31 | hi default link chromaitcaConstAttr Typedef 32 | hi default link chromaticaTypedef Typedef 33 | hi default link chromaticaSpecifier Type 34 | hi default link chromaticaAutoType Type 35 | hi default link chromaticaRegister Type 36 | hi default link chromaticaThreadLocal Type 37 | hi default link chromaticaRegister Type 38 | hi default link chromaticaRegister Type 39 | 40 | let b:chromatica_syntax_loaded = 1 41 | -------------------------------------------------------------------------------- /firefox/firefox.css: -------------------------------------------------------------------------------- 1 | @namespace html url(http://www.w3.org/1999/xhtml); 2 | @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); 3 | /* 4 | Author: Twily 5 | Description: Minimal flat styled tabs for Australis 6 | Compitability: Firefox Nightly v31.0a1 - v32.0a1 (Australis) 7 | CSS Variables were introduced to Firefox in v29.0a1 8 | Website: http://twily.info/ 9 | */ 10 | 11 | /* 12 | Modified by: Koekeishiya 13 | Compatibility: Firefox 50.1.0 14 | */ 15 | 16 | :root { 17 | /* TAB VARIABLES */ 18 | --bg-nav: #202020; 19 | --bg-light: #202020; --bg-dark: #202020; --bg-selected: #202020; 20 | --fg-light: #c0b18b; --fg-dark: #7f7f7f; --fg-selected: #c0b18b /*--fg-selected: #FF456F*/; 21 | --tab-triangle-correction: 0px; --tab-triangle-height: 16px; 22 | --tab-selected-border: #458588; 23 | --tab-height: 20px; --tab-icon-size: 10px; --tab-strip-margin: -11px; --tab-overlap: -5px; 24 | --tab-fonts: "Input Mono", "Courier New", "Lemon", "monospace"," Dejavu Sans"; --tab-font-size: 6.75pt; 25 | --tab-triangle: block; /* block | none */ 26 | 27 | /* URL VARIABLES */ 28 | --url-background: var(--bg-nav); --url-color: var(--fg-light); 29 | --url-focus: #202020; 30 | --url-height: 18px; --url-right-margin: 15px; 31 | --url-fonts: "Input Mono","Courier New", "Lemon",monospace,"Dejavu Sans"; --url-font-size: 5.75pt; 32 | --url-text-align: center; /* left | center | right */ 33 | --url-position: absolute; /* absolute == top (under tabs) || fixed == bottom of browser */ 34 | 35 | margin-bottom: 0 /* var(--url-height) */ !important; 36 | } 37 | 38 | #sidebar-search-container { display: none !important; } 39 | #sidebar-header, #bookmarksPanel, #bookmarks-view 40 | { 41 | color: var(--fg-light) !important; 42 | background-color: var(--bg-dark) !important; 43 | border-color: var(--bg-dark) !important; 44 | -moz-appearance:none!important; 45 | } 46 | 47 | @-moz-document url(chrome://browser/content/browser.xul) { 48 | /* URL-BAR */ 49 | #PanelUI-button, #bookmarks-menu-button, #downloads-button, #home-button, #stylish-toolbar-button, #abp-toolbarbutton, 50 | #back-button, #forward-button, #identity-box, #urlbar-reload-button, #urlbar-stop-button, #urlbar-go-button, 51 | #notification-popup-box, #new-tab-button, #private-browsing-indicator, #search-container, #nav-bar-overflow-button, 52 | .tabs-newtab-button, .tab-close-button, .tab-close, .tab-throbber, .tab-background-start, .tab-background-end 53 | /*, #alltabs-button, #tabview-button, .tab-icon-image*/, .tab-icon-image:not([pinned]) { display: none !important; } 54 | 55 | .tab-drop-indicator { margin-bottom: 0 !important; } 56 | 57 | .autocomplete-richlistbox { 58 | background: var(--url-focus) !important;/**/ 59 | color: var(--bg-selected) !important;/**/ 60 | } 61 | 62 | .autocomplete-richlistbox > scrollbox { 63 | overflow: hidden !important; 64 | background: var(--url-focus) !important;/**/ 65 | color: var(--bg-selected) !important;/**/ 66 | } 67 | 68 | .autocomplete-richlistbox > richlistitem { 69 | overflow: hidden !important; 70 | color : var(--fg-dark) !important; 71 | background: var(--bg-selected) !important;/**/ 72 | } 73 | 74 | #nav-bar { 75 | position: var(--url-position) !important; bottom: 0 !important; 76 | width: 100% !important; height: var(--url-height) !important; 77 | min-height: var(--url-height) !important; max-height: var(--url-height) !important; 78 | margin: 0 0 0 0 !important; 79 | overflow: hidden !important; 80 | /* --- Uncomment the section below to attach the url-bar to the tab-bar [EXPERIMENTAL] (Require a line in "#TabsToolbar" below) --- */ 81 | 82 | position: fixed !important; top: 0px !important; left: 6px !important; 83 | width: 384px !important; max-width: 384px !important; 84 | z-index: 100 !important; 85 | /**/ 86 | } 87 | #nav-bar-customization-target { width: 100% !important; } 88 | #urlbar-wrapper { 89 | width: 100% !important; margin-top: 0px !important; /* adjust margin-top to ~ -5px if you experience gap */ 90 | position: absolute !important; top: 0px !important; left: 0 !important; 91 | border-bottom: 0px solid var(--bg-light) !important; 92 | } 93 | #urlbar { 94 | border: none !important; border-radius: 0 !important; 95 | margin: 0 0 0 0 !important; padding: 0 2px 0 9px !important; 96 | width: calc(100% + var(--url-right-margin)) !important; 97 | height: var(--url-height) !important; min-height: var(--url-height) !important; 98 | background: var(--url-background) !important; color: var(--url-color) !important; 99 | font-family: var(--url-fonts) !important; font-size: var(--url-font-size) !important; 100 | text-align: var(--url-text-align) !important; 101 | } 102 | #urlbar[focused="true"] { 103 | background: var(--url-focus) !important; 104 | overflow: hidden !important; 105 | } 106 | 107 | /* TABS */ 108 | .tabbrowser-tab[fadein]:not([pinned]) { min-width: 50px !important; max-width: /*180px*/ 100% !important; } 109 | tab { 110 | font-family: var(--tab-fonts) !important; 111 | height: var(--tab-height) !important; min-height: var(--tab-height) !important; 112 | background: var(--bg-dark) !important; color: var(--fg-dark) !important; 113 | font-size: var(--tab-font-size) !important; text-shadow: none !important; text-align: center /* center | left */ !important; 114 | } 115 | 116 | .tabbrowser-tab label { padding: 0 14px 0 14px !important; } 117 | 118 | #tabbrowser-tabs .tabbrowser-tab[pinned] { width: 38px !important; } 119 | #tabbrowser-tabs .tabbrowser-tab[pinned] label { display: none !important; } 120 | 121 | #tabbrowser-tabs .tabbrowser-tab .tab-icon-image { 122 | margin: 0 -10px 0 14px !important; 123 | width: var(--tab-icon-size) !important; 124 | height: var(--tab-icon-size) !important; 125 | } 126 | 127 | .tabbrowser-tab *, .tabs-newtab-button * { 128 | background: none !important; list-style-image: none !important; 129 | margin: 0 0 0 0 !important; padding: 0 0 0 0 !important; 130 | -moz-appearance: none !important; 131 | } 132 | 133 | #tabbrowser-tabs .tabbrowser-tab[pinned] .tab-stack { height: var(--tab-height) !important; width: 100% !important; } 134 | #tabbrowser-tabs .tabbrowser-arrowscrollbox .box-inherit.scrollbox-innerbox { max-height: var(--tab-height) !important; } 135 | .scrollbutton-up, .scrollbutton-down { border: none !important; } 136 | 137 | #tabbrowser-tabs[overflow]:not([positionpinnedtabs]) { -moz-padding-start: 20px !important; } 138 | 139 | .tabbrowser-tab[selected="true"] .tab-stack { 140 | background: var(--bg-selected) !important; color: var(--fg-selected) !important; 141 | border-radius: 0px !important; position: relative !important; 142 | margin-top: 0px !important; 143 | margin-bottom: 2px !important; 144 | /* border-bottom: 2px solid var(--tab-selected-border) !important; */ 145 | } 146 | 147 | .tabbrowser-tab[selected="true"]:before { /* Left Triangle (of selected tab) */ 148 | /* 149 | content: '' !important; display: var(--tab-triangle); 150 | position: absolute !important; top: 2px !important; left: var(--tab-overlap) !important; 151 | width: 0 !important; height: 0 !important; 152 | border: none !important; z-index: 2 !important; 153 | 154 | border-left: calc(var(--tab-triangle-height)/2) solid var(--bg-dark) !important; 155 | border-top: calc((var(--tab-triangle-height)/2) - var(--tab-triangle-correction)) solid var(--bg-selected) !important; 156 | border-bottom: calc((var(--tab-triangle-height)/2) + var(--tab-triangle-correction)) solid var(--bg-selected) !important; 157 | */ 158 | } 159 | .tabbrowser-tab[selected="true"]:after { /* Right Triangle (of selected tab) */ 160 | /* 161 | content: '' !important; display: var(--tab-triangle); 162 | position: absolute !important; top: 2px !important; right: var(--tab-overlap) !important; 163 | width: 0 !important; height: 0 !important; 164 | border: none !important; z-index: 2 !important; 165 | border-right: calc(var(--tab-triangle-height)/2) solid var(--bg-dark) !important; 166 | border-top: calc((var(--tab-triangle-height)/2) - var(--tab-triangle-correction)) solid var(--bg-selected) !important; 167 | border-bottom: calc((var(--tab-triangle-height)/2) + var(--tab-triangle-correction)) solid var(--bg-selected) !important; 168 | */ 169 | } 170 | 171 | #TabsToolbar, #tabbrowser-tabs { 172 | -moz-appearance: none !important; 173 | height: var(--tab-height) !important; min-height: var(--tab-height)!important; 174 | margin: 0 var(--tab-strip-margin) !important; 175 | background: var(--bg-dark) !important; 176 | 177 | margin-bottom: 2px !important; 178 | /* --- Uncomment the line below to attach the url-bar to the tab-bar [EXPERIMENTAL] (Require a line in "#nav-bar" above) --- */ 179 | margin-left: 186px !important;/**/ 180 | } 181 | #TabsToolbar::after { display: none !important; } 182 | .tabbrowser-tab::before, .tabbrowser-tab::after { background: none !important; opacity: 1 !important; display: none !important; } 183 | 184 | /*browser, #navigator-toolbox { -moz-appearance: none !important; background: transparent !important; }*/ 185 | 186 | #navigator-toolbox::after { height: 0px !important; background: var(--bg-light) !important; } 187 | #liberator-separator { height: 0px !important; background: var(--bg-light) !important; } 188 | 189 | /* MENUS */ 190 | menuitem + menuseparator, menu + menuseparator/*, .menu-iconic-left*/ { display: none !important; } 191 | /*menuitem > label { margin-left: var(--tab-height) !important; }*/ 192 | menubar, menubutton, menulist, menu, menuitem { 193 | font-family: var(--tab-fonts) !important; font-size: var(--tab-font-size) !important; 194 | height: var(--tab-height) !important; 195 | } 196 | 197 | /* HIDE ORANGE MENU BUTTON */ 198 | #appmenu-toolbar-button, #appmenu-button-container { display: none !important; } 199 | 200 | /* HIDE STATUS BAR */ 201 | /*#status-bar, #statusbar-display, statuspanel { display: none !important; }*/ 202 | 203 | .statuspanel-label { 204 | background: var(--bg-dark) !important; 205 | color: var(--fg-dark) !important; 206 | border: none !important; 207 | } 208 | 209 | #titlebar { 210 | display: none !important; 211 | } 212 | 213 | /* PRIVATE BROWSING ICON HIDE */ 214 | #main-window[privatebrowsingmode=temporary] #private-browsing-indicator, 215 | #main-window[privatebrowsingmode=temporary] #private-browsing-indicator-titlebar { display: none !important; } 216 | 217 | /* Vimperator icon style */ 218 | #liberator-statusline:not([customizing="true"]) { margin: -2px -2px !important; padding: 0 0 !important; height: 24px !important; } 219 | #liberator-statusline:not([customizing="true"]) :-moz-any(toolbarbutton) { height: 100% !important; } 220 | #tabview-button { 221 | list-style-image: url(http://twily.info/img/tabview-button.png?v=2) /* 16x16 px image */ !important; 222 | -moz-image-region: rect(0, 0, 0, 0) !important; 223 | } 224 | 225 | #liberator-completions { background: var(--bg-dark) !important; } 226 | 227 | /* Tabgroup margin top fix */ 228 | #tab-view-deck #tab-view { margin-top: 11px !important; } 229 | #tab-view-deck { background: var(--bg-dark) !important; } 230 | } 231 | 232 | /* AGENT_SHEET */ 233 | @-moz-document url-prefix(http://), url-prefix(https://), url-prefix(chrome://liberator/) { 234 | /* SCROLLBAR */ 235 | scrollbar[orient="vertical"], scrollbar thumb[orient="vertical"], 236 | scrollbar[orient="horizontal"], scrollbar thumb[orient="horizontal"] { 237 | display: none !important; /* none = hide || block = show */ 238 | } 239 | } 240 | 241 | /* background color around/behind pictures opened in firefox (require html namespace on top) */ 242 | @-moz-document regexp("(https?://|file:///)(.*)\\.(jpeg|jpg|gif|png|apng|svg|bmp|webm|webp)") { 243 | body { background: var(--bg-light) !important; } 244 | img.decoded { background-color: transparent !important; } 245 | } 246 | 247 | 248 | /* About:Blank background */ 249 | @-moz-document url(about:blank) { 250 | html,body { background: var(--bg-dark) !important; } 251 | } 252 | 253 | /* about:stylish-edit toolbar style */ 254 | @-moz-document regexp("about:stylish-edit.*") { 255 | #main-area, textbox { background: var(--bg-light) !important; } 256 | textbox, grid, columns, rows, separator { border: 0 !important; } 257 | 258 | .devtools-toolbarbutton { background: var(--bg-dark) !important; color: var(--fg-light) !important; } 259 | } 260 | 261 | /*----- Fix for white flash on new tab -----*/ 262 | tabbrowser tabpanels, #appcontent > #content { background: var(--bg-light) !important; } 263 | 264 | 265 | /* Set dark text in light textareas 266 | @-moz-document regexp("https?://(?!(localhost|twily.info|.*.4chan.org|.*.youtube.com)).*") { 267 | input, textarea { color: #222628 !important; -moz-appearance: none !important; } 268 | }*/ 269 | -------------------------------------------------------------------------------- /kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | # vim:fileencoding=utf-8:ft=conf 2 | 3 | # Font family. You can also specify different fonts for the 4 | # bold/italic/bold-italic variants. By default they are derived automatically, 5 | # by the OSes font system. Setting them manually is useful for font families 6 | # that have many weight variants like Book, Medium, Thick, etc. For example: 7 | # font_family Operator Mono Book 8 | # bold_font Operator Mono Thick 9 | # bold_italic_font Operator Mono Medium 10 | # font_family Input Mono 11 | font_family Fantasque Sans Mono 12 | italic_font auto 13 | bold_font auto 14 | bold_italic_font auto 15 | 16 | # Font size (in pts) 17 | font_size 12.0 18 | 19 | # The foreground color 20 | foreground #c0b18b 21 | 22 | # The background color 23 | background #262626 24 | 25 | # The foreground for selections 26 | selection_foreground #2f2f2f 27 | 28 | # The background for selections 29 | selection_background #d75f5f 30 | 31 | # The cursor color 32 | cursor #8fee96 33 | 34 | # The cursor shape can be one of (block, beam, underline) 35 | shell_integration no-cursor 36 | cursor_shape block 37 | 38 | # The interval (in seconds) at which to blink the cursor. Set to zero to 39 | # disable blinking. 40 | cursor_blink_interval 0.5 41 | 42 | # Stop blinking cursor after the specified number of seconds of keyboard inactivity. Set to 43 | # zero or a negative number to never stop blinking. 44 | cursor_stop_blinking_after 15.0 45 | 46 | # Number of lines of history to keep in memory for scrolling back 47 | scrollback_lines 2000 48 | 49 | # Program with which to view scrollback in a new window. The scrollback buffer is passed as 50 | # STDIN to this program. If you change it, make sure the program you use can 51 | # handle ANSI escape sequences for colors and text formatting. 52 | scrollback_pager less +G -R 53 | 54 | # Wheel scroll multiplier (modify the amount scrolled by the mouse wheel) 55 | wheel_scroll_multiplier 5.0 56 | 57 | # The interval between successive clicks to detect double/triple clicks (in seconds) 58 | click_interval 0.5 59 | 60 | # Characters considered part of a word when double clicking. In addition to these characters 61 | # any character that is marked as an alpha-numeric character in the unicode 62 | # database will be matched. 63 | select_by_word_characters :@-./_~?&=%+# 64 | 65 | # Hide mouse cursor after the specified number of seconds of the mouse not being used. Set to 66 | # zero or a negative number to disable mouse cursor hiding. 67 | mouse_hide_wait 0.0 68 | 69 | # The enabled window layouts. A comma separated list of layout names. The special value * means 70 | # all layouts. The first listed layout will be used as the startup layout. 71 | # For a list of available layouts, see the file layouts.py 72 | enabled_layouts * 73 | 74 | # If enabled, the window size will be remembered so that new instances of kitty will have the same 75 | # size as the previous instance. If disabled, the window will initially have size configured 76 | # by initial_window_width/height, in pixels. 77 | remember_window_size no 78 | initial_window_width 640 79 | initial_window_height 400 80 | 81 | # Delay (in milliseconds) between screen updates. Decreasing it, increases fps 82 | # at the cost of more CPU usage. The default value yields ~100fps which is more 83 | # that sufficient for most uses. 84 | # repaint_delay 10 85 | repaint_delay 10 86 | 87 | # Delay (in milliseconds) before input from the program running in the terminal 88 | # is processed. Note that decreasing it will increase responsiveness, but also 89 | # increase CPU usage and might cause flicker in full screen programs that 90 | # redraw the entire screen on each loop, because kitty is so fast that partial 91 | # screen updates will be drawn. 92 | input_delay 3 93 | 94 | # Visual bell duration. Flash the screen when a bell occurs for the specified number of 95 | # seconds. Set to zero to disable. 96 | visual_bell_duration 0.0 97 | 98 | # Enable/disable the audio bell. Useful in environments that require silence. 99 | enable_audio_bell yes 100 | 101 | # The modifier keys to press when clicking with the mouse on URLs to open the URL 102 | open_url_modifiers ctrl+shift 103 | 104 | # The program with which to open URLs that are clicked on. The special value "default" means to 105 | # use the operating system's default URL handler. 106 | open_url_with default 107 | 108 | # The value of the TERM environment variable to set 109 | term xterm-kitty 110 | 111 | # The width (in pts) of window borders. Will be rounded to the nearest number of pixels based on screen resolution. 112 | window_border_width 0 113 | 114 | window_margin_width 15 115 | 116 | # The color for the border of the active window 117 | active_border_color #ffffff 118 | 119 | # The color for the border of inactive windows 120 | inactive_border_color #cccccc 121 | 122 | # Tab-bar colors 123 | active_tab_foreground #000 124 | active_tab_background #eee 125 | inactive_tab_foreground #444 126 | inactive_tab_background #999 127 | 128 | 129 | # The 16 terminal colors. There are 8 basic colors, each color has a dull and 130 | # bright version. 131 | 132 | # black 133 | color0 #2f2f2f 134 | color8 #656565 135 | 136 | # red 137 | color1 #d75f5f 138 | color9 #d75f5f 139 | 140 | # green 141 | color2 #d4d232 142 | color10 #8fee96 143 | 144 | # yellow 145 | color3 #af865a 146 | color11 #cd950c 147 | 148 | # blue 149 | color4 #22c3a1 150 | color12 #22c3a1 151 | 152 | # magenta 153 | color5 #775759 154 | color13 #775759 155 | 156 | # cyan 157 | color6 #84edb9 158 | color14 #84edb9 159 | 160 | # white 161 | color7 #c0b18b 162 | color15 #d8d8d8 163 | 164 | # Key mapping 165 | # For a list of key names, see: http://www.glfw.org/docs/latest/group__keys.html 166 | # For a list of modifier names, see: http://www.glfw.org/docs/latest/group__mods.html 167 | # You can use the special action no_op to unmap a keyboard shortcut that is 168 | # assigned in the default configuration. 169 | 170 | # Clipboard 171 | map super+v paste_from_clipboard 172 | map ctrl+shift+s paste_from_selection 173 | map super+c copy_to_clipboard 174 | map shift+insert paste_from_selection 175 | 176 | # Scrolling 177 | map ctrl+shift+up scroll_line_up 178 | map ctrl+shift+down scroll_line_down 179 | map ctrl+shift+k scroll_line_up 180 | map ctrl+shift+j scroll_line_down 181 | map ctrl+shift+page_up scroll_page_up 182 | map ctrl+shift+page_down scroll_page_down 183 | map ctrl+shift+home scroll_home 184 | map ctrl+shift+end scroll_end 185 | map ctrl+shift+h show_scrollback 186 | 187 | # Window management 188 | map super+n new_os_window 189 | map super+w close_window 190 | map ctrl+shift+enter new_window 191 | map ctrl+shift+] next_window 192 | map ctrl+shift+[ previous_window 193 | map ctrl+shift+f move_window_forward 194 | map ctrl+shift+b move_window_backward 195 | map ctrl+shift+` move_window_to_top 196 | map ctrl+shift+1 first_window 197 | map ctrl+shift+2 second_window 198 | map ctrl+shift+3 third_window 199 | map ctrl+shift+4 fourth_window 200 | map ctrl+shift+5 fifth_window 201 | map ctrl+shift+6 sixth_window 202 | map ctrl+shift+7 seventh_window 203 | map ctrl+shift+8 eighth_window 204 | map ctrl+shift+9 ninth_window 205 | map ctrl+shift+0 tenth_window 206 | 207 | # Tab management 208 | map ctrl+shift+right next_tab 209 | map ctrl+shift+left previous_tab 210 | map ctrl+shift+t new_tab 211 | map ctrl+shift+q close_tab 212 | map ctrl+shift+l next_layout 213 | map ctrl+shift+. move_tab_forward 214 | map ctrl+shift+, move_tab_backward 215 | 216 | # Miscellaneous 217 | map ctrl+shift+up increase_font_size 218 | map ctrl+shift+down decrease_font_size 219 | map ctrl+shift+backspace restore_font_size 220 | 221 | # Symbol mapping (special font for specified unicode code points). Map the 222 | # specified unicode codepoints to a particular font. Useful if you need special 223 | # rendering for some symbols, such as for Powerline. Avoids the need for 224 | # patched fonts. Each unicode code point is specified in the form U+. You can specify multiple code points, separated by commas 226 | # and ranges separated by hyphens. symbol_map itself can be specified multiple times. 227 | # Syntax is: 228 | # 229 | # symbol_map codepoints Font Family Name 230 | # 231 | # For example: 232 | # 233 | #symbol_map U+E0A0-U+E0A2,U+E0B0-U+E0B3 PowerlineSymbols 234 | hide_window_decorations titlebar-only 235 | macos_option_as_alt no 236 | 237 | # Change the color of the kitty window's titlebar on macOS. A value of "system" 238 | # means to use the default system color, a value of "background" means to use 239 | # the default background color and finally you can use an arbitrary color, such 240 | # as #12af59 or "red". 241 | macos_titlebar_color background 242 | 243 | allow_remote_control yes 244 | -------------------------------------------------------------------------------- /kitty/kitty_rpaths.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # fix kitty rpaths 3 | 4 | install_name_tool -id "@executable_path/../Frameworks/kitty/kitty/fast_data_types.so" kitty.app/Contents/Frameworks/kitty/kitty/fast_data_types.so 5 | install_name_tool kitty.app/Contents/Frameworks/kitty/kitty/fast_data_types.so -change /usr/local/opt/glfw/lib/libglfw.3.dylib @executable_path/../Frameworks/libglfw.3.dylib 6 | install_name_tool kitty.app/Contents/Frameworks/kitty/kitty/fast_data_types.so -change /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/Python @executable_path/../Frameworks/Python.framework/Versions/3.6/Python 7 | install_name_tool kitty.app/Contents/MacOS/kitty -change /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/Python @executable_path/../Frameworks/Python.framework/Versions/3.6/Python 8 | -------------------------------------------------------------------------------- /mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | no-border 2 | cache=auto 3 | ytdl-format=best 4 | keepaspect-window=no 5 | background=0.15/0.15/0.15 6 | -------------------------------------------------------------------------------- /nvim/after/syntax/c.vim: -------------------------------------------------------------------------------- 1 | syn match cCustomParen "?=(" contains=cParen,cCppParen 2 | syn match cCustomFunc "\w\+\s*(\@=" contains=cCustomParen 3 | syn match cCustomScope "::" 4 | syn match cCustomClass "\w\+\s*::" contains=cCustomScope 5 | " syn keyword cTodo NOTE 6 | syn keyword myNote NOTE containedin=cComment,cCommentL 7 | syn keyword myStatic internal local global 8 | -------------------------------------------------------------------------------- /nvim/autoload/airline/themes/koe.vim: -------------------------------------------------------------------------------- 1 | let g:airline#themes#koe#palette = {} 2 | 3 | function! airline#themes#koe#refresh() 4 | 5 | let M0 = airline#themes#get_highlight('Identifier') 6 | let accents_group = airline#themes#get_highlight('Special') 7 | let modified_group = [M0[0], '', M0[2], '', ''] 8 | let warning_group = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg']) 9 | let error_group = airline#themes#get_highlight2(['Normal', 'bg'], ['WarningMsg', 'fg']) 10 | 11 | let s:N1 = airline#themes#get_highlight2(['Normal', 'fg'], ['StatusLineNC', 'bg']) 12 | let s:N2 = [ '#000', '#000', 0, 10] 13 | let s:N3 = [ '#000', '#000', 7, 235] 14 | let g:airline#themes#koe#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) 15 | let g:airline#themes#koe#palette.normal_modified = { 'airline_c': modified_group } 16 | let g:airline#themes#koe#palette.normal.airline_warning = warning_group 17 | let g:airline#themes#koe#palette.normal_modified.airline_warning = warning_group 18 | let g:airline#themes#koe#palette.normal.airline_error = error_group 19 | let g:airline#themes#koe#palette.normal_modified.airline_error = error_group 20 | 21 | let s:I1 = s:N1 22 | let s:I2 = [ '#000', '#000', 0, 2] 23 | let s:I3 = s:N3 24 | let g:airline#themes#koe#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) 25 | let g:airline#themes#koe#palette.insert_modified = g:airline#themes#koe#palette.normal_modified 26 | let g:airline#themes#koe#palette.insert.airline_warning = g:airline#themes#koe#palette.normal.airline_warning 27 | let g:airline#themes#koe#palette.insert_modified.airline_warning = g:airline#themes#koe#palette.normal_modified.airline_warning 28 | let g:airline#themes#koe#palette.insert.airline_error = g:airline#themes#koe#palette.normal.airline_error 29 | let g:airline#themes#koe#palette.insert_modified.airline_error = g:airline#themes#koe#palette.normal_modified.airline_error 30 | 31 | let s:R1 = s:N1 32 | let s:R2 = [ '#000', '#000', 0, 3] 33 | let s:R3 = s:N3 34 | let g:airline#themes#koe#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) 35 | let g:airline#themes#koe#palette.replace_modified = g:airline#themes#koe#palette.normal_modified 36 | let g:airline#themes#koe#palette.replace.airline_warning = g:airline#themes#koe#palette.normal.airline_warning 37 | let g:airline#themes#koe#palette.replace_modified.airline_warning = g:airline#themes#koe#palette.normal_modified.airline_warning 38 | let g:airline#themes#koe#palette.replace.airline_error = g:airline#themes#koe#palette.normal.airline_error 39 | let g:airline#themes#koe#palette.replace_modified.airline_error = g:airline#themes#koe#palette.normal_modified.airline_error 40 | 41 | let s:V1 = s:N1 42 | let s:V2 = [ '#000', '#000', 0, 1] 43 | let s:V3 = s:N3 44 | let g:airline#themes#koe#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) 45 | let g:airline#themes#koe#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] } 46 | let g:airline#themes#koe#palette.visual.airline_warning = g:airline#themes#koe#palette.normal.airline_warning 47 | let g:airline#themes#koe#palette.visual_modified.airline_warning = g:airline#themes#koe#palette.normal_modified.airline_warning 48 | let g:airline#themes#koe#palette.visual.airline_error = g:airline#themes#koe#palette.normal.airline_error 49 | let g:airline#themes#koe#palette.visual_modified.airline_error = g:airline#themes#koe#palette.normal_modified.airline_error 50 | 51 | let s:IA = airline#themes#get_highlight2(['Normal', 'fg'], ['StatusLineNC', 'bg']) 52 | let g:airline#themes#koe#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) 53 | let g:airline#themes#koe#palette.inactive_modified = { 'airline_c': modified_group } 54 | 55 | let g:airline#themes#koe#palette.accents = { 'red': accents_group } 56 | 57 | let s:TF = airline#themes#get_highlight2(['Normal', 'bg'], ['Normal', 'bg']) 58 | let g:airline#themes#koe#palette.tabline = { 59 | \ 'airline_tab': s:N2, 60 | \ 'airline_tabsel': s:N1, 61 | \ 'airline_tabtype': s:V1, 62 | \ 'airline_tabfill': s:TF, 63 | \ 'airline_tabhid': s:IA, 64 | \ 'airline_tabmod': s:I1 65 | \ } 66 | 67 | endfunction 68 | 69 | call airline#themes#koe#refresh() 70 | 71 | " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: 72 | -------------------------------------------------------------------------------- /nvim/colors/koe.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Maintainer: koekeishiya 3 | " Last Change: 2020 March 16 4 | 5 | set bg& 6 | hi clear 7 | 8 | if exists("syntax_on") 9 | syntax reset 10 | endif 11 | 12 | let colors_name = "koe" 13 | 14 | " SYNTAX HIGHLIGHT GROUPS 15 | " 16 | " *Comment any comment 17 | " 18 | " *Constant any constant 19 | " String a string constant: "this is a string" 20 | " Character a character constant: 'c', '\n' 21 | " Number a number constant: 234, 0xff 22 | " Boolean a boolean constant: TRUE, false 23 | " Float a floating point constant: 2.3e10 24 | " 25 | " *Identifier any variable name 26 | " Function function name (also: methods for classes) 27 | " 28 | " *Statement any statement 29 | " Conditional if, then, else, endif, switch, etc. 30 | " Repeat for, do, while, etc. 31 | " Label case, default, etc. 32 | " Operator 'sizeof', '+', '*', etc. 33 | " Keyword any other keyword 34 | " Exception try, catch, throw 35 | " 36 | " *PreProc generic Preprocessor 37 | " Include preprocessor #include 38 | " Define preprocessor #define 39 | " Macro same as Define 40 | " PreCondit preprocessor #if, #else, #endif, etc. 41 | " 42 | " *Type int, long, char, etc. 43 | " StorageClass static, register, volatile, etc. 44 | " Structure struct, union, enum, etc. 45 | " Typedef A typedef 46 | " 47 | " *Special any special symbol 48 | " SpecialChar special character in a constant 49 | " Tag you can use CTRL-] on this 50 | " Delimiter character that needs attention 51 | " SpecialComment special things inside a comment 52 | " Debug debugging statements 53 | " 54 | " *Underlined text that stands out, HTML links 55 | " 56 | " *Ignore left blank, hidden |hl-Ignore| 57 | " 58 | " *Error any erroneous construct 59 | " 60 | " *Todo anything that needs extra attention; 61 | " mostly the keywords TODO FIXME and XXX 62 | 63 | hi Normal ctermfg=7 guifg=#c0b18b 64 | 65 | hi Pmenu ctermfg=7 ctermbg=0 guifg=#c0b18b guibg=#2f2f2f 66 | 67 | hi Comment ctermfg=2 guifg=#d4d232 68 | 69 | hi Identifier ctermfg=7 guifg=#c0b18b 70 | hi cCustomFunc ctermfg=8 guifg=#555555 71 | hi link Function cCustomFunc 72 | 73 | hi Statement ctermfg=15 cterm=NONE guifg=#d8d8d8 gui=NONE 74 | hi Operator ctermfg=15 guifg=#d8d8d8 75 | 76 | hi Type ctermfg=10 guifg=#8fee96 77 | hi StorageClass ctermfg=15 guifg=#d8d8d8 78 | hi Structure ctermfg=15 guifg=#d8d8d8 79 | 80 | hi Constant ctermfg=6 guifg=#84edb9 81 | hi String ctermfg=4 guifg=#22c3a1 82 | hi Character ctermfg=4 guifg=#22c3a1 83 | hi Number ctermfg=6 guifg=#84edb9 84 | hi Boolean ctermfg=6 guifg=#84edb9 85 | hi Special ctermfg=4 guifg=#22c3a1 86 | 87 | hi SignColumn ctermbg=8 88 | hi lineNr ctermfg=8 89 | 90 | hi Todo ctermfg=2 ctermbg=NONE cterm=bold guifg=#d4d232 guibg=NONE gui=bold 91 | hi myNote ctermfg=2 ctermbg=NONE cterm=bold guifg=#d4d232 guibg=NONE gui=bold 92 | hi myStatic ctermfg=15 guifg=#d8d8d8 93 | 94 | hi Error ctermfg=8 ctermbg=1 guifg=#555555 guibg=#d75f5f 95 | 96 | hi TabLine ctermfg=8 ctermbg=0 guifg=#555555 guibg=#2f2f2f 97 | hi TabLineSel ctermfg=7 ctermbg=0 cterm=NONE guifg=#c0b18b guibg=#2f2f2f gui=NONE 98 | hi TabLineFill ctermfg=0 ctermbg=8 guifg=#2f2f2f guibg=#555555 99 | hi VertSplit ctermbg=0 ctermfg=0 guibg=#2f2f2f guifg=#2f2f2f 100 | 101 | hi Search cterm=bold ctermfg=0 ctermbg=1 gui=bold guifg=#2f2f2f guibg=#d75f5f 102 | hi Visual ctermfg=8 ctermbg=1 cterm=NONE guifg=#555555 guibg=#d75f5f gui=NONE 103 | 104 | hi PreProc ctermfg=10 guifg=#8fee96 105 | hi MatchParen cterm=bold ctermbg=NONE ctermfg=10 gui=bold guibg=NONE guifg=#8fee96 106 | 107 | hi StatusLine ctermfg=7 ctermbg=0 cterm=NONE guifg=#c0b18b guifg=#D4D232 gui=NONE 108 | hi StatusLineNC ctermfg=8 ctermbg=0 cterm=NONE guifg=#555555 guibg=#2f2f2f gui=NONE 109 | hi CursorLine ctermfg=7 ctermbg=0 cterm=NONE guifg=#c0b18b guibg=#2f2f2f gui=NONE 110 | -------------------------------------------------------------------------------- /nvim/init.vim: -------------------------------------------------------------------------------- 1 | set nocompatible " be iMproved, required 2 | filetype off " required 3 | " set the runtime path to include Vundle and initialize 4 | set rtp+=~/.vim/bundle/Vundle.vim 5 | call vundle#begin() 6 | " alternatively, pass a path where Vundle should install plugins 7 | "call vundle#begin('~/some/path/here') 8 | 9 | " let Vundle manage Vundle, required 10 | Plugin 'gmarik/Vundle.vim' 11 | Plugin 'Shougo/deoplete.nvim' 12 | Plugin 'vim-airline/vim-airline' 13 | Plugin 'bling/vim-bufferline' 14 | Plugin 'majutsushi/tagbar' 15 | "Plugin 'arakashic/chromatica.nvim' 16 | Plugin 'zchee/deoplete-clang' 17 | " All of your Plugins must be added before the following line 18 | call vundle#end() " required 19 | filetype plugin indent on " required 20 | " To ignore plugin indent changes, instead use: 21 | "filetype plugin on 22 | " 23 | " Brief help 24 | " :PluginList - lists configured plugins 25 | " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate 26 | " :PluginSearch foo - searches for foo; append `!` to refresh local cache 27 | " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal 28 | " 29 | " see :h vundle for more details or wiki for FAQ 30 | " Put your non-Plugin stuff after this line 31 | 32 | version 6.0 33 | if &cp | set nocp | endif 34 | let s:cpo_save=&cpo 35 | set cpo&vim 36 | inoremap jk 37 | nnoremap :cprev 38 | nnoremap :cnext 39 | nnoremap :cclose\|cd %:h/..\|make!\|cd %:h\|copen\|redraw!:normal G 40 | nnoremap :cclose\|cd %:h/..\|make!\|cd %:h\|redraw! 41 | nmap :TagbarToggle 42 | " nmap LLBreakSwitch 43 | " nnoremap :LLmode debug 44 | " nnoremap :LL step 45 | " nnoremap :LL next 46 | " nnoremap :LL continue 47 | " nnoremap :LL process interrupt 48 | 49 | if has('nvim') 50 | tnoremap 51 | endif 52 | 53 | let mapleader = ',' 54 | 55 | filetype plugin indent on 56 | let &cpo=s:cpo_save 57 | unlet s:cpo_save 58 | set tabstop=4 59 | set shiftwidth=4 60 | set expandtab 61 | set backspace=2 62 | set fileencodings=utf-8,ucs-bom,default,latin1 63 | set encoding=utf-8 64 | set termencoding=utf-8 65 | set modelines=0 66 | set window=0 67 | set number 68 | set hidden 69 | set nowrap 70 | set hlsearch " Highlight search results. 71 | set ignorecase " Make searching case insensitive 72 | set smartcase " ... unless the query has capital letters. 73 | set incsearch 74 | set switchbuf=usetab,newtab 75 | set nojoinspaces 76 | set cino=:0,=4 " fix indentation for switch statements 77 | "set cursorline 78 | "let loaded_matchparen=1 " Don't load matchit.vim (paren/bracket matching) 79 | "set noshowmatch " Don't match parentheses/brackets 80 | set laststatus=2 81 | set noshowcmd 82 | set noshowmode 83 | set nocursorline " Don't paint cursor line 84 | set nocursorcolumn " Don't paint cursor column 85 | set lazyredraw " Wait to redraw 86 | "set scrolljump=8 " Scroll 8 lines at a time at bottom/top 87 | let html_no_rendering=1 " Don't render italic, bold, links in HTML 88 | autocmd BufWritePre * :%s/\s\+$//e 89 | 90 | set guitablabel=%N/\ %t\ %M 91 | 92 | " vim: set ft=vim : 93 | 94 | " enables to search in all open buffers with :Search 95 | function! BuffersList() 96 | let all = range(0, bufnr('$')) 97 | let res = [] 98 | for b in all 99 | if buflisted(b) 100 | call add(res, bufname(b)) 101 | endif 102 | endfor 103 | return res 104 | endfunction 105 | 106 | function! GrepBuffers (expression) 107 | exec 'vimgrep/'.a:expression.'/ '.join(BuffersList()) 108 | endfunction 109 | 110 | command! -nargs=0 Cclear call setqflist([]) | cclose 111 | 112 | command! -nargs=+ Search call setqflist([]) | call GrepBuffers() | copen 113 | 114 | let g:deoplete#enable_at_startup = 1 115 | 116 | let g:airline_powerline_fonts=1 117 | let g:airline_theme='koe' 118 | 119 | let g:airline#extensions#tabline#tab_min_count = 2 120 | let g:airline#extensions#tabline#enabled = 1 121 | let g:airline#extensions#tabline#show_buffers = 0 122 | let g:airline#extensions#tabline#show_splits = 0 123 | let g:airline#extensions#tabline#show_tabs = 1 124 | let g:airline#extensions#tabline#show_tab_nr = 0 125 | let g:airline#extensions#tabline#show_tab_type = 0 126 | let g:airline#extensions#tabline#show_close_button = 0 127 | 128 | let g:airline#extensions#bufferline#enabled = 1 129 | let g:airline#extensions#tagbar#enabled = 1 130 | 131 | "let g:chromatica#libclang_path='/Library/Developer/CommandLineTools/usr/lib/libclang.dylib' 132 | "let g:chromatica#libclang_path='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib' 133 | "let g:chromatica#responsive_mode=1 134 | "let g:chromatica#enable_at_startup=1 135 | 136 | let g:deoplete#sources#clang#libclang_path='/Library/Developer/CommandLineTools/usr/lib/libclang.dylib' 137 | let g:deoplete#sources#clang#clang_header='/Library/Developer/CommandLineTools/usr/lib/clang' 138 | 139 | "let g:deoplete#sources#clang#libclang_path='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib' 140 | "let g:deoplete#sources#clang#clang_header='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang' 141 | 142 | let g:python3_host_prog='/usr/bin/python3' 143 | 144 | set completeopt -=preview 145 | 146 | syntax enable 147 | 148 | colorscheme koe 149 | -------------------------------------------------------------------------------- /nvim/syntax/asm.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: GNU Assembler 3 | " Maintainer: Erik Wognsen 4 | " Previous maintainer: 5 | " Kevin Dahlhausen 6 | " Last Change: 2014 Feb 04 7 | 8 | " Thanks to Ori Avtalion for feedback on the comment markers! 9 | 10 | " quit when a syntax file was already loaded 11 | if exists("b:current_syntax") 12 | finish 13 | endif 14 | 15 | let s:cpo_save = &cpo 16 | set cpo&vim 17 | 18 | syn case ignore 19 | 20 | " storage types 21 | syn match asmType "\.long" 22 | syn match asmType "\.ascii" 23 | syn match asmType "\.asciz" 24 | syn match asmType "\.byte" 25 | syn match asmType "\.double" 26 | syn match asmType "\.float" 27 | syn match asmType "\.hword" 28 | syn match asmType "\.int" 29 | syn match asmType "\.octa" 30 | syn match asmType "\.quad" 31 | syn match asmType "\.short" 32 | syn match asmType "\.single" 33 | syn match asmType "\.space" 34 | syn match asmType "\.string" 35 | syn match asmType "\.word" 36 | 37 | syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1 38 | syn match asmIdentifier "[a-z_][a-z0-9_]*" 39 | 40 | " Various #'s as defined by GAS ref manual sec 3.6.2.1 41 | " Technically, the first decNumber def is actually octal, 42 | " since the value of 0-7 octal is the same as 0-7 decimal, 43 | " I (Kevin) prefer to map it as decimal: 44 | syn match decNumber "0\+[1-7]\=[\t\n$,; ]" 45 | syn match decNumber "[1-9]\d*" 46 | syn match octNumber "0[0-7][0-7]\+" 47 | syn match hexNumber "0[xX][0-9a-fA-F]\+" 48 | syn match binNumber "0[bB][0-1]*" 49 | 50 | syn keyword asmTodo contained TODO 51 | 52 | 53 | " GAS supports one type of multi line comments: 54 | syn region asmComment start="/\*" end="\*/" contains=asmTodo 55 | 56 | " GAS (undocumentedly?) supports C++ style comments. Unlike in C/C++ however, 57 | " a backslash ending a C++ style comment does not extend the comment to the 58 | " next line (hence the syntax region does not define 'skip="\\$"') 59 | syn region asmComment start="//" end="$" keepend contains=asmTodo 60 | 61 | " Line comment characters depend on the target architecture and command line 62 | " options and some comments may double as logical line number directives or 63 | " preprocessor commands. This situation is described at 64 | " http://sourceware.org/binutils/docs-2.22/as/Comments.html 65 | " Some line comment characters have other meanings for other targets. For 66 | " example, .type directives may use the `@' character which is also an ARM 67 | " comment marker. 68 | " As a compromise to accommodate what I arbitrarily assume to be the most 69 | " frequently used features of the most popular architectures (and also the 70 | " non-GNU assembly languages that use this syntax file because their asm files 71 | " are also named *.asm), the following are used as line comment characters: 72 | syn match asmComment "[#;!|].*" contains=asmTodo 73 | 74 | " Side effects of this include: 75 | " - When `;' is used to separate statements on the same line (many targets 76 | " support this), all statements except the first get highlighted as 77 | " comments. As a remedy, remove `;' from the above. 78 | " - ARM comments are not highlighted correctly. For ARM, uncomment the 79 | " following two lines and comment the one above. 80 | "syn match asmComment "@.*" contains=asmTodo 81 | "syn match asmComment "^#.*" contains=asmTodo 82 | 83 | " Advanced users of specific architectures will probably want to change the 84 | " comment highlighting or use a specific, more comprehensive syntax file. 85 | 86 | syn match asmInclude "\.include" 87 | syn match asmCond "\.if" 88 | syn match asmCond "\.else" 89 | syn match asmCond "\.endif" 90 | syn match asmMacro "\.macro" 91 | syn match asmMacro "\.endm" 92 | 93 | " Assembler directives start with a '.' and may contain upper case (e.g., 94 | " .ABORT), numbers (e.g., .p2align), dash (e.g., .app-file) and underscore in 95 | " CFI directives (e.g., .cfi_startproc). This will also match labels starting 96 | " with '.', including the GCC auto-generated '.L' labels. 97 | syn match asmDirective "\.[A-Za-z][0-9A-Za-z-_]*" 98 | 99 | 100 | syn case match 101 | 102 | " Define the default highlighting. 103 | " Only when an item doesn't have highlighting yet 104 | 105 | " The default methods for highlighting. Can be overridden later 106 | hi def link asmSection Special 107 | hi def link asmLabel Label 108 | hi def link asmComment Comment 109 | hi def link asmTodo Todo 110 | hi def link asmDirective Statement 111 | 112 | hi def link asmInclude Include 113 | hi def link asmCond PreCondit 114 | hi def link asmMacro Macro 115 | 116 | hi def link hexNumber Number 117 | hi def link decNumber Number 118 | hi def link octNumber Number 119 | hi def link binNumber Number 120 | 121 | hi def link asmIdentifier Identifier 122 | hi def link asmType Type 123 | 124 | 125 | let b:current_syntax = "asm" 126 | 127 | let &cpo = s:cpo_save 128 | unlet s:cpo_save 129 | 130 | " vim: ts=8 131 | -------------------------------------------------------------------------------- /nvim/syntax/c.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: C 3 | " Maintainer: Bram Moolenaar 4 | " Last Change: 2016 Nov 17 5 | 6 | " Quit when a (custom) syntax file was already loaded 7 | if exists("b:current_syntax") 8 | finish 9 | endif 10 | 11 | let s:cpo_save = &cpo 12 | set cpo&vim 13 | 14 | let s:ft = matchstr(&ft, '^\([^.]\)\+') 15 | 16 | " A bunch of useful C keywords 17 | syn keyword cStatement goto break return continue asm 18 | syn keyword cLabel case default 19 | syn keyword cConditional if else switch 20 | syn keyword cRepeat while for do 21 | 22 | syn keyword cTodo contained TODO FIXME XXX 23 | 24 | " It's easy to accidentally add a space after a backslash that was intended 25 | " for line continuation. Some compilers allow it, which makes it 26 | " unpredictable and should be avoided. 27 | syn match cBadContinuation contained "\\\s\+$" 28 | 29 | " cCommentGroup allows adding matches for special things in comments 30 | syn cluster cCommentGroup contains=cTodo,cBadContinuation 31 | 32 | " String and Character constants 33 | " Highlight special characters (those which have a backslash) differently 34 | syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" 35 | if !exists("c_no_utf") 36 | syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" 37 | endif 38 | 39 | if !exists("c_no_cformat") 40 | " Highlight % items in strings. 41 | if !exists("c_no_c99") " ISO C99 42 | syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained 43 | else 44 | syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained 45 | endif 46 | syn match cFormat display "%%" contained 47 | endif 48 | 49 | " cCppString: same as cString, but ends at end of line 50 | if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat") 51 | " ISO C++11 52 | syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend 53 | syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell 54 | elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat") 55 | " ISO C99 56 | syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend 57 | syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell 58 | else 59 | " older C or C++ 60 | syn match cFormat display "%%" contained 61 | syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend 62 | syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell 63 | endif 64 | 65 | syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip 66 | 67 | syn cluster cStringGroup contains=cCppString,cCppSkip 68 | 69 | syn match cCharacter "L\='[^\\]'" 70 | syn match cCharacter "L'[^']*'" contains=cSpecial 71 | if exists("c_gnu") 72 | syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'" 73 | syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'" 74 | else 75 | syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'" 76 | syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'" 77 | endif 78 | syn match cSpecialCharacter display "L\='\\\o\{1,3}'" 79 | syn match cSpecialCharacter display "'\\x\x\{1,2}'" 80 | syn match cSpecialCharacter display "L'\\x\x\+'" 81 | 82 | if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11")) 83 | " ISO C11 or ISO C++ 11 84 | if exists("c_no_cformat") 85 | syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend 86 | else 87 | syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend 88 | endif 89 | syn match cCharacter "[Uu]'[^\\]'" 90 | syn match cCharacter "[Uu]'[^']*'" contains=cSpecial 91 | if exists("c_gnu") 92 | syn match cSpecialError "[Uu]'\\[^'\"?\\abefnrtv]'" 93 | syn match cSpecialCharacter "[Uu]'\\['\"?\\abefnrtv]'" 94 | else 95 | syn match cSpecialError "[Uu]'\\[^'\"?\\abfnrtv]'" 96 | syn match cSpecialCharacter "[Uu]'\\['\"?\\abfnrtv]'" 97 | endif 98 | syn match cSpecialCharacter display "[Uu]'\\\o\{1,3}'" 99 | syn match cSpecialCharacter display "[Uu]'\\x\x\+'" 100 | endif 101 | 102 | "when wanted, highlight trailing white space 103 | if exists("c_space_errors") 104 | if !exists("c_no_trail_space_error") 105 | syn match cSpaceError display excludenl "\s\+$" 106 | endif 107 | if !exists("c_no_tab_space_error") 108 | syn match cSpaceError display " \+\t"me=e-1 109 | endif 110 | endif 111 | 112 | " This should be before cErrInParen to avoid problems with #define ({ xxx }) 113 | if exists("c_curly_error") 114 | syn match cCurlyError "}" 115 | syn region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell fold 116 | else 117 | syn region cBlock start="{" end="}" transparent fold 118 | endif 119 | 120 | " Catch errors caused by wrong parenthesis and brackets. 121 | " Also accept <% for {, %> for }, <: for [ and :> for ] (C99) 122 | " But avoid matching <::. 123 | syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom 124 | if exists("c_no_curly_error") 125 | if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") 126 | syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell 127 | " cCppParen: same as cParen but ends at end-of-line; used in cDefine 128 | syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell 129 | syn match cParenError display ")" 130 | syn match cErrInParen display contained "^^<%\|^%>" 131 | else 132 | syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell 133 | " cCppParen: same as cParen but ends at end-of-line; used in cDefine 134 | syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell 135 | syn match cParenError display ")" 136 | syn match cErrInParen display contained "^[{}]\|^<%\|^%>" 137 | endif 138 | elseif exists("c_no_bracket_error") 139 | if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") 140 | syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell 141 | " cCppParen: same as cParen but ends at end-of-line; used in cDefine 142 | syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell 143 | syn match cParenError display ")" 144 | syn match cErrInParen display contained "<%\|%>" 145 | else 146 | syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell 147 | " cCppParen: same as cParen but ends at end-of-line; used in cDefine 148 | syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell 149 | syn match cParenError display ")" 150 | syn match cErrInParen display contained "[{}]\|<%\|%>" 151 | endif 152 | else 153 | if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") 154 | syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell 155 | " cCppParen: same as cParen but ends at end-of-line; used in cDefine 156 | syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell 157 | syn match cParenError display "[\])]" 158 | syn match cErrInParen display contained "<%\|%>" 159 | syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell 160 | else 161 | syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell 162 | " cCppParen: same as cParen but ends at end-of-line; used in cDefine 163 | syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell 164 | syn match cParenError display "[\])]" 165 | syn match cErrInParen display contained "[\]{}]\|<%\|%>" 166 | syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell 167 | endif 168 | " cCppBracket: same as cParen but ends at end-of-line; used in cDefine 169 | syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell 170 | syn match cErrInBracket display contained "[);{}]\|<%\|%>" 171 | endif 172 | 173 | if s:ft ==# 'c' || exists("cpp_no_cpp11") 174 | syn region cBadBlock keepend start="{" end="}" contained containedin=cParen,cBracket,cBadBlock transparent fold 175 | endif 176 | 177 | "integer number, or floating point number without a dot and with "f". 178 | syn case ignore 179 | syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal 180 | " Same, but without octal error (for comments) 181 | syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal 182 | syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" 183 | "hex number 184 | syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" 185 | " Flag the first zero of an octal number as something special 186 | syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero 187 | syn match cOctalZero display contained "\<0" 188 | syn match cFloat display contained "\d\+f" 189 | "floating point number, with dot, optional exponent 190 | syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" 191 | "floating point number, starting with a dot, optional exponent 192 | syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" 193 | "floating point number, without dot, with exponent 194 | syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" 195 | if !exists("c_no_c99") 196 | "hexadecimal floating point number, optional leading digits, with dot, with exponent 197 | syn match cFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" 198 | "hexadecimal floating point number, with leading digits, optional dot, with exponent 199 | syn match cFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" 200 | endif 201 | 202 | " flag an octal number with wrong digits 203 | syn match cOctalError display contained "0\o*[89]\d*" 204 | syn case match 205 | 206 | if exists("c_comment_strings") 207 | " A comment can contain cString, cCharacter and cNumber. 208 | " But a "*/" inside a cString in a cComment DOES end the comment! So we 209 | " need to use a special type of cString: cCommentString, which also ends on 210 | " "*/", and sees a "*" at the start of the line as comment again. 211 | " Unfortunately this doesn't very well work for // type of comments :-( 212 | syn match cCommentSkip contained "^\s*\*\($\|\s\+\)" 213 | syn region cCommentString contained start=+L\=\\\@" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError 362 | syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>" 363 | if !exists("c_no_if0") 364 | syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip 365 | syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold 366 | syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse 367 | if !exists("c_no_if0_fold") 368 | syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold 369 | else 370 | syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell 371 | endif 372 | syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit 373 | syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold 374 | syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit 375 | if !exists("c_no_if0_fold") 376 | syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold 377 | else 378 | syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 379 | endif 380 | syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell 381 | syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip 382 | syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc 383 | endif 384 | syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ 385 | syn match cIncluded display contained "<[^>]*>" 386 | syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded 387 | "syn match cLineSkip "\\$" 388 | syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock 389 | syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell 390 | syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell 391 | 392 | " Highlight User Labels 393 | syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString 394 | if s:ft ==# 'c' || exists("cpp_no_cpp11") 395 | syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell,@cStringGroup 396 | endif 397 | " Avoid matching foo::bar() in C++ by requiring that the next char is not ':' 398 | syn cluster cLabelGroup contains=cUserLabel 399 | syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup 400 | syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup 401 | if s:ft ==# 'cpp' 402 | syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup 403 | syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup 404 | else 405 | syn match cUserCont display "^\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup 406 | syn match cUserCont display ";\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup 407 | endif 408 | 409 | syn match cUserLabel display "\I\i*" contained 410 | 411 | " Avoid recognizing most bitfields as labels 412 | syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType 413 | syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType 414 | 415 | if exists("c_minlines") 416 | let b:c_minlines = c_minlines 417 | else 418 | if !exists("c_no_if0") 419 | let b:c_minlines = 50 " #if 0 constructs can be long 420 | else 421 | let b:c_minlines = 15 " mostly for () constructs 422 | endif 423 | endif 424 | if exists("c_curly_error") 425 | syn sync fromstart 426 | else 427 | exec "syn sync ccomment cComment minlines=" . b:c_minlines 428 | endif 429 | 430 | " Define the default highlighting. 431 | " Only used when an item doesn't have highlighting yet 432 | hi def link cFormat cSpecial 433 | hi def link cCppString cString 434 | hi def link cCommentL cComment 435 | hi def link cCommentStart cComment 436 | hi def link cLabel Label 437 | hi def link cUserLabel Label 438 | hi def link cConditional Conditional 439 | hi def link cRepeat Repeat 440 | hi def link cCharacter Character 441 | hi def link cSpecialCharacter cSpecial 442 | hi def link cNumber Number 443 | hi def link cOctal Number 444 | hi def link cOctalZero PreProc " link this to Error if you want 445 | hi def link cFloat Float 446 | hi def link cOctalError cError 447 | hi def link cParenError cError 448 | hi def link cErrInParen cError 449 | hi def link cErrInBracket cError 450 | hi def link cCommentError cError 451 | hi def link cCommentStartError cError 452 | hi def link cSpaceError cError 453 | hi def link cSpecialError cError 454 | hi def link cCurlyError cError 455 | hi def link cOperator Operator 456 | hi def link cStructure Structure 457 | hi def link cStorageClass StorageClass 458 | hi def link cInclude Include 459 | hi def link cPreProc PreProc 460 | hi def link cDefine Macro 461 | hi def link cIncluded cString 462 | hi def link cError Error 463 | hi def link cStatement Statement 464 | hi def link cCppInWrapper cCppOutWrapper 465 | hi def link cCppOutWrapper cPreCondit 466 | hi def link cPreConditMatch cPreCondit 467 | hi def link cPreCondit PreCondit 468 | hi def link cType Type 469 | hi def link cConstant Constant 470 | hi def link cCommentString cString 471 | hi def link cComment2String cString 472 | hi def link cCommentSkip cComment 473 | hi def link cString String 474 | hi def link cComment Comment 475 | hi def link cSpecial SpecialChar 476 | hi def link cTodo Todo 477 | hi def link cBadContinuation Error 478 | hi def link cCppOutSkip cCppOutIf2 479 | hi def link cCppInElse2 cCppOutIf2 480 | hi def link cCppOutIf2 cCppOut 481 | hi def link cCppOut Comment 482 | 483 | let b:current_syntax = "c" 484 | 485 | unlet s:ft 486 | 487 | let &cpo = s:cpo_save 488 | unlet s:cpo_save 489 | " vim: ts=8 490 | -------------------------------------------------------------------------------- /nvim/syntax/cpp.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: C++ 3 | " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) 4 | " Previous Maintainer: Ken Shan 5 | " Last Change: 2016 Oct 28 6 | 7 | " quit when a syntax file was already loaded 8 | if exists("b:current_syntax") 9 | finish 10 | endif 11 | 12 | " Read the C syntax to start with 13 | runtime! syntax/c.vim 14 | unlet b:current_syntax 15 | 16 | " C++ extensions 17 | syn keyword cppStatement new delete this friend using 18 | syn keyword cppAccess public protected private 19 | syn keyword cppModifier virtual explicit export 20 | syn keyword cppType bool wchar_t 21 | syn keyword cppExceptions throw try catch 22 | syn keyword cppOperator operator typeid 23 | syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq 24 | syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 25 | syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" 26 | syn keyword cppStorageClass mutable 27 | syn keyword cppStructure class typename template namespace 28 | syn keyword cppBoolean true false 29 | syn keyword cppConstant __cplusplus 30 | 31 | " C++ 11 extensions 32 | if !exists("cpp_no_cpp11") 33 | syn keyword cppModifier override final 34 | syn keyword cppType nullptr_t auto 35 | syn keyword cppExceptions noexcept 36 | syn keyword cppStorageClass constexpr decltype thread_local 37 | syn keyword cppConstant nullptr 38 | syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT 39 | syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE 40 | syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE 41 | syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE 42 | syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE 43 | syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE 44 | syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell 45 | endif 46 | 47 | " C++ 14 extensions 48 | if !exists("cpp_no_cpp14") 49 | syn case ignore 50 | syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>" 51 | syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" 52 | syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>" 53 | syn case match 54 | endif 55 | 56 | " The minimum and maximum operators in GNU C++ 57 | syn match cppMinMax "[<>]?" 58 | 59 | " Default highlighting 60 | hi def link cppAccess cppStatement 61 | hi def link cppCast cppStatement 62 | hi def link cppExceptions Exception 63 | hi def link cppOperator Operator 64 | hi def link cppStatement Statement 65 | hi def link cppModifier Type 66 | hi def link cppType Type 67 | hi def link cppStorageClass StorageClass 68 | hi def link cppStructure Structure 69 | hi def link cppBoolean Boolean 70 | hi def link cppConstant Constant 71 | hi def link cppRawStringDelimiter Delimiter 72 | hi def link cppRawString String 73 | hi def link cppNumber Number 74 | 75 | let b:current_syntax = "cpp" 76 | 77 | " vim: ts=8 78 | -------------------------------------------------------------------------------- /nvim/syntax/html.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: HTML 3 | " Maintainer: Claudio Fleiner 4 | " URL: http://www.fleiner.com/vim/syntax/html.vim 5 | " Last Change: 2015 Jan 07 6 | " included patch from David Felix 7 | 8 | " Please check :help html.vim for some comments and a description of the options 9 | 10 | " For version 5.x: Clear all syntax items 11 | " For version 6.x: Quit when a syntax file was already loaded 12 | if !exists("main_syntax") 13 | if version < 600 14 | syntax clear 15 | elseif exists("b:current_syntax") 16 | finish 17 | endif 18 | let main_syntax = 'html' 19 | endif 20 | 21 | let s:cpo_save = &cpo 22 | set cpo&vim 23 | 24 | " don't use standard HiLink, it will not work with included syntax files 25 | if version < 508 26 | command! -nargs=+ HtmlHiLink hi link 27 | else 28 | command! -nargs=+ HtmlHiLink hi def link 29 | endif 30 | 31 | syntax spell toplevel 32 | 33 | syn case ignore 34 | 35 | " mark illegal characters 36 | syn match htmlError "[<>&]" 37 | 38 | 39 | " tags 40 | syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc 41 | syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc 42 | syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc 43 | syn region htmlEndTag start=++ contains=htmlTagN,htmlTagError 44 | syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster 45 | syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster 46 | syn match htmlTagN contained +]<"ms=s+1 48 | 49 | 50 | " tag names 51 | syn keyword htmlTagName contained address applet area a base basefont 52 | syn keyword htmlTagName contained big blockquote br caption center 53 | syn keyword htmlTagName contained cite code dd dfn dir div dl dt font 54 | syn keyword htmlTagName contained form hr html img 55 | syn keyword htmlTagName contained input isindex kbd li link map menu 56 | syn keyword htmlTagName contained meta ol option param pre p samp span 57 | syn keyword htmlTagName contained select small strike sub sup 58 | syn keyword htmlTagName contained table td textarea th tr tt ul var xmp 59 | syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>" 60 | 61 | " new html 4.0 tags 62 | syn keyword htmlTagName contained abbr acronym bdo button col label 63 | syn keyword htmlTagName contained colgroup del fieldset iframe ins legend 64 | syn keyword htmlTagName contained object optgroup q s tbody tfoot thead 65 | 66 | " legal arg names 67 | syn keyword htmlArg contained action 68 | syn keyword htmlArg contained align alink alt archive background bgcolor 69 | syn keyword htmlArg contained border bordercolor cellpadding 70 | syn keyword htmlArg contained cellspacing checked class clear code codebase color 71 | syn keyword htmlArg contained cols colspan content coords enctype face 72 | syn keyword htmlArg contained gutter height hspace id 73 | syn keyword htmlArg contained link lowsrc marginheight 74 | syn keyword htmlArg contained marginwidth maxlength method name prompt 75 | syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape 76 | syn keyword htmlArg contained size src start target text type url 77 | syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap 78 | syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1 79 | 80 | " Netscape extensions 81 | syn keyword htmlTagName contained frame noframes frameset nobr blink 82 | syn keyword htmlTagName contained layer ilayer nolayer spacer 83 | syn keyword htmlArg contained frameborder noresize pagex pagey above below 84 | syn keyword htmlArg contained left top visibility clip id noshade 85 | syn match htmlArg contained "\" 86 | 87 | " Microsoft extensions 88 | syn keyword htmlTagName contained marquee 89 | 90 | " html 4.0 arg names 91 | syn match htmlArg contained "\<\(accept-charset\|label\)\>" 92 | syn keyword htmlArg contained abbr accept accesskey axis char charoff charset 93 | syn keyword htmlArg contained cite classid codetype compact data datetime 94 | syn keyword htmlArg contained declare defer dir disabled for frame 95 | syn keyword htmlArg contained headers hreflang lang language longdesc 96 | syn keyword htmlArg contained multiple nohref nowrap object profile readonly 97 | syn keyword htmlArg contained rules scheme scope span standby style 98 | syn keyword htmlArg contained summary tabindex valuetype version 99 | 100 | " special characters 101 | syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" 102 | 103 | " Comments (the real ones or the old netscape ones) 104 | if exists("html_wrong_comments") 105 | syn region htmlComment start=++ contains=htmlPreStmt,htmlPreError,htmlPreAttr 115 | syn match htmlPreStmt contained "\)" 209 | syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc 210 | HtmlHiLink htmlStyleArg htmlString 211 | endif 212 | 213 | if main_syntax == "html" 214 | " synchronizing (does not always work if a comment includes legal 215 | " html tags, but doing it right would mean to always start 216 | " at the first line, which is too slow) 217 | syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]" 218 | syn sync match htmlHighlight groupthere javaScript "= 508 || !exists("did_html_syn_inits") 225 | if version < 508 226 | let did_html_syn_inits = 1 227 | endif 228 | HtmlHiLink htmlTag Function 229 | HtmlHiLink htmlEndTag Identifier 230 | HtmlHiLink htmlArg Type 231 | HtmlHiLink htmlTagName htmlStatement 232 | HtmlHiLink htmlSpecialTagName Exception 233 | HtmlHiLink htmlValue String 234 | HtmlHiLink htmlSpecialChar Special 235 | 236 | if !exists("html_no_rendering") 237 | HtmlHiLink htmlH1 Title 238 | HtmlHiLink htmlH2 htmlH1 239 | HtmlHiLink htmlH3 htmlH2 240 | HtmlHiLink htmlH4 htmlH3 241 | HtmlHiLink htmlH5 htmlH4 242 | HtmlHiLink htmlH6 htmlH5 243 | HtmlHiLink htmlHead PreProc 244 | HtmlHiLink htmlTitle Title 245 | HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic 246 | HtmlHiLink htmlUnderlineBold htmlBoldUnderline 247 | HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic 248 | HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic 249 | HtmlHiLink htmlItalicUnderline htmlUnderlineItalic 250 | HtmlHiLink htmlItalicBold htmlBoldItalic 251 | HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic 252 | HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic 253 | HtmlHiLink htmlLink Underlined 254 | HtmlHiLink htmlLeadingSpace None 255 | if !exists("html_my_rendering") 256 | hi def htmlBold term=bold cterm=bold gui=bold 257 | hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline 258 | hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic 259 | hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline 260 | hi def htmlUnderline term=underline cterm=underline gui=underline 261 | hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline 262 | hi def htmlItalic term=italic cterm=italic gui=italic 263 | endif 264 | endif 265 | 266 | HtmlHiLink htmlPreStmt PreProc 267 | HtmlHiLink htmlPreError Error 268 | HtmlHiLink htmlPreProc PreProc 269 | HtmlHiLink htmlPreAttr String 270 | HtmlHiLink htmlPreProcAttrName PreProc 271 | HtmlHiLink htmlPreProcAttrError Error 272 | HtmlHiLink htmlSpecial Special 273 | HtmlHiLink htmlSpecialChar Special 274 | HtmlHiLink htmlString String 275 | HtmlHiLink htmlStatement Statement 276 | HtmlHiLink htmlComment Comment 277 | HtmlHiLink htmlCommentPart Comment 278 | HtmlHiLink htmlValue String 279 | HtmlHiLink htmlCommentError htmlError 280 | HtmlHiLink htmlTagError htmlError 281 | HtmlHiLink htmlEvent javaScript 282 | HtmlHiLink htmlError Error 283 | 284 | HtmlHiLink javaScript Special 285 | HtmlHiLink javaScriptExpression javaScript 286 | HtmlHiLink htmlCssStyleComment Comment 287 | HtmlHiLink htmlCssDefinition Special 288 | endif 289 | 290 | delcommand HtmlHiLink 291 | 292 | let b:current_syntax = "html" 293 | 294 | if main_syntax == 'html' 295 | unlet main_syntax 296 | endif 297 | 298 | let &cpo = s:cpo_save 299 | unlet s:cpo_save 300 | " vim: ts=8 301 | -------------------------------------------------------------------------------- /nvim/syntax/objc.vim: -------------------------------------------------------------------------------- 1 | " Author: Michael Sanders (msanders42 [at] gmail [dot] com) 2 | " Description: Better syntax highlighting for Objective-C files (part of the 3 | " cocoa.vim plugin). 4 | " Last Updated: June 23, 2009 5 | 6 | " NOTE: This next file (cocoa_keywords.vim) is rather large and may slow 7 | " things down. Loading it seems to take less than 0.5 microseconds 8 | " on my machine, but I'm not sure of the consequences; if it is slow 9 | " for you, just comment out the next line. 10 | ru cocoa_keywords.vim 11 | 12 | syn match objcDirective '@synthesize\|@property\|@optional\|@required' display 13 | syn keyword objcType IBOutlet IBAction Method 14 | syn keyword objcConstant YES NO TRUE FALSE 15 | 16 | syn region objcImp start='@implementation' end='@end' transparent 17 | syn region objcHeader start='@interface' end='@end' transparent 18 | 19 | " I make this typo sometimes so it's nice to have it highlighted. 20 | syn match objcError '\v(NSLogv=\(\s*)@<=[^@]=["'].*'me=e-1 21 | 22 | syn match objcSubclass '\(@implementation\|@interface\)\@<=\s*\k\+' display contained containedin=objcImp,objcHeader 23 | syn match objcSuperclass '\(@\(implementation\|interface\)\s*\k\+\s*:\)\@<=\s*\k*' display contained containedin=objcImp,objcHeader 24 | 25 | " Matches "- (void) foo: (int) bar and: (float) foobar" 26 | syn match objcMethod '^\s*[-+]\s*\_.\{-}[\{;]'me=e-1 transparent contains=cParen,objcInstMethod,objcFactMethod 27 | " Matches "bar & foobar" in above 28 | syn match objcMethodArg ')\@<=\s*\k\+' contained containedin=objcMethod 29 | " Matches "foo:" & "and:" in above 30 | syn match objcMethodName '\(^\s*[-+]\s*(\_[^)]*)\)\@<=\_\s*\_\k\+' contained containedin=objcMethod 31 | syn match objcMethodColon '\k\+\s*:' contained containedin=objcMethod 32 | " Don't match these groups in cParen "(...)" 33 | syn cluster cParenGroup add=objcMethodName,objcMethodArg,objcMethodColon 34 | " This fixes a bug with completion inside parens (e.g. if ([NSString ])) 35 | syn cluster cParenGroup remove=objcMethodCall 36 | 37 | " Matches "bar" in "[NSObject bar]" or "bar" in "[[NSObject foo: baz] bar]", 38 | " but NOT "bar" in "[NSObject foo: bar]". 39 | syn match objcMessageName '\(\[\s*\k\+\s\+\|\]\s*\)\@<=\k*\s*\]'me=e-1 display contained containedin=objcMethodCall 40 | " Matches "foo:" in "[NSObject foo: bar]" or "[[NSObject new] foo: bar]" 41 | syn match objcMessageColon '\(\_\S\+\_\s\+\)\@<=\k\+\s*:' display contained containedin=objcMethodCall 42 | 43 | " Don't match these in this strange group for edge cases... 44 | syn cluster cMultiGroup add=objcMessageColon,objcMessageName,objcMethodName,objcMethodArg,objcMethodColon 45 | 46 | " You may want to customize this one. I couldn't find a default group to suit 47 | " it, but you can modify your colorscheme to make this a different color. 48 | hi link objcMethodName Special 49 | hi link objcMethodColon objcMethodName 50 | 51 | hi link objcMethodArg Identifier 52 | 53 | hi link objcMessageName objcMethodArg 54 | hi link objcMessageColon objcMessageName 55 | 56 | hi link objcSubclass objcMethodName 57 | hi link objcSuperclass String 58 | 59 | hi link objcError Error 60 | -------------------------------------------------------------------------------- /qutebrowser/config.py: -------------------------------------------------------------------------------- 1 | # Autogenerated config.py 2 | # Documentation: 3 | # qute://help/configuring.html 4 | # qute://help/settings.html 5 | 6 | # Uncomment this to still load settings configured via autoconfig.yml 7 | # config.load_autoconfig() 8 | 9 | # Enable JavaScript. 10 | # Type: Bool 11 | config.set('content.javascript.enabled', True, 'file://*') 12 | 13 | # Enable JavaScript. 14 | # Type: Bool 15 | config.set('content.javascript.enabled', True, 'chrome://*/*') 16 | 17 | # Enable JavaScript. 18 | # Type: Bool 19 | config.set('content.javascript.enabled', True, 'qute://*/*') 20 | 21 | # Enable smooth scrolling for web pages. Note smooth scrolling does not 22 | # work with the `:scroll-px` command. 23 | # Type: Bool 24 | c.scrolling.smooth = True 25 | 26 | # Padding (in pixels) around text for tabs. 27 | # Type: Padding 28 | c.tabs.padding = {'bottom': 5, 'left': 5, 'right': 5, 'top': 5} 29 | 30 | # Page to open if :open -t/-b/-w is used without URL. Use `about:blank` 31 | # for a blank page. 32 | # Type: FuzzyUrl 33 | c.url.default_page = 'https://koekeishiya.github.io/chunkwm/' 34 | 35 | # Page(s) to open at the start. 36 | # Type: List of FuzzyUrl, or FuzzyUrl 37 | c.url.start_pages = 'https://koekeishiya.github.io/chunkwm/' 38 | 39 | # Hide the window decoration. This setting requires a restart on 40 | # Wayland. 41 | # Type: Bool 42 | c.window.hide_decoration = True 43 | 44 | # Text color of the completion widget. May be a single color to use for 45 | # all columns or a list of three colors, one for each column. 46 | # Type: List of QtColor, or QtColor 47 | c.colors.completion.fg = '#d5c4a1' 48 | 49 | # Background color of the completion widget for odd rows. 50 | # Type: QssColor 51 | c.colors.completion.odd.bg = '#333333' 52 | 53 | # Background color of the completion widget for even rows. 54 | # Type: QssColor 55 | c.colors.completion.even.bg = '#202020' 56 | 57 | # Background color of the selected completion item. 58 | # Type: QssColor 59 | c.colors.completion.item.selected.bg = '#8fee96' 60 | 61 | # Top border color of the completion widget category headers. 62 | # Type: QssColor 63 | c.colors.completion.item.selected.border.top = '#151515' 64 | 65 | # Bottom border color of the selected completion item. 66 | # Type: QssColor 67 | c.colors.completion.item.selected.border.bottom = '#151515' 68 | 69 | # Foreground color of the matched text in the completion. 70 | # Type: QssColor 71 | c.colors.completion.match.fg = '#d75f5f' 72 | 73 | # Background color for the download bar. 74 | # Type: QssColor 75 | c.colors.downloads.bar.bg = '#202020' 76 | 77 | # Foreground color of the statusbar. 78 | # Type: QssColor 79 | c.colors.statusbar.normal.fg = '#d5c4a1' 80 | 81 | # Background color of the statusbar. 82 | # Type: QssColor 83 | c.colors.statusbar.normal.bg = '#202020' 84 | 85 | # Foreground color of the statusbar in command mode. 86 | # Type: QssColor 87 | c.colors.statusbar.command.fg = '#d4c5a1' 88 | 89 | # Background color of the statusbar in command mode. 90 | # Type: QssColor 91 | c.colors.statusbar.command.bg = '#202020' 92 | 93 | # Default foreground color of the URL in the statusbar. 94 | # Type: QssColor 95 | c.colors.statusbar.url.fg = '#d5c4a1' 96 | 97 | # Foreground color of the URL in the statusbar on error. 98 | # Type: QssColor 99 | c.colors.statusbar.url.error.fg = '#d75f5f' 100 | 101 | # Foreground color of the URL in the statusbar on successful load 102 | # (http). 103 | # Type: QssColor 104 | c.colors.statusbar.url.success.http.fg = '#84edb9' 105 | 106 | # Foreground color of the URL in the statusbar on successful load 107 | # (https). 108 | # Type: QssColor 109 | c.colors.statusbar.url.success.https.fg = '#8fee96' 110 | 111 | # Foreground color of the URL in the statusbar when there's a warning. 112 | # Type: QssColor 113 | c.colors.statusbar.url.warn.fg = '#cd950c' 114 | 115 | # Background color of the tab bar. 116 | # Type: QtColor 117 | c.colors.tabs.bar.bg = '#202020' 118 | 119 | # Foreground color of unselected odd tabs. 120 | # Type: QtColor 121 | c.colors.tabs.odd.fg = '#707070' 122 | 123 | # Background color of unselected odd tabs. 124 | # Type: QtColor 125 | c.colors.tabs.odd.bg = '#202020' 126 | 127 | # Foreground color of unselected even tabs. 128 | # Type: QtColor 129 | c.colors.tabs.even.fg = '#707070' 130 | 131 | # Background color of unselected even tabs. 132 | # Type: QtColor 133 | c.colors.tabs.even.bg = '#202020' 134 | 135 | # Foreground color of selected odd tabs. 136 | # Type: QtColor 137 | c.colors.tabs.selected.odd.fg = '#d5c4a1' 138 | 139 | # Background color of selected odd tabs. 140 | # Type: QtColor 141 | c.colors.tabs.selected.odd.bg = '#202020' 142 | 143 | # Foreground color of selected even tabs. 144 | # Type: QtColor 145 | c.colors.tabs.selected.even.fg = '#d5c4a1' 146 | 147 | # Background color of selected even tabs. 148 | # Type: QtColor 149 | c.colors.tabs.selected.even.bg = '#202020' 150 | 151 | # Font used in the tab bar. 152 | # Type: QtFont 153 | c.fonts.tabs = '10pt fantasque sans mono' 154 | 155 | # Bindings for normal mode 156 | config.bind(';M', 'hint --rapid links spawn open -na /Applications/mpv.app {hint-url}') 157 | config.bind('', 'open -p') 158 | config.bind('', 'close') 159 | config.bind('M', 'hint links spawn open -na /Applications/mpv.app {hint-url}') 160 | config.bind('m', 'spawn open -na /Applications/mpv.app {url}') 161 | -------------------------------------------------------------------------------- /scripts/binclock.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python2 2 | 3 | # binclock 4 | # written by Brian Gajdos , 2001 5 | 6 | import curses 7 | import _curses 8 | import math 9 | import os 10 | import sys 11 | import time 12 | 13 | 14 | pause = 0 15 | show_help_screen = 0 16 | 17 | 18 | 19 | class BincScreen: 20 | 21 | def __init__(self): 22 | self.stdscr = None 23 | 24 | 25 | def initialize(self): 26 | self.stdscr = curses.initscr() 27 | curses.start_color() 28 | curses.use_default_colors() 29 | curses.noecho() 30 | curses.cbreak() 31 | self.stdscr.keypad(1) 32 | 33 | self.stdscr.nodelay(1) 34 | curses.halfdelay(1) 35 | 36 | curses.init_pair(10, curses.COLOR_RED, -1) 37 | curses.init_pair(11, curses.COLOR_BLACK, -1) 38 | curses.init_pair(12, curses.COLOR_GREEN, -1) 39 | curses.init_pair(13, curses.COLOR_BLUE, -1) 40 | 41 | 42 | def erase(self): 43 | self.stdscr.erase() 44 | 45 | 46 | def refresh(self): 47 | self.stdscr.refresh() 48 | 49 | 50 | def getch(self): 51 | return self.stdscr.getch() 52 | 53 | 54 | def addtext(self, x, y, col, txt): 55 | ccc = 0 56 | 57 | if col == 1: 58 | ccc = curses.A_BOLD 59 | elif col == 100: 60 | ccc = curses.A_NORMAL | curses.color_pair(10) 61 | elif col == 101: 62 | ccc = curses.A_BOLD | curses.color_pair(10) 63 | elif col == 111: 64 | ccc = curses.A_BOLD | curses.color_pair(11) 65 | elif col == 120: 66 | ccc = curses.A_NORMAL | curses.color_pair(12) 67 | elif col == 121: 68 | ccc = curses.A_BOLD | curses.color_pair(12) 69 | elif col == 130: 70 | ccc = curses.A_NORMAL | curses.color_pair(13) 71 | elif col == 131: 72 | ccc = curses.A_BOLD | curses.color_pair(13) 73 | 74 | self.stdscr.addstr(y, x, txt, ccc) 75 | 76 | 77 | def fetch_screensize(self): 78 | my_width = 80 79 | my_height = 25 80 | my_height, my_width = self.stdscr.getmaxyx() 81 | return my_width, my_height 82 | 83 | 84 | def done(self): 85 | curses.echo() 86 | curses.endwin() 87 | 88 | 89 | 90 | class BincLED: 91 | 92 | def __init__(self, scr, x, y, co): 93 | self.scr = scr 94 | self.x = x 95 | self.y = y 96 | self.status = 0 97 | self.co = co 98 | self.oldstatus = 0 99 | 100 | 101 | def move(self, x, y): 102 | if self.x == x and self.y == y: 103 | return 104 | self.x = x 105 | self.y = y 106 | 107 | 108 | def switch_on(self): 109 | self.status = 1 110 | 111 | 112 | def switch_off(self): 113 | self.status = 0 114 | 115 | 116 | def draw(self): 117 | 118 | if self.status: 119 | if self.co == 2: 120 | self.scr.addtext(self.x, self.y, 121, "*") 121 | else: 122 | self.scr.addtext(self.x, self.y, 101, "*") 123 | else: 124 | if self.oldstatus: 125 | if self.co == 2: 126 | self.scr.addtext(self.x, self.y, 120, "*") 127 | else: 128 | self.scr.addtext(self.x, self.y, 100, "*") 129 | else: 130 | self.scr.addtext(self.x, self.y, 111, "*") 131 | 132 | self.oldstatus = self.status 133 | 134 | 135 | 136 | class BincColumn: 137 | 138 | def __init__(self, scr, x, y, co=1): 139 | self.scr = scr 140 | self.x = x 141 | self.y = y 142 | self.co = co 143 | self.leds = [] 144 | for i in range(4): 145 | self.leds.append(BincLED(scr, x, y + i, co)) 146 | 147 | 148 | def move(self, x, y): 149 | if self.x == x and self.y == y: 150 | return 151 | self.x = x 152 | self.y = y 153 | for i in range(4): 154 | self.leds[i].move(x, y + i) 155 | 156 | 157 | def setup(self, number): 158 | if number & 1: 159 | self.leds[3].switch_on() 160 | else: 161 | self.leds[3].switch_off() 162 | if number & 2: 163 | self.leds[2].switch_on() 164 | else: 165 | self.leds[2].switch_off() 166 | if number & 4: 167 | self.leds[1].switch_on() 168 | else: 169 | self.leds[1].switch_off() 170 | if number & 8: 171 | self.leds[0].switch_on() 172 | else: 173 | self.leds[0].switch_off() 174 | 175 | 176 | def draw(self): 177 | for i in range(4): 178 | self.leds[i].draw() 179 | 180 | 181 | 182 | class BincDigital: 183 | 184 | def __init__(self, scr, x1, y1, x2, y2, x3, y3, x4, y4): 185 | self.scr = scr 186 | self.x1 = x1 187 | self.y1 = y1 188 | self.x2 = x2 189 | self.y2 = y2 190 | self.x3 = x3 191 | self.y3 = y3 192 | self.x4 = x4 193 | self.y4 = y4 194 | self.hour = 0 195 | self.minute = 0 196 | self.second = 0 197 | self.hds = 0 198 | 199 | 200 | def move(self, x1, y1, x2, y2, x3, y3, x4, y4): 201 | self.x1 = x1 202 | self.y1 = y1 203 | self.x2 = x2 204 | self.y2 = y2 205 | self.x3 = x3 206 | self.y3 = y3 207 | self.x4 = x4 208 | self.y4 = y4 209 | 210 | self.x12 = ((x1 + 2) + x2) / 2 211 | self.x23 = ((x2 + 2) + x3) / 2 212 | self.x34 = ((x3 + 2) + x4) / 2 213 | 214 | self.y12 = (y1 + y2) / 2 215 | self.y23 = (y2 + y3) / 2 216 | self.y34 = (y3 + y4) / 2 217 | 218 | 219 | def setup(self, hour, minute, second, hds): 220 | self.hour = hour 221 | self.minute = minute 222 | self.second = second 223 | self.hds = hds 224 | 225 | 226 | def draw(self, thds = 0): 227 | self.scr.addtext(self.x1, self.y1, 131, "%02d" % self.hour) 228 | self.scr.addtext(self.x12, self.y12, 130, ":") 229 | self.scr.addtext(self.x2, self.y2, 131, "%02d" % self.minute) 230 | self.scr.addtext(self.x23, self.y23, 130, ":") 231 | self.scr.addtext(self.x3, self.y3, 131, "%02d" % self.second) 232 | 233 | if thds: 234 | if self.hds < 50: 235 | self.scr.addtext(self.x34, self.y34, 130, ".") 236 | else: 237 | self.scr.addtext(self.x34, self.y34, 130, " ") 238 | self.scr.addtext(self.x4, self.y4, 130, "%02d" % self.hds) 239 | 240 | 241 | 242 | class BincTitle: 243 | 244 | def __init__(self, scr, x, y, txt=""): 245 | self.scr = scr 246 | self.x = x 247 | self.y = y 248 | self.txt = txt 249 | 250 | 251 | def move(self, x, y): 252 | if self.x == x and self.y == y: 253 | return 254 | self.x = x 255 | self.y = y 256 | 257 | 258 | def draw(self): 259 | self.scr.addtext(self.x, self.y, 0, self.txt) 260 | 261 | 262 | 263 | class BincHelpAdv: 264 | 265 | def __init__(self, scr, width, height): 266 | self.scr = scr 267 | self.width = width 268 | self.height = height 269 | self.txt_x = 0 270 | self.txt_y = 0 271 | self.start_time = 0 272 | self.help_text = "Press '?' to get help" 273 | self.window_too_small = 1 274 | 275 | 276 | def resize(self, width, height): 277 | self.width = width 278 | self.height = height 279 | 280 | self.window_too_small = 0 281 | if (len(self.help_text) + 1 > width) or (height < 2): 282 | self.window_too_small = 1 283 | 284 | self.txt_x = (width - len(self.help_text)) / 2 285 | self.txt_y = height - 1 286 | 287 | 288 | def start(self): 289 | self.start_time = time.time() 290 | 291 | 292 | def draw(self): 293 | if self.window_too_small: 294 | return 295 | t = time.time() - self.start_time 296 | if t < 0.15: 297 | a = 0 298 | elif t < 0.25: 299 | a = 1 300 | elif t < 4.0: 301 | a = 0 302 | else: 303 | a = 111 304 | self.scr.addtext(self.txt_x, self.txt_y, a, self.help_text) 305 | 306 | 307 | 308 | class BincWatch: 309 | 310 | def __init__(self, scr): 311 | 312 | self.scr = scr 313 | 314 | self.exc_window_is_too_small = "window is too small" 315 | 316 | self.window_too_small = 0 317 | 318 | self.toggle_digital = 0 319 | self.toggle_help = 0 320 | self.toggle_hundreds = 1 321 | self.toggle_titles = 1 322 | 323 | self.title_hrs = BincTitle(scr, 0, 0, "hrs") 324 | self.title_min = BincTitle(scr, 0, 0, "min") 325 | self.title_sec = BincTitle(scr, 0, 0, "sec") 326 | self.title_hds = BincTitle(scr, 0, 0, "hds") 327 | 328 | self.bincols = [ 329 | BincColumn(scr, 0, 0), 330 | BincColumn(scr, 0, 0), 331 | BincColumn(scr, 0, 0), 332 | BincColumn(scr, 0, 0), 333 | BincColumn(scr, 0, 0), 334 | BincColumn(scr, 0, 0), 335 | BincColumn(scr, 0, 0, 2), 336 | BincColumn(scr, 0, 0, 2) 337 | ] 338 | 339 | self.bindigi = BincDigital(scr, 0, 0, 0, 0, 0, 0, 0, 0) 340 | 341 | self.binhelpadv = BincHelpAdv(scr, 0, 0) 342 | 343 | 344 | def setup_time(self, t): 345 | cas2 = time.localtime(t) 346 | year, month, day, hour, minute, second, weekday = cas2[:7] 347 | hds = int(math.fmod(math.floor(t * 100), 100)) 348 | 349 | self.bincols[0].setup(hour / 10) 350 | self.bincols[1].setup(hour % 10) 351 | self.bincols[2].setup(minute / 10) 352 | self.bincols[3].setup(minute % 10) 353 | self.bincols[4].setup(second / 10) 354 | self.bincols[5].setup(second % 10) 355 | self.bincols[6].setup(hds / 10) 356 | self.bincols[7].setup(hds % 10) 357 | 358 | self.bindigi.setup(hour, minute, second, hds) 359 | 360 | if self.toggle_help: 361 | if time.time() - self.binhelpadv.start_time > 5: 362 | self.toggle_help = 0 363 | 364 | 365 | def recalc_coords(self, width, height): 366 | 367 | inner_width = 13 368 | 369 | if self.toggle_hundreds: 370 | inner_width = inner_width + 5 371 | 372 | inner_height = 4 373 | 374 | if self.toggle_titles: 375 | inner_height = inner_height + 2 376 | if self.toggle_digital: 377 | inner_height = inner_height + 2 378 | 379 | self.window_too_small = 0 380 | 381 | if inner_width > width or inner_height > height: 382 | self.window_too_small = 1 383 | raise self.exc_window_is_too_small 384 | 385 | # if self.toggle_help: 386 | # if (len(self.help_text) + 1 > width) or (inner_height + 2 > height): 387 | # self.window_too_small = 1 388 | # raise "window is too small" 389 | 390 | off_x = (width - inner_width) / 2 391 | off_y = (height - inner_height) / 2 392 | 393 | pos_hrs_x = off_x 394 | pos_homi_x = off_x + 3 395 | pos_min_x = off_x + 5 396 | pos_mise_x = off_x + 8 397 | pos_sec_x = off_x + 10 398 | pos_seho_x = off_x + 13 399 | pos_hds_x = off_x + 15 400 | 401 | pos_hrs_y = pos_min_y = pos_sec_y = pos_hds_y = off_y 402 | 403 | if self.toggle_titles: 404 | pos_hrs_y = pos_min_y = pos_sec_y = pos_hds_y = off_y + 2 405 | pos_tit_y = off_y 406 | 407 | self.title_hrs.move(pos_hrs_x, pos_tit_y) 408 | self.title_min.move(pos_min_x, pos_tit_y) 409 | self.title_sec.move(pos_sec_x, pos_tit_y) 410 | self.title_hds.move(pos_hds_x, pos_tit_y) 411 | 412 | if self.toggle_digital: 413 | pos_dig_y = pos_hrs_y + 5 414 | 415 | self.bindigi.move(pos_hrs_x, pos_dig_y, 416 | pos_min_x, pos_dig_y, pos_sec_x, pos_dig_y, 417 | pos_hds_x, pos_dig_y) 418 | 419 | # pos_help_x = (width - len(self.help_text)) / 2 420 | # pos_help_y = height - 1 421 | 422 | self.binhelpadv.resize(width, height) 423 | 424 | self.bincols[0].move(pos_hrs_x, pos_hrs_y) 425 | self.bincols[1].move(pos_hrs_x + 1, pos_hrs_y) 426 | self.bincols[2].move(pos_min_x, pos_min_y) 427 | self.bincols[3].move(pos_min_x + 1, pos_min_y) 428 | self.bincols[4].move(pos_sec_x, pos_sec_y) 429 | self.bincols[5].move(pos_sec_x + 1, pos_sec_y) 430 | self.bincols[6].move(pos_hds_x, pos_sec_y) 431 | self.bincols[7].move(pos_hds_x + 1, pos_sec_y) 432 | 433 | 434 | 435 | def recalc_coords2(self, width, height): 436 | self.window_too_small = 0 437 | try: 438 | self.recalc_coords(width, height) 439 | except self.exc_window_is_too_small: 440 | self.window_too_small = 1 441 | 442 | 443 | def start_help_adv(self): 444 | self.toggle_help = 1 445 | self.binhelpadv.start() 446 | 447 | 448 | def draw(self): 449 | 450 | self.scr.erase() 451 | if self.window_too_small: 452 | self.scr.refresh() 453 | return 454 | 455 | if self.toggle_hundreds: 456 | self.bcols = self.bincols[:] 457 | else: 458 | self.bcols = self.bincols[:6] 459 | 460 | for a in self.bcols: 461 | a.draw() 462 | 463 | if self.toggle_titles: 464 | self.title_hrs.draw() 465 | self.title_min.draw() 466 | self.title_sec.draw() 467 | if self.toggle_hundreds: 468 | self.title_hds.draw() 469 | 470 | if self.toggle_digital: 471 | self.bindigi.draw(thds = self.toggle_hundreds) 472 | 473 | if self.toggle_help: 474 | self.binhelpadv.draw() 475 | 476 | self.scr.refresh() 477 | 478 | 479 | 480 | 481 | def draw_help_screen(scr): 482 | try: 483 | scr.erase() 484 | scr.addtext(2, 2, 131, "d") 485 | scr.addtext(4, 2, 130, "- toggles ordinary digital display on/off") 486 | scr.addtext(2, 3, 131, "h") 487 | scr.addtext(4, 3, 130, "- toggles hundreds display on/off") 488 | scr.addtext(2, 4, 131, "p") 489 | scr.addtext(4, 4, 130, "- pause/unpause") 490 | scr.addtext(2, 5, 131, "q") 491 | scr.addtext(4, 5, 130, "- quit") 492 | scr.addtext(2, 6, 131, "t") 493 | scr.addtext(4, 6, 130, "- toggles titles display on/off") 494 | 495 | except _curses.error: 496 | pass 497 | 498 | 499 | def resize_handler(scr, thewatch): 500 | global my_width 501 | global my_height 502 | my_width, my_height = scr.fetch_screensize() 503 | thewatch.recalc_coords2(my_width, my_height) 504 | 505 | 506 | def main(): 507 | global pause 508 | global window_is_too_small 509 | global show_help_screen 510 | global my_height 511 | global my_width 512 | 513 | thescr = BincScreen() 514 | thescr.initialize() 515 | 516 | thewatch = BincWatch(thescr) 517 | 518 | thewatch.start_help_adv() 519 | 520 | my_width, my_height = thescr.fetch_screensize() 521 | try: 522 | thewatch.recalc_coords(my_width, my_height) 523 | except "window is too small": 524 | thescr.done() 525 | print "Screen too small." 526 | sys.exit(1) 527 | 528 | cas = time.time() 529 | 530 | while 1: 531 | try: 532 | c = thescr.getch() 533 | except KeyboardInterrupt: 534 | break 535 | if c in [-1, curses.KEY_RESIZE]: 536 | if c == -1: 537 | pass 538 | elif c == curses.KEY_RESIZE: 539 | resize_handler(thescr, thewatch) 540 | else: 541 | if show_help_screen: 542 | show_help_screen = 0 543 | elif c == ord('d'): 544 | thewatch.toggle_digital = not thewatch.toggle_digital 545 | thewatch.recalc_coords2(my_width, my_height) 546 | elif c == ord('h'): 547 | thewatch.toggle_hundreds = not thewatch.toggle_hundreds 548 | thewatch.recalc_coords2(my_width, my_height) 549 | elif c == ord('q'): break 550 | elif c == ord('p'): 551 | pause = not pause 552 | elif c == ord('t'): 553 | thewatch.toggle_titles = not thewatch.toggle_titles 554 | thewatch.recalc_coords2(my_width, my_height) 555 | elif c == ord('?'): 556 | show_help_screen = 1 557 | else: 558 | thewatch.start_help_adv() 559 | if not pause: 560 | cas = time.time() 561 | 562 | if show_help_screen: 563 | draw_help_screen(thescr) 564 | thescr.refresh() 565 | continue 566 | 567 | thewatch.setup_time(cas) 568 | thewatch.draw() 569 | 570 | thescr.done() 571 | 572 | 573 | main() 574 | 575 | 576 | -------------------------------------------------------------------------------- /scripts/dark_menu.applescript: -------------------------------------------------------------------------------- 1 | tell application "System Events" 2 | tell appearance preferences 3 | set dark mode to true 4 | end tell 5 | end tell 6 | -------------------------------------------------------------------------------- /scripts/day-mode: -------------------------------------------------------------------------------- 1 | rm -f ~/Pictures/fade/* 2 | #cp ~/Pictures/island/island_day.jpg ~/Pictures/fade/ 3 | cp ~/Pictures/firewatch/firewatch_day.png ~/Pictures/fade/ 4 | #cp ~/Pictures/aqua/aqua_day.jpg ~/Pictures/fade/ 5 | 6 | cp ~/.day-hyper.js ~/.hyper.js 7 | osascript ~/Scripts/wallchange.applescript 8 | osascript ~/Scripts/light_menu.applescript 9 | -------------------------------------------------------------------------------- /scripts/disable-mouseaccel: -------------------------------------------------------------------------------- 1 | defaults write .GlobalPreferences com.apple.mouse.scaling -1 2 | -------------------------------------------------------------------------------- /scripts/flash.sh: -------------------------------------------------------------------------------- 1 | id=$(chunkc tiling::query --window id) 2 | sleep 0.01 3 | CHUNKC_SOCKET=5050 chunkc window_alpha $id 0.5 4 | sleep 0.01 5 | CHUNKC_SOCKET=5050 chunkc window_alpha_fade $id 1.0 0.25 6 | -------------------------------------------------------------------------------- /scripts/key-repeat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # default value is 2 (30ms ?), each tick = 15ms 4 | defaults write NSGlobalDomain KeyRepeat -int 1 5 | 6 | # default value is 15 (225ms), each tick = 15ms 7 | defaults write NSGlobalDomain InitialKeyRepeat -int 10 8 | -------------------------------------------------------------------------------- /scripts/light_menu.applescript: -------------------------------------------------------------------------------- 1 | tell application "System Events" 2 | tell appearance preferences 3 | set dark mode to false 4 | end tell 5 | end tell 6 | -------------------------------------------------------------------------------- /scripts/night-mode: -------------------------------------------------------------------------------- 1 | rm -f ~/Pictures/fade/* 2 | #cp ~/Pictures/island/island_night.jpg ~/Pictures/fade/ 3 | cp ~/Pictures/firewatch/firewatch_night.png ~/Pictures/fade/ 4 | #cp ~/Pictures/aqua/aqua_night.jpg ~/Pictures/fade/ 5 | 6 | cp ~/.night-hyper.js ~/.hyper.js 7 | osascript ~/Scripts/wallchange.applescript 8 | osascript ~/Scripts/dark_menu.applescript 9 | -------------------------------------------------------------------------------- /scripts/qtb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # initial idea: Florian Bruhin (The-Compiler) 3 | # author: Thore Bödecker (foxxx0) 4 | 5 | _proto_version=1 6 | _ipc_socket=$(ls $(echo $TMPDIR)qutebrowser/ipc-* 2>/dev/null) 7 | 8 | printf '{"args": [":open -w"], "target_arg": null, "protocol_version": %d, "cwd": "%s"}\n' \ 9 | "${_proto_version}" \ 10 | "${PWD}" | socat - UNIX-CONNECT:"${_ipc_socket}" 2>/dev/null || open -a qutebrowser.app 2>/dev/null 11 | -------------------------------------------------------------------------------- /scripts/stfu: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | $@ &> /dev/null 3 | -------------------------------------------------------------------------------- /scripts/wallchange.applescript: -------------------------------------------------------------------------------- 1 | tell application "System Events" 2 | tell current desktop 3 | set initInterval to get change interval 4 | set change interval to -1 5 | set change interval to initInterval 6 | end tell 7 | end tell 8 | -------------------------------------------------------------------------------- /skhd/skhdrc: -------------------------------------------------------------------------------- 1 | # open terminal 2 | cmd - return : /Applications/Kitty.app/Contents/MacOS/kitty --single-instance -d ~ &> /dev/null 3 | 4 | # open mpv with url from clipboard 5 | shift + cmd - m : mpv $(pbpaste) 6 | 7 | # focus window 8 | alt - x : yabai -m window --focus recent 9 | alt - h : yabai -m window --focus west 10 | alt - j : yabai -m window --focus south 11 | alt - k : yabai -m window --focus north 12 | alt - l : yabai -m window --focus east 13 | alt - z : yabai -m window --focus stack.prev 14 | alt - c : yabai -m window --focus stack.next 15 | 16 | # swap window 17 | shift + alt - x : yabai -m window --swap recent 18 | shift + alt - h : yabai -m window --swap west 19 | shift + alt - j : yabai -m window --swap south 20 | shift + alt - k : yabai -m window --swap north 21 | shift + alt - l : yabai -m window --swap east 22 | 23 | # move window 24 | shift + cmd - h : yabai -m window --warp west 25 | shift + cmd - j : yabai -m window --warp south 26 | shift + cmd - k : yabai -m window --warp north 27 | shift + cmd - l : yabai -m window --warp east 28 | 29 | # balance size of windows 30 | shift + alt - 0 : yabai -m space --balance 31 | 32 | # make floating window fill screen 33 | shift + alt - up : yabai -m window --grid 1:1:0:0:1:1 34 | 35 | # make floating window fill left-half of screen 36 | shift + alt - left : yabai -m window --grid 1:2:0:0:1:1 37 | 38 | # make floating window fill right-half of screen 39 | shift + alt - right : yabai -m window --grid 1:2:1:0:1:1 40 | 41 | # create desktop, move window and follow focus - uses jq for parsing json (brew install jq) 42 | # shift + cmd - n : yabai -m space --create && \ 43 | # index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \ 44 | # yabai -m window --space "${index}" && \ 45 | # yabai -m space --focus "${index}" 46 | 47 | # create desktop and follow focus - uses jq for parsing json (brew install jq) 48 | # cmd + alt - n : yabai -m space --create && \ 49 | # index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \ 50 | # yabai -m space --focus "${index}" 51 | 52 | # destroy desktop 53 | # cmd + alt - w : yabai -m space --destroy 54 | cmd + alt - w : yabai -m space --focus prev && yabai -m space recent --destroy 55 | 56 | # fast focus desktop 57 | cmd + alt - x : yabai -m space --focus recent 58 | cmd + alt - z : yabai -m space --focus prev || skhd -k "ctrl + alt + cmd - z" 59 | cmd + alt - c : yabai -m space --focus next || skhd -k "ctrl + alt + cmd - c" 60 | cmd + alt - 1 : yabai -m space --focus 1 || skhd -k "ctrl + alt + cmd - 1" 61 | cmd + alt - 2 : yabai -m space --focus 2 || skhd -k "ctrl + alt + cmd - 2" 62 | cmd + alt - 3 : yabai -m space --focus 3 || skhd -k "ctrl + alt + cmd - 3" 63 | cmd + alt - 4 : yabai -m space --focus 4 || skhd -k "ctrl + alt + cmd - 4" 64 | cmd + alt - 5 : yabai -m space --focus 5 || skhd -k "ctrl + alt + cmd - 5" 65 | cmd + alt - 6 : yabai -m space --focus 6 || skhd -k "ctrl + alt + cmd - 6" 66 | cmd + alt - 7 : yabai -m space --focus 7 || skhd -k "ctrl + alt + cmd - 7" 67 | cmd + alt - 8 : yabai -m space --focus 8 || skhd -k "ctrl + alt + cmd - 8" 68 | cmd + alt - 9 : yabai -m space --focus 9 || skhd -k "ctrl + alt + cmd - 9" 69 | cmd + alt - 0 : yabai -m space --focus 10 || skhd -k "ctrl + alt + cmd - 0" 70 | 71 | # send window to desktop and follow focus 72 | shift + cmd - x : yabai -m window --space recent && yabai -m space --focus recent 73 | shift + cmd - z : yabai -m window --space prev && yabai -m space --focus prev 74 | shift + cmd - c : yabai -m window --space next && yabai -m space --focus next 75 | shift + cmd - 1 : yabai -m window --space 1 && yabai -m space --focus 1 76 | shift + cmd - 2 : yabai -m window --space 2 && yabai -m space --focus 2 77 | shift + cmd - 3 : yabai -m window --space 3 && yabai -m space --focus 3 78 | shift + cmd - 4 : yabai -m window --space 4 && yabai -m space --focus 4 79 | shift + cmd - 5 : yabai -m window --space 5 && yabai -m space --focus 5 80 | shift + cmd - 6 : yabai -m window --space 6 && yabai -m space --focus 6 81 | shift + cmd - 7 : yabai -m window --space 7 && yabai -m space --focus 7 82 | shift + cmd - 8 : yabai -m window --space 8 && yabai -m space --focus 8 83 | shift + cmd - 9 : yabai -m window --space 9 && yabai -m space --focus 9 84 | shift + cmd - 0 : yabai -m window --space 10 && yabai -m space --focus 10 85 | 86 | # focus monitor 87 | ctrl + alt - x : yabai -m display --focus recent 88 | ctrl + alt - z : yabai -m display --focus prev 89 | ctrl + alt - c : yabai -m display --focus next 90 | ctrl + alt - 1 : yabai -m display --focus 1 91 | ctrl + alt - 2 : yabai -m display --focus 2 92 | ctrl + alt - 3 : yabai -m display --focus 3 93 | 94 | # send window to monitor and follow focus 95 | ctrl + cmd - x : yabai -m window --display recent && yabai -m display --focus recent 96 | ctrl + cmd - z : yabai -m window --display prev && yabai -m display --focus prev 97 | ctrl + cmd - c : yabai -m window --display next && yabai -m display --focus next 98 | ctrl + cmd - 1 : yabai -m window --display 1 && yabai -m display --focus 1 99 | ctrl + cmd - 2 : yabai -m window --display 2 && yabai -m display --focus 2 100 | ctrl + cmd - 3 : yabai -m window --display 3 && yabai -m display --focus 3 101 | 102 | # move window 103 | shift + ctrl - a : yabai -m window --move rel:-20:0 104 | shift + ctrl - s : yabai -m window --move rel:0:20 105 | shift + ctrl - w : yabai -m window --move rel:0:-20 106 | shift + ctrl - d : yabai -m window --move rel:20:0 107 | 108 | # increase window size 109 | shift + alt - a : yabai -m window --resize left:-20:0 110 | shift + alt - s : yabai -m window --resize bottom:0:20 111 | shift + alt - w : yabai -m window --resize top:0:-20 112 | shift + alt - d : yabai -m window --resize right:20:0 113 | 114 | # decrease window size 115 | shift + cmd - a : yabai -m window --resize left:20:0 116 | shift + cmd - s : yabai -m window --resize bottom:0:-20 117 | shift + cmd - w : yabai -m window --resize top:0:20 118 | shift + cmd - d : yabai -m window --resize right:-20:0 119 | 120 | # set insertion point in focused container 121 | ctrl + alt - h : yabai -m window --insert west 122 | ctrl + alt - j : yabai -m window --insert south 123 | ctrl + alt - k : yabai -m window --insert north 124 | ctrl + alt - l : yabai -m window --insert east 125 | ctrl + alt - i : yabai -m window --insert stack 126 | 127 | # rotate tree 128 | alt - r : yabai -m space --rotate 90 129 | 130 | # mirror tree y-axis 131 | alt - y : yabai -m space --mirror y-axis 132 | 133 | # mirror tree x-axis 134 | alt - x : yabai -m space --mirror x-axis 135 | 136 | # toggle desktop offset 137 | alt - a : yabai -m space --toggle padding --toggle gap 138 | 139 | # toggle window parent zoom 140 | alt - d : yabai -m window --toggle zoom-parent 141 | 142 | # toggle window fullscreen zoom 143 | alt - f : yabai -m window --toggle zoom-fullscreen 144 | 145 | # toggle window native fullscreen 146 | shift + alt - f : yabai -m window --toggle native-fullscreen 147 | 148 | # toggle window split type 149 | alt - e : yabai -m window --toggle split 150 | 151 | # float / unfloat window and restore position 152 | # alt - t : yabai -m window --toggle float && /tmp/yabai-restore/$(yabai -m query --windows --window | jq -re '.id').restore 2>/dev/null || true 153 | alt - t : yabai -m window --toggle float --grid 4:4:1:1:2:2 154 | 155 | # toggle sticky (show on all spaces) 156 | alt - s : yabai -m window --toggle sticky 157 | 158 | # toggle topmost (keep above other windows) 159 | alt - o : yabai -m window --toggle topmost 160 | 161 | # toggle picture-in-picture 162 | alt - p : yabai -m window --toggle border --toggle pip 163 | 164 | # change layout of desktop 165 | ctrl + alt - a : yabai -m space --layout bsp 166 | ctrl + alt - d : yabai -m space --layout float 167 | ctrl + alt - s : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "float" else "bsp" end') 168 | -------------------------------------------------------------------------------- /tmux/tmux.conf: -------------------------------------------------------------------------------- 1 | set-option -g default-shell /bin/zsh 2 | set-option -g default-terminal "screen-256color" 3 | 4 | # set-option -g default-shell /opt/local/bin/zsh 5 | # set-option -g default-terminal "screen-256color" 6 | 7 | set-option -g status-position bottom 8 | set -g status-justify centre 9 | set -g status-interval 2 10 | # set -g status-right '%H:%M' 11 | set -g status-right '' 12 | set -g status-left '' 13 | set -g status-fg white 14 | set -g status-style default 15 | 16 | set -g renumber-windows on 17 | set -g automatic-rename on 18 | set-option -g -q mouse on 19 | 20 | # set -g default-command "reattach-to-user-namespace -l zsh" 21 | 22 | setw -g mode-keys vi 23 | 24 | unbind v 25 | bind v copy-mode 26 | 27 | # Setup 'v' to begin selection as in Vim 28 | bind-key -T copy-mode-vi 'v' send -X begin-selection 29 | bind-key -T copy-mode-vi 'y' send -X copy-pipe "pbcopy" 30 | # bind-key -T copy-mode-vi 'y' send -X copy-pipe "reattach-to-user-namespace pbcopy" 31 | 32 | # Update default binding of `Enter` to also use copy-pipe 33 | unbind -T copy-mode-vi Enter 34 | bind-key -T copy-mode-vi 'Enter' send -X copy-pipe "pbcopy" 35 | # bind-key -T copy-mode-vi 'Enter' send -X copy-pipe "reattach-to-user-namespace pbcopy" 36 | 37 | set -g base-index 1 38 | setw -g aggressive-resize on 39 | set -sg escape-time 0 40 | 41 | bind r source-file ~/.tmux.conf 42 | 43 | bind h select-pane -L 44 | bind j select-pane -D 45 | bind k select-pane -U 46 | bind l select-pane -R 47 | 48 | bind -r H resize-pane -L 5 49 | bind -r J resize-pane -D 5 50 | bind -r K resize-pane -U 5 51 | bind -r L resize-pane -R 5 52 | 53 | bind | split-window -h 54 | bind - split-window -v 55 | unbind '"' 56 | unbind % 57 | 58 | bind x kill-pane 59 | bind t set status 60 | 61 | bind-key -n S-left prev 62 | bind-key -n S-right next 63 | bind-key -n C-left swap-window -t -1 64 | bind-key -n C-right swap-window -t +1 65 | 66 | setw -g window-status-format "#[bg=default,fg=colour8,reverse]▓▒░ #W ░▒▓" 67 | setw -g window-status-current-format "#[bg=default,fg=colour10,reverse]▓▒░ #W ░▒▓" 68 | -------------------------------------------------------------------------------- /vifm/vifmrc: -------------------------------------------------------------------------------- 1 | " vim: filetype=vifm : 2 | " Sample configuration file for vifm on OSX (last updated: 27 Mar, 2015) 3 | " You can edit this file by hand. 4 | " The " character at the beginning of a line comments out the line. 5 | " Blank lines are ignored. 6 | " The basic format for each item is shown with an example. 7 | 8 | " ------------------------------------------------------------------------------ 9 | 10 | " This is the actual command used to start vi. The default is vim. 11 | " If you would like to use another vi clone such as Elvis or Vile 12 | " you will need to change this setting. 13 | 14 | set vicmd=vim 15 | " set vicmd=elvis\ -G\ termcap 16 | " set vicmd=vile 17 | 18 | " Trash Directory 19 | " The default is to move files that are deleted with dd or :d to 20 | " the trash directory. If you change this you will not be able to move 21 | " files by deleting them and then using p to put the file in the new location. 22 | " I recommend not changing this until you are familiar with vifm. 23 | " This probably shouldn't be an option. 24 | 25 | set trash 26 | 27 | " This is how many directories to store in the directory history. 28 | 29 | set history=100 30 | 31 | " Automatically resolve symbolic links on l or Enter. 32 | 33 | set nofollowlinks 34 | 35 | " With this option turned on you can run partially entered commands with 36 | " unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te). 37 | 38 | set fastrun 39 | 40 | " Natural sort of (version) numbers within text. 41 | 42 | set sortnumbers 43 | 44 | " Maximum number of changes that can be undone. 45 | 46 | set undolevels=100 47 | 48 | " If you installed the vim.txt help file set vimhelp. 49 | " If would rather use a plain text help file set novimhelp. 50 | 51 | set novimhelp 52 | 53 | " If you would like to run an executable file when you 54 | " press return on the file name set this. 55 | 56 | set norunexec 57 | 58 | " Use KiB, MiB, ... instead of KB, MB, ... 59 | 60 | set noiec 61 | 62 | " Selected color scheme 63 | 64 | colorscheme Default 65 | 66 | " The FUSE_HOME directory will be used as a root dir for all FUSE mounts. 67 | " Unless it exists with write/exec permissions set, vifm will attempt to 68 | " create it. 69 | 70 | " set fusehome=/tmp/vifm_FUSE 71 | 72 | " Format for displaying time in file list. For example: 73 | " TIME_STAMP_FORMAT=%m/%d-%H:%M 74 | " See man date or man strftime for details. 75 | 76 | set timefmt=%m/%d\ %H:%M 77 | 78 | " Show list of matches on tab completion in command-line mode 79 | 80 | set wildmenu 81 | 82 | " Ignore case in search patterns unless it contains at least one uppercase 83 | " letter 84 | 85 | set ignorecase 86 | set smartcase 87 | 88 | " Don't highlight search results automatically 89 | 90 | set nohlsearch 91 | 92 | " Use increment searching (search while typing) 93 | set incsearch 94 | 95 | " Try to leave some space from cursor to upper/lower border in lists 96 | 97 | set scrolloff=4 98 | 99 | " Don't do too many requests to slow file systems 100 | 101 | set slowfs=curlftpfs 102 | 103 | " Set custom status line look 104 | 105 | set statusline=" %t%= %A %10u:%-7g %15s %20d " 106 | 107 | " ------------------------------------------------------------------------------ 108 | 109 | " :mark mark /full/directory/path [filename] 110 | 111 | mark b ~/bin/ 112 | mark h ~/ 113 | 114 | " ------------------------------------------------------------------------------ 115 | 116 | " :com[mand][!] command_name action 117 | " The following macros can be used in a command 118 | " %a is replaced with the user arguments. 119 | " %c the current file under the cursor. 120 | " %C the current file under the cursor in the other directory. 121 | " %f the current selected file, or files. 122 | " %F the current selected file, or files in the other directory. 123 | " %b same as %f %F. 124 | " %d the current directory name. 125 | " %D the other window directory name. 126 | " %m run the command in a menu window 127 | 128 | command! df df -h %m 2> /dev/null 129 | command! diff vim -d %f %F 130 | command! zip zip -r %f.zip %f 131 | command! run !! ./%f 132 | command! make !!make %a 133 | command! mkcd :mkdir %a | cd %a 134 | command! reload :write | restart 135 | 136 | " ------------------------------------------------------------------------------ 137 | 138 | " The file type is for the default programs to be used with 139 | " a file extension. 140 | " :filetype pattern1,pattern2 defaultprogram,program2 141 | " :fileviewer pattern1,pattern2 consoleviewer 142 | " The other programs for the file type can be accessed with the :file command 143 | " The command macros %f, %F, %d, %F may be used in the commands. 144 | " Spaces in an app name will have to be escaped e.g. QuickTime\ Player.app 145 | " The %a macro is ignored. To use a % you must put %%. 146 | 147 | " For automated FUSE mounts, you must register an extension with :file[x]type 148 | " in one of following formats: 149 | " 150 | " :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables 151 | " %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime. 152 | " A sample line might look like this: 153 | " :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR 154 | " 155 | " :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables 156 | " %PARAM and %DESTINATION_DIR are filled in by vifm at runtime. 157 | " A sample line might look like this: 158 | " :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR 159 | " %PARAM value is filled from the first line of file (whole line). 160 | " Example first line for SshMount filetype: root@127.0.0.1:/ 161 | " 162 | " You can also add %CLEAR if you want to clear screen before running FUSE 163 | " program. 164 | 165 | " Pdf 166 | filextype *.pdf 167 | \ {Open in Preview} 168 | \ open -a Preview.app, 169 | \ {Open in Skim} 170 | \ open -a Skim.app, 171 | fileviewer *.pdf pdftotext -nopgbrk %c - 172 | 173 | " PostScript 174 | filextype *.ps,*.eps open -a Preview.app 175 | 176 | " Djvu 177 | filextype *.djvu open -a MacDjView.app 178 | 179 | " Audio 180 | filextype *.wav,*.mp3,*.flac,*.ogg,*.m4a,*.wma,*.ape,*.ac3 181 | \ {Play using MPlayerX} 182 | \ open -a MPlayerX.app, 183 | \ {Open in iTunes} 184 | \ open -a iTunes.app, 185 | \ {Open in QuickTime Player} 186 | \ open -a QuickTime\ Player.app, 187 | fileviewer *.mp3 mp3info 188 | fileviewer *.flac soxi 189 | 190 | " Video 191 | filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.vob,*.flv,*.m2v,*.mov,*.webm,*.ts,*.m4v 192 | \ {Open in MPV} 193 | \ open -a mpv.app, 194 | \ {Open in VLC} 195 | \ open -a VLC.app, 196 | \ {Open in QuickTime Player} 197 | \ open -a QuickTime\ Player.app, 198 | \ {Open in MPlayerX} 199 | \ open -a MPlayerX.app, 200 | fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.vob,*.flv,*.m2v,*.mov,*.webm,*.ts,*.m4v 201 | \ ffprobe -pretty %c 2>&1 202 | 203 | " Web 204 | filextype *.html,*.htm 205 | \ {Open in Chrome} 206 | \ open -a Google\ Chrome.app, 207 | \ {Open in Safari} 208 | \ open -a Safari.app, 209 | \ {Open in Firefox} 210 | \ open -a Firefox.app, 211 | \ {Open in vim} 212 | \ vim, 213 | fileviewer *.html,*.htm w3m -dump -T text/html 214 | 215 | " Object 216 | filetype *.o nm %f | less 217 | 218 | " Man page 219 | filetype *.[1-8] man ./%c 220 | fileviewer *.[1-8] man ./%c | col -b 221 | 222 | " Image 223 | filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm, 224 | \ open -a Preview.app, 225 | fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm convert -identify %f -verbose /dev/null 226 | 227 | " MD5 228 | filetype *.md5 229 | \ {Check MD5 hash sum} 230 | \ md5 %f, 231 | 232 | " GPG signature 233 | filetype *.asc 234 | \ {Check signature} 235 | \ !!gpg --verify %c, 236 | 237 | " Torrent 238 | filextype *.torrent open -a Transmission.app 239 | fileviewer *.torrent dumptorrent -v %c 240 | 241 | " Extract zip files 242 | filetype *.zip unzip %f 243 | fileviewer *.zip,*.jar,*.war,*.ear zip -sf %c 244 | 245 | " Extract tar archives 246 | filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz tar -xf %f 247 | fileviewer *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz tar -tf %f 248 | 249 | " Extract .bz2 archives 250 | filetype *.bz2 bzip2 -d %f 251 | 252 | " Extract .gz files 253 | filetype *.gz gunzip %f 254 | 255 | " Mount .dmg archives 256 | filetype *.dmg open 257 | 258 | " Mount disk .img 259 | filetype *.img open 260 | 261 | " Open .pkg binaries 262 | filetype *.pkg open 263 | 264 | " Office files 265 | filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx,*.ppt open -a LibreOffice.app 266 | fileviewer *.doc antiword - 267 | fileviewer *.docx, docx2txt.pl %f - 268 | 269 | " Syntax highlighting in preview 270 | " 271 | " Explicitly set highlight type for some extensions 272 | " 273 | " 256-color terminal 274 | " fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c 275 | " fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c 276 | " 277 | " 16-color terminal 278 | " fileviewer *.c,*.h highlight -O ansi -s dante %c 279 | " 280 | " Or leave it for automatic detection 281 | " 282 | " fileviewer * pygmentize -O style=monokai -f console256 -g 283 | 284 | " Displaying pictures in terminal 285 | " 286 | " fileviewer *.jpg,*.png shellpic %c 287 | 288 | " Open all other files with default system programs (you can also remove all 289 | " :file[x]type commands above to ensure they don't interfere with system-wide 290 | " settings). By default all unknown files are opened with 'vi[x]cmd' 291 | " uncommenting one of lines below will result in ignoring 'vi[x]cmd' option 292 | " for unknown file types. 293 | " For OS X: 294 | " filetype * open 295 | 296 | " ------------------------------------------------------------------------------ 297 | 298 | " What should be saved automatically between vifm runs 299 | " Like in previous versions of vifm 300 | " set vifminfo=options,filetypes,commands,bookmarks,dhistory,state,cs 301 | " Like in vi 302 | set vifminfo=dhistory,savedirs,chistory,state,tui,shistory, 303 | \phistory,fhistory,dirstack,registers,bookmarks 304 | 305 | " ------------------------------------------------------------------------------ 306 | 307 | " Examples of configuring both panels 308 | 309 | " Customize view columns a bit (enable ellipsis for truncated file names) 310 | " 311 | " windo set viewcolumns=-{name}..,6{}. 312 | 313 | " Filter-out build and temporary files 314 | " 315 | " windo filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/ 316 | 317 | " ------------------------------------------------------------------------------ 318 | 319 | " Sample mappings 320 | 321 | " Start shell in current directory 322 | nnoremap s :shell 323 | 324 | " Display sorting dialog 325 | nnoremap S :sort 326 | 327 | " Toggle visibility of preview window 328 | nnoremap w :view 329 | vnoremap w :viewgv 330 | 331 | " Open file in new MacVim tab 332 | nnoremap o :!mvim --remote-tab-silent %f 333 | " Open file in new MacVim window 334 | nnoremap O :!mvim %f 335 | 336 | " Open file in the background using its default program 337 | nnoremap gb :!open -g %f 338 | 339 | " Yank current directory path into the clipboard 340 | nnoremap yd :!printf %d | pbcopy 341 | 342 | " Yank current file path into the clipboard 343 | nnoremap yf :!printf %c:p | pbcopy 344 | 345 | " View preview in Quick Look 346 | nnoremap q :!qlmanage -p %f > /dev/null 2>&1 347 | 348 | " Mappings for faster renaming 349 | nnoremap I cw 350 | nnoremap cc cw 351 | nnoremap A cw 352 | 353 | " Open vim to edit vifmrc and apply settings after returning to vifm 354 | nnoremap ,c :write | execute ':!vim $MYVIFMRC' | restart 355 | " Open MacVim to edit vifmrc 356 | nnoremap ,C :!mvim --remote-tab-silent $MYVIFMRC & 357 | 358 | " Toggle wrap setting on ,w key 359 | nnoremap ,w :set wrap! 360 | 361 | " Example of standard two-panel file managers mappings 362 | nnoremap :!less %f 363 | nnoremap :edit 364 | nnoremap :copy 365 | nnoremap :move 366 | nnoremap :mkdir 367 | nnoremap :delete 368 | 369 | " ------------------------------------------------------------------------------ 370 | 371 | " Various customization examples 372 | 373 | " Use ag (the silver searcher) instead of grep 374 | " 375 | " set grepprg=ag\ --line-numbers\ %i\ %a\ %s 376 | 377 | " Add additional place to look for executables 378 | " 379 | " let $PATH=$HOME.'/bin/fuse:'.$PATH 380 | 381 | " Block particular shortcut 382 | " 383 | " nnoremap 384 | -------------------------------------------------------------------------------- /yabai/yabairc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # necessary to load scripting-addition during startup on macOS Big Sur 4 | # *yabai --load-sa* is configured to run through sudo without a password 5 | sudo yabai --load-sa 6 | yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" 7 | 8 | # mission-control desktop labels 9 | yabai -m space 1 --label code 10 | yabai -m space 2 --label mail 11 | yabai -m space 3 --label web 12 | yabai -m space 4 --label notes 13 | yabai -m space 5 --label re 14 | yabai -m space 6 --label media 15 | yabai -m space 7 --label social 16 | yabai -m space 8 --label games 17 | 18 | # window rules 19 | yabai -m rule --add app="^Mail$" space=mail 20 | yabai -m rule --add app="^Safari$" space=web 21 | yabai -m rule --add app="^Notes$" space=notes 22 | yabai -m rule --add app="^ida64$" space=re 23 | yabai -m rule --add app="^Transmission$" space=media 24 | yabai -m rule --add app="^Spotify$" space=media 25 | yabai -m rule --add app="^Discord$" space=social grid=1:1:0:0:1:1 manage=off 26 | yabai -m rule --add app="^Steam$" space=games manage=off 27 | yabai -m rule --add app="^(Calculator|System Preferences|Archive Utility)$" manage=off 28 | yabai -m rule --add app="^mpv$" manage=off border=off sticky=on layer=above opacity=1.0 grid=8:8:6:0:2:2 29 | 30 | # signals 31 | yabai -m signal --add event=window_destroyed active=yes action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse &> /dev/null || yabai -m window --focus \$(yabai -m query --windows --space | jq .[0].id) &> /dev/null" 32 | yabai -m signal --add event=window_minimized active=yes action="if \$(yabai -m query --windows --window \$YABAI_WINDOW_ID | jq -r '.\"is-floating\"'); then yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse &> /dev/null || yabai -m window --focus \$(yabai -m query --windows --space | jq .[0].id) &> /dev/null; fi" 33 | 34 | # specific space settings 35 | yabai -m config --space mail layout stack 36 | yabai -m config --space games layout float 37 | 38 | # global settings 39 | yabai -m config \ 40 | external_bar off:41:0 \ 41 | mouse_follows_focus on \ 42 | focus_follows_mouse autoraise \ 43 | window_placement second_child \ 44 | window_topmost off \ 45 | window_shadow off \ 46 | window_animation_duration 0.25 \ 47 | window_opacity_duration 0.25 \ 48 | active_window_opacity 0.90 \ 49 | normal_window_opacity 0.50 \ 50 | window_opacity on \ 51 | insert_feedback_color 0xaad75f5f \ 52 | active_window_border_color 0xBF775759 \ 53 | normal_window_border_color 0x7f353535 \ 54 | window_border_width 4 \ 55 | window_border_radius 12 \ 56 | window_border_blur on \ 57 | window_border_hidpi on \ 58 | window_border on \ 59 | split_ratio 0.50 \ 60 | split_type auto \ 61 | auto_balance off \ 62 | top_padding 10 \ 63 | left_padding 10 \ 64 | right_padding 10 \ 65 | bottom_padding 10 \ 66 | window_gap 10 \ 67 | layout bsp \ 68 | mouse_modifier fn \ 69 | mouse_action1 move \ 70 | mouse_action2 resize \ 71 | mouse_drop_action swap 72 | 73 | echo "yabai configuration loaded.." 74 | -------------------------------------------------------------------------------- /zshrc: -------------------------------------------------------------------------------- 1 | # If you come from bash you might have to change your $PATH. 2 | export PATH=/opt/local/sbin:/opt/local/bin:/usr/local/bin:$PATH 3 | 4 | # Path to your oh-my-zsh installation. 5 | export ZSH=/Users/Koe/.oh-my-zsh 6 | 7 | # Set name of the theme to load. Optionally, if you set this to "random" 8 | # it'll load a random theme each time that oh-my-zsh is loaded. 9 | # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes 10 | # ZSH_THEME="robbyrussell" 11 | 12 | 13 | # Uncomment the following line to use case-sensitive completion. 14 | # CASE_SENSITIVE="true" 15 | 16 | # Uncomment the following line to use hyphen-insensitive completion. Case 17 | # sensitive completion must be off. _ and - will be interchangeable. 18 | # HYPHEN_INSENSITIVE="true" 19 | 20 | # Uncomment the following line to disable bi-weekly auto-update checks. 21 | # DISABLE_AUTO_UPDATE="true" 22 | 23 | # Uncomment the following line to change how often to auto-update (in days). 24 | # export UPDATE_ZSH_DAYS=13 25 | 26 | # Uncomment the following line to disable colors in ls. 27 | # DISABLE_LS_COLORS="true" 28 | 29 | # Uncomment the following line to disable auto-setting terminal title. 30 | # DISABLE_AUTO_TITLE="true" 31 | 32 | # Uncomment the following line to enable command auto-correction. 33 | # ENABLE_CORRECTION="true" 34 | 35 | # Uncomment the following line to display red dots whilst waiting for completion. 36 | # COMPLETION_WAITING_DOTS="true" 37 | 38 | # Uncomment the following line if you want to disable marking untracked files 39 | # under VCS as dirty. This makes repository status check for large repositories 40 | # much, much faster. 41 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 42 | 43 | # Uncomment the following line if you want to change the command execution time 44 | # stamp shown in the history command output. 45 | # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 46 | # HIST_STAMPS="mm/dd/yyyy" 47 | 48 | # Would you like to use another custom folder than $ZSH/custom? 49 | # ZSH_CUSTOM=/path/to/new-custom-folder 50 | 51 | # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) 52 | # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ 53 | # Example format: plugins=(rails git textmate ruby lighthouse) 54 | # Add wisely, as too many plugins slow down shell startup. 55 | plugins=(git) 56 | 57 | source $ZSH/oh-my-zsh.sh 58 | 59 | # User configuration 60 | 61 | # local ret_status="%(?:%{$fg_bold[green]%}>>:%{$fg_bold[red]%}>>)" 62 | # PS1='${ret_status} %{$fg[yellow]%}%c%{$reset_color%} $(git_prompt_info)' 63 | PS1='%{$fg_bold[yellow]%}%c%{$reset_color%} $(git_prompt_info)' 64 | 65 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[magenta]%}git(%{$fg[red]%}" 66 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 67 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[magenta]%}) %{$fg[yellow]%}✗" 68 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[magenta]%})" 69 | 70 | RPS1='%{$fg[magenta]%}%T%{$reset_color%}' 71 | fpath=(/usr/local/share/zsh-completions $fpath) 72 | 73 | export LANG='en_US.UTF-8' 74 | export LC_ALL='en_US.UTF-8' 75 | export EDITOR='/opt/local/bin/nvim' 76 | alias devenv='pushd ~/Documents/programming && tmux && popd' 77 | alias gitlog='git log --all --graph --pretty=format:"%Cred%h%Creset %C(bold blue)%an%Creset :%C(yellow)%d%Creset %s %Cgreen(%cr) %Creset" --abbrev-commit' 78 | alias mpv='open -na mpv.app' 79 | alias ll='ls -lh' 80 | alias lz="ps axo pid=,stat= | awk '\$2~/^Z/ { print \$1 }'" 81 | alias binclock='python /Users/Koe/Scripts/binclock.py' 82 | alias nosleep='caffeinate -d' 83 | alias disasm='objdump -disassemble' 84 | 85 | gitclone() { 86 | rm -rf `basename $1 .git` 87 | git clone $1 88 | cd `basename $1 .git` 89 | git reset --hard $2 90 | } 91 | 92 | linecount() { find $1 -name "*.*" -print | xargs wc -l } 93 | --------------------------------------------------------------------------------