From 8c725aa77c03fc1f590b50a41a39e952d8bb3d1c Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Mon, 27 Sep 2021 03:37:04 +0700 Subject: [PATCH] Lots of changes. See comment :) - firefox: add script to automate updating user.js - Anime4K: update version in install script to 4.0.1 - neovim: + remove nnn plugin (telescope's file browser has hidden files now) + telescope.nvim: update horizontal layout + nvim-cmp: update config for lsp, add more sources + indent-blankline: update config to use setup() + toggleterm, bufferline: repos moved + plugins: update multiple small configurations --- home/.config/mpv/input.conf | 22 +++++-- home/.config/nvim/lua/colors/nord.lua | 3 + home/.config/nvim/lua/mappings.lua | 2 - home/.config/nvim/lua/modules/completion.lua | 23 +++++++- home/.config/nvim/lua/modules/editor.lua | 61 ++++++-------------- home/.config/nvim/lua/modules/lsp.lua | 24 ++++---- home/.config/nvim/lua/modules/tools.lua | 29 +++------- home/.config/nvim/lua/modules/ui.lua | 25 +++++--- home/.config/nvim/lua/options.lua | 2 +- home/.config/nvim/lua/plugins.lua | 44 +++++++------- home/firefox/user-overrides.js | 12 ++++ home/firefox/userjs-update.sh | 23 ++++++++ setup/Anime4K.sh | 14 ++--- 13 files changed, 161 insertions(+), 123 deletions(-) create mode 100644 home/firefox/user-overrides.js create mode 100755 home/firefox/userjs-update.sh diff --git a/home/.config/mpv/input.conf b/home/.config/mpv/input.conf index e9a1964..a00a769 100644 --- a/home/.config/mpv/input.conf +++ b/home/.config/mpv/input.conf @@ -1,7 +1,17 @@ -CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Upscale_CNN_L_x2_Denoise.glsl:~~/shaders/Anime4K_Auto_Downscale_Pre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_M_x2_Deblur.glsl"; show-text "Anime4k: 480/720p (Faithful)" -CTRL+2 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Upscale_CNN_L_x2_Denoise.glsl:~~/shaders/Anime4K_Auto_Downscale_Pre_x4.glsl:~~/shaders/Anime4K_DarkLines_HQ.glsl:~~/shaders/Anime4K_ThinLines_HQ.glsl:~~/shaders/Anime4K_Upscale_CNN_M_x2_Deblur.glsl"; show-text "Anime4k: 480/720p (Perceptual Quality)" -CTRL+3 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Upscale_CNN_L_x2_Denoise.glsl:~~/shaders/Anime4K_Auto_Downscale_Pre_x4.glsl:~~/shaders/Anime4K_Deblur_DoG.glsl:~~/shaders/Anime4K_DarkLines_HQ.glsl:~~/shaders/Anime4K_ThinLines_HQ.glsl:~~/shaders/Anime4K_Upscale_CNN_M_x2_Deblur.glsl"; show-text "Anime4k: 480/720p (Perceptual Quality and Deblur)" -CTRL+4 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Denoise_Bilateral_Mode.glsl:~~/shaders/Anime4K_Upscale_CNN_M_x2_Deblur.glsl"; show-text "Anime4k: 1080p (Faithful)" -CTRL+5 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Denoise_Bilateral_Mode.glsl:~~/shaders/Anime4K_DarkLines_HQ.glsl:~~/shaders/Anime4K_ThinLines_HQ.glsl:~~/shaders/Anime4K_Upscale_CNN_M_x2_Deblur.glsl"; show-text "Anime4k: 1080p (Perceptual Quality)" -CTRL+6 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Denoise_Bilateral_Mode.glsl:~~/shaders/Anime4K_Deblur_DoG.glsl:~~/shaders/Anime4K_DarkLines_HQ.glsl:~~/shaders/Anime4K_ThinLines_HQ.glsl:~~/shaders/Anime4K_Upscale_CNN_M_x2_Deblur.glsl"; show-text "Anime4k: 1080p (Perceptual Quality and Deblur)" +# Low-end computer +CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode A (Fast)" +CTRL+2 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode B (Fast)" +CTRL+3 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode C (Fast)" +CTRL+4 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_Restore_CNN_S.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode A+A (Fast)" +CTRL+5 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_S.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode B+B (Fast)" +CTRL+6 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_S.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode C+A (Fast)" CTRL+0 no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared" + +# High-end computer +# CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A (HQ)" +# CTRL+2 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode B (HQ)" +# CTRL+3 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode C (HQ)" +# CTRL+4 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A+A (HQ)" +# CTRL+5 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode B+B (HQ)" +# CTRL+6 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode C+A (HQ)" +# CTRL+0 no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared" diff --git a/home/.config/nvim/lua/colors/nord.lua b/home/.config/nvim/lua/colors/nord.lua index 55094ec..704fceb 100644 --- a/home/.config/nvim/lua/colors/nord.lua +++ b/home/.config/nvim/lua/colors/nord.lua @@ -313,6 +313,9 @@ local function highlight_plugins() hi('DashboardShortcut', c.grey_bright, '', 'bold,italic', '') hi('DashboardFooter' , c.purple , '', 'bold' , '') + -- symbols-outline.nvim + hi('FocusedSymbol', c.black, c.yellow, 'bold', '') + -- NvimTree hi('NvimTreeIndentMarker' , c.grey3 , '', '', '') hi('NvimTreeFolderIcon' , c.fg , '', '', '') diff --git a/home/.config/nvim/lua/mappings.lua b/home/.config/nvim/lua/mappings.lua index bbca6eb..217b0d0 100644 --- a/home/.config/nvim/lua/mappings.lua +++ b/home/.config/nvim/lua/mappings.lua @@ -248,8 +248,6 @@ wk.register({ } }, - n = {':NnnPicker %:p:h', 'File picker'}, - r = { name = 'REST', c = {'RestNvim', 'Run request under cursor'}, diff --git a/home/.config/nvim/lua/modules/completion.lua b/home/.config/nvim/lua/modules/completion.lua index aae96ed..e0f14b4 100644 --- a/home/.config/nvim/lua/modules/completion.lua +++ b/home/.config/nvim/lua/modules/completion.lua @@ -50,7 +50,9 @@ function M.cmp_conf() -- nuspell = '[SPELL]', spell = '[SPELL]', emoji = '[EMOJI]', + -- treesitter = '[TS]', nvim_lsp = '[LSP]', + -- cmp_tabnine = '[TN]', latex_symbols = '[TEX]', tmux = '[TMUX]', orgmode = '[ORG]' @@ -114,7 +116,9 @@ function M.cmp_conf() -- {name = 'nuspell'}, {name = 'spell'}, {name = 'emoji'}, + -- {name = 'treesitter'}, {name = 'nvim_lsp'}, + -- {name = 'cmp_tabnine'}, {name = 'conjure'}, {name = 'latex_symbols'}, {name = 'tmux'}, @@ -123,6 +127,16 @@ function M.cmp_conf() } end +-- function M.tabnine_conf() +-- local tabnine = require('cmp_tabnine.config') +-- tabnine:setup({ +-- max_lines = 1000, +-- max_num_results = 20, +-- sort = true, +-- run_on_every_keystroke = true +-- }) +-- end + function M.autopairs_conf() require('nvim-autopairs').setup {fast_wrap = {}} require('nvim-autopairs.completion.cmp').setup({ @@ -172,9 +186,12 @@ function M.coq_conf() end function M.autotag_conf() - require('nvim-treesitter.configs').setup { - autotag = {enable = true} - } + require('nvim-ts-autotag').setup({ + filetypes = { + 'html', 'javascript', 'javascriptreact', 'typescript', + 'typescriptreact', 'svelte', 'vue' + } + }) end return M diff --git a/home/.config/nvim/lua/modules/editor.lua b/home/.config/nvim/lua/modules/editor.lua index 6b90001..74e2f9f 100644 --- a/home/.config/nvim/lua/modules/editor.lua +++ b/home/.config/nvim/lua/modules/editor.lua @@ -17,49 +17,24 @@ function M.colorizer_conf() end function M.blankline_conf() - vim.g.indent_blankline_char = '│' - -- vim.g.indent_blankline_space_char = '·' - vim.g.indent_blankline_show_first_indent_level = true - vim.g.indent_blankline_filetype_exclude = { - 'startify', - 'dashboard', - 'alpha', - 'dotooagenda', - 'log', - 'fugitive', - 'gitcommit', - 'packer', - 'vimwiki', - 'markdown', - 'org', - 'json', - 'txt', - 'vista', - 'help', - 'todoist', - 'NvimTree', - 'peekaboo', - 'git', - 'TelescopePrompt', - 'undotree', - 'flutterToolsOutline', - '' -- for all buffers without a file type - } - vim.g.indent_blankline_buftype_exclude = {'terminal', 'nofile'} - vim.g.indent_blankline_show_trailing_blankline_indent = false - vim.g.indent_blankline_show_current_context = true - vim.g.indent_blankline_context_patterns = { - 'class', - 'function', - 'method', - 'block', - 'list_literal', - 'selector', - '^if', - '^table', - 'if_statement', - 'while', - 'for' + require('indent_blankline').setup { + char = '│', + -- space_char_blankline = '·', + show_first_indent_level = true, + filetype_exclude = { + 'startify', 'dashboard', 'alpha', 'log', 'gitcommit', 'packer', 'vimwiki', + 'markdown', 'org', 'json', 'txt', 'help', 'NvimTree', 'git', 'TelescopePrompt', + 'undotree', 'dotooagenda', 'fugitive', + '' -- for all buffers without a filetype + }, + buftype_exclude = {'terminal', 'nofile'}, + show_trailing_blankline_indent = false, + show_current_context = true, + context_patterns = { + 'class', 'function', 'method', 'block', 'list_literal', 'selector', '^if', + '^table', 'if_statement', 'while', 'for' + }, + use_treesitter = true } -- Refresh often, since it is lazy-loaded diff --git a/home/.config/nvim/lua/modules/lsp.lua b/home/.config/nvim/lua/modules/lsp.lua index 1f425e0..864c172 100644 --- a/home/.config/nvim/lua/modules/lsp.lua +++ b/home/.config/nvim/lua/modules/lsp.lua @@ -46,22 +46,24 @@ function M.lsp_conf() }, bufnr) end - -- Add additional capabilities supported by nvim-cmp local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities.textDocument.completion.completionItem.documentationFormat = {'markdown', 'plaintext'} - capabilities.textDocument.completion.completionItem.snippetSupport = true - capabilities.textDocument.completion.completionItem.preselectSupport = true - capabilities.textDocument.completion.completionItem.insertReplaceSupport = true - capabilities.textDocument.completion.completionItem.labelDetailsSupport = true - capabilities.textDocument.completion.completionItem.deprecatedSupport = true - capabilities.textDocument.completion.completionItem.commitCharactersSupport = true - capabilities.textDocument.completion.completionItem.tagSupport = {valueSet = {1}} - capabilities.textDocument.completion.completionItem.resolveSupport = { + + -- Add additional capabilities supported by nvim-cmp + local completionItem = capabilities.textDocument.completion.completionItem + completionItem.documentationFormat = {'markdown', 'plaintext'} + completionItem.snippetSupport = true + completionItem.preselectSupport = true + completionItem.insertReplaceSupport = true + completionItem.labelDetailsSupport = true + completionItem.deprecatedSupport = true + completionItem.commitCharactersSupport = true + completionItem.tagSupport = {valueSet = {1}} + completionItem.resolveSupport = { properties = { 'documentation', 'detail', 'additionalTextEdits', - }, + } } --------------------------- diff --git a/home/.config/nvim/lua/modules/tools.lua b/home/.config/nvim/lua/modules/tools.lua index 716d572..3caa6c0 100644 --- a/home/.config/nvim/lua/modules/tools.lua +++ b/home/.config/nvim/lua/modules/tools.lua @@ -6,12 +6,13 @@ function M.telescope_conf() prompt_prefix = '  ', selection_caret = ' ', set_env = {['COLORTERM'] = 'truecolor'}, + sorting_strategy = 'ascending', layout_strategy = 'horizontal', layout_config = { horizontal = { + prompt_position = 'top', preview_width = 0.6 }, - -- prompt_position = 'top', width = 0.8, height = 0.8 }, @@ -24,6 +25,9 @@ function M.telescope_conf() }, grep_string = { opts = '--hidden' + }, + file_browser = { + hidden = true } }, extensions = { @@ -44,22 +48,6 @@ function M.telescope_conf() require('telescope').load_extension('fzf') end -function M.nnn_conf() - require('nnn').setup { - set_default_mappings = false, - session = 'global', - layout = { - window = {width = 0.8, height = 0.8, highlight = 'Debug'}, - }, - command = 'nnn -HUdex', - action = { - [''] = 'tab split', - [''] = 'split', - [''] = 'vsplit' - } - } -end - function M.octo_conf() require('octo').setup() end @@ -93,6 +81,7 @@ function M.markdown_preview_conf() 'pandoc.markdown', 'rmd' } + -- vim.g.mkdp_browser = 'qutebrowser' -- vim.g.mkdp_page_title = '「${name}」' -- vim.g.mkdp_echo_preview_url = 1 end @@ -223,8 +212,8 @@ function M.toggleterm_conf() } end -function M.wilder_conf() - vim.api.nvim_command [[ call wilder#setup({'modes': [':', '/', '?']}) ]] +-- function M.wilder_conf() +-- vim.api.nvim_command [[ call wilder#setup({'modes': [':', '/', '?']}) ]] -- Doesn't work yet. Bugs in Neovim (see neovim/neovim#14809 and gelguy/wilder.nvim#53) -- so can't do multi-line config inside vim.cmd [[ ]] with \ @@ -255,7 +244,7 @@ function M.wilder_conf() -- \ ) -- \ ]) -- ]] -end +-- end function M.neoscroll_conf() require('neoscroll').setup() diff --git a/home/.config/nvim/lua/modules/ui.lua b/home/.config/nvim/lua/modules/ui.lua index c289231..2784eb3 100644 --- a/home/.config/nvim/lua/modules/ui.lua +++ b/home/.config/nvim/lua/modules/ui.lua @@ -127,6 +127,13 @@ function M.statusline_conf() return icon .. os end + local function buffer_not_empty() + if vim.fn.empty(vim.fn.expand('%:t')) ~= 1 then + return true + end + return false + end + local vi_mode_utils = require('feline.providers.vi_mode') local comps = { @@ -147,6 +154,7 @@ function M.statusline_conf() }, filesize = { provider = 'file_size', + enabled = buffer_not_empty, hl = {fg = colors.fg, style = 'bold'}, right_sep = ' ' }, @@ -155,10 +163,11 @@ function M.statusline_conf() name = 'file_info', opts = { file_modified_icon = ' ', - file_readonly_icon = '🔒', - type = 'base-only' -- relative, unique + file_readonly_icon = ' ', + type = 'base-only' -- relative, unique, full-path, short-path, relative-short, unique-short } }, + enabled = buffer_not_empty, hl = {fg = colors.blue, style = 'bold'}, right_sep = ' ' }, @@ -282,10 +291,12 @@ function M.statusline_conf() force_inactive = { filetypes = { 'packer', - 'NvimTree', + 'dashboard', 'alpha', + 'NvimTree', 'undotree', 'DIFF', + 'TROUBLE', 'Outline' }, buftypes = {'terminal', 'nofile'}, @@ -309,8 +320,8 @@ function M.bufferline_conf() show_buffer_close_icons = true, always_show_bufferline = true, offsets = { - {filetype = 'NvimTree', text = 'NvimTree', text_align = 'left'}, - {filetype = 'packer', text = 'Packer', text_align = 'left'} + {filetype = 'NvimTree', text = 'NvimTree', text_align = 'center'}, + {filetype = 'packer', text = 'Packer', text_align = 'center'} }, separator_style = 'thin' }, @@ -328,9 +339,7 @@ function M.nvimtree_conf() vim.g.nvim_tree_respect_buf_cwd = 1 vim.g.nvim_tree_indent_markers = 1 vim.g.nvim_tree_git_hl = 1 - vim.g.nvim_tree_auto_resize = 0 - -- vim.g.nvim_tree_add_trailing = 1 - vim.g.nvim_tree_lsp_diagnostics = 1 + vim.g.nvim_tree_add_trailing = 0 vim.g.nvim_tree_icons = { default = '', symlink = '', diff --git a/home/.config/nvim/lua/options.lua b/home/.config/nvim/lua/options.lua index 4ee6893..e895a46 100644 --- a/home/.config/nvim/lua/options.lua +++ b/home/.config/nvim/lua/options.lua @@ -111,7 +111,7 @@ function M.load_options() opt.wildmenu = true opt.wildmode = 'full' opt.complete = '.,w,b,k' - opt.completeopt = 'menuone,noselect' + opt.completeopt = 'menu,menuone,noselect' opt.pumheight = 16 opt.helpheight = 12 opt.previewheight = 12 diff --git a/home/.config/nvim/lua/plugins.lua b/home/.config/nvim/lua/plugins.lua index b96d149..2c0c49b 100644 --- a/home/.config/nvim/lua/plugins.lua +++ b/home/.config/nvim/lua/plugins.lua @@ -35,7 +35,7 @@ return require('packer').startup( config = ui.statusline_conf } use { - 'akinsho/nvim-bufferline.lua', + 'akinsho/bufferline.nvim', event = {'BufRead', 'BufNewFile'}, config = ui.bufferline_conf } @@ -49,7 +49,11 @@ return require('packer').startup( open_on_setup = false, auto_close = true, hijack_cursor = true, - update_cwd = true + update_cwd = true, + lsp_diagnostics = true, + view = { + auto_resize = false + } } end } @@ -80,7 +84,7 @@ return require('packer').startup( } use { 'lukas-reineke/indent-blankline.nvim', - event = 'BufRead', + after = 'nvim-treesitter', config = editor.blankline_conf } use { -- TODO: config (lua -> fennel) + learn clojure, fennel, guile scheme @@ -215,8 +219,15 @@ return require('packer').startup( -- use {'f3fora/cmp-nuspell', after = 'nvim-cmp', rocks={'lua-nuspell'}} use {'f3fora/cmp-spell', after = 'nvim-cmp'} use {'hrsh7th/cmp-emoji', after = 'nvim-cmp'} - use {'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp'} - use {'kdheepak/cmp-latex-symbols', after = 'nvim-cmp'} + -- use {'ray-x/cmp-treesitter', after = {'nvim-cmp', 'nvim-treesitter'}} + use {'hrsh7th/cmp-nvim-lsp', after = {'nvim-cmp', 'nvim-lspconfig'}} + -- use { + -- 'tzachar/cmp-tabnine', + -- after = 'nvim-cmp', + -- run = './install.sh', + -- config = completion.tabnine_conf + -- } + use {'kdheepak/cmp-latex-symbols', after = {'nvim-cmp', 'vimtex'}} use {'andersevenrud/compe-tmux', after = 'nvim-cmp', branch = 'cmp'} use {'PaterJason/cmp-conjure', after = {'conjure', 'nvim-cmp'}} use { @@ -236,15 +247,8 @@ return require('packer').startup( use { 'windwp/nvim-ts-autotag', ft = { - 'html', - 'xml', - 'javascript', - 'javascriptreact', - 'typescript', - 'typescriptreact', - 'vue', - 'svelte', - 'php' + 'html', 'javascript', 'javascriptreact', 'typescript', + 'typescriptreact', 'vue', 'svelte' }, wants = 'nvim-treesitter', config = completion.autotag_conf @@ -271,11 +275,6 @@ return require('packer').startup( }, config = tools.telescope_conf } - use { -- Telescope file browser doesn't support dotfiles - 'mcchrish/nnn.vim', - cmd = 'NnnPicker', - config = tools.nnn_conf - } use { -- TODO: colors + config 'pwntester/octo.nvim', cmd = 'Octo', @@ -353,7 +352,7 @@ return require('packer').startup( setup = tools.undotree_conf } use { - 'akinsho/nvim-toggleterm.lua', + 'akinsho/toggleterm.nvim', cmd = 'ToggleTerm', config = tools.toggleterm_conf } @@ -390,8 +389,9 @@ return require('packer').startup( event = 'BufEnter', config = tools.session_conf } - use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking + -- use {'dstein64/vim-startuptime', cmd = 'StartupTime'} -- Just for benchmarking - -- TODO: dial.nvim, rust-tools.nvim, crates.nvim, go.nvim, clojure-vim/*, vim-pandoc, nvim-bqf + -- TODO: dial.nvim, rust-tools.nvim, crates.nvim, go.nvim, clojure-vim/*, + -- vim-pandoc, nvim-bqf, todo-comments.nvim, nvim-comment-frame end ) diff --git a/home/firefox/user-overrides.js b/home/firefox/user-overrides.js new file mode 100644 index 0000000..305a3be --- /dev/null +++ b/home/firefox/user-overrides.js @@ -0,0 +1,12 @@ +/* override recipe: these are some preferences that I like */ + +user_pref("ui.systemUsesDarkTheme", 1); // [FF67+] [HIDDEN PREF] + // 0=light, 1=dark: with RFP this only affects chrome + +user_pref("ui.prefersReducedMotion", 1); // [FF77+] [RESTART] [HIDDEN PREF] + // disable chrome animations + +user_pref("privacy.firstparty.isolate", false); // 4001 +user_pref("network.cookie.cookieBehavior", 5); // 2701 +user_pref("browser.contentblocking.category", "strict"); // 2701 + // ETP Strict mode (Total cookie protection + Smart block) diff --git a/home/firefox/userjs-update.sh b/home/firefox/userjs-update.sh new file mode 100755 index 0000000..40fb3af --- /dev/null +++ b/home/firefox/userjs-update.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e +# Use in conjunction with `firefox-sync` script +# (need to open Firefox at least once to generate a profile) + +cur_dir="$PWD" + +profile_dir=$(find ~/.var/app/org.mozilla.firefox/.mozilla/firefox/ -type d -name "static-*" | head -n 1) +profile=$(echo "${profile_dir}" | sed 's/^.*static-//g') + +~/.local/bin/firefox-sync ${profile} + +if [ ! -f "${profile_dir}/updater.sh" ]; then + curl -fLo "${profile_dir}/updater.sh" https://raw.githubusercontent.com/arkenfox/user.js/master/updater.sh + chmod 755 "${profile_dir}/updater.sh" +fi + +cd ${profile_dir} +bash ./updater.sh +# To be sure both directories are synced +cp -f ./user.js ../${profile}/user.js +cp -f ./updater.sh ../${profile}/updater.sh + +cd "${cur_dir}" diff --git a/setup/Anime4K.sh b/setup/Anime4K.sh index bfe6c28..2e8e11f 100755 --- a/setup/Anime4K.sh +++ b/setup/Anime4K.sh @@ -14,13 +14,13 @@ cp -f bin/Anime4KCPP_CLI ~/.local/bin/ cd ../.. # ----------------- Anime4K shaders ---------------------- # -echo "Version of Anime4K shaders: " | tr -d '\n' # 3.1 +echo "Version of Anime4K shaders: " | tr -d '\n' # 4.0.1 read -r version -mkdir shaders && cd shaders -curl -fLo Anime4K.zip https://github.com/bloc97/Anime4K/releases/download/${version}/Anime4K_v${version}.zip -unzip Anime4K.zip && rm Anime4K.zip -cd .. -cp -rfv shaders ~/.config/mpv/ +if [ -d "$HOME/.config/mpv/shaders" ]; then + rm -rf ~/.config/mpv/shaders +fi +curl -fLo Anime4K.zip https://github.com/bloc97/Anime4K/releases/download/${version}/Anime4K_v4.0.zip +unzip Anime4K.zip -d ~/.config/mpv/shaders && rm Anime4K.zip # ------------------- PyWrapper -------------------------- # # Need pymkv, pymediainfo, simple-term-menu (use pip inside a virtualenv) @@ -43,4 +43,4 @@ cd ../.. #git clone https://github.com/k4yt3x/video2x.git #cp -rfv video2x/src ~/.local/bin/video2x -# -- Dandere2x, waifu2x, waifu2x-ncnn-vulkan -- # f*** Nvidia, you need it for waifu2x stuff +# -- Dandere2x, waifu2x, waifu2x-ncnn-vulkan -- #