dotfiles
This commit is contained in:
parent
899b21c3c1
commit
86b8c4919a
42 changed files with 727 additions and 255 deletions
|
@ -24,8 +24,8 @@
|
|||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Fira Mono</family>
|
||||
<family>FiraMono Nerd Font</family>
|
||||
<family>Fira Code</family>
|
||||
<family>FiraCode Nerd Font</family>
|
||||
<family>Font Awesome 6 Pro Regular</family>
|
||||
<family>Twemoji</family>
|
||||
<family>DejaVu Sans Mono</family>
|
||||
|
|
|
@ -1,218 +0,0 @@
|
|||
" ==============================================================================
|
||||
" Name: Termcolors
|
||||
"
|
||||
" Based on OneHalf
|
||||
" ==============================================================================
|
||||
|
||||
set background=dark
|
||||
highlight clear
|
||||
syntax reset
|
||||
|
||||
let g:colors_name="termcolors"
|
||||
let colors_name="termcolors"
|
||||
|
||||
|
||||
let s:red = { "gui": "#cc5c5c", "cterm": "167" }
|
||||
let s:green = { "gui": "#97bd5e", "cterm": "107" }
|
||||
let s:yellow = { "gui": "#f0c767", "cterm": "222" }
|
||||
let s:blue = { "gui": "#789ebf", "cterm": "110" }
|
||||
let s:purple = { "gui": "#a97fb3", "cterm": "139" }
|
||||
let s:cyan = { "gui": "#82bfb3", "cterm": "109" }
|
||||
let s:black = { "gui": "0", "cterm": "0" }
|
||||
let s:darkgray = { "gui": "#2c2b3b", "cterm": "236" }
|
||||
let s:gray = { "gui": "#4d4754", "cterm": "239" }
|
||||
let s:lightgray = { "gui": "#ada0a8", "cterm": "248" }
|
||||
let s:white = { "gui": "#c7c6c3", "cterm": "251" }
|
||||
|
||||
let s:fg = s:white
|
||||
let s:bg = s:black
|
||||
|
||||
let s:comment_fg = s:gray
|
||||
let s:gutter_bg = s:darkgray
|
||||
let s:gutter_fg = s:lightgray
|
||||
|
||||
let s:cursor_line = s:lightgray
|
||||
let s:color_col = s:lightgray
|
||||
|
||||
let s:selection = s:lightgray
|
||||
let s:vertsplit = s:lightgray
|
||||
|
||||
|
||||
function! s:h(group, fg, bg, attr)
|
||||
if type(a:fg) == type({})
|
||||
exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . a:fg.cterm
|
||||
else
|
||||
exec "hi " . a:group . " guifg=NONE cterm=NONE"
|
||||
endif
|
||||
if type(a:bg) == type({})
|
||||
exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . a:bg.cterm
|
||||
else
|
||||
exec "hi " . a:group . " guibg=NONE ctermbg=NONE"
|
||||
endif
|
||||
if a:attr != ""
|
||||
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||
else
|
||||
exec "hi " . a:group . " gui=NONE cterm=NONE"
|
||||
endif
|
||||
endfun
|
||||
|
||||
|
||||
" User interface colors {
|
||||
call s:h("Normal", s:fg, s:bg, "")
|
||||
call s:h("NonText", s:fg, "", "")
|
||||
|
||||
call s:h("Cursor", s:bg, s:blue, "")
|
||||
call s:h("CursorColumn", "", s:cursor_line, "")
|
||||
call s:h("CursorLine", "", s:cursor_line, "")
|
||||
|
||||
call s:h("LineNr", s:gutter_fg, s:gutter_bg, "")
|
||||
call s:h("CursorLineNr", s:fg, "", "")
|
||||
|
||||
call s:h("DiffAdd", s:green, "", "")
|
||||
call s:h("DiffChange", s:yellow, "", "")
|
||||
call s:h("DiffDelete", s:red, "", "")
|
||||
call s:h("DiffText", s:blue, "", "")
|
||||
|
||||
call s:h("IncSearch", s:bg, s:yellow, "")
|
||||
call s:h("Search", s:bg, s:yellow, "")
|
||||
|
||||
call s:h("ErrorMsg", s:fg, "", "")
|
||||
call s:h("ModeMsg", s:fg, "", "")
|
||||
call s:h("MoreMsg", s:fg, "", "")
|
||||
call s:h("WarningMsg", s:red, "", "")
|
||||
call s:h("Question", s:purple, "", "")
|
||||
|
||||
call s:h("Pmenu", s:bg, s:fg, "")
|
||||
call s:h("PmenuSel", s:fg, s:blue, "")
|
||||
call s:h("PmenuSbar", "", s:selection, "")
|
||||
call s:h("PmenuThumb", "", s:fg, "")
|
||||
|
||||
call s:h("SpellBad", s:red, "", "")
|
||||
call s:h("SpellCap", s:yellow, "", "")
|
||||
call s:h("SpellLocal", s:yellow, "", "")
|
||||
call s:h("SpellRare", s:yellow, "", "")
|
||||
|
||||
call s:h("StatusLine", s:blue, s:cursor_line, "")
|
||||
call s:h("StatusLineNC", s:comment_fg, s:cursor_line, "")
|
||||
call s:h("TabLine", s:comment_fg, s:cursor_line, "")
|
||||
call s:h("TabLineFill", s:comment_fg, s:cursor_line, "")
|
||||
call s:h("TabLineSel", s:fg, s:bg, "")
|
||||
|
||||
call s:h("Visual", "", s:selection, "")
|
||||
call s:h("VisualNOS", "", s:selection, "")
|
||||
|
||||
call s:h("ColorColumn", "", s:color_col, "")
|
||||
call s:h("Conceal", s:fg, "", "")
|
||||
call s:h("Directory", s:blue, "", "")
|
||||
call s:h("VertSplit", s:vertsplit, s:vertsplit, "")
|
||||
call s:h("Folded", s:fg, "", "")
|
||||
call s:h("FoldColumn", s:fg, "", "")
|
||||
call s:h("SignColumn", s:fg, "", "")
|
||||
|
||||
call s:h("MatchParen", s:blue, "", "underline")
|
||||
call s:h("SpecialKey", s:fg, "", "")
|
||||
call s:h("Title", s:green, "", "")
|
||||
call s:h("WildMenu", s:fg, "", "")
|
||||
" }
|
||||
|
||||
|
||||
" Syntax colors {
|
||||
call s:h("Comment", s:comment_fg, "", "italic")
|
||||
call s:h("Constant", s:cyan, "", "")
|
||||
call s:h("String", s:green, "", "")
|
||||
call s:h("Character", s:green, "", "")
|
||||
call s:h("Number", s:yellow, "", "")
|
||||
call s:h("Boolean", s:yellow, "", "")
|
||||
call s:h("Float", s:yellow, "", "")
|
||||
|
||||
call s:h("Identifier", s:red, "", "italic")
|
||||
call s:h("Function", s:blue, "", "")
|
||||
call s:h("Statement", s:purple, "", "")
|
||||
|
||||
call s:h("Conditional", s:purple, "", "")
|
||||
call s:h("Repeat", s:purple, "", "")
|
||||
call s:h("Label", s:purple, "", "")
|
||||
call s:h("Operator", s:fg, "", "")
|
||||
call s:h("Keyword", s:red, "", "")
|
||||
call s:h("Exception", s:purple, "", "")
|
||||
|
||||
call s:h("PreProc", s:yellow, "", "")
|
||||
call s:h("Include", s:blue, "", "")
|
||||
call s:h("Define", s:purple, "", "")
|
||||
call s:h("Macro", s:purple, "", "")
|
||||
call s:h("PreCondit", s:yellow, "", "")
|
||||
|
||||
call s:h("Type", s:yellow, "", "")
|
||||
call s:h("StorageClass", s:yellow, "", "")
|
||||
call s:h("Structure", s:yellow, "", "")
|
||||
call s:h("Typedef", s:yellow, "", "")
|
||||
|
||||
call s:h("Special", s:yellow, "", "")
|
||||
call s:h("SpecialChar", s:fg, "", "")
|
||||
call s:h("Tag", s:fg, "", "")
|
||||
call s:h("Delimiter", s:fg, "", "")
|
||||
call s:h("SpecialComment", s:fg, "", "italic")
|
||||
call s:h("Debug", s:fg, "", "")
|
||||
call s:h("Underlined", s:fg, "", "underline")
|
||||
call s:h("Ignore", s:lightgray, "", "")
|
||||
call s:h("Error", s:red, s:gutter_bg, "")
|
||||
call s:h("Todo", s:purple, "", "")
|
||||
" }
|
||||
|
||||
|
||||
" Plugins {
|
||||
" GitGutter
|
||||
call s:h("GitGutterAdd", s:green, s:gutter_bg, "")
|
||||
call s:h("GitGutterDelete", s:red, s:gutter_bg, "")
|
||||
call s:h("GitGutterChange", s:yellow, s:gutter_bg, "")
|
||||
call s:h("GitGutterChangeDelete", s:red, s:gutter_bg, "")
|
||||
" Fugitive
|
||||
call s:h("diffAdded", s:green, "", "")
|
||||
call s:h("diffRemoved", s:red, "", "")
|
||||
" }
|
||||
|
||||
|
||||
" Git {
|
||||
call s:h("gitcommitComment", s:comment_fg, "", "")
|
||||
call s:h("gitcommitUnmerged", s:red, "", "")
|
||||
call s:h("gitcommitOnBranch", s:fg, "", "")
|
||||
call s:h("gitcommitBranch", s:purple, "", "")
|
||||
call s:h("gitcommitDiscardedType", s:red, "", "")
|
||||
call s:h("gitcommitSelectedType", s:green, "", "")
|
||||
call s:h("gitcommitHeader", s:fg, "", "")
|
||||
call s:h("gitcommitUntrackedFile", s:cyan, "", "")
|
||||
call s:h("gitcommitDiscardedFile", s:red, "", "")
|
||||
call s:h("gitcommitSelectedFile", s:green, "", "")
|
||||
call s:h("gitcommitUnmergedFile", s:yellow, "", "")
|
||||
call s:h("gitcommitFile", s:fg, "", "")
|
||||
hi link gitcommitNoBranch gitcommitBranch
|
||||
hi link gitcommitUntracked gitcommitComment
|
||||
hi link gitcommitDiscarded gitcommitComment
|
||||
hi link gitcommitSelected gitcommitComment
|
||||
hi link gitcommitDiscardedArrow gitcommitDiscardedFile
|
||||
hi link gitcommitSelectedArrow gitcommitSelectedFile
|
||||
hi link gitcommitUnmergedArrow gitcommitUnmergedFile
|
||||
" }
|
||||
|
||||
" Fix colors in neovim terminal buffers {
|
||||
if has('nvim')
|
||||
let g:terminal_color_0 = s:black.gui
|
||||
let g:terminal_color_1 = s:red.gui
|
||||
let g:terminal_color_2 = s:green.gui
|
||||
let g:terminal_color_3 = s:yellow.gui
|
||||
let g:terminal_color_4 = s:blue.gui
|
||||
let g:terminal_color_5 = s:purple.gui
|
||||
let g:terminal_color_6 = s:cyan.gui
|
||||
let g:terminal_color_7 = s:white.gui
|
||||
let g:terminal_color_8 = s:black.gui
|
||||
let g:terminal_color_9 = s:red.gui
|
||||
let g:terminal_color_10 = s:green.gui
|
||||
let g:terminal_color_11 = s:yellow.gui
|
||||
let g:terminal_color_12 = s:blue.gui
|
||||
let g:terminal_color_13 = s:purple.gui
|
||||
let g:terminal_color_14 = s:cyan.gui
|
||||
let g:terminal_color_15 = s:white.gui
|
||||
let g:terminal_color_background = s:bg.gui
|
||||
let g:terminal_color_foreground = s:fg.gui
|
||||
endif
|
||||
" }
|
9
.config/nvim/init.lua
Normal file
9
.config/nvim/init.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require('plugin')
|
||||
require('tricolors')
|
||||
require('vimopt')
|
||||
require('tree')
|
||||
require('keybinds')
|
||||
require('treesitter')
|
||||
require('lsp')
|
||||
require('session')
|
||||
|
32
.config/nvim/lua/keybinds.lua
Normal file
32
.config/nvim/lua/keybinds.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
local opts = { noremap = true, silent = true }
|
||||
local keymap = vim.keymap.set
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
local term_float = Terminal:new({ direction = 'float', hidden = 'true' })
|
||||
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
keymap('', '<leader>', '<Nop>', opts)
|
||||
keymap('n', '<leader>e', vim.cmd.NvimTreeToggle)
|
||||
keymap('n', '<leader>m', vim.cmd.Mason)
|
||||
keymap('n', '<leader>h', vim.cmd.noh)
|
||||
keymap('n', '<leader>p', vim.cmd.PlugUpdate)
|
||||
keymap('n', '<leader>gs', vim.cmd.Git)
|
||||
keymap('n', '<leader>t', function() require('trouble').toggle() end)
|
||||
keymap('', '<A-s>', function() term_float:toggle() end)
|
||||
|
||||
keymap('', '<A-1>', function() vim.cmd.BufferLineGoToBuffer(1) end)
|
||||
keymap('', '<A-2>', function() vim.cmd.BufferLineGoToBuffer(2) end)
|
||||
keymap('', '<A-3>', function() vim.cmd.BufferLineGoToBuffer(3) end)
|
||||
keymap('', '<A-4>', function() vim.cmd.BufferLineGoToBuffer(4) end)
|
||||
keymap('', '<A-5>', function() vim.cmd.BufferLineGoToBuffer(5) end)
|
||||
keymap('', '<A-6>', function() vim.cmd.BufferLineGoToBuffer(6) end)
|
||||
keymap('', '<A-7>', function() vim.cmd.BufferLineGoToBuffer(7) end)
|
||||
keymap('', '<A-8>', function() vim.cmd.BufferLineGoToBuffer(8) end)
|
||||
keymap('', '<A-9>', function() vim.cmd.BufferLineGoToBuffer(9) end)
|
||||
keymap('', '<A-0>', function() vim.cmd.BufferLineGoToBuffer(10) end)
|
||||
keymap('', '<A-h>', vim.cmd.BufferLineCyclePrev)
|
||||
keymap('', '<A-l>', vim.cmd.BufferLineCycleNext)
|
||||
keymap('', '<A-S-h>', vim.cmd.BufferLineMovePrev)
|
||||
keymap('', '<A-S-l>', vim.cmd.BufferLineMoveNext)
|
||||
keymap('', '<A-q>', vim.cmd.bd)
|
83
.config/nvim/lua/lsp.lua
Normal file
83
.config/nvim/lua/lsp.lua
Normal file
|
@ -0,0 +1,83 @@
|
|||
local lsp = require('lsp-zero')
|
||||
|
||||
lsp.preset('recommended')
|
||||
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {
|
||||
'tsserver',
|
||||
'eslint',
|
||||
'rust_analyzer',
|
||||
'clangd',
|
||||
'html',
|
||||
'cssls',
|
||||
'pyright',
|
||||
'vimls',
|
||||
'yamlls',
|
||||
'jdtls',
|
||||
'bashls',
|
||||
'lua_ls'
|
||||
},
|
||||
handlers = {
|
||||
lsp.default_setup,
|
||||
},
|
||||
})
|
||||
|
||||
local cmp = require('cmp')
|
||||
|
||||
local cmp_select = {behavior = cmp.SelectBehavior.Select}
|
||||
local cmp_mappings = cmp.mapping.preset.insert({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
})
|
||||
|
||||
cmp_mappings['<Tab>'] = nil
|
||||
cmp_mappings['<S-Tab>'] = nil
|
||||
|
||||
cmp.setup({
|
||||
mapping = cmp_mappings
|
||||
})
|
||||
|
||||
lsp.set_preferences({
|
||||
suggest_lsp_servers = false,
|
||||
sign_icons = {
|
||||
error = 'E',
|
||||
warn = 'W',
|
||||
hint = 'H',
|
||||
info = 'I'
|
||||
}
|
||||
})
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
local opts = {buffer = bufnr, remap = false}
|
||||
local keymap = vim.keymap.set
|
||||
|
||||
keymap("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||
keymap("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||
keymap("n", "<leader>ls", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||
keymap("n", "<leader>lf", function() vim.diagnostic.open_float() end, opts)
|
||||
keymap("n", "[d", function() vim.diagnostic.goto_next() end, opts)
|
||||
keymap("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
||||
keymap("n", "<leader>la", function() vim.lsp.buf.code_action() end, opts)
|
||||
keymap("n", "<leader>lr", function() vim.lsp.buf.references() end, opts)
|
||||
keymap("n", "<leader>ln", function() vim.lsp.buf.rename() end, opts)
|
||||
keymap("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||
end)
|
||||
|
||||
lsp.setup()
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true
|
||||
})
|
||||
|
||||
require("neodev").setup()
|
||||
require("nvim-surround").setup()
|
||||
require("toggleterm").setup()
|
||||
|
||||
local config = {
|
||||
cmd = {'/home/trimill/.local/share/nvim/mason/packages/jdtls/bin/jdtls'},
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||
}
|
||||
require('jdtls').start_or_attach(config)
|
113
.config/nvim/lua/menu.lua
Normal file
113
.config/nvim/lua/menu.lua
Normal file
|
@ -0,0 +1,113 @@
|
|||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
--
|
||||
-- header
|
||||
--
|
||||
|
||||
local function section_fortune_lines()
|
||||
local fortune = vim.api.nvim_exec("silent !fortune", true)
|
||||
|
||||
local tbl = {}
|
||||
local first = true
|
||||
for line in fortune:gmatch("[^\r\n]+") do
|
||||
if first then
|
||||
first = false
|
||||
else
|
||||
local entry = {
|
||||
type = "text",
|
||||
val = line,
|
||||
opts = { hl = "Number", position = "center" }
|
||||
}
|
||||
table.insert(tbl, entry)
|
||||
end
|
||||
end
|
||||
|
||||
return { type = "group", val = tbl }
|
||||
end
|
||||
|
||||
|
||||
|
||||
local section_fortune = {
|
||||
type = "group",
|
||||
val = {
|
||||
section_fortune_lines()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
-- sessions
|
||||
--
|
||||
|
||||
local function section_sessions_entries()
|
||||
local session = require("session")
|
||||
|
||||
local tbl = {}
|
||||
|
||||
local s = session.list_sessions()
|
||||
local i = 1
|
||||
for _, v in pairs(s) do
|
||||
local item = v[1]
|
||||
local item_short = item:gsub(vim.env.HOME, "~")
|
||||
local item_escaped = item:gsub("([\\ $%%])", "\\%1")
|
||||
local cmd = "<cmd>SessionLoad " .. item_escaped .. "<CR>"
|
||||
table.insert(tbl, dashboard.button("s " .. i, item_short, cmd))
|
||||
i = i + 1
|
||||
if i > 9 then break end
|
||||
end
|
||||
|
||||
return {
|
||||
type = "group",
|
||||
val = tbl,
|
||||
opts = {},
|
||||
}
|
||||
end
|
||||
|
||||
local section_sessions = {
|
||||
type = "group",
|
||||
val = {
|
||||
{ type = "text", val = "Recent sessions", opts = { hl = "String", position = "center" } },
|
||||
{ type = "padding", val = 1 },
|
||||
section_sessions_entries(),
|
||||
},
|
||||
}
|
||||
|
||||
--
|
||||
-- actions
|
||||
--
|
||||
|
||||
local section_buttons = {
|
||||
type = "group",
|
||||
val = {
|
||||
{ type = "text", val = "Actions", opts = { hl = "String", position = "center" } },
|
||||
{ type = "padding", val = 1 },
|
||||
dashboard.button("n", "New file", "<cmd>ene<CR>"),
|
||||
dashboard.button("q", "Quit", "<cmd>qa<CR>"),
|
||||
},
|
||||
position = "center",
|
||||
}
|
||||
|
||||
--
|
||||
-- config
|
||||
--
|
||||
|
||||
return {
|
||||
layout = {
|
||||
{ type = "padding", val = 4 },
|
||||
section_fortune,
|
||||
{ type = "padding", val = 2 },
|
||||
section_sessions,
|
||||
{ type = "padding", val = 2 },
|
||||
section_buttons,
|
||||
},
|
||||
opts = {
|
||||
margin = 5,
|
||||
setup = function()
|
||||
vim.api.nvim_create_autocmd('DirChanged', {
|
||||
pattern = '*',
|
||||
group = "alpha_temp",
|
||||
callback = function () require('alpha').redraw() end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
35
.config/nvim/lua/plugin.lua
Normal file
35
.config/nvim/lua/plugin.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
local Plug = vim.fn['plug#']
|
||||
|
||||
vim.call('plug#begin')
|
||||
|
||||
Plug('L3MON4D3/LuaSnip')
|
||||
Plug('nvim-lualine/lualine.nvim')
|
||||
Plug('nvim-tree/nvim-web-devicons')
|
||||
Plug('nvim-tree/nvim-tree.lua')
|
||||
Plug('nvim-lualine/lualine.nvim')
|
||||
Plug('ryanoasis/vim-devicons')
|
||||
Plug('preservim/nerdcommenter')
|
||||
Plug('neoclide/coc.nvim', { branch = 'release' })
|
||||
Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
||||
Plug('nvim-lua/plenary.nvim')
|
||||
Plug('tpope/vim-fugitive')
|
||||
Plug('neovim/nvim-lspconfig')
|
||||
Plug('hrsh7th/nvim-cmp')
|
||||
Plug('hrsh7th/cmp-nvim-lsp')
|
||||
Plug('williamboman/mason.nvim')
|
||||
Plug('williamboman/mason-lspconfig.nvim')
|
||||
Plug('VonHeikemen/lsp-zero.nvim', { branch = 'v3.x' })
|
||||
Plug('mfussenegger/nvim-jdtls')
|
||||
Plug('akinsho/bufferline.nvim', { tag = '*' })
|
||||
Plug('folke/neodev.nvim')
|
||||
Plug('RRethy/vim-illuminate')
|
||||
Plug('SmiteshP/nvim-navic')
|
||||
Plug('j-hui/fidget.nvim', { tag = 'legacy' })
|
||||
Plug('rcarriga/nvim-notify')
|
||||
Plug('folke/trouble.nvim')
|
||||
Plug('kylechui/nvim-surround')
|
||||
Plug('akinsho/toggleterm.nvim', {tag = '*'})
|
||||
Plug('goolord/alpha-nvim')
|
||||
Plug('dhruvasagar/vim-table-mode')
|
||||
|
||||
vim.call('plug#end')
|
47
.config/nvim/lua/session.lua
Normal file
47
.config/nvim/lua/session.lua
Normal file
|
@ -0,0 +1,47 @@
|
|||
local session_dir = vim.env.HOME .. "/.local/share/nvim/sessions/"
|
||||
|
||||
local function session_file(workdir)
|
||||
local basename = workdir:gsub("([ \\%%~$])", "\\%1"):gsub("/", "\\%%")
|
||||
return session_dir .. basename
|
||||
end
|
||||
|
||||
local function unescape(session)
|
||||
return session:sub(#session_dir+1):gsub("%%", "/")
|
||||
end
|
||||
|
||||
local function save_session()
|
||||
vim.cmd("silent !mkdir -p " .. session_dir)
|
||||
vim.cmd("mksession! " .. session_file(vim.fn.getcwd()))
|
||||
end
|
||||
|
||||
local function load_session(dir)
|
||||
vim.cmd.source(session_file(dir))
|
||||
end
|
||||
|
||||
local function del_session(dir)
|
||||
vim.cmd("silent !rm " .. session_file(dir))
|
||||
end
|
||||
|
||||
local function list_sessions()
|
||||
local sessions = vim.split(vim.fn.glob(session_dir .. "*"), '\n', { trimempty=true })
|
||||
local dated_sessions = {}
|
||||
for _, item in pairs(sessions) do
|
||||
table.insert(dated_sessions, { unescape(item), vim.fn.getftime(item) })
|
||||
end
|
||||
table.sort(dated_sessions, function(l, r) return l[2] > r[2] end)
|
||||
return dated_sessions
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({"BufWritePost"}, {
|
||||
callback = save_session
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("SessionSave", function(opts) save_session(opts.args) end, { nargs=0 })
|
||||
vim.api.nvim_create_user_command("SessionLoad", function(opts) load_session(opts.args) end, { nargs=1 })
|
||||
vim.api.nvim_create_user_command("SessionDel", function(opts) del_session(opts.args) end, { nargs=1 })
|
||||
|
||||
return {
|
||||
load_session = load_session,
|
||||
save_session = save_session,
|
||||
list_sessions = list_sessions,
|
||||
}
|
120
.config/nvim/lua/tree.lua
Normal file
120
.config/nvim/lua/tree.lua
Normal file
|
@ -0,0 +1,120 @@
|
|||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
local function on_attach(bufnr)
|
||||
local api = require("nvim-tree.api")
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
local function edit_or_open()
|
||||
local node = api.tree.get_node_under_cursor()
|
||||
|
||||
if node.nodes ~= nil then
|
||||
-- expand or collapse folder
|
||||
api.node.open.edit()
|
||||
else
|
||||
-- open file
|
||||
api.node.open.edit()
|
||||
-- Close the tree if file was opened
|
||||
api.tree.close()
|
||||
end
|
||||
end
|
||||
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
vim.keymap.set("n", "<CR>", edit_or_open, opts("Open"))
|
||||
end
|
||||
|
||||
require("nvim-tree").setup({
|
||||
sort_by = "case_sensitive",
|
||||
view = {
|
||||
adaptive_size = false,
|
||||
centralize_selection = true,
|
||||
width = 30,
|
||||
side = "left",
|
||||
preserve_window_proportions = false,
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "yes",
|
||||
float = {
|
||||
enable = false,
|
||||
quit_on_focus_loss = true,
|
||||
open_win_config = {
|
||||
relative = "editor",
|
||||
border = "rounded",
|
||||
width = 30,
|
||||
height = 30,
|
||||
row = 1,
|
||||
col = 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
},
|
||||
actions = {
|
||||
use_system_clipboard = true,
|
||||
change_dir = {
|
||||
enable = true,
|
||||
global = false,
|
||||
restrict_above_cwd = false,
|
||||
},
|
||||
expand_all = {
|
||||
max_folder_discovery = 300,
|
||||
exclude = {},
|
||||
},
|
||||
file_popup = {
|
||||
open_win_config = {
|
||||
col = 1,
|
||||
row = 1,
|
||||
relative = "cursor",
|
||||
border = "shadow",
|
||||
style = "minimal",
|
||||
},
|
||||
},
|
||||
open_file = {
|
||||
window_picker = {
|
||||
enable = false,
|
||||
picker = "default",
|
||||
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
|
||||
exclude = {
|
||||
filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" },
|
||||
buftype = { "nofile", "terminal", "help" },
|
||||
},
|
||||
}
|
||||
},
|
||||
remove_file = {
|
||||
close_window = true,
|
||||
},
|
||||
|
||||
},
|
||||
tab = {
|
||||
sync = {
|
||||
open = false,
|
||||
close = false,
|
||||
ignore = {},
|
||||
},
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = false,
|
||||
show_on_dirs = true,
|
||||
show_on_open_dirs = true,
|
||||
timeout = 200,
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
git_clean = false,
|
||||
no_buffer = false,
|
||||
custom = {},
|
||||
exclude = {},
|
||||
},
|
||||
update_cwd = true,
|
||||
respect_buf_cwd = true,
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = true
|
||||
},
|
||||
on_attach = on_attach
|
||||
})
|
30
.config/nvim/lua/treesitter.lua
Normal file
30
.config/nvim/lua/treesitter.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
local lsps = {
|
||||
"c",
|
||||
"lua",
|
||||
"rust",
|
||||
"typescript",
|
||||
"javascript",
|
||||
"python",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"query"
|
||||
};
|
||||
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = lsps,
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
ignore_install = { "javascript" },
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = { "c", "rust" },
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
165
.config/nvim/lua/tricolors.lua
Normal file
165
.config/nvim/lua/tricolors.lua
Normal file
|
@ -0,0 +1,165 @@
|
|||
local c = {
|
||||
red = "#cc5c5c",
|
||||
green = "#97bd5e",
|
||||
yellow = "#f0c767",
|
||||
blue = "#789ebf",
|
||||
purple = "#a97fb3",
|
||||
cyan = "#82bfb3",
|
||||
black = "#14171d",
|
||||
darkgray = "#2c2b3b",
|
||||
gray = "#4d4754",
|
||||
lightgray = "#ada0a8",
|
||||
white = "#c7c6c3",
|
||||
}
|
||||
|
||||
|
||||
c.fg = c.white
|
||||
c.bg = "NONE"
|
||||
|
||||
c.comment_fg = c.lightgray
|
||||
c.gutter_bg = c.darkgray
|
||||
c.gutter_fg = c.lightgray
|
||||
|
||||
c.selection = c.lightgray
|
||||
c.vertsplit = c.darkgray
|
||||
|
||||
local hl = vim.api.nvim_set_hl
|
||||
local theme = {}
|
||||
|
||||
theme.set_highlights = function()
|
||||
-- UI
|
||||
hl(0, "Normal", { fg = c.fg, bg = c.bg })
|
||||
hl(0, "NonText", { fg = c.fg, bg = c.bg })
|
||||
|
||||
hl(0, "Cursor", { fg = c.black, bg = c.blue })
|
||||
hl(0, "CursorColumn", { fg = c.black, bg = c.blue })
|
||||
hl(0, "CursorLine", { fg = c.black, bg = c.blue })
|
||||
|
||||
hl(0, "LineNr", { fg = c.gutter_fg, bg = c.gutter_bg })
|
||||
hl(0, "CursorLineNr", { fg = c.fg, bg = "NONE" })
|
||||
|
||||
hl(0, "DiffAdd", { fg = c.green, bg = "NONE" })
|
||||
hl(0, "DiffChange", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "DiffDelete", { fg = c.red, bg = "NONE" })
|
||||
hl(0, "DiffText", { fg = c.blue, bg = "NONE" })
|
||||
|
||||
hl(0, "IncSearch", { fg = c.yellow, bg = c.bg, reverse = true })
|
||||
hl(0, "Search", { fg = c.yellow, bg = c.bg, reverse = true })
|
||||
|
||||
hl(0, "ErrorMsg", { fg = c.red, bg = "NONE" })
|
||||
hl(0, "ModeMsg", { fg = c.lightgray, bg = "NONE" })
|
||||
hl(0, "MoreMsg", { fg = c.lightgray, bg = "NONE" })
|
||||
hl(0, "WarningMsg", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "Question", { fg = c.purple, bg = "NONE" })
|
||||
|
||||
hl(0, "Pmenu", { fg = c.fg, bg = c.darkgray })
|
||||
hl(0, "PmenuSel", { fg = c.fg, bg = c.blue })
|
||||
hl(0, "PmenuSbar", { fg = c.fg, bg = c.selection })
|
||||
hl(0, "PmenuThumb", { fg = c.fg, bg = c.gray })
|
||||
|
||||
hl(0, "SpellBad", { fg = c.red, bg = "NONE" })
|
||||
hl(0, "SpellCap", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "SpellLocal", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "SpellRare", { fg = c.yellow, bg = "NONE" })
|
||||
|
||||
hl(0, "StatusLine", { fg = c.fg, bg = c.darkgray })
|
||||
hl(0, "StatusLineNC", { fg = c.cyan, bg = c.darkgray })
|
||||
hl(0, "TabLine", { fg = c.fg, bg = c.darkgray })
|
||||
hl(0, "TabLineFill", { fg = c.fg, bg = c.darkgray })
|
||||
hl(0, "TabLineSel", { fg = c.fg, bg = c.bg })
|
||||
|
||||
hl(0, "Visual", { fg = c.selection, bg = c.bg, reverse = true })
|
||||
hl(0, "VisualNOS", { fg = c.selection, bg = c.bg, reverse = true })
|
||||
|
||||
hl(0, "ColorColumn", { fg = "NONE", bg = c.color_col })
|
||||
hl(0, "Conceal", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "Directory", { fg = c.blue, bg = "NONE" })
|
||||
hl(0, "VertSplit", { fg = c.vertsplit, bg = c.vertsplit })
|
||||
hl(0, "Folded", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "FoldColumn", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "SignColumn", { fg = c.fg, bg = "NONE" })
|
||||
|
||||
hl(0, "MatchParen", { fg = c.blue, bg = "NONE", underline = true })
|
||||
hl(0, "SpecialKey", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "Title", { fg = c.green, bg = "NONE" })
|
||||
hl(0, "WildMenu", { fg = c.fg, bg = "NONE" })
|
||||
|
||||
-- Syntax
|
||||
hl(0, "Comment", { fg = c.comment_fg, bg = "NONE", italic = true })
|
||||
hl(0, "Constant", { fg = c.cyan, bg = "NONE" })
|
||||
hl(0, "String", { fg = c.green, bg = "NONE" })
|
||||
hl(0, "Character", { fg = c.green, bg = "NONE" })
|
||||
hl(0, "Number", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "Boolean", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "Float", { fg = c.yellow, bg = "NONE" })
|
||||
|
||||
hl(0, "Identifier", { fg = c.fg, bg = "NONE", italic = true })
|
||||
hl(0, "Function", { fg = c.blue, bg = "NONE" })
|
||||
hl(0, "Statement", { fg = c.purple, bg = "NONE" })
|
||||
|
||||
hl(0, "Conditional", { fg = c.purple, bg = "NONE" })
|
||||
hl(0, "Repeat", { fg = c.purple, bg = "NONE" })
|
||||
hl(0, "Label", { fg = c.purple, bg = "NONE" })
|
||||
hl(0, "Operator", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "Keyword", { fg = c.red, bg = "NONE" })
|
||||
hl(0, "Exception", { fg = c.purple, bg = "NONE" })
|
||||
|
||||
hl(0, "PreProc", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "Include", { fg = c.blue, bg = "NONE" })
|
||||
hl(0, "Define", { fg = c.purple, bg = "NONE" })
|
||||
hl(0, "Macro", { fg = c.purple, bg = "NONE" })
|
||||
hl(0, "PreCondit", { fg = c.yellow, bg = "NONE" })
|
||||
|
||||
hl(0, "Type", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "StorageClass", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "Structure", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "Typedef", { fg = c.yellow, bg = "NONE" })
|
||||
|
||||
hl(0, "Special", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "SpecialChar", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "Tag", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "Delimiter", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "SpecialComment", { fg = c.fg, bg = "NONE", italic = true })
|
||||
hl(0, "Debug", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "Underlined", { fg = c.fg, bg = "NONE", underline = true })
|
||||
hl(0, "Ignore", { fg = c.lightgray, bg = "NONE" })
|
||||
hl(0, "Error", { fg = c.red, bg = c.gutter_bg })
|
||||
hl(0, "Todo", { fg = c.purple, bg = "NONE" })
|
||||
|
||||
-- GitGutter
|
||||
hl(0, "GitGutterAdd", { fg = c.green, bg = c.gutter_bg })
|
||||
hl(0, "GitGutterDelete", { fg = c.red, bg = c.gutter_bg })
|
||||
hl(0, "GitGutterChange", { fg = c.yellow, bg = c.gutter_bg })
|
||||
hl(0, "GitGutterChangeDelete", { fg = c.red, bg = c.gutter_bg })
|
||||
-- Fugitive
|
||||
hl(0, "diffAdded", { fg = c.green, bg = "NONE" })
|
||||
hl(0, "diffRemoved", { fg = c.red, bg = "NONE" })
|
||||
|
||||
-- Git
|
||||
hl(0, "gitcommitComment", { fg = c.comment_fg, bg = "NONE" })
|
||||
hl(0, "gitcommitUnmerged", { fg = c.red, bg = "NONE" })
|
||||
hl(0, "gitcommitOnBranch", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "gitcommitBranch", { fg = c.purple, bg = "NONE" })
|
||||
hl(0, "gitcommitDiscardedType", { fg = c.red, bg = "NONE" })
|
||||
hl(0, "gitcommitSelectedType", { fg = c.green, bg = "NONE" })
|
||||
hl(0, "gitcommitHeader", { fg = c.fg, bg = "NONE" })
|
||||
hl(0, "gitcommitUntrackedFile", { fg = c.cyan, bg = "NONE" })
|
||||
hl(0, "gitcommitDiscardedFile", { fg = c.red, bg = "NONE" })
|
||||
hl(0, "gitcommitSelectedFile", { fg = c.green, bg = "NONE" })
|
||||
hl(0, "gitcommitUnmergedFile", { fg = c.yellow, bg = "NONE" })
|
||||
hl(0, "gitcommitFile", { fg = c.fg, bg = "NONE" })
|
||||
end
|
||||
|
||||
vim.cmd("let $NVIM_TUI_ENABLE_TRUE_COLOR=1")
|
||||
vim.cmd("let &t_8f = \"\\<Esc>[38:2:%lu:%lu:%lum\"")
|
||||
vim.cmd("let &t_8b = \"\\<Esc>[48:2:%lu:%lu:%lum\"")
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
vim.cmd("hi clear")
|
||||
vim.opt.background = "dark"
|
||||
if vim.fn.exists("syntax_on") then
|
||||
vim.cmd("syntax reset")
|
||||
end
|
||||
|
||||
vim.g.colors_name = "tricolors"
|
||||
theme.set_highlights()
|
47
.config/nvim/lua/vimopt.lua
Normal file
47
.config/nvim/lua/vimopt.lua
Normal file
|
@ -0,0 +1,47 @@
|
|||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = false
|
||||
vim.opt.autoindent = true
|
||||
|
||||
vim.opt.mouse = "a"
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.ttyfast = true
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.rnu = true
|
||||
vim.opt.swapfile = false
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
globalstatus = true,
|
||||
},
|
||||
}
|
||||
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" })
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
require("bufferline").setup {}
|
||||
require("fidget").setup {
|
||||
window = {
|
||||
blend = 0,
|
||||
},
|
||||
}
|
||||
|
||||
local config = require('menu')
|
||||
require('alpha').setup(config)
|
||||
|
||||
vim.api.nvim_create_autocmd({"BufRead", "BufEnter", "BufWinEnter"}, {
|
||||
pattern = {"*.lalrpop"},
|
||||
command = "set syn=rust",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({"BufRead", "BufEnter", "BufWinEnter"}, {
|
||||
pattern = {"*.vert", "*.frag"},
|
||||
command = "set filetype=glsl",
|
||||
})
|
|
@ -5,26 +5,18 @@
|
|||
|
||||
set $mod Mod4
|
||||
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
set $term alacritty
|
||||
set $browser librewolf
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
set $browser firefox
|
||||
set $menu wofi -IS drun
|
||||
|
||||
exec --no-startup-id wmname LG3D
|
||||
exec --no-startup-id ydotoold
|
||||
exec --no-startup-id dunst -b
|
||||
exec --no-startup-id rand-wallpaper
|
||||
exec --no-startup-id webcord.sh
|
||||
exec --no-startup-id autotiling
|
||||
exec --no-startup-id nm-applet --indicator
|
||||
exec --no-startup-id element.sh
|
||||
exec --no-startup-id blueman-applet
|
||||
exec --no-startup-id thunderbird
|
||||
exec --no-startup-id qbittorrent
|
||||
exec --no-startup-id gajim
|
||||
|
||||
assign [app_id="thunderbird"] workspace number 9
|
||||
assign [app_id="Element"] workspace number 9
|
||||
|
@ -49,10 +41,12 @@ exec_always {
|
|||
}
|
||||
|
||||
# swaymsg -t get_outputs
|
||||
output eDP-1 resolution 3840x2400 position 2133,0
|
||||
output DP-3 resolution 2560x1440 position 0,0 scale 1.2
|
||||
#output eDP-1 resolution 3840x2400 position 2133,0
|
||||
#output DP-2 resolution 2560x1440 position 0,0 scale 1.2
|
||||
#output eDP-1 resolution 3840x2400 position 1920,0
|
||||
#output DP-3 resolution 1920x1080 position 0,0
|
||||
#output DP-2 resolution 1920x1080 position 0,0
|
||||
output eDP-1 resolution 3840x2400 position 0,0
|
||||
output DP-3 resolution 2560x1440 position 1920,0 scale 1.2
|
||||
|
||||
input "type:keyboard" {
|
||||
xkb_layout uscustom
|
||||
|
@ -128,7 +122,7 @@ bindsym $mod+t floating toggle
|
|||
bindsym $mod+y exec ~/.config/sway/scratchpads.sh scratch_term zsh
|
||||
bindsym $mod+u exec dmenu_specialchars
|
||||
bindsym $mod+Shift+u exec dmenu_unicode
|
||||
bindsym $mod+i exec ~/.config/sway/scratchpads.sh scratch_calc ~/.cargo/bin/complexpr
|
||||
bindsym $mod+i exec ~/.config/sway/scratchpads.sh scratch_calc "talc -H ~/.local/share/talc_history"
|
||||
bindsym $mod+o exec ~/.config/sway/scratchpads.sh scratch_cmus cmus
|
||||
bindsym $mod+p exec ~/.config/sway/scratchpads.sh scratch_htop htop
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
( swaymsg -t get_tree | /bin/grep '"app_id": "'$1'"' ) || ( ( $TERMINAL --class=$1 -e $2 & ) && sleep 0.2 )
|
||||
( swaymsg -t get_tree | /bin/grep '"app_id": "'"$1"'"' ) || ( ( "$TERMINAL" --class="$1" -e sh -c "$2" & ) && sleep 0.2 )
|
||||
swaymsg "[app_id=\"$1\"]" scratchpad show
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
"spacing": 10
|
||||
},
|
||||
"clock": {
|
||||
"timezone": "America/New_York",
|
||||
"format": "{:%Y-%m-%d %a %H:%M}",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{:%A, %Y %B %d %H:%M:%S}",
|
||||
|
|
|
@ -8,5 +8,5 @@ while :; do
|
|||
sleep 1;
|
||||
done
|
||||
echo "$unread" | awk '{ print $1 }'
|
||||
sleep 60
|
||||
sleep 300
|
||||
done
|
||||
|
|
43
.zshenv
43
.zshenv
|
@ -1,9 +1,34 @@
|
|||
#!/bin/zsh
|
||||
|
||||
export PATH="$PATH:/usr/lib/rustup/bin:$HOME/.local/scripts:$HOME/.local/bin:$HOME/.local/share/gem/ruby/3.0.0/bin/:$HOME/.local/share/cargo/bin"
|
||||
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_CACHE_HOME="$HOME/.local/cache"
|
||||
|
||||
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
||||
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
|
||||
export MIX_HOME="$XDG_DATA_HOME/mix"
|
||||
export ANDROID_USER_HOME="$XDG_DATA_HOME/android"
|
||||
export DOTNET_CLI_HOME="$XDG_DATA_HOME/dotnet"
|
||||
export FCEUX_HOME="$XDG_CONFIG_HOME/fceux"
|
||||
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
|
||||
export XCURSOR_PATH="/usr/share/icons:$XDG_DATA_HOME/icons"
|
||||
export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH"
|
||||
export LEIN_HOME="$XDG_DATA_HOME/lein"
|
||||
export NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history"
|
||||
export W3M_DIR="$XDG_DATA_HOME/w3m"
|
||||
export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var"
|
||||
export SQLITE_HISTORY="$XDG_CACHE_HOME/sqlite_history"
|
||||
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME/bundle"
|
||||
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME/bundle"
|
||||
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME/bundle"
|
||||
export NUGET_PACKAGES="$XDG_CACHE_HOME/NuGetPackages"
|
||||
export WINEPREFIX="$XDG_DATA_HOME/wine"
|
||||
|
||||
export QT_QPA_PLATFORM=wayland-egl
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export EDITOR=/bin/nvim
|
||||
|
@ -12,18 +37,12 @@ export BROWSER=/bin/librewolf
|
|||
export FILE=/bin/thunar
|
||||
export PAGER=/bin/less
|
||||
export TERMINAL=/bin/alacritty
|
||||
|
||||
export XMODIFIERS=@im=fcitx
|
||||
export GTK_IM_MODULE=fcitx
|
||||
export QT_IM_MODULE=fcitx
|
||||
|
||||
export GNUPGHOME="$HOME/.config/gnupg"
|
||||
export CARGO_HOME="$HOME/.local/share/cargo"
|
||||
export RUSTUP_HOME="$HOME/.local/share/rustup"
|
||||
export MIX_HOME="$HOME/.local/share/mix"
|
||||
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export GTK_THEME=Adwaita-dark
|
||||
export DEBUGINFOD_URLS="https://debuginfod.archlinux.org/"
|
||||
|
||||
export PATH="$PATH:/usr/lib/rustup/bin:$HOME/.local/scripts:$HOME/.local/bin:$HOME/.local/share/gem/ruby/3.0.0/bin/:$CARGO_HOME/bin"
|
||||
|
||||
if [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec sway
|
||||
fi
|
||||
|
|
7
.zshrc
7
.zshrc
|
@ -9,10 +9,6 @@ SSH_AUTH_SOCK="/run/user/$(id -u)/gnupg/S.gpg-agent.ssh"
|
|||
export SSH_AUTH_SOCK
|
||||
gpgconf --launch gpg-agent
|
||||
|
||||
# opam configuration
|
||||
[[ ! -r /home/trimill/.opam/opam-init/init.zsh ]] || source /home/trimill/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
|
||||
eval $(opam env)
|
||||
|
||||
setopt extendedglob
|
||||
bindkey -e
|
||||
tabs 4
|
||||
|
@ -93,7 +89,7 @@ alias cp="cp -i"
|
|||
alias ccat='highlight --out-format=ansi'
|
||||
|
||||
# shorten commands
|
||||
LSARGS='-hN --color=auto --group-directories-first'
|
||||
LSARGS='-h --color=auto --group-directories-first'
|
||||
alias ls="ls $LSARGS"
|
||||
alias ll="ls -l $LSARGS"
|
||||
alias lla="ls -lA $LSARGS"
|
||||
|
@ -126,7 +122,6 @@ alias ytdl-a="youtube-dl --extract-audio --audio-format=mp3"
|
|||
alias ssht="ssh -D 1080"
|
||||
|
||||
alias irc="ssh -t apiaceae tmux attach -t weechat"
|
||||
alias firefox=librewolf
|
||||
|
||||
alias e="emacs -nw"
|
||||
|
||||
|
|
Loading…
Reference in a new issue