diff --git a/aliases b/aliases index 74439c2..acfce88 100644 --- a/aliases +++ b/aliases @@ -212,6 +212,33 @@ function dl_twitch_vid { fi cd .. } +function dl_twitch_chat { + local url="$1" + # @note If the filename contains symbols that are incompatible with + # Windows' directory names then add --restrict-filenames to the command. + local dir=$(youtube-dl.exe --get-filename -o "%(upload_date)s - %(title)s" $url) + if [[ $dir == "" ]]; then + return + fi + dir="${dir:0:4}-${dir:4:2}-${dir:6}" + echo "Creating directory '$dir'" + mkdir "$dir" + cd "$dir" + error=$? + if [[ ! $error -eq 0 ]]; then + echo "Failed to download chat for '$url'" + return + fi + # Download Twitch chat transcript + local name_format="%(upload_date)s-%(title)s-twitch-%(id)s" + local chat_file=$(youtube-dl.exe --get-filename -o "$name_format" $url) + rechat.exe -d $url "$chat_file.json" + rechat.exe -p "$chat_file.json" "$chat_file.txt" -b -o + mv "$chat_file.txt" "${chat_file:0:4}-${chat_file:4:2}-${chat_file:6}.txt" + tt "$chat_file.json" + cd .. +} +alias tw-download-chat='dl_twitch_chat' alias tw-dl='youtube-dl.exe -f "1080" -o "%(upload_date)s-%(title)s-twitch-%(id)s.%(ext)s"' alias tw-dl2='youtube-dl.exe -o "%(upload_date)s-%(title)s-twitch-%(id)s.%(ext)s"' alias tw-download='dl_twitch_vid "1080"' diff --git a/vim/colors/campo-dark-blue.vim b/vim/colors/campo-dark-blue.vim index df12892..bc6b58f 100644 --- a/vim/colors/campo-dark-blue.vim +++ b/vim/colors/campo-dark-blue.vim @@ -26,6 +26,11 @@ if has('termguicolors') let s:selection = "546e7a" let s:window = "37474f" let s:line = "034a4a" + let s:active_tab_bg = s:background + let s:active_tab_fg = s:text + let s:inactive_tab_bg = s:line + let s:inactive_tab_fg = "dddddd" + let s:tab_line_bg = s:inactive_tab_bg let s:bad_spelling = "ee877d" let s:todo = "b8fbb0" let s:bugs = "b8fbb0" @@ -280,7 +285,9 @@ if has("gui_running") || &t_Co == 88 || &t_Co == 256 call X("NonText", s:foreground, "", "") call X("SpecialKey", s:blue, "", "") call X("Search", s:foreground, s:selection, "") - call X("TabLine", s:foreground, s:background, "reverse") + call X("TabLineSel", s:active_tab_fg, s:active_tab_bg, "bold") + call X("TabLine", s:inactive_tab_fg, s:inactive_tab_bg, "none") + call X("TabLineFill", "", s:tab_line_bg, "none") call X("StatusLine", s:window, s:foreground, "reverse") call X("StatusLineNC", s:window, s:comment, "reverse") call X("VertSplit", s:window, s:window, "none") diff --git a/vim/colors/campo-dark-grey-blue.vim b/vim/colors/campo-dark-grey-blue.vim index c682af7..e3e5bc0 100644 --- a/vim/colors/campo-dark-grey-blue.vim +++ b/vim/colors/campo-dark-grey-blue.vim @@ -6,6 +6,9 @@ " See https://github.com/chriskempson/vim-tomorrow-theme.git for it. " Hex color conversion functions borrowed from the theme "Desert256". +" @TODO port these colors over to a copy of campo-dark-greyscale so that I +" have better control over the C syntax highlighting. + if has('termguicolors') " Supports 24-bit color range @@ -18,6 +21,11 @@ if has('termguicolors') let s:background = "1f2431" let s:selection = "546e7a" let s:window = "394051" + let s:active_tab_bg = s:background + let s:active_tab_fg = "ffffff" + let s:inactive_tab_bg = "2a3142" + let s:inactive_tab_fg = "dddddd" + let s:tab_line_bg = s:inactive_tab_bg let s:line = "323643" let s:comment = "96a2c1" let s:red = "f27c71" @@ -254,7 +262,9 @@ if has("gui_running") || &t_Co == 88 || &t_Co == 256 call X("NonText", s:foreground, "", "") call X("SpecialKey", s:blue, "", "") call X("Search", s:foreground, s:selection, "") - call X("TabLine", s:foreground, s:background, "reverse") + call X("TabLineSel", s:active_tab_fg, s:active_tab_bg, "bold") + call X("TabLine", s:inactive_tab_fg, s:inactive_tab_bg, "none") + call X("TabLineFill", "", s:tab_line_bg, "none") call X("StatusLine", s:window, s:foreground, "reverse") call X("StatusLineNC", s:window, s:comment, "reverse") call X("VertSplit", s:window, s:window, "none") diff --git a/vim/colors/campo-dark-greyscale.vim b/vim/colors/campo-dark-greyscale.vim index 17fc780..1fa45f6 100644 --- a/vim/colors/campo-dark-greyscale.vim +++ b/vim/colors/campo-dark-greyscale.vim @@ -1,9 +1,7 @@ -" A simple dark vim colorscheme. +" A simple dark greyscale colorscheme. " Maintainer: Michael Campagnaro " Version: 1.0 " -" The theme file original copied from the Tomorrow theme. -" See https://github.com/chriskempson/vim-tomorrow-theme.git for it. " Hex color conversion functions borrowed from the theme "Desert256". if has('termguicolors') @@ -22,10 +20,15 @@ if has('termguicolors') let s:text = "ffffff" let s:foreground = s:text - let s:background = "282d37" + let s:background = "1f2431" let s:selection = "546e7a" let s:window = "394051" let s:line = "333946" + let s:active_tab_bg = s:background + let s:active_tab_fg = s:text + let s:inactive_tab_bg = s:line + let s:inactive_tab_fg = "dddddd" + let s:tab_line_bg = s:inactive_tab_bg let s:bad_spelling = "ee877d" let s:todo = "b8fbb0" let s:bugs = "b8fbb0" @@ -36,13 +39,10 @@ if has('termguicolors') let s:pre_processor = s:text let s:define = s:text let s:struct = s:text - " things like 'return' - let s:statement = s:text + let s:statement = s:text " Things like 'return' let s:number = s:text - " this like 'inline' - let s:type = s:text - " #include - let s:include = s:text + let s:type = s:text " Things like 'inline' + let s:include = s:text " #include let s:string = s:text let s:comment = "aaaaaa" let s:constant = s:text @@ -53,7 +53,6 @@ if has('termguicolors') let s:c_loops = "ffffff" let s:vim_command = "ffffff" - else echoerr "This theme requires 'termguicolors' support!" endif @@ -280,7 +279,9 @@ if has("gui_running") || &t_Co == 88 || &t_Co == 256 call X("NonText", s:foreground, "", "") call X("SpecialKey", s:blue, "", "") call X("Search", s:foreground, s:selection, "") - call X("TabLine", s:foreground, s:background, "reverse") + call X("TabLineSel", s:active_tab_fg, s:active_tab_bg, "bold") + call X("TabLine", s:inactive_tab_fg, s:inactive_tab_bg, "none") + call X("TabLineFill", "", s:tab_line_bg, "none") call X("StatusLine", s:window, s:foreground, "reverse") call X("StatusLineNC", s:window, s:comment, "reverse") call X("VertSplit", s:window, s:window, "none") diff --git a/vim/colors/campo-simple-dark.vim b/vim/colors/campo-simple-dark.vim new file mode 100644 index 0000000..8801031 --- /dev/null +++ b/vim/colors/campo-simple-dark.vim @@ -0,0 +1,111 @@ +" A simple dark colorscheme. +" Maintainer: Michael Campagnaro +" Version: 1.0 +" +" Adapted from https://github.com/tek256/simple-dark + +if has('termguicolors') + " Supports 24-bit color range + set termguicolors + let g:campo_theme_use_rainbow_parens = 0 +else + echoerr "This theme requires 'termguicolors' support!" +endif + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "campo-simple-dark" + +if has("gui_running") || &t_Co == 256 + hi NonText cterm=NONE ctermfg=black ctermbg=black gui=NONE guifg=bg guibg=#0a0a0a + hi Normal cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#bcbcbc guibg=#0a0a0a + hi Keyword cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#eeeeee guibg=#0a0a0a + hi Constant cterm=NONE ctermfg=252 ctermbg=black gui=NONE guifg=#d0d0d0 guibg=#0a0a0a + hi String cterm=NONE ctermfg=245 ctermbg=black gui=NONE guifg=#8a8a8a guibg=#0a0a0a + hi Comment cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#585858 guibg=#0a0a0a + hi Number cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#ff0000 guibg=#0a0a0a + hi Error cterm=NONE ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#eeeeee guibg=#0a0a0a " Should match the text colors + hi ErrorMsg cterm=bold ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#ff0000 guibg=#0a0a0a + hi Search cterm=NONE ctermfg=245 ctermbg=Gray gui=NONE guifg=#fff229 guibg=#0a0a0a + hi IncSearch cterm=reverse ctermfg=255 ctermbg=245 gui=reverse guifg=#ffffff guibg=#0a0a0a + hi DiffChange cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#8a8a8a guibg=#0a0a0a + hi DiffText cterm=bold ctermfg=255 ctermbg=DarkGray gui=bold guifg=#bcbcbc guibg=#0a0a0a + hi SignColumn cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#8a8a8a guibg=#0a0a0a + hi SpellBad cterm=underline ctermfg=255 ctermbg=245 gui=undercurl guifg=#ff0000 guibg=#0a0a0a + hi SpellCap cterm=NONE ctermfg=255 ctermbg=124 gui=NONE guifg=#eeeeee guibg=#0a0a0a + hi SpellRare cterm=NONE ctermfg=240 ctermbg=16 gui=NONE guifg=#8a8a8a guibg=#0a0a0a + hi WildMenu cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#585858 guibg=#0a0a0a + hi Pmenu cterm=NONE ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#333333 + hi PmenuThumb cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#444444 + hi PmenuSel cterm=bold,reverse ctermfg=250 ctermbg=black gui=reverse guifg=#bcbcbc guibg=#0a0a0a + hi SpecialKey cterm=NONE ctermfg=16 ctermbg=255 gui=NONE guifg=#eeeeee guibg=#0a0a0a + hi MatchParen cterm=bold ctermfg=white ctermbg=black gui=NONE guifg=#bcbcbc guibg=#454545 + hi CursorLine cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#222222 + hi CursorColumn cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#222222 + hi ColorColumn cterm=NONE ctermfg=NONE ctermbg=255 gui=NONE guifg=NONE guibg=#444444 + hi StatusLine cterm=bold,reverse ctermfg=245 ctermbg=black gui=bold,reverse guifg=#8a8a8a guibg=#0a0a0a + hi StatusLineNC cterm=reverse ctermfg=236 ctermbg=black gui=reverse guifg=#303030 guibg=#0a0a0a + hi Visual cterm=reverse ctermfg=250 ctermbg=black gui=reverse guifg=#bcbcbc guibg=#0a0a0a + hi VertSplit cterm=NONE ctermfg=Gray ctermbg=black gui=NONE guifg=#0a0a0a guibg=#454545 + hi TermCursor cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE + hi TabLineSel cterm=bold ctermfg=250 ctermbg=black gui=NONE guifg=#cccccc guibg=#0a0a0a " Active tab label + hi TabLine cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#888888 guibg=#1d1d1d " Inactive tab label +endif + +highlight! link Boolean Normal +highlight! link Delimiter Normal +highlight! link Identifier Normal +highlight! link Title Normal +highlight! link TabLineFill TabLine " Tabline background +highlight! link Debug Normal +highlight! link Exception Normal +highlight! link FoldColumn Normal +highlight! link Macro Normal +highlight! link ModeMsg Normal +highlight! link MoreMsg Normal +highlight! link Question Normal +highlight! link Conditional Keyword +highlight! link Statement Keyword +highlight! link Operator Keyword +highlight! link Structure Keyword +highlight! link Function Keyword +highlight! link Include Keyword +highlight! link Type Keyword +highlight! link Typedef Keyword +highlight! link Todo Keyword +highlight! link Label Keyword +highlight! link Define Keyword +highlight! link DiffAdd Keyword +highlight! link diffAdded Keyword +highlight! link diffCommon Keyword +highlight! link Directory Keyword +highlight! link PreCondit Keyword +highlight! link PreProc Keyword +highlight! link Repeat Keyword +highlight! link Special Keyword +highlight! link SpecialChar Keyword +highlight! link StorageClass Keyword +highlight! link SpecialComment String +highlight! link CursorLineNr Keyword +highlight! link Character Number +highlight! link Float Number +highlight! link Tag Number +highlight! link Folded Number +highlight! link WarningMsg Number +highlight! link iCursor SpecialKey +highlight! link SpellLocal SpellCap +highlight! link LineNr Comment +highlight! link NonText NonText +highlight! link DiffDelete Comment +highlight! link diffRemoved Comment +highlight! link PmenuSbar Visual +highlight! link VisualNOS Visual +highlight! link VertSplit VertSplit +highlight! link Cursor StatusLine +highlight! link Underlined SpellRare +highlight! link rstEmphasis SpellRare +highlight! link diffChanged DiffChange diff --git a/vim/colors/campo-simple-light.vim b/vim/colors/campo-simple-light.vim new file mode 100644 index 0000000..4c9e7f1 --- /dev/null +++ b/vim/colors/campo-simple-light.vim @@ -0,0 +1,111 @@ +" A simple light colorscheme. +" Maintainer: Michael Campagnaro +" Version: 1.0 +" +" Adapted from https://github.com/tek256/simple-dark + +if has('termguicolors') + " Supports 24-bit color range + set termguicolors + let g:campo_theme_use_rainbow_parens = 1 +else + echoerr "This theme requires 'termguicolors' support!" +endif + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "campo-simple-light" + +if has("gui_running") || &t_Co == 256 + hi NonText cterm=NONE ctermfg=black ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb + hi Normal cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb + hi Keyword cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb + hi Constant cterm=NONE ctermfg=252 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb + hi String cterm=NONE ctermfg=245 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb + hi Comment cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#7c7c7c guibg=#fbfbfb + hi Number cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#0000ff guibg=#fbfbfb + hi Error cterm=NONE ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#263238 guibg=#fbfbfb " Should match the text colors + hi ErrorMsg cterm=bold ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#ff0000 guibg=#fbfbfb + hi Search cterm=NONE ctermfg=255 ctermbg=245 gui=reverse guifg=#263238 guibg=#cccccc + hi IncSearch cterm=reverse ctermfg=255 ctermbg=245 gui=reverse guifg=#263238 guibg=#fbfbfb + hi DiffChange cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#8a8a8a guibg=#fbfbfb + hi DiffText cterm=bold ctermfg=255 ctermbg=DarkGray gui=bold guifg=#263238 guibg=#fbfbfb + hi SignColumn cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#8a8a8a guibg=#fbfbfb + hi SpellBad cterm=undercurl ctermfg=255 ctermbg=245 gui=undercurl guifg=#ff0000 guibg=#fbfbfb + hi SpellCap cterm=NONE ctermfg=255 ctermbg=124 gui=NONE guifg=#ff0000 guibg=#fbfbfb + hi SpellRare cterm=NONE ctermfg=240 ctermbg=16 gui=NONE guifg=#ff0000 guibg=#fbfbfb + hi WildMenu cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#585858 guibg=#fbfbfb + hi Pmenu cterm=NONE ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#333333 " autocomplete menu + hi PmenuSel cterm=bold ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#454545 " autocomplete menu selection + hi PmenuThumb cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=NONE guibg=#cccccc " autocomplete scroller bar + hi PmenuSbar cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=NONE guibg=#454545 " autocomplete scroller background + hi SpecialKey cterm=NONE ctermfg=16 ctermbg=255 gui=NONE guifg=#eeeeee guibg=#fbfbfb + hi MatchParen cterm=bold ctermfg=white ctermbg=black gui=NONE guifg=#000000 guibg=#dddddd + hi CursorLine cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#dddddd + hi CursorColumn cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#dddddd + hi ColorColumn cterm=NONE ctermfg=NONE ctermbg=255 gui=NONE guifg=NONE guibg=#dddddd + hi StatusLine cterm=bold,reverse ctermfg=245 ctermbg=black gui=bold,reverse guifg=#8a8a8a guibg=#fbfbfb + hi StatusLineNC cterm=reverse ctermfg=236 ctermbg=black gui=reverse guifg=#303030 guibg=#fbfbfb + hi Visual cterm=reverse ctermfg=250 ctermbg=black gui=reverse guifg=#263238 guibg=#fbfbfb + hi VertSplit cterm=NONE ctermfg=Gray ctermbg=black gui=NONE guifg=#aaaaaa guibg=#dddddd + hi TermCursor cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE + hi TabLineSel cterm=bold ctermfg=250 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb " Active tab label + hi TabLine cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#4a4a4a guibg=#aaaaaa " Inactive tab label +endif + +highlight! link Boolean Normal +highlight! link Delimiter Normal +highlight! link Identifier Normal +highlight! link Title Normal +highlight! link TabLineFill TabLine " Tabline background +highlight! link Debug Normal +highlight! link Exception Normal +highlight! link FoldColumn Normal +highlight! link Macro Normal +highlight! link ModeMsg Normal +highlight! link MoreMsg Normal +highlight! link Question Normal +highlight! link Conditional Keyword +highlight! link Statement Keyword +highlight! link Operator Keyword +highlight! link Structure Keyword +highlight! link Function Keyword +highlight! link Include Keyword +highlight! link Type Keyword +highlight! link Typedef Keyword +highlight! link Todo Keyword +highlight! link Label Keyword +highlight! link Define Keyword +highlight! link DiffAdd Keyword +highlight! link diffAdded Keyword +highlight! link diffCommon Keyword +highlight! link Directory Keyword +highlight! link PreCondit Keyword +highlight! link PreProc Keyword +highlight! link Repeat Keyword +highlight! link Special Keyword +highlight! link SpecialChar Keyword +highlight! link StorageClass Keyword +highlight! link SpecialComment String +highlight! link CursorLineNr String +highlight! link Character Number +highlight! link Float Number +highlight! link Tag Number +highlight! link Folded Number +highlight! link WarningMsg Number +highlight! link iCursor SpecialKey +highlight! link SpellLocal SpellCap +highlight! link LineNr Comment +highlight! link NonText NonText +highlight! link DiffDelete Comment +highlight! link diffRemoved Comment +highlight! link VisualNOS Visual +highlight! link VertSplit VertSplit +highlight! link Cursor StatusLine +highlight! link Underlined SpellRare +highlight! link rstEmphasis SpellRare +highlight! link diffChanged DiffChange diff --git a/vimrc b/vimrc index e189ccb..51d61a4 100644 --- a/vimrc +++ b/vimrc @@ -719,8 +719,9 @@ set statusline=%<%f\ (%{&ft})\ %-4(%m%)%=%-19(%3l,%02c%03V%) let g:campo_theme_use_rainbow_parens = 1 "let s:dark_theme = 'campo-dark-blue' -let s:dark_theme = 'campo-dark-greyscale' "let s:dark_theme = 'campo-dark-grey-blue' +"let s:dark_theme = 'campo-dark-greyscale' +let s:dark_theme = 'campo-simple-dark' let s:light_theme = 'campo-light' execute "autocmd ColorScheme " . s:dark_theme . " call ReloadRainbow()"