diff --git a/.config/BetterDiscord/bdstorage.json b/.config/BetterDiscord/bdstorage.json index efb56c7..ef9be23 100644 --- a/.config/BetterDiscord/bdstorage.json +++ b/.config/BetterDiscord/bdstorage.json @@ -46,6 +46,6 @@ }, "version": "0.3.5", "emoteCacheDays": 7, - "emoteCacheDate": "2020-09-09T20:57:49.233Z", + "emoteCacheDate": "2020-10-24T10:21:17.385Z", "bdcustomcss": "I2FwcC1tb3VudCAuY2hhdC0zYlJ4eHUgLm1lc3NhZ2VzV3JhcHBlci0zbFpEZlkgW2NsYXNzKj10aW1lc3RhbXBdLAojYXBwLW1vdW50IC5jaGF0LTNiUnh4dSAubWVzc2FnZXNXcmFwcGVyLTNsWkRmWSAubWVzc2FnZUNvbnRlbnQtMnFXV3hDLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aik6bm90KC5tb2RlVW5yZWFkLTF6cEZkQSk6bm90KC5tb2RlU2VsZWN0ZWQtMXpBcEpfKSAuY29udGVudC0zYXRfQVUgLm5hbWUtM19Ec21nLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aik6bm90KC5tb2RlVW5yZWFkLTF6cEZkQSk6bm90KC5tb2RlU2VsZWN0ZWQtMXpBcEpfKSAuY29udGVudC0zYXRfQVUgc3ZnLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY2hhbm5lbC0yUUQ5X08gewogICAgY29sb3I6ICM5M2ExYTEgIWltcG9ydGFudDsKfQoKI2FwcC1tb3VudCA6OnNlbGVjdGlvbiwKI2FwcC1tb3VudCAuY2hhdC0zYlJ4eHUgLm1lbnRpb24sCiNhcHAtbW91bnQgLm1lbWJlcnMtMTk5OHBCIC5tZW1iZXItMy1ZWFVlLnNlbGVjdGVkLWFYaFFSNiAucm9sZUNvbG9yLXJ6MnZNMCwKI2FwcC1tb3VudCAubWVtYmVycy0xOTk4cEIgLm1lbWJlci0zLVlYVWUgLmJvdFRhZy0yV1BKNzQsCiNhcHAtbW91bnQgLnNpZGViYXItMks4cEZoIC5jb250YWluZXItUE5raW1jIC5jb250YWluZXJEZWZhdWx0LTFabkFEcS5zZWxlY3RlZC0zN2pfaVUgLmNvbnRlbnQtM2F0X0FVIC5uYW1lLTNfRHNtZywKI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNvbnRhaW5lci1QTmtpbWMgLmNvbnRhaW5lckRlZmF1bHQtMVpuQURxLnNlbGVjdGVkLTM3al9pVSAuY29udGVudC0zYXRfQVUgc3ZnLAojYXBwLW1vdW50IC50b29sdGlwQmxhY2stUFBHNDd6LCAjYXBwLW1vdW50IC50b29sdGlwQnJhbmQtZzAzTno4LCAjYXBwLW1vdW50IC50b29sdGlwUmVkLTgtOU5lUCwKI2FwcC1tb3VudCAuYnViYmxlLTN3ZTJkaSwgI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNvbnRhaW5lci1QTmtpbWMgLmNvbnRhaW5lckRlZmF1bHQtMVpuQURxIC53cmFwcGVyLTF1Y2pUZDpub3QoLm1vZGVNdXRlZC0zb3N5N2opLm1vZGVVbnJlYWQtMXpwRmRBIC5jb250ZW50LTNhdF9BVSAubmFtZS0zX0RzbWcsCiNhcHAtbW91bnQgLnNpZGViYXItMks4cEZoIC5jb250YWluZXItUE5raW1jIC5jb250YWluZXJEZWZhdWx0LTFabkFEcSAud3JhcHBlci0xdWNqVGQ6bm90KC5tb2RlTXV0ZWQtM29zeTdqKS5tb2RlVW5yZWFkLTF6cEZkQSAuY29udGVudC0zYXRfQVUgc3ZnIHsKICAgIGNvbG9yOiAjMDAyYjM2ICFpbXBvcnRhbnQ7CiAgICB0ZXh0LXNoYWRvdzogbm9uZSAhaW1wb3J0YW50Owp9CgojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aikubW9kZVVucmVhZC0xenBGZEEgLmNvbnRlbnQtM2F0X0FVIHsKICAgIGJhY2tncm91bmQ6ICMyNjhiZDIgIWltcG9ydGFudDsKfQoKI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNoYW5uZWwtMlFEOV9PLnNlbGVjdGVkLWFYaFFSNiB7CiAgICBiYWNrZ3JvdW5kOiBsaW5lYXItZ3JhZGllbnQodmFyKC0tQkctZ3JhZGllbnQtZGlyZWN0aW9uKSwgcmdiYSh2YXIoLS1CRy1ncmFkaWVudC1vbmUpLCAxKSAyMCUsIHJnYmEodmFyKC0tQkctZ3JhZGllbnQtdHdvKSwgMSkpOwogICAgY29sb3I6ICMwMDJiMzYgIWltcG9ydGFudDsKICAgIHRleHQtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7Cgp9" } \ No newline at end of file diff --git a/.config/chrome-flags.conf b/.config/chrome-flags.conf new file mode 100644 index 0000000..b5fdfd3 --- /dev/null +++ b/.config/chrome-flags.conf @@ -0,0 +1,3 @@ +--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,WebUIDarkMode +--ozone-platform=wayland +--force-dark-mode diff --git a/.config/electron-flags.conf b/.config/electron-flags.conf new file mode 100644 index 0000000..1effbaa --- /dev/null +++ b/.config/electron-flags.conf @@ -0,0 +1,3 @@ +--enable-features=VaapiVideoDecoder +--ozone-platform=wayland +--in-process-gpu diff --git a/.config/environment.d/sway.conf b/.config/environment.d/sway.conf index 1d07201..ed08560 100644 --- a/.config/environment.d/sway.conf +++ b/.config/environment.d/sway.conf @@ -1 +1,2 @@ -XDG_CURRENT_DESKTOP=sway +export XDG_CURRENT_DESKTOP=sway +export XDG_SESSION_TYPE=wayland diff --git a/.config/kitty/bell.sh b/.config/kitty/bell.sh new file mode 100755 index 0000000..22aec4d --- /dev/null +++ b/.config/kitty/bell.sh @@ -0,0 +1,2 @@ +#!/bin/sh +find ~/.config/kitty/bells -type f | shuf -n 1 | mpv --audio-display=no --playlist=- diff --git a/.config/kitty/bells/loli.mp3 b/.config/kitty/bells/loli.mp3 new file mode 100644 index 0000000..74ac6c1 Binary files /dev/null and b/.config/kitty/bells/loli.mp3 differ diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 36c80d4..1fd0ac0 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -282,7 +282,8 @@ font_family DejaVuSansMono #: windows in the tab and the window is not the currently focused #: window -# command_on_bell none +# command_on_bell mpv --audio-display=no ~/loli.mp3 +# command_on_bell ~/.config/kitty/bell.sh #: Program to run when a bell occurs. @@ -508,7 +509,7 @@ background_opacity 0.8 #: change transparency of windows set dynamic_background_opacity to #: yes (this is off by default as it has a performance cost) -# dynamic_background_opacity no +dynamic_background_opacity yes #: Allow changing of the background_opacity dynamically, using either #: keyboard shortcuts (increase_background_opacity and @@ -1034,6 +1035,8 @@ shell /bin/zsh # map kitty_mod+a>1 set_background_opacity 1 # map kitty_mod+a>d set_background_opacity default # map kitty_mod+delete clear_terminal reset active +map kitty_mod+a>o set_background_opacity 1.0 +map kitty_mod+a>t set_background_opacity 0.8 #: You can create shortcuts to clear/reset the terminal. For example:: diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf index 834ada7..2def8df 100644 --- a/.config/mpv/input.conf +++ b/.config/mpv/input.conf @@ -6,3 +6,9 @@ S screenshot-to-file /tmp/mpv-screenshot.png ; run sh -c "cat /tmp/mpv-screensho x add sub-delay -0.04 X add sub-delay +0.04 + +# increase subtitle font size +ALT+k add sub-scale +0.1 + +# decrease subtitle font size +ALT+j add sub-scale -0.1 diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index ae71e0d..c58f33a 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -1,5 +1,6 @@ profile=gpu-hq #gpu-api=vulkan +#gpu-context=waylandvk gpu-context=wayland hwdec=none @@ -33,3 +34,9 @@ ytdl-format=bestvideo[height<=?1080]+bestaudio/best #ytdl-raw-options="rm-cache-dir=:yes-playlist=" osd-fractions=yes + +[downmix] +profile-desc="downmixing profile" +profile-cond=p["audio-params/channel-count"] > 2 +ad-lavc-downmix=no +af=lavfi="pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE" diff --git a/.config/mpv/script-opts/.gitignore b/.config/mpv/script-opts/.gitignore new file mode 100644 index 0000000..0d767b6 --- /dev/null +++ b/.config/mpv/script-opts/.gitignore @@ -0,0 +1 @@ +japan7.conf diff --git a/.config/mpv/scripts/japan7.lua b/.config/mpv/scripts/japan7.lua new file mode 100644 index 0000000..82457a0 --- /dev/null +++ b/.config/mpv/scripts/japan7.lua @@ -0,0 +1,34 @@ +local settings = { + username = "", + password = "", + projo_host = "" +} + +local opts = require 'mp.options' +opts.read_options(settings, "japan7") + + +local function is_projo(path) + return path:match("^https://projection") +end + + +function on_load() + local path = mp.get_property("path") + local match = path:gsub("^https://fubuki.aidoru.agency", "https://"..settings.username..":"..settings.password.."@fubuki.aidoru.agency") + match = match:gsub("^https://korone.aidoru.agency", "https://"..settings.username..":"..settings.password.."@korone.aidoru.agency") + match = match:gsub("^https://yuyuko.butaishoujo.moe", "https://"..settings.username..":"..settings.password.."@yuyuko.butaishoujo.moe") + match = match:gsub("^https://projo.yuru.moe", "https://"..settings.username..":"..settings.password.."@projo.yuru.moe") + match = match:gsub("^https://projection", settings.projo_host) + if match ~= path then + if is_projo(path) then + local stream = match:gsub("^(.+)/.-$", "%1/stream") + mp.set_property("ordered-chapters-files", stream) + end + mp.set_property("stream-open-filename", match) + local ass = match:gsub("...$", "ass") + mp.commandv("sub-add", ass) + end +end + +mp.register_event('start-file', on_load) diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore new file mode 100644 index 0000000..c84aa4a --- /dev/null +++ b/.config/nvim/.gitignore @@ -0,0 +1 @@ +plugin/packer_compiled.lua diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json deleted file mode 100644 index f133007..0000000 --- a/.config/nvim/coc-settings.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "explorer.keyMappings": { - "k": "nodePrev", - "j": "nodeNext", - - "*": "toggleSelection", - "": "actionMenu", - - "": "collapse", - "": "expand", - "J": ["toggleSelection", "normal:j"], - "K": ["toggleSelection", "normal:k"], - "gl": "expandRecursive", - "gh": "collapseRecursive", - "o": "expandOrCollapse", - "": "open", - "e": "open", - "E": "openInVsplit", - "t": "openInTab", - "": "gotoParent", - - "y": "copyFilepath", - "Y": "copyFilename", - "c": "copyFile", - "x": "cutFile", - "p": "pasteFile", - "d": "delete", - "D": "deleteForever", - - "a": "addFile", - "A": "addDirectory", - "r": "rename", - - ".": "toggleHidden", - "R": "refresh", - - "?": "help", - "q": "quit", - "X": "systemExecute", - "gd": "listDrive", - - "f": "search", - "F": "searchRecursive", - - "gf": "gotoSource:file", - "gb": "gotoSource:buffer", - - "[[": "sourcePrev", - "]]": "sourceNext", - - "[d": "diagnosticPrev", - "]d": "diagnosticNext", - - "[c": "gitPrev", - "]c": "gitNext", - "<<": "gitStage", - ">>": "gitUnstage" - } -} diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..1ee68d2 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,213 @@ +require 'plugins' + + +require 'popup' + + +vim.g.solarized_italic_comments = true +vim.g.solarized_italic_keywords = true +vim.g.solarized_italic_functions = true +vim.g.solarized_italic_variables = false +vim.g.solarized_contrast = true +vim.g.solarized_borders = false +vim.g.solarized_disable_background = false +require('solarized').set() + + +require('nvim-treesitter.configs').setup { + ensure_installed = { "c", "lua", "rust", "java", "python", "javascript", "typescript" }, + sync_install = false, + ignore_install = { }, + + highlight = { + enable = true, + disable = { }, + additional_vim_regex_highlighting = false, + }, +} + + +require('feline').setup { + theme = require('feline.solarized'), + force_inactive = { + filetypes = { + '^neo\\-tree$', + '^aerial$', + '^packer$', + '^startify$', + '^fugitive$', + '^fugitiveblame$', + '^qf$', + '^help$' + }, + buftypes = { + '^terminal$' + }, + bufnames = { + 'neo\\-.*', + } + } +} + + +require('nvim-lsp-installer').setup {} +require('lspconfig/settings') + + +require('window-picker').setup({ + autoselect_one = true, + selection_chars = 'ABCDEFGHIJKLMNOP', + filter_rules = { + bo = { + filetype = { 'NvimTree', "neo-tree", "notify", 'aerial' }, + buftype = { 'terminal' } + } + } +}) + +vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) +require('neo-tree').setup({ + close_if_last_window = true, + window = { + width = 30, + mappings = { + [""] = "open_with_window_picker", + ["S"] = "split_with_window_picker", + ["s"] = "vsplit_with_window_picker" + } + }, + filesystem = { + filtered_items = { + visible = true + }, + follow_current_file = true,window = { + mappings = { + ["/"] = "noop", + ["g/"] = "fuzzy_finder", + ["f"] = "noop", + ["ff"] = function() vim.cmd([[Telescope find_files]]) end, + ["fg"] = function() vim.cmd([[Telescope live_grep]]) end + } + } + } +}) +vim.keymap.set("n", "f", "Neotree focus", opts) + + +require('smart-splits') +vim.keymap.set("n", "", require('smart-splits').move_cursor_left) +vim.keymap.set("n", "", require('smart-splits').move_cursor_down) +vim.keymap.set("n", "", require('smart-splits').move_cursor_up) +vim.keymap.set("n", "", require('smart-splits').move_cursor_right) +vim.keymap.set("n", "", require('smart-splits').resize_up) +vim.keymap.set("n", "", require('smart-splits').resize_down) +vim.keymap.set("n", "", require('smart-splits').resize_left) +vim.keymap.set("n", "", require('smart-splits').resize_right) + + +require('bufdelete') + + +local colors = require('solarized.colors') +require('bufferline').setup{ + options = { + close_command = "Bdelete %d", + right_mouse_command = "Bdelete %d", + offsets = { + {filetype = "neo-tree", text = "File Explorer", padding = 1}, + {filetype = "aerial", text = "Outline", padding = 1} + }, + enforce_regular_tabs = true, + separator_style = 'slant' + }, + highlights = { + separator = { + guifg = colors.bg_alt + }, + separator_visible = { + guifg = colors.bg_alt + }, + separator_selected = { + guifg = colors.bg_alt + } + } +} +vim.keymap.set("n", "", "bnext", opts) +vim.keymap.set("n", "", "bprevious", opts) +vim.keymap.set("n", "q", "Bdelete", opts) + + +require('nvim-autopairs').setup() + + +require('gitsigns').setup() + + +require('cinnamon').setup() + + +require('aerial').setup({ + close_behavior = 'global', + open_automatic = true, + placement_editor_edge = true, + width = 30, + on_attach = function(bufnr) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 't', + require('map_utils').lua_fn(function() + vim.tbl_map(function(buf) + if vim.api.nvim_buf_get_option(buf, 'filetype') == 'aerial' then + vim.tbl_map(function(win) + vim.api.nvim_set_current_win(win) + end, vim.fn.win_findbuf(buf)) + end + end, vim.api.nvim_list_bufs()) + end), + {}) + end +}) + + +require('guess-indent').setup() + + +local actions = require("telescope.actions") +require('telescope').setup({ + defaults = { + mappings = { + n = { + ["S"] = actions.file_split, + ["s"] = actions.file_vsplit, + } + }, + get_selection_window = require('window-picker').pick_window + }, + pickers = { + find_files = { + find_command = {"fd", "--type", "f", "--strip-cwd-prefix", "--hidden"} + }, + live_grep = { + vimgrep_arguments = {"rg", "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case", "--hidden"} + }, + } +}) + + +vim.o.clipboard = 'unnamedplus' +vim.o.expandtab = true +vim.o.fileencoding = 'utf-8' +vim.o.ignorecase = true +vim.o.mouse = 'a' +vim.o.showmode = false +vim.o.number = true +vim.o.shiftwidth = 2 +vim.o.signcolumn = 'yes' +vim.o.smartcase = true +vim.o.spelllang = 'en' +vim.o.tabstop = 2 + + +if vim.fn.expand('%') == '' then + require("neo-tree.command")._command(vim.fn.getcwd()) +else + require("neo-tree.command")._command("show", vim.fn.getcwd()) +end diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100644 index 2ba996a..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,148 +0,0 @@ -tnoremap - -set termguicolors -"set colorcolumn=88 -set background=dark -match Error /\%>88c/ - -highlight Pmenu ctermbg=gray guibg=gray - -" if hidden is not set, TextEdit might fail. -set hidden - -" Some servers have issues with backup files, see #649 -set nobackup -set nowritebackup - -" Better display for messages -set cmdheight=2 - -" You will have bad experience for diagnostic messages when it's default 4000. -set updatetime=300 - -" don't give |ins-completion-menu| messages. -set shortmess+=c - -" always show signcolumns -set signcolumn=yes - -" Use tab for trigger completion with characters ahead and navigate. -" Use command ':verbose imap ' to make sure tab is not mapped by other plugin. -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? "\" : "\" - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" Use to trigger completion. -inoremap coc#refresh() - -" Use to confirm completion, `u` means break undo chain at current position. -" Coc only does snippet and additional edit on confirm. -inoremap pumvisible() ? "\" : "\u\" -" Or use `complete_info` if your vim support it, like: -" inoremap complete_info()["selected"] != "-1" ? "\" : "\u\" - -" Use `[g` and `]g` to navigate diagnostics -nmap [g (coc-diagnostic-prev) -nmap ]g (coc-diagnostic-next) - -" Remap keys for gotos -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window -nnoremap K :call show_documentation() - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - else - call CocAction('doHover') - endif -endfunction - -" Highlight symbol under cursor on CursorHold -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Remap for rename current word -nmap rn (coc-rename) - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s). - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -" Remap for do codeAction of selected region, ex: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap for do codeAction of current line -nmap ac (coc-codeaction) -" Fix autofix problem of current line -nmap qf (coc-fix-current) - -" Create mappings for function text object, requires document symbols feature of -" languageserver. -xmap if (coc-funcobj-i) -xmap af (coc-funcobj-a) -omap if (coc-funcobj-i) -omap af (coc-funcobj-a) - -" Use for select selections ranges, needs server support, like: coc-tsserver, -" coc-python -nmap (coc-range-select) -xmap (coc-range-select) - -" Use `:Format` to format current buffer -command! -nargs=0 Format :call CocAction('format') - -" Use `:Fold` to fold current buffer -command! -nargs=? Fold :call CocAction('fold', ) - -" use `:OR` for organize import of current buffer -command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') - -" Add status line support, for integration with other plugin, checkout `:h coc-status` -set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} - -" Using CocList -" Show all diagnostics -nnoremap a :CocList diagnostics -" Manage extensions -nnoremap e :CocList extensions -" Show commands -nnoremap c :CocList commands -" Find symbol of current document -nnoremap o :CocList outline -" Search workspace symbols -nnoremap s :CocList -I symbols -" Do default action for next item. -nnoremap j :CocNext -" Do default action for previous item. -nnoremap k :CocPrev -" Resume latest coc list -nnoremap p :CocListResume - -" coc-explorer -nmap e :CocCommand explorer - -call plug#begin() -Plug 'rbgrouleff/bclose.vim' -Plug 'francoiscabrol/ranger.vim' -Plug 'neoclide/coc.nvim', {'branch': 'release'} -Plug 'lervag/vimtex' -Plug 'iCyMind/NeoSolarized' -call plug#end() - -colorscheme NeoSolarized diff --git a/.config/nvim/lua/feline/solarized.lua b/.config/nvim/lua/feline/solarized.lua new file mode 100644 index 0000000..a6c4263 --- /dev/null +++ b/.config/nvim/lua/feline/solarized.lua @@ -0,0 +1,19 @@ +local colors = require('solarized.colors') + +local solarized = { + fg = colors.fg, + bg = colors.bg_alt, + black = colors.black, + skyblue = colors.paleblue, + cyan = colors.cyan, + green = colors.green, + oceanblue = colors.blue, + magenta = colors.magenta, + orange = colors.orange, + red = colors.red, + violet = colors.purple, + white = colors.white, + yellow = colors.yellow +} + +return solarized diff --git a/.config/nvim/lua/lspconfig/settings.lua b/.config/nvim/lua/lspconfig/settings.lua new file mode 100644 index 0000000..6b81f93 --- /dev/null +++ b/.config/nvim/lua/lspconfig/settings.lua @@ -0,0 +1,95 @@ +local servers = { 'pyright', 'sumneko_lua', 'eslint', 'tsserver' } + +-- Mappings. +-- See `:help vim.diagnostic.*` for documentation on any of the below functions +local opts = { noremap=true, silent=true } +vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) + +-- Use an on_attach function to only map the following keys +-- after the language server attaches to the current buffer +local on_attach = function(client, bufnr) + -- Enable completion triggered by + vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + + -- Mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local bufopts = { noremap=true, silent=true, buffer=bufnr } + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) + vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) + vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) + vim.keymap.set('n', 'wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, bufopts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) + vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) + vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) +end + +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) + +-- Use a loop to conveniently call 'setup' on multiple servers and +-- map buffer local keybindings when the language server attaches +for _, lsp in pairs(servers) do + require('lspconfig')[lsp].setup { + on_attach = on_attach, + capabilities = capabilities, + flags = { + -- This will be the default in neovim 0.7+ + debounce_text_changes = 150, + } + } +end + +-- luasnip setup +local luasnip = require 'luasnip' + +-- nvim-cmp setup +local cmp = require 'cmp' +cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { 'i', 's' }), + }), + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, +} diff --git a/.config/nvim/lua/map_utils.lua b/.config/nvim/lua/map_utils.lua new file mode 100644 index 0000000..33a41c4 --- /dev/null +++ b/.config/nvim/lua/map_utils.lua @@ -0,0 +1,34 @@ +local M = {} +local module_name = 'map_utils' +local fn_store = {} + +local function register_fn(fn) + table.insert(fn_store, fn) + return #fn_store +end + +function M.apply_function(id) + fn_store[id]() +end + +function M.apply_expr(id) + return vim.api.nvim_replace_termcodes(fn_store[id](), true, true, true) +end + +function M.lua_fn(fn) + return string.format( + "lua require('%s').apply_function(%s)", + module_name, + register_fn(fn) + ) +end + +function M.lua_expr(fn) + return string.format( + "v:lua.require'%s'.apply_expr(%s)", + module_name, + register_fn(fn) + ) +end + +return M diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua new file mode 100644 index 0000000..a8f88e2 --- /dev/null +++ b/.config/nvim/lua/plugins.lua @@ -0,0 +1,54 @@ +return require('packer').startup(function() + use 'wbthomason/packer.nvim' + + use 'nvim-lua/popup.nvim' + + use { + 'nvim-treesitter/nvim-treesitter', + run = ':TSUpdate' + } + + use {'feline-nvim/feline.nvim', requires = 'kyazdani42/nvim-web-devicons'} + + use { + "williamboman/nvim-lsp-installer", + "neovim/nvim-lspconfig", + } + + use { + "nvim-neo-tree/neo-tree.nvim", + branch = "v2.x", + requires = { + "nvim-lua/plenary.nvim", + "kyazdani42/nvim-web-devicons", + "MunifTanjim/nui.nvim", + 's1n7ax/nvim-window-picker' + } + } + + use 'mrjones2014/smart-splits.nvim' + + use 'famiu/bufdelete.nvim' + + use {'akinsho/bufferline.nvim', tag = "v2.*", requires = 'kyazdani42/nvim-web-devicons'} + + use 'windwp/nvim-autopairs' + + use 'lewis6991/gitsigns.nvim' + + use 'declancm/cinnamon.nvim' + + use 'stevearc/aerial.nvim' + + use 'nmac427/guess-indent.nvim' + + use {'nvim-telescope/telescope.nvim', requires = 'nvim-lua/plenary.nvim'} + + use { + 'hrsh7th/nvim-cmp', + 'hrsh7th/cmp-nvim-lsp', + 'saadparwaiz1/cmp_luasnip', + 'L3MON4D3/LuaSnip' + } + +end) diff --git a/.config/nvim/solarized.nvim b/.config/nvim/solarized.nvim new file mode 160000 index 0000000..e145551 --- /dev/null +++ b/.config/nvim/solarized.nvim @@ -0,0 +1 @@ +Subproject commit e14555132db1204c1feed0d6441a2ff170bf761f diff --git a/.config/spicetify/config-xpui.ini b/.config/spicetify/config-xpui.ini new file mode 100644 index 0000000..7f20bb5 --- /dev/null +++ b/.config/spicetify/config-xpui.ini @@ -0,0 +1,31 @@ +[AdditionalOptions] +extensions = +custom_apps = +sidebar_config = 1 +home_config = 1 + +[Patch] + +[Setting] +prefs_path = /home/rhiobet/.config/spotify/prefs +overwrite_assets = 0 +check_spicetify_upgrade = 0 +spotify_path = /opt/spotify +current_theme = SpicetifyDefault +color_scheme = +inject_css = 1 +replace_colors = 1 +spotify_launch_flags = + +[Preprocesses] +disable_sentry = 1 +disable_ui_logging = 1 +remove_rtl_rule = 1 +expose_apis = 1 +disable_upgrade_check = 1 + +; DO NOT CHANGE! +[Backup] +version = +with = + diff --git a/.config/spicetify/config.ini b/.config/spicetify/config.ini index 8838364..b6b9205 100644 --- a/.config/spicetify/config.ini +++ b/.config/spicetify/config.ini @@ -1,12 +1,13 @@ [Setting] -spotify_path = /opt/spotify -prefs_path = /home/rhiobet/.config/spotify/prefs -current_theme = SolarizedDarkGreen -color_scheme = -inject_css = 1 -replace_colors = 1 -overwrite_assets = 0 -spotify_launch_flags = +spotify_path = /opt/spotify +prefs_path = /home/rhiobet/.config/spotify/prefs +current_theme = SolarizedDarkGreen +color_scheme = +inject_css = 1 +replace_colors = 1 +overwrite_assets = 0 +spotify_launch_flags = +check_spicetify_upgrade = 0 [Preprocesses] remove_rtl_rule = 1 @@ -34,5 +35,5 @@ custom_apps = ; DO NOT CHANGE! [Backup] -version = 1.1.10.546.ge08ef575 +version = 1.1.56.595.g2d2da0de diff --git a/.config/sway/config b/.config/sway/config index 2de36b1..a7da5a6 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -29,9 +29,12 @@ set $srclocker swaylock -c 222222 -u -i eDP-1:~/wallpapers/radiance.png\ # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) # output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill output * pos 1920 0 res 1920 1080 +#output eDP-1 pos 0 300 res 3840 2160 scale 1 output eDP-1 pos 0 300 res 3840 2160 output "Goldstar Company Ltd M2080D 0x00000101" pos 1920 0 res 1920 1080 +#output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 3840 0 res 2560 1440 output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 1920 0 res 2560 1440 +#output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 1920 0 res 1920 1080 output HDMI-A-3 pos 1920 0 res 1920 1080 output * bg ~/wallpapers/filianore-u.jpg fill focus output eDP-1 @@ -125,6 +128,7 @@ input "1739:0:Synaptics_TM3276-031" { bindsym Print exec slurp -d | grim -g - - | wl-copy -t image/png bindsym Ctrl+Print exec swaymsg -t get_tree | jq -r 'recurse(.nodes[], .floating_nodes[]) | select(.focused and .pid).rect | "\(.x),\(.y) \(.width)x\(.height)"' | grim -g - - | wl-copy -t image/png bindsym Shift+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy -t image/png + #bindsym Shift+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - > /home/rhiobet/screenshots/$(date +%s).png # # Moving around: @@ -277,9 +281,11 @@ include /etc/sway/config.d/* assign [class="discord"] workspace 3 assign [class="Spotify"] workspace 3 for_window [class="Spotify"] opacity 0.8 +for_window [app_id="boop-gtk"] floating enable #exec redshift -O 4500 -m wayland exec nm-applet --indicator +exec wlanthy -i pass # exec ~/.local/start-jack.sh diff --git a/.config/sway/status.toml b/.config/sway/status.toml index c1dc1f3..049381e 100644 --- a/.config/sway/status.toml +++ b/.config/sway/status.toml @@ -9,11 +9,12 @@ good_bg = "#859900cc" warning_bg = "#b58900cc" critical_bg = "#dc322fcc" alternating_tint_bg = "#00000000" -separator = "" +separator = "\ue0b2" +#separator = "" -[[block]] -block = "focused_window" -max_width = 100 +#[[block]] +#block = "focused_window" +#max_width = 100 [[block]] block = "music" @@ -25,19 +26,22 @@ marquee = true [[block]] block = "sound" -driver = "alsa" -#device = "hw:0" +driver = "auto" +show_volume_when_muted = true +headphones_indicator = true step_width = 3 [[block]] block = "memory" display_type = "memory" -format_mem = "{Mum}MB" +format_mem = "{mem_used;M}" clickable = false +on_click = "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf btop" [[block]] block = "cpu" interval = 1 +on_click = "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf btop" #[[block]] #block = "sound" @@ -46,6 +50,23 @@ interval = 1 block = "battery" interval = 10 +[[block]] +block = "pacman" +interval = 600 +format = "{both} updates available" +format_singular = "{both} update available" +format_up_to_date = "up to date" +hide_when_uptodate = true +critical_updates_regex = "(^(linux-|sway|wl)|pipewire)" +aur_command = "yay -Qua" +on_click = "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf zsh -i -c update" + +[[block]] +block = "networkmanager" +on_click = "networkmanager_dmenu" +device_format = "{icon}{ap}" +interface_name_exclude = ["br\\-[0-9a-f]{12}", "docker\\d+"] + [[block]] block = "time" interval = 60 diff --git a/.config/sway/workspace-rename.sh b/.config/sway/workspace-rename.sh index 203bca0..9c76abf 100755 --- a/.config/sway/workspace-rename.sh +++ b/.config/sway/workspace-rename.sh @@ -13,7 +13,7 @@ swaymsg -t subscribe -m '[ "window" ]' | while read -r event ; do if [ "$app_name" = "kitty" ] ; then app_name="" - elif [ "$app_name" = "chromium" ] || [ "$app_name" = "Chromium" ]; then + elif [[ "$app_name" == *"chrom"* ]] || [[ "$app_name" == *"Chrom"* ]]; then case "$(jq -r '.container.name' <<< $event)" in *YouTube*) app_name="" diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..82ccd2a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".config/nvim/solarized.nvim"] + path = .config/nvim/solarized.nvim + url = ssh://git@git.rhiobet.sh:42424/rhiobet/solarized.nvim.git diff --git a/.zshenv b/.zshenv index 498bc95..064ded1 100644 --- a/.zshenv +++ b/.zshenv @@ -1,6 +1,7 @@ export JAVA_HOME=/usr/lib/jvm/$(archlinux-java get) -export GDK_BACKEND=x11 +#export GDK_BACKEND=x11 export EDITOR=nvim export XDG_CURRENT_DESKTOP=sway export XDG_SESSION_TYPE=wayland +#export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json diff --git a/.zshrc b/.zshrc index da802f1..9910e98 100644 --- a/.zshrc +++ b/.zshrc @@ -13,12 +13,14 @@ compinit export ZSH=/usr/share/oh-my-zsh export ZSH_CUSTOM=/usr/share/zsh +ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=10" ZSH_THEME="af-magic" plugins=( archlinux docker docker-compose + fzf git systemd vagrant @@ -27,12 +29,11 @@ plugins=( ) source $ZSH/oh-my-zsh.sh -bindkey '^R' history-incremental-pattern-search-backward +#bindkey '^R' history-incremental-pattern-search-backward if [ -f ~/.bash_aliases ]; then source ~/.bash_aliases fi eval $(thefuck --alias) -alias chromium="export GDK_BACKEND=wayland && chromium --enable-features=UseOzonePlatform --ozone-platform=wayland" -alias discord="export GDK_BACKEND=wayland && discord-canary --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer --ozone-platform=wayland" +alias discord="export GDK_BACKEND=wayland && discord-canary"