From bffa1239a9c89f2d756fd2861166506e12eed2de Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Sat, 10 Jul 2021 03:48:46 +0200 Subject: [PATCH] nord theme ++ --- HOME/.Xresources | 52 +++++++++++++++++++++++++++++++ fish/config.fish | 6 ---- manjaro.md | 2 +- nvim/init.lua | 80 ++++++++++++++++++++++++++++-------------------- tmux/tmux.conf | 28 ++++------------- 5 files changed, 106 insertions(+), 62 deletions(-) create mode 100644 HOME/.Xresources diff --git a/HOME/.Xresources b/HOME/.Xresources new file mode 100644 index 0000000..19f54c1 --- /dev/null +++ b/HOME/.Xresources @@ -0,0 +1,52 @@ +Xft.dpi: 109 +Xft.antialias: true +Xft.hinting: true +Xft.rgba: rgb +Xft.autohint: false +Xft.hintstyle: hintslight +Xft.lcdfilter: lcddefault + +#define nord0 #2E3440 +#define nord1 #3B4252 +#define nord2 #434C5E +#define nord3 #4C566A +#define nord4 #D8DEE9 +#define nord5 #E5E9F0 +#define nord6 #ECEFF4 +#define nord7 #8FBCBB +#define nord8 #88C0D0 +#define nord9 #81A1C1 +#define nord10 #5E81AC +#define nord11 #BF616A +#define nord12 #D08770 +#define nord13 #EBCB8B +#define nord14 #A3BE8C +#define nord15 #B48EAD + +*.foreground: nord4 +*.background: nord0 +*.cursorColor: nord4 +*fadeColor: nord3 +*fading: 35 + +*.color0: nord1 +*.color1: nord11 +*.color2: nord14 +*.color3: nord13 +*.color4: nord9 +*.color5: nord15 +*.color6: nord8 +*.color7: nord5 +*.color8: nord3 +*.color9: nord11 +*.color10: nord14 +*.color11: nord13 +*.color12: nord9 +*.color13: nord15 +*.color14: nord7 +*.color15: nord6 + +*pointerColorBackground: #2B2C2B +*pointerColorForeground: #16A085 +Xcursor.theme: Adwaita +Xcursor.size: 0 diff --git a/fish/config.fish b/fish/config.fish index 65ae568..e57f157 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -7,11 +7,5 @@ set -x CUDA_HOME /opt/cuda set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH $CUDA_HOME/lib64 set -Ua fish_user_paths /home/hjalmarlucius/.local/bin/ -# Base16 Shell -if status --is-interactive - set BASE16_SHELL "$HOME/.config/base16-shell/" - source "$BASE16_SHELL/profile_helper.fish" -end - # fzf bindings set -U FZF_LEGACY_KEYBINDINGS 0 diff --git a/manjaro.md b/manjaro.md index cb8fe88..6df2781 100644 --- a/manjaro.md +++ b/manjaro.md @@ -9,7 +9,7 @@ * `curl -L https://get.oh-my.fish | fish` * `omf install https://github.com/edc/bass` * `omf install https://github.com/jethrokuan/fzf` -* div applications `yay -S thunar ranger drawio-desktop steam-manjaro vtop nvtop` +* div applications `yay -S thunar ranger drawio-desktop steam-manjaro bpytop nvtop` * div utils `yay -S trash-cli rofi redshift flameshot asus-fan-control` * sysrq lock shutdown https://forum.manjaro.org/t/howto-reboot-turn-off-your-frozen-computer-reisub-reisuo/3855 + `echo kernel.sysrq=1 | sudo tee --append /etc/sysctl.d/99-sysctl.conf` diff --git a/nvim/init.lua b/nvim/init.lua index f5d5266..f30ab90 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -18,7 +18,7 @@ vim.g.BASH_Ctrl_l = "off" opt.termguicolors = true opt.cmdheight = 2 opt.background = "dark" -vim.cmd "colorscheme embark" +vim.cmd "colorscheme nord" opt.listchars = "tab:→ ,trail:·,extends:↷,precedes:↶,nbsp:+,eol:↵" opt.list = true -- Show listchars opt.showtabline = 2 @@ -52,7 +52,7 @@ opt.shiftwidth = 2 -- Size of an indent -- search opt.ignorecase = true -- Ignore case opt.smartcase = true -- Do not ignore case with capitals -opt.wildmode = {"list", "longest"} -- Command-line completion mode +opt.wildmode = {"list:longest"} -- Command-line completion mode opt.wildignorecase = true opt.wildignore = opt.wildignore + {"*swp", "*.class", "*.pyc", "*.png", "*.jpg", "*.gif", "*.zip", "*/tmp/*", "*.o", ".obj", "*.so"} @@ -74,7 +74,7 @@ opt.clipboard = opt.clipboard + {"unnamedplus"} -- za zA switch fold (small/full) -- zi toggle folds -- zi zj move to next / prev fold -opt.foldenable = false +opt.foldenable = true opt.foldmethod = "expr" -- ---------------------------------------- @@ -94,7 +94,6 @@ end cmd "au TextYankPost * lua vim.highlight.on_yank {on_visual = false}" create_augroup({ - -- { "FileType", "*", "setlocal formatoptions-=c formatoptions-=r formatoptions-=o" }, -- Disables automatic commenting on newline TODO await ftplugins { "BufWritePre", "*", [[%s/\s\+$//e]] }, -- Delete trailing whitespace { "BufReadPost", "quickfix", "nmap " }, { "TextYankPost", "*", "lua vim.highlight.on_yank {on_visual = false}" }, @@ -111,11 +110,14 @@ local map = vim.api.nvim_set_keymap map("n", "Q", "", {noremap = true}) map("n", "q:", "", {noremap = true}) -map("n", "r", [[:so ~/.config/nvim/init.lua:PackerCompile]], { noremap = true }) +map("n", "E", [[:so ~/.config/nvim/init.lua:PackerCompile]], { noremap = true }) map("n", "e", [[:vnew ~/dotfiles/nvim/init.lua]], { noremap = true }) -map("n", "t", [[:vnew ~/notes/todos.md]], { noremap = true }) -map("n", "n", [[:Explore ~/notes]], { noremap = true }) -map("n", "W", [[:cd %:p:h]], { noremap = true }) +map("n", "nt", [[:vnew ~/notes/todos.md]], { noremap = true }) +map("n", "nc", [[:vnew ~/notes/cheatsheet.md]], { noremap = true }) +map("n", "nl", [[:vnew ~/notes/libs.md]], { noremap = true }) +map("n", "nu", [[:vnew ~/notes/urls.md]], { noremap = true }) +map("n", "nn", [[:Explore ~/notes]], { noremap = true }) +map("n", "ww", [[:cd %:p:h]], { noremap = true }) map("n", "", ":noh", { silent = true, noremap = true } ) -- to navigate the completion menu @@ -178,6 +180,9 @@ require("packer").startup {function(use) -- smooth scrolling use {"psliwka/vim-smoothie"} + -- tables + use {"dhruvasagar/vim-table-mode"} + -- git use {"tpope/vim-fugitive", config = function() @@ -201,13 +206,13 @@ require("packer").startup {function(use) ["n "] = { expr = true, [[&diff ? "]c" : "lua require('gitsigns.actions').next_hunk()"]]}, ["n "] = { expr = true, [[&diff ? "[c" : "lua require('gitsigns.actions').prev_hunk()"]]}, - ["n s"] = [[lua require("gitsigns").stage_hunk()]], - ["v s"] = [[lua require("gitsigns").stage_hunk({vim.fn.line("."), vim.fn.line("v")})]], - ["n u"] = [[lua require("gitsigns").undo_stage_hunk()]], - ["n x"] = [[lua require("gitsigns").reset_hunk()]], - ["v x"] = [[lua require("gitsigns").reset_hunk({vim.fn.line("."), vim.fn.line("v")})]], - ["n i"] = [[lua require("gitsigns").preview_hunk()]], - ["n b"] = [[lua require("gitsigns").blame_line(true)]], + ["n gs"] = [[lua require("gitsigns").stage_hunk()]], + ["v gs"] = [[lua require("gitsigns").stage_hunk({vim.fn.line("."), vim.fn.line("v")})]], + ["n gu"] = [[lua require("gitsigns").undo_stage_hunk()]], + ["n gx"] = [[lua require("gitsigns").reset_hunk()]], + ["v gx"] = [[lua require("gitsigns").reset_hunk({vim.fn.line("."), vim.fn.line("v")})]], + ["n gp"] = [[lua require("gitsigns").preview_hunk()]], + ["n gb"] = [[lua require("gitsigns").blame_line(true)]], -- Text objects ["o ih"] = [[:lua require("gitsigns.actions").select_hunk()]], @@ -242,6 +247,11 @@ require("packer").startup {function(use) end } + use {"arcticicestudio/nord-vim", + config = function() + end + } + use {"junegunn/seoul256.vim", config = function() vim.g.seoul256_background = 235 @@ -335,7 +345,10 @@ require("packer").startup {function(use) requires = {"kyazdani42/nvim-web-devicons"}, config = function() require("lualine").setup { - options = { theme = "molokai" }, + options = { + -- theme = "everforest", + theme = "nord", + }, extensions = { "fugitive", }, @@ -395,6 +408,7 @@ require("packer").startup {function(use) use {"nvim-telescope/telescope.nvim", requires = {"nvim-lua/popup.nvim", "nvim-lua/plenary.nvim"}, config = function() + -- TODO grep with regex local map = vim.api.nvim_set_keymap local opts = { noremap = true } local actions = require("telescope.actions") @@ -402,15 +416,15 @@ require("packer").startup {function(use) map("n", "", "Telescope git_files", opts ) map("n", "", "Telescope live_grep", opts ) map("n", "", "Telescope buffers", opts ) - map("n", "", "Telescope filetypes", opts ) + -- map("n", "", "Telescope filetypes", opts ) map("n", "", "Telescope colorscheme", opts ) - map("n", "a", "Telescope lsp_code_actions", opts ) - map("v", "a", "Telescope lsp_range_code_actions", opts ) - map("n", "d", "Telescope lsp_document_diagnostics", opts ) - map("n", "D", "Telescope lsp_workspace_diagnostics", opts ) - map("n", "g", "Telescope git_status", opts ) - map("n", "c", "Telescope git_commits", opts ) - map("n", "C", "Telescope git_bcommits", opts ) + map("n", "la", "Telescope lsp_code_actions", opts ) + map("v", "la", "Telescope lsp_range_code_actions", opts ) + map("n", "ld", "Telescope lsp_document_diagnostics", opts ) + map("n", "lD", "Telescope lsp_workspace_diagnostics", opts ) + map("n", "gg", "Telescope git_status", opts ) + map("n", "gc", "Telescope git_commits", opts ) + map("n", "gC", "Telescope git_bcommits", opts ) map("n", "", "Telescope", opts ) require("telescope").setup{ defaults = { @@ -524,13 +538,13 @@ require("packer").startup {function(use) bmap(bufnr, "n", "", ":Lspsaga diagnostic_jump_next", opts) bmap(bufnr, "n", "", ":Lspsaga diagnostic_jump_prev", opts) -- popups - bmap(bufnr, "n", "", ":Lspsaga signature_help", opts) - bmap(bufnr, "i", "", ":Lspsaga signature_help", opts) + bmap(bufnr, "n", "", ":Lspsaga signature_help", opts) + bmap(bufnr, "i", "", "lua require('lspsaga.signaturehelp').signature_help()", opts) bmap(bufnr, "n", "", "lua require('lspsaga.action').smart_scroll_with_saga(1)", opts) bmap(bufnr, "n", "", "lua require('lspsaga.action').smart_scroll_with_saga(-1)", opts) -- actions - bmap(bufnr, "n", "", ":Lspsaga range_code_action", opts) - bmap(bufnr, "v", "", ":Lspsaga range_code_action", opts) + bmap(bufnr, "n", "ll", ":Lspsaga range_code_action", opts) + bmap(bufnr, "v", "ll", ":Lspsaga range_code_action", opts) -- other if client.resolved_capabilities.goto_definition then bmap(bufnr, "n", "gd", ":Lspsaga preview_definition", opts) @@ -548,9 +562,9 @@ require("packer").startup {function(use) if client.resolved_capabilities.document_formatting or client.resolved_capabilities.document_range_formatting then vim.api.nvim_command [[augroup Format]] vim.api.nvim_command [[autocmd! * ]] - vim.api.nvim_command [[autocmd BufWritePost python lua vim.lsp.buf.formatting_seq_sync()]] - vim.api.nvim_command [[autocmd BufWritePost markdown lua vim.lsp.buf.formatting_seq_sync()]] - vim.api.nvim_command [[autocmd BufWritePost yaml lua vim.lsp.buf.formatting_seq_sync()]] + vim.api.nvim_command [[autocmd BufWritePost *.py lua vim.lsp.buf.formatting_seq_sync()]] + vim.api.nvim_command [[autocmd BufWritePost *.md lua vim.lsp.buf.formatting_seq_sync()]] + vim.api.nvim_command [[autocmd BufWritePost *.yaml lua vim.lsp.buf.formatting_seq_sync()]] vim.api.nvim_command [[augroup END]] end end @@ -597,11 +611,11 @@ require("packer").startup {function(use) } nvim_lsp.efm.setup{ on_attach = on_attach, - init_options = {documentFormatting = true}, + init_options = { documentFormatting = true }, filetypes = { "python", "markdown", "yaml", "lua" }, root_dir = vim.loop.cwd, settings = { - rootMarkers = {".git/"}, + rootMarkers = { ".git/" }, languages = { python = { { diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 549d869..deb0046 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -171,29 +171,13 @@ set -g @tmux-fzf-launch-key 'f' # various plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' -set -g @plugin 'tmux-plugins/tmux-resurrect' -set -g @plugin 'tmux-plugins/tmux-continuum' set -g @plugin 'tmux-plugins/tmux-yank' -set -g @plugin 'sainnhe/tmux-fzf' -# note: fzf bound to 'F' -#set -g @plugin 'odedlaz/tmux-onedark-theme' - -# solarized plugin and options - #set -g @plugin 'seebi/tmux-colors-solarized' -# set -g @colors-solarized '256' (the default) -# set -g @colors-solarized 'dark' -# set -g @colors-solarized 'light' - #set -g @colors-solarized 'base16' - -# tmux themepack - set -g @plugin 'jimeh/tmux-themepack' - #set -g @themepack 'basic' - #set -g @themepack 'powerline/default/yellow' - #set -g @themepack 'powerline/default/orange' - #set -g @themepack 'powerline/block/blue' - #set -g @themepack 'powerline/block/cyan' - #set -g @themepack 'powerline/default/gray' - set -g @themepack 'powerline/double/yellow' +set -g @plugin 'arcticicestudio/nord-tmux' +# set -g @plugin 'tmux-plugins/tmux-resurrect' +# set -g @plugin 'tmux-plugins/tmux-continuum' +# set -g @plugin 'odedlaz/tmux-onedark-theme' +# set -g @plugin 'seebi/tmux-colors-solarized' +# set -g @plugin 'jimeh/tmux-themepack' # keep at bottom run -b '~/.config/tmux/plugins/tpm/tpm'