init
This commit is contained in:
180
.config/foot/foot.ini
Normal file
180
.config/foot/foot.ini
Normal file
@@ -0,0 +1,180 @@
|
||||
# -*- conf -*-
|
||||
# include=/usr/share/foot/themes/gruvbox-dark
|
||||
|
||||
|
||||
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
|
||||
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
|
||||
# login-shell=no
|
||||
#font=RobotoMono Nerd Font:size=14
|
||||
font=Firacode Nerd Font:size=14
|
||||
#font=JetBrainsMonoNL-Regular:size=14
|
||||
# font-bold=<bold variant of regular font>
|
||||
# font-italic=<italic variant of regular font>
|
||||
# font-bold-italic=<bold+italic variant of regular font>
|
||||
# line-height=<font metrics>
|
||||
# letter-spacing=0
|
||||
# horizontal-letter-offset=0
|
||||
# vertical-letter-offset=0
|
||||
# underline-offset=<font metrics>
|
||||
# box-drawings-uses-font-glyphs=no
|
||||
# dpi-aware=yes
|
||||
|
||||
# initial-window-size-pixels=700x500# Or,
|
||||
# initial-window-size-chars=<COLSxROWS>
|
||||
# initial-window-mode=windowed
|
||||
pad=5x5 # optionally append 'center'
|
||||
resize-delay-ms=50
|
||||
|
||||
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
|
||||
|
||||
# bold-text-in-bright=no
|
||||
# bell=none
|
||||
# word-delimiters=,│`|:"'()[]{}<>
|
||||
# selection-target=primary
|
||||
# workers=<number of logical CPUs>
|
||||
|
||||
[bell]
|
||||
# urgent=no
|
||||
# notify=no
|
||||
# command=
|
||||
# command-focused=no
|
||||
|
||||
[scrollback]
|
||||
lines=10000
|
||||
# multiplier=3.0
|
||||
# indicator-position=relative
|
||||
# indicator-format=
|
||||
|
||||
[url]
|
||||
# launch=xdg-open ${url}
|
||||
# label-letters=sadfjklewcmpgh
|
||||
# osc8-underline=url-mode
|
||||
# protocols = http, https, ftp, ftps, file, gemini, gopher
|
||||
|
||||
[cursor]
|
||||
# style=block
|
||||
color= 141a1b eeeeee
|
||||
# blink=no
|
||||
# beam-thickness=1.5
|
||||
# underline-thickness=<font underline thickness>
|
||||
|
||||
[mouse]
|
||||
# hide-when-typing=no
|
||||
# alternate-scroll-mode=yes
|
||||
|
||||
[colors]
|
||||
alpha=0.7
|
||||
foreground=cdd6f4 # Text
|
||||
background=1e1e2e # Base
|
||||
regular0=45475a # Surface 1
|
||||
regular1=f38ba8 # red
|
||||
regular2=a6e3a1 # green
|
||||
regular3=f9e2af # yellow
|
||||
regular4=89b4fa # blue
|
||||
regular5=f5c2e7 # pink
|
||||
regular6=94e2d5 # teal
|
||||
regular7=bac2de # Subtext 1
|
||||
bright0=585b70 # Surface 2
|
||||
bright1=f38ba8 # red
|
||||
bright2=a6e3a1 # green
|
||||
bright3=f9e2af # yellow
|
||||
bright4=89b4fa # blue
|
||||
bright5=f5c2e7 # pink
|
||||
bright6=94e2d5 # teal
|
||||
bright7=a6adc8 # Subtext 0
|
||||
|
||||
#[colors]
|
||||
#alpha=0.8
|
||||
#foreground=eeeeee
|
||||
#background=141a1b
|
||||
#regular0=141a1B # black
|
||||
#regular1=cd3f45 # red
|
||||
#regular2=9fca56 # green
|
||||
#regular3=e6cd69 # yellow
|
||||
#regular4=16a085 # blue
|
||||
#regular5=a074c4 # magenta
|
||||
#regular6=55b5db # cyan
|
||||
#regular7=d6d6d6 # white
|
||||
#bright0=41535B # bright black
|
||||
#bright1=cd3f45 # red
|
||||
#bright2=9fca56 # green
|
||||
#bright3=e6cd69 # yellow
|
||||
#bright4=16a085 # blue
|
||||
#bright5=a074c4 # magenta
|
||||
#bright6=55b5db # cyan
|
||||
#bright7=ffffff # bright white
|
||||
# 16 = <256-color palette #16>
|
||||
# ...
|
||||
# 255 = <256-color palette #255>
|
||||
# selection-foreground=<inverse foreground/background>
|
||||
# selection-background=<inverse foreground/background>
|
||||
# jump-labels=<regular0> <regular3>
|
||||
# urls=<regular3>
|
||||
|
||||
[csd]
|
||||
# preferred=server
|
||||
# size=26
|
||||
# color=<foreground color>
|
||||
# button-width=26
|
||||
# button-color=<background color>
|
||||
# button-minimize-color=<regular4>
|
||||
# button-maximize-color=<regular2>
|
||||
# button-close-color=<regular1>
|
||||
|
||||
[key-bindings]
|
||||
# scrollback-up-page=Shift+Page_Up
|
||||
# scrollback-up-half-page=none
|
||||
# scrollback-up-line=none
|
||||
# scrollback-down-page=Shift+Page_Down
|
||||
# scrollback-down-half-page=none
|
||||
# scrollback-down-line=none
|
||||
# clipboard-copy=Control+Shift+c
|
||||
# clipboard-paste=Control+Shift+v
|
||||
# primary-paste=Shift+Insert
|
||||
# search-start=Control+Shift+r
|
||||
# font-increase=Control+plus Control+equal Control+KP_Add
|
||||
# font-decrease=Control+minus Control+KP_Subtract
|
||||
# font-reset=Control+0 Control+KP_0
|
||||
# spawn-terminal=Control+Shift+n
|
||||
# minimize=none
|
||||
# maximize=none
|
||||
# fullscreen=none
|
||||
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-selected=[xargs -r firefox] none
|
||||
# show-urls-launch=Control+Shift+u
|
||||
# show-urls-copy=none
|
||||
|
||||
[search-bindings]
|
||||
# cancel=Control+g Escape
|
||||
# commit=Return
|
||||
# find-prev=Control+r
|
||||
# find-next=Control+s
|
||||
# cursor-left=Left Control+b
|
||||
# cursor-left-word=Control+Left Mod1+b
|
||||
# cursor-right=Right Control+f
|
||||
# cursor-right-word=Control+Right Mod1+f
|
||||
# cursor-home=Home Control+a
|
||||
# cursor-end=End Control+e
|
||||
# delete-prev=BackSpace
|
||||
# delete-prev-word=Mod1+BackSpace Control+BackSpace
|
||||
# delete-next=Delete
|
||||
# delete-next-word=Mod1+d Control+Delete
|
||||
# extend-to-word-boundary=Control+w
|
||||
# extend-to-next-whitespace=Control+Shift+w
|
||||
# clipboard-paste=Control+v Control+y
|
||||
# primary-paste=Shift+Insert
|
||||
|
||||
[url-bindings]
|
||||
# cancel=Control+g Control+d Escape
|
||||
# toggle-url-visible=t
|
||||
|
||||
[mouse-bindings]
|
||||
# primary-paste=BTN_MIDDLE
|
||||
# select-begin=BTN_LEFT
|
||||
# select-begin-block=Control+BTN_LEFT
|
||||
# select-extend=BTN_RIGHT
|
||||
# select-extend-character-wise=Control+BTN_RIGHT
|
||||
# select-word=BTN_LEFT-2
|
||||
# select-word-whitespace=Control+BTN_LEFT-2
|
||||
# select-row=BTN_LEFT-3
|
||||
90
.config/nvim/.session.vim
Normal file
90
.config/nvim/.session.vim
Normal file
@@ -0,0 +1,90 @@
|
||||
let SessionLoad = 1
|
||||
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
|
||||
let v:this_session=expand("<sfile>:p")
|
||||
silent only
|
||||
silent tabonly
|
||||
cd ~/.config/nvim
|
||||
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||
let s:wipebuf = bufnr('%')
|
||||
endif
|
||||
let s:shortmess_save = &shortmess
|
||||
if &shortmess =~ 'A'
|
||||
set shortmess=aoOA
|
||||
else
|
||||
set shortmess=aoO
|
||||
endif
|
||||
badd +98 lua/core/keymaps.lua
|
||||
argglobal
|
||||
%argdel
|
||||
$argadd lua/core/keymaps.lua
|
||||
edit lua/core/keymaps.lua
|
||||
let s:save_splitbelow = &splitbelow
|
||||
let s:save_splitright = &splitright
|
||||
set splitbelow splitright
|
||||
wincmd _ | wincmd |
|
||||
vsplit
|
||||
1wincmd h
|
||||
wincmd w
|
||||
let &splitbelow = s:save_splitbelow
|
||||
let &splitright = s:save_splitright
|
||||
wincmd t
|
||||
let s:save_winminheight = &winminheight
|
||||
let s:save_winminwidth = &winminwidth
|
||||
set winminheight=0
|
||||
set winheight=1
|
||||
set winminwidth=0
|
||||
set winwidth=1
|
||||
exe 'vert 1resize ' . ((&columns * 40 + 94) / 189)
|
||||
exe 'vert 2resize ' . ((&columns * 148 + 94) / 189)
|
||||
argglobal
|
||||
enew
|
||||
file neo-tree\ filesystem\ \[1]
|
||||
balt lua/core/keymaps.lua
|
||||
setlocal foldmethod=manual
|
||||
setlocal foldexpr=0
|
||||
setlocal foldmarker={{{,}}}
|
||||
setlocal foldignore=#
|
||||
setlocal foldlevel=0
|
||||
setlocal foldminlines=1
|
||||
setlocal foldnestmax=20
|
||||
setlocal foldenable
|
||||
wincmd w
|
||||
argglobal
|
||||
setlocal foldmethod=manual
|
||||
setlocal foldexpr=v:lua.vim.treesitter.foldexpr()
|
||||
setlocal foldmarker={{{,}}}
|
||||
setlocal foldignore=#
|
||||
setlocal foldlevel=0
|
||||
setlocal foldminlines=1
|
||||
setlocal foldnestmax=20
|
||||
setlocal foldenable
|
||||
silent! normal! zE
|
||||
let &fdl = &fdl
|
||||
let s:l = 113 - ((34 * winheight(0) + 21) / 42)
|
||||
if s:l < 1 | let s:l = 1 | endif
|
||||
keepjumps exe s:l
|
||||
normal! zt
|
||||
keepjumps 113
|
||||
normal! 049|
|
||||
wincmd w
|
||||
2wincmd w
|
||||
exe 'vert 1resize ' . ((&columns * 40 + 94) / 189)
|
||||
exe 'vert 2resize ' . ((&columns * 148 + 94) / 189)
|
||||
tabnext 1
|
||||
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
||||
silent exe 'bwipe ' . s:wipebuf
|
||||
endif
|
||||
unlet! s:wipebuf
|
||||
set winheight=1 winwidth=20
|
||||
let &shortmess = s:shortmess_save
|
||||
let &winminheight = s:save_winminheight
|
||||
let &winminwidth = s:save_winminwidth
|
||||
let s:sx = expand("<sfile>:p:r")."x.vim"
|
||||
if filereadable(s:sx)
|
||||
exe "source " . fnameescape(s:sx)
|
||||
endif
|
||||
let &g:so = s:so_save | let &g:siso = s:siso_save
|
||||
nohlsearch
|
||||
doautoall SessionLoadPost
|
||||
unlet SessionLoad
|
||||
" vim: set ft=vim :
|
||||
6
.config/nvim/.stylua.toml
Normal file
6
.config/nvim/.stylua.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
column_width = 160
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
#call_parentheses = "None"
|
||||
36
.config/nvim/init.lua
Normal file
36
.config/nvim/init.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
require 'core.options'
|
||||
require 'core.keymaps'
|
||||
|
||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
|
||||
if vim.v.shell_error ~= 0 then
|
||||
error('Error cloning lazy.nvim:\n' .. out)
|
||||
end
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require('lazy').setup {
|
||||
require 'plugins.neotree',
|
||||
require 'plugins.colortheme',
|
||||
require 'plugins.bufferline',
|
||||
require 'plugins.lualine',
|
||||
require 'plugins.treesitter',
|
||||
require 'plugins.telescope',
|
||||
require 'plugins.lsp',
|
||||
require 'plugins.autocomplete',
|
||||
require 'plugins.none-ls',
|
||||
require 'plugins.rustaceanvim',
|
||||
require 'plugins.gitsigns',
|
||||
require 'plugins.alpha',
|
||||
require 'plugins.indent-blankline',
|
||||
require 'plugins.vim-tmux-navigator',
|
||||
require 'plugins.lazygit',
|
||||
require 'plugins.harpoon',
|
||||
require 'plugins.toggleterm',
|
||||
require 'plugins.misc',
|
||||
require 'plugins.cheatsheet',
|
||||
}
|
||||
51
.config/nvim/lazy-lock.json
Normal file
51
.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"everforest-nvim": { "branch": "main", "commit": "2eb7c348f880ba93de4d98cae049c9441f5d4d49" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "8b729e489f1475615dc6c9737da917b3bc163605" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
|
||||
"marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "3856bbb0da214d1f2f3d5a2dd3fea26591f930f9" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "75d60a8f928decd8b38897f80849768b7c540a5b" },
|
||||
"mason.nvim": { "branch": "main", "commit": "9eaedb864cdadc29c6eb7d761a6c0d8aee26c91b" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
|
||||
"none-ls-extras.nvim": { "branch": "main", "commit": "924fe88a9983c7d90dbb31fc4e3129a583ea0a90" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "90e4a27ccaa25979a6b732b9f06dfa43b54957b7" },
|
||||
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
|
||||
"nvcheatsheet.nvim": { "branch": "master", "commit": "618850d2a14ac82f8d9bc560cce923d728e7424a" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "562487bc108bf73c2493f9e701b9334b48163216" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "1e1106492f7e4512642603db34e542c938ad579c" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
|
||||
"vim-rhubarb": { "branch": "master", "commit": "386daa2e9d98e23e27ad089afcbe5c5a903e488d" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "0ecda542c0bd3ea26444044c7f03e469a6bb0bff" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
||||
123
.config/nvim/lua/core/keymaps.lua
Normal file
123
.config/nvim/lua/core/keymaps.lua
Normal file
@@ -0,0 +1,123 @@
|
||||
-- Set leader key
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- For conciseness
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Disable the spacebar key's default behavior in Normal and Visual modes
|
||||
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||
|
||||
-- Allow moving the cursor through wrapped lines with j, k
|
||||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
-- clear highlights
|
||||
vim.keymap.set('n', '<Esc>', ':noh<CR>', opts)
|
||||
|
||||
-- save file
|
||||
vim.keymap.set('n', '<C-s>', '<cmd> w <CR>', opts)
|
||||
|
||||
-- save file without auto-formatting
|
||||
vim.keymap.set('n', '<leader>sn', '<cmd>noautocmd w <CR>', opts)
|
||||
|
||||
-- quit file
|
||||
vim.keymap.set('n', '<C-q>', '<cmd> q <CR>', opts)
|
||||
|
||||
-- delete single character without copying into register
|
||||
vim.keymap.set('n', 'x', '"_x', opts)
|
||||
|
||||
-- Vertical scroll and center
|
||||
vim.keymap.set('n', '<C-d>', '<C-d>zz', opts)
|
||||
vim.keymap.set('n', '<C-u>', '<C-u>zz', opts)
|
||||
|
||||
-- Find and center
|
||||
vim.keymap.set('n', 'n', 'nzzzv')
|
||||
vim.keymap.set('n', 'N', 'Nzzzv')
|
||||
|
||||
-- Resize with arrows
|
||||
vim.keymap.set('n', '<Up>', ':resize -2<CR>', opts)
|
||||
vim.keymap.set('n', '<Down>', ':resize +2<CR>', opts)
|
||||
vim.keymap.set('n', '<Left>', ':vertical resize -2<CR>', opts)
|
||||
vim.keymap.set('n', '<Right>', ':vertical resize +2<CR>', opts)
|
||||
|
||||
-- Buffers
|
||||
vim.keymap.set('n', '<Tab>', ':bnext<CR>', opts)
|
||||
vim.keymap.set('n', '<S-Tab>', ':bprevious<CR>', opts)
|
||||
vim.keymap.set('n', '<leader>x', ':Bdelete!<CR>', opts) -- close buffer
|
||||
vim.keymap.set('n', '<leader>b', '<cmd> enew <CR>', opts) -- new buffer
|
||||
|
||||
-- Increment/decrement numbers
|
||||
vim.keymap.set('n', '<leader>+', '<C-a>', opts) -- increment
|
||||
vim.keymap.set('n', '<leader>-', '<C-x>', opts) -- decrement
|
||||
|
||||
-- Window management
|
||||
vim.keymap.set('n', '<leader>v', '<C-w>v', opts) -- split window vertically
|
||||
vim.keymap.set('n', '<leader>h', '<C-w>s', opts) -- split window horizontally
|
||||
vim.keymap.set('n', '<leader>se', '<C-w>=', opts) -- make split windows equal width & height
|
||||
vim.keymap.set('n', '<leader>xs', ':close<CR>', opts) -- close current split window
|
||||
|
||||
-- Navigate between splits
|
||||
vim.keymap.set('n', '<C-k>', ':wincmd k<CR>', opts)
|
||||
vim.keymap.set('n', '<C-j>', ':wincmd j<CR>', opts)
|
||||
vim.keymap.set('n', '<C-h>', ':wincmd h<CR>', opts)
|
||||
vim.keymap.set('n', '<C-l>', ':wincmd l<CR>', opts)
|
||||
|
||||
-- Tabs
|
||||
vim.keymap.set('n', '<leader>to', ':tabnew<CR>', opts) -- open new tab
|
||||
vim.keymap.set('n', '<leader>tx', ':tabclose<CR>', opts) -- close current tab
|
||||
vim.keymap.set('n', '<leader>tn', ':tabn<CR>', opts) -- go to next tab
|
||||
vim.keymap.set('n', '<leader>tp', ':tabp<CR>', opts) -- go to previous tab
|
||||
|
||||
-- Toggle line wrapping
|
||||
vim.keymap.set('n', '<leader>lw', '<cmd>set wrap!<CR>', opts)
|
||||
|
||||
-- Press jk fast to exit insert mode
|
||||
vim.keymap.set('i', 'jk', '<ESC>', opts)
|
||||
vim.keymap.set('i', 'kj', '<ESC>', opts)
|
||||
|
||||
-- Stay in indent mode
|
||||
vim.keymap.set('v', '<', '<gv', opts)
|
||||
vim.keymap.set('v', '>', '>gv', opts)
|
||||
|
||||
-- Move text up and down
|
||||
vim.keymap.set('v', '<A-j>', ':m .+1<CR>==', opts)
|
||||
vim.keymap.set('v', '<A-k>', ':m .-2<CR>==', opts)
|
||||
|
||||
-- Keep last yanked when pasting
|
||||
vim.keymap.set('v', 'p', '"_dP', opts)
|
||||
|
||||
-- Replace word under cursor
|
||||
vim.keymap.set('n', '<leader>j', '*``cgn', opts)
|
||||
|
||||
-- Explicitly yank to system clipboard (highlighted and entire row)
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>y', [["+y]])
|
||||
vim.keymap.set('n', '<leader>Y', [["+Y]])
|
||||
|
||||
-- Toggle diagnostics
|
||||
local diagnostics_active = true
|
||||
|
||||
vim.keymap.set('n', '<leader>do', function()
|
||||
diagnostics_active = not diagnostics_active
|
||||
|
||||
if diagnostics_active then
|
||||
vim.diagnostic.enable(0)
|
||||
else
|
||||
vim.diagnostic.disable(0)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
|
||||
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||
|
||||
-- Save and load session
|
||||
vim.keymap.set('n', '<leader>ss', ':mksession! .session.vim<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>sl', ':source .session.vim<CR>', { noremap = true, silent = false })
|
||||
|
||||
-- Lazygit
|
||||
vim.keymap.set('n', '<leader>gg', ':LazyGit<CR>', opts)
|
||||
-- Exit terminal mode
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
43
.config/nvim/lua/core/options.lua
Normal file
43
.config/nvim/lua/core/options.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
vim.o.hlsearch = false -- Set highlight on search
|
||||
vim.wo.number = true -- Make line numbers default
|
||||
vim.o.mouse = 'a' -- Enable mouse mode
|
||||
vim.o.clipboard = 'unnamedplus' -- Sync clipboard between OS and Neovim.
|
||||
vim.o.breakindent = true -- Enable break indent
|
||||
vim.o.undofile = true -- Save undo history
|
||||
vim.o.ignorecase = true -- Case-insensitive searching UNLESS \C or capital in search
|
||||
vim.o.smartcase = true -- smart case
|
||||
vim.wo.signcolumn = 'yes' -- Keep signcolumn on by default
|
||||
vim.o.updatetime = 250 -- Decrease update time
|
||||
vim.o.timeoutlen = 300 -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
vim.o.backup = false -- creates a backup file
|
||||
vim.o.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
|
||||
vim.o.completeopt = 'menuone,noselect' -- Set completeopt to have a better completion experience
|
||||
vim.opt.termguicolors = true -- set termguicolors to enable highlight groups
|
||||
vim.o.whichwrap = 'bs<>[]hl' -- which "horizontal" keys are allowed to travel to prev/next line
|
||||
vim.o.wrap = false -- display lines as one long line
|
||||
vim.o.linebreak = true -- companion to wrap don't split words
|
||||
vim.o.scrolloff = 4 -- minimal number of screen lines to keep above and below the cursor
|
||||
vim.o.sidescrolloff = 8 -- minimal number of screen columns either side of cursor if wrap is `false`
|
||||
vim.o.relativenumber = false -- set relative numbered lines
|
||||
vim.o.numberwidth = 4 -- set number column width to 2 {default 4}
|
||||
vim.o.shiftwidth = 4 -- the number of spaces inserted for each indentation
|
||||
vim.o.tabstop = 4 -- insert n spaces for a tab
|
||||
vim.o.softtabstop = 4 -- Number of spaces that a tab counts for while performing editing operations
|
||||
vim.o.expandtab = true -- convert tabs to spaces
|
||||
vim.o.cursorline = false -- highlight the current line
|
||||
vim.o.splitbelow = true -- force all horizontal splits to go below current window
|
||||
vim.o.splitright = true -- force all vertical splits to go to the right of current window
|
||||
vim.o.swapfile = false -- creates a swapfile
|
||||
vim.o.smartindent = true -- make indenting smarter again
|
||||
vim.o.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
||||
vim.o.showtabline = 2 -- always show tabs
|
||||
vim.o.backspace = 'indent,eol,start' -- allow backspace on
|
||||
vim.o.pumheight = 10 -- pop up menu height
|
||||
vim.o.conceallevel = 0 -- so that `` is visible in markdown files
|
||||
vim.o.fileencoding = 'utf-8' -- the encoding written to a file
|
||||
vim.o.cmdheight = 1 -- more space in the neovim command line for displaying messages
|
||||
vim.o.autoindent = true -- copy indent from current line when starting new one
|
||||
vim.opt.shortmess:append('c') -- don't give |ins-completion-menu| messages
|
||||
vim.opt.iskeyword:append('-') -- hyphenated words recognized by searches
|
||||
vim.opt.formatoptions:remove({ 'c', 'r', 'o' }) -- don't insert the current comment leader automatically for auto-wrapping comments using 'textwidth', hitting <Enter> in insert mode, or hitting 'o' or 'O' in normal mode.
|
||||
vim.opt.runtimepath:remove('/usr/share/vim/vimfiles') -- separate vim plugins from neovim in case vim still in use
|
||||
24
.config/nvim/lua/plugins/alpha.lua
Normal file
24
.config/nvim/lua/plugins/alpha.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
return {
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.startify")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
[[ ]],
|
||||
[[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ]],
|
||||
[[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ]],
|
||||
[[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ]],
|
||||
[[ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ]],
|
||||
[[ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ]],
|
||||
[[ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]],
|
||||
[[ ]],
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
end,
|
||||
}
|
||||
143
.config/nvim/lua/plugins/autocomplete.lua
Normal file
143
.config/nvim/lua/plugins/autocomplete.lua
Normal file
@@ -0,0 +1,143 @@
|
||||
return { -- Autocompletion
|
||||
'hrsh7th/nvim-cmp',
|
||||
-- event = 'InsertEnter',
|
||||
dependencies = {
|
||||
-- Snippet Engine & its associated nvim-cmp source
|
||||
{
|
||||
'L3MON4D3/LuaSnip',
|
||||
build = (function()
|
||||
-- Build Step is needed for regex support in snippets
|
||||
-- This step is not supported in many windows environments
|
||||
-- Remove the below condition to re-enable on windows
|
||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
||||
return
|
||||
end
|
||||
return 'make install_jsregexp'
|
||||
end)(),
|
||||
},
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
|
||||
-- Adds other completion capabilities.
|
||||
-- nvim-cmp does not ship with all sources by default. They are split
|
||||
-- into multiple repos for maintenance purposes.
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
|
||||
-- Adds a number of user-friendly snippets
|
||||
'rafamadriz/friendly-snippets',
|
||||
},
|
||||
config = function()
|
||||
local cmp = require 'cmp'
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
local luasnip = require 'luasnip'
|
||||
luasnip.config.setup {}
|
||||
|
||||
local kind_icons = {
|
||||
Text = '',
|
||||
Method = 'm',
|
||||
Function = '',
|
||||
Constructor = '',
|
||||
Field = '',
|
||||
Variable = '',
|
||||
Class = '',
|
||||
Interface = '',
|
||||
Module = '',
|
||||
Property = '',
|
||||
Unit = '',
|
||||
Value = '',
|
||||
Enum = '',
|
||||
Keyword = '',
|
||||
Snippet = '',
|
||||
Color = '',
|
||||
File = '',
|
||||
Reference = '',
|
||||
Folder = '',
|
||||
EnumMember = '',
|
||||
Constant = '',
|
||||
Struct = '',
|
||||
Event = '',
|
||||
Operator = '',
|
||||
TypeParameter = '',
|
||||
}
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
completion = { completeopt = 'menu,menuone,noinsert' },
|
||||
-- window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
-- },
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
['<C-j>'] = cmp.mapping.select_next_item(), -- Select the [n]ext item
|
||||
['<C-k>'] = cmp.mapping.select_prev_item(), -- Select the [p]revious item
|
||||
['<CR>'] = cmp.mapping.confirm { select = true }, -- Accept the completion with Enter.
|
||||
['<C-c>'] = cmp.mapping.complete {}, -- Manually trigger a completion from nvim-cmp.
|
||||
|
||||
-- Think of <c-l> as moving to the right of your snippet expansion.
|
||||
-- So if you have a snippet that's like:
|
||||
-- function $name($args)
|
||||
-- $body
|
||||
-- end
|
||||
--
|
||||
-- <c-l> will move you to the right of each of the expansion locations.
|
||||
-- <c-h> is similar, except moving you backwards.
|
||||
['<C-l>'] = cmp.mapping(function()
|
||||
if luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<C-h>'] = cmp.mapping(function()
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
|
||||
-- Select next/previous item with Tab / Shift + Tab
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
},
|
||||
formatting = {
|
||||
fields = { 'kind', 'abbr', 'menu' },
|
||||
format = function(entry, vim_item)
|
||||
-- Kind icons
|
||||
vim_item.kind = string.format('%s', kind_icons[vim_item.kind])
|
||||
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = '[LSP]',
|
||||
luasnip = '[Snippet]',
|
||||
buffer = '[Buffer]',
|
||||
path = '[Path]',
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
81
.config/nvim/lua/plugins/bufferline.lua
Normal file
81
.config/nvim/lua/plugins/bufferline.lua
Normal file
@@ -0,0 +1,81 @@
|
||||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
dependencies = {
|
||||
'moll/vim-bbye',
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
-- vim.opt.linespace = 8
|
||||
|
||||
require('bufferline').setup {
|
||||
options = {
|
||||
mode = 'buffers', -- set to "tabs" to only show tabpages instead
|
||||
themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default
|
||||
numbers = 'none', -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string,
|
||||
close_command = 'Bdelete! %d', -- can be a string | function, see "Mouse actions"
|
||||
right_mouse_command = 'Bdelete! %d', -- can be a string | function, see "Mouse actions"
|
||||
left_mouse_command = 'buffer %d', -- can be a string | function, see "Mouse actions"
|
||||
middle_mouse_command = nil, -- can be a string | function, see "Mouse actions"
|
||||
-- buffer_close_icon = '',
|
||||
buffer_close_icon = '✗',
|
||||
-- buffer_close_icon = '✕',
|
||||
close_icon = '',
|
||||
path_components = 1, -- Show only the file name without the directory
|
||||
modified_icon = '●',
|
||||
left_trunc_marker = '',
|
||||
right_trunc_marker = '',
|
||||
max_name_length = 30,
|
||||
max_prefix_length = 30, -- prefix used when a buffer is de-duplicated
|
||||
tab_size = 21,
|
||||
diagnostics = false,
|
||||
diagnostics_update_in_insert = false,
|
||||
color_icons = true,
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
show_close_icon = true,
|
||||
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
|
||||
separator_style = { '│', '│' }, -- | "thick" | "thin" | { 'any', 'any' },
|
||||
enforce_regular_tabs = true,
|
||||
always_show_bufferline = true,
|
||||
show_tab_indicators = false,
|
||||
indicator = {
|
||||
-- icon = '▎', -- this should be omitted if indicator style is not 'icon'
|
||||
style = 'none', -- Options: 'icon', 'underline', 'none'
|
||||
},
|
||||
icon_pinned = '',
|
||||
minimum_padding = 1,
|
||||
maximum_padding = 5,
|
||||
maximum_length = 15,
|
||||
sort_by = 'insert_at_end',
|
||||
},
|
||||
highlights = {
|
||||
separator = {
|
||||
fg = '#434C5E',
|
||||
},
|
||||
buffer_selected = {
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
-- separator_selected = {},
|
||||
-- tab_selected = {},
|
||||
-- background = {},
|
||||
-- indicator_selected = {},
|
||||
-- fill = {},
|
||||
},
|
||||
}
|
||||
|
||||
-- Keymaps
|
||||
local opts = { noremap = true, silent = true, desc = 'Go to Buffer' }
|
||||
-- vim.keymap.set("n", "<Tab>", "<Cmd>BufferLineCycleNext<CR>", {})
|
||||
-- vim.keymap.set("n", "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>", {})
|
||||
-- vim.keymap.set('n', '<leader>1', "<cmd>lua require('bufferline').go_to_buffer(1)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>2', "<cmd>lua require('bufferline').go_to_buffer(2)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>3', "<cmd>lua require('bufferline').go_to_buffer(3)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>4', "<cmd>lua require('bufferline').go_to_buffer(4)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>5', "<cmd>lua require('bufferline').go_to_buffer(5)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>6', "<cmd>lua require('bufferline').go_to_buffer(6)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>7', "<cmd>lua require('bufferline').go_to_buffer(7)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>8', "<cmd>lua require('bufferline').go_to_buffer(8)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>9', "<cmd>lua require('bufferline').go_to_buffer(9)<CR>", opts)
|
||||
end,
|
||||
}
|
||||
53
.config/nvim/lua/plugins/cheatsheet.lua
Normal file
53
.config/nvim/lua/plugins/cheatsheet.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
local opts = {
|
||||
-- TODO: Actually setup cheatsheet. This is just an example.
|
||||
header = {
|
||||
' ',
|
||||
' ',
|
||||
' ',
|
||||
'█▀▀ █░█ █▀▀ ▄▀█ ▀█▀ █▀ █░█ █▀▀ █▀▀ ▀█▀',
|
||||
'█▄▄ █▀█ ██▄ █▀█ ░█░ ▄█ █▀█ ██▄ ██▄ ░█░',
|
||||
' ',
|
||||
' ',
|
||||
' ',
|
||||
},
|
||||
-- Example keymaps (this doesn't create any)
|
||||
keymaps = {
|
||||
['Oil'] = {
|
||||
{ 'Toggle oil (closes without saving)', '<leader>q' },
|
||||
{ 'Select entry', '⏎' },
|
||||
{ 'Select entry', 'l' },
|
||||
{ 'Go to parent', 'h' },
|
||||
{ 'Open vertical split', '⌃v' },
|
||||
{ 'Open horizontal split', '⌃x' },
|
||||
{ 'Go to current working directory', '.' },
|
||||
},
|
||||
['Cmp'] = {
|
||||
{ 'Select entry', '⌃f' },
|
||||
{ 'Next result - Jump to next snippet placeholder', '⌃n' },
|
||||
{ 'Previous result - Jump to previous snippet placeholder', '⌃p' },
|
||||
{ 'Scroll up in preview', '⌃u' },
|
||||
{ 'Scroll down in preview', '⌃d' },
|
||||
{ 'Abort autocompletion', '⌃e' },
|
||||
},
|
||||
['Comment'] = {
|
||||
{ 'Comment line toggle', 'gcc' },
|
||||
{ 'Comment block toggle', 'gbc' },
|
||||
{ 'Comment visual selection', 'gc' },
|
||||
{ 'Comment visual selection using block delimiters', 'gb' },
|
||||
{ 'Comment out text object line wise', 'gc<motion>' },
|
||||
{ 'Comment out text object block wise', 'gb<motion>' },
|
||||
{ 'Add comment on the line above', 'gcO' },
|
||||
{ 'Add comment on the line below', 'gco' },
|
||||
{ 'Add comment at the end of line', 'gcA' },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
'smartinellimarco/nvcheatsheet.nvim',
|
||||
config = function()
|
||||
local cheatsheet = require('nvcheatsheet')
|
||||
cheatsheet.setup(opts)
|
||||
vim.keymap.set('n', '<F1>', cheatsheet.toggle)
|
||||
end,
|
||||
}
|
||||
15
.config/nvim/lua/plugins/colortheme.lua
Normal file
15
.config/nvim/lua/plugins/colortheme.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
"neanias/everforest-nvim",
|
||||
version = false,
|
||||
lazy = false,
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
-- Optional; default configuration will be used if setup isn't called.
|
||||
config = function()
|
||||
local everforest = require("everforest")
|
||||
everforest.setup({
|
||||
transparent_background_level = 1,
|
||||
-- Your config here
|
||||
})
|
||||
everforest.load()
|
||||
end,
|
||||
}
|
||||
21
.config/nvim/lua/plugins/gitsigns.lua
Normal file
21
.config/nvim/lua/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
opts = {
|
||||
-- See `:help gitsigns.txt`
|
||||
signs = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
},
|
||||
},
|
||||
}
|
||||
67
.config/nvim/lua/plugins/harpoon.lua
Normal file
67
.config/nvim/lua/plugins/harpoon.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup({})
|
||||
|
||||
-- -- Use Telescope as a UI
|
||||
-- local conf = require('telescope.config').values
|
||||
-- local function toggle_telescope(harpoon_files)
|
||||
-- local file_paths = {}
|
||||
-- for _, item in ipairs(harpoon_files.items) do
|
||||
-- table.insert(file_paths, item.value)
|
||||
-- end
|
||||
--
|
||||
-- require('telescope.pickers')
|
||||
-- .new({}, {
|
||||
-- prompt_title = 'Harpoon',
|
||||
-- finder = require('telescope.finders').new_table {
|
||||
-- results = file_paths,
|
||||
-- },
|
||||
-- previewer = conf.file_previewer {},
|
||||
-- sorter = conf.generic_sorter {},
|
||||
-- })
|
||||
-- :find()
|
||||
-- end
|
||||
--
|
||||
-- vim.keymap.set('n', '<leader>M', function()
|
||||
-- toggle_telescope(harpoon:list())
|
||||
-- end, { desc = 'Open harpoon window' })
|
||||
|
||||
-- Default UI
|
||||
vim.keymap.set("n", "<leader>M", function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>m", function()
|
||||
harpoon:list():add()
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>1", function()
|
||||
harpoon:list():select(1)
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>2", function()
|
||||
harpoon:list():select(2)
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>3", function()
|
||||
harpoon:list():select(3)
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>4", function()
|
||||
harpoon:list():select(4)
|
||||
end)
|
||||
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
vim.keymap.set("n", "<leader>p", function()
|
||||
harpoon:list():prev()
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>n", function()
|
||||
harpoon:list():next()
|
||||
end)
|
||||
end,
|
||||
}
|
||||
25
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
25
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
opts = {
|
||||
indent = {
|
||||
char = "▏",
|
||||
},
|
||||
scope = {
|
||||
show_start = false,
|
||||
show_end = false,
|
||||
show_exact_scope = false,
|
||||
},
|
||||
exclude = {
|
||||
filetypes = {
|
||||
"help",
|
||||
"startify",
|
||||
"dashboard",
|
||||
"packer",
|
||||
"neogitstatus",
|
||||
"NvimTree",
|
||||
"Trouble",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
33
.config/nvim/lua/plugins/lazygit.lua
Normal file
33
.config/nvim/lua/plugins/lazygit.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
return {
|
||||
"kdheepak/lazygit.nvim",
|
||||
cmd = {
|
||||
"LazyGit",
|
||||
"LazyGitConfig",
|
||||
"LazyGitCurrentFile",
|
||||
"LazyGitFilter",
|
||||
"LazyGitFilterCurrentFile",
|
||||
},
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||
-- order to load the plugin when the command is run for the first time
|
||||
keys = {
|
||||
-- Run LazyGit command and set background to transparent
|
||||
{
|
||||
"<leader>lg",
|
||||
"<cmd>LazyGit<cr><cmd>hi LazyGitFloat guibg=NONE guifg=NONE<cr><cmd>setlocal winhl=NormalFloat:LazyGitFloat<cr>",
|
||||
desc = "LazyGit",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
vim.g.lazygit_floating_window_winblend = 0 -- transparency of floating window (0-100)
|
||||
vim.g.lazygit_floating_window_scaling_factor = 0.9 -- scaling factor for floating window
|
||||
vim.g.lazygit_floating_window_border_chars = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" } -- customize lazygit popup window border characters
|
||||
vim.g.lazygit_floating_window_use_plenary = 0 -- use plenary.nvim to manage floating window if available
|
||||
vim.g.lazygit_use_neovim_remote = 1 -- fallback to 0 if neovim-remote is not installed
|
||||
vim.g.lazygit_use_custom_config_file_path = 0 -- config file path is evaluated if this value is 1
|
||||
vim.g.lazygit_config_file_path = {} -- table of custom config file paths
|
||||
end,
|
||||
}
|
||||
247
.config/nvim/lua/plugins/lsp.lua
Normal file
247
.config/nvim/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,247 @@
|
||||
return { -- LSP Configuration & Plugins
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
-- Automatically install LSPs and related tools to stdpath for neovim
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
|
||||
-- Useful status updates for LSP.
|
||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||
{
|
||||
"j-hui/fidget.nvim",
|
||||
tag = "v1.4.0",
|
||||
opts = {
|
||||
progress = {
|
||||
display = {
|
||||
done_icon = "✓", -- Icon shown when all LSP progress tasks are complete
|
||||
},
|
||||
},
|
||||
notification = {
|
||||
window = {
|
||||
winblend = 0, -- Background color opacity in the notification window
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("lsp-attach", { clear = true }),
|
||||
-- Create a function that lets us more easily define mappings specific LSP related items.
|
||||
-- It sets the mode, buffer and description for us each time.
|
||||
callback = function(event)
|
||||
local map = function(keys, func, desc)
|
||||
vim.keymap.set("n", keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
|
||||
end
|
||||
|
||||
-- Jump to the definition of the word under your cursor.
|
||||
-- This is where a variable was first declared, or where a function is defined, etc.
|
||||
-- To jump back, press <C-T>.
|
||||
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
|
||||
|
||||
-- Find references for the word under your cursor.
|
||||
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||
|
||||
-- Jump to the implementation of the word under your cursor.
|
||||
-- Useful when your language has ways of declaring types without an actual implementation.
|
||||
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
|
||||
|
||||
-- Jump to the type of the word under your cursor.
|
||||
-- Useful when you're not sure what type a variable is and you want to see
|
||||
-- the definition of its *type*, not where it was *defined*.
|
||||
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
|
||||
|
||||
-- Fuzzy find all the symbols in your current document.
|
||||
-- Symbols are things like variables, functions, types, etc.
|
||||
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
|
||||
|
||||
-- Fuzzy find all the symbols in your current workspace
|
||||
-- Similar to document symbols, except searches over your whole project.
|
||||
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
|
||||
|
||||
-- Rename the variable under your cursor
|
||||
-- Most Language Servers support renaming across files, etc.
|
||||
map("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
|
||||
|
||||
-- Execute a code action, usually your cursor needs to be on top of an error
|
||||
-- or a suggestion from your LSP for this to activate.
|
||||
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
|
||||
|
||||
-- Opens a popup that displays documentation about the word under your cursor
|
||||
-- See `:help K` for why this keymap
|
||||
map("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||
|
||||
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
||||
-- For example, in C this would take you to the header
|
||||
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||
|
||||
map("<leader>wa", vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder")
|
||||
map("<leader>wr", vim.lsp.buf.remove_workspace_folder, "[W]orkspace [R]emove Folder")
|
||||
map("<leader>wl", function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, "[W]orkspace [L]ist Folders")
|
||||
|
||||
-- The following two autocommands are used to highlight references of the
|
||||
-- word under your cursor when your cursor rests there for a little while.
|
||||
-- See `:help CursorHold` for information about when this is executed
|
||||
--
|
||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client.server_capabilities.documentHighlightProvider then
|
||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
buffer = event.buf,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||
buffer = event.buf,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
||||
|
||||
-- Enable the following language servers
|
||||
local servers = {
|
||||
lua_ls = {
|
||||
-- cmd = {...},
|
||||
-- filetypes { ...},
|
||||
-- capabilities = {},
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = "LuaJIT" },
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
-- Tells lua_ls where to find all the Lua files that you have loaded
|
||||
-- for your neovim configuration.
|
||||
library = {
|
||||
"${3rd}/luv/library",
|
||||
unpack(vim.api.nvim_get_runtime_file("", true)),
|
||||
},
|
||||
-- If lua_ls is really slow on your computer, you can try this instead:
|
||||
-- library = { vim.env.VIMRUNTIME },
|
||||
},
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
diagnostics = { disable = { "missing-fields" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
pylsp = {
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pyflakes = { enabled = false },
|
||||
pycodestyle = { enabled = false },
|
||||
autopep8 = { enabled = false },
|
||||
yapf = { enabled = false },
|
||||
mccabe = { enabled = false },
|
||||
pylsp_mypy = { enabled = false },
|
||||
pylsp_black = { enabled = false },
|
||||
pylsp_isort = { enabled = false },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
puppet = {
|
||||
cmd = { "puppet-languageserver", "--stdio" },
|
||||
filetypes = { "puppet" },
|
||||
root_markers = {
|
||||
"manifests",
|
||||
".puppet-lint.rc",
|
||||
"hiera.yaml",
|
||||
".git",
|
||||
},
|
||||
},
|
||||
-- basedpyright = {
|
||||
-- -- Config options: https://github.com/DetachHead/basedpyright/blob/main/docs/settings.md
|
||||
-- settings = {
|
||||
-- basedpyright = {
|
||||
-- disableOrganizeImports = true, -- Using Ruff's import organizer
|
||||
-- disableLanguageServices = false,
|
||||
-- analysis = {
|
||||
-- ignore = { '*' }, -- Ignore all files for analysis to exclusively use Ruff for linting
|
||||
-- typeCheckingMode = 'off',
|
||||
-- diagnosticMode = 'openFilesOnly', -- Only analyze open files
|
||||
-- useLibraryCodeForTypes = true,
|
||||
-- autoImportCompletions = true, -- whether pyright offers auto-import completions
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
ruff = {
|
||||
-- Notes on code actions: https://github.com/astral-sh/ruff-lsp/issues/119#issuecomment-1595628355
|
||||
-- Get isort like behavior: https://github.com/astral-sh/ruff/issues/8926#issuecomment-1834048218
|
||||
commands = {
|
||||
RuffAutofix = {
|
||||
function()
|
||||
vim.lsp.buf.execute_command({
|
||||
command = "ruff.applyAutofix",
|
||||
arguments = {
|
||||
{ uri = vim.uri_from_bufnr(0) },
|
||||
},
|
||||
})
|
||||
end,
|
||||
description = "Ruff: Fix all auto-fixable problems",
|
||||
},
|
||||
RuffOrganizeImports = {
|
||||
function()
|
||||
vim.lsp.buf.execute_command({
|
||||
command = "ruff.applyOrganizeImports",
|
||||
arguments = {
|
||||
{ uri = vim.uri_from_bufnr(0) },
|
||||
},
|
||||
})
|
||||
end,
|
||||
description = "Ruff: Format imports",
|
||||
},
|
||||
},
|
||||
},
|
||||
jsonls = {},
|
||||
sqlls = {},
|
||||
terraformls = {},
|
||||
yamlls = {},
|
||||
bashls = {},
|
||||
dockerls = {},
|
||||
docker_compose_language_service = {},
|
||||
-- tailwindcss = {},
|
||||
-- graphql = {},
|
||||
-- html = { filetypes = { 'html', 'twig', 'hbs' } },
|
||||
-- cssls = {},
|
||||
-- ltex = {},
|
||||
-- texlab = {},
|
||||
}
|
||||
|
||||
-- Ensure the servers and tools above are installed
|
||||
require("mason").setup()
|
||||
|
||||
-- You can add other tools here that you want Mason to install
|
||||
-- for you, so that they are available from within Neovim.
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
"stylua", -- Used to format lua code
|
||||
})
|
||||
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
-- This handles overriding only values explicitly passed
|
||||
-- by the server configuration above. Useful when disabling
|
||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
|
||||
require("lspconfig")[server_name].setup(server)
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
117
.config/nvim/lua/plugins/lualine.lua
Normal file
117
.config/nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,117 @@
|
||||
-- Set lualine as statusline
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
config = function()
|
||||
-- Adapted from: https://github.com/nvim-lualine/lualine.nvim/blob/master/lua/lualine/themes/onedark.lua
|
||||
local colors = {
|
||||
blue = '#61afef',
|
||||
green = '#98c379',
|
||||
purple = '#c678dd',
|
||||
cyan = '#56b6c2',
|
||||
red1 = '#e06c75',
|
||||
red2 = '#be5046',
|
||||
yellow = '#e5c07b',
|
||||
fg = '#abb2bf',
|
||||
bg = '#282c34',
|
||||
gray1 = '#828997',
|
||||
gray2 = '#2c323c',
|
||||
gray3 = '#3e4452',
|
||||
}
|
||||
|
||||
local onedark_theme = {
|
||||
normal = {
|
||||
a = { fg = colors.bg, bg = colors.green, gui = 'bold' },
|
||||
b = { fg = colors.fg, bg = colors.gray3 },
|
||||
c = { fg = colors.fg, bg = colors.gray2 },
|
||||
},
|
||||
command = { a = { fg = colors.bg, bg = colors.yellow, gui = 'bold' } },
|
||||
insert = { a = { fg = colors.bg, bg = colors.blue, gui = 'bold' } },
|
||||
visual = { a = { fg = colors.bg, bg = colors.purple, gui = 'bold' } },
|
||||
terminal = { a = { fg = colors.bg, bg = colors.cyan, gui = 'bold' } },
|
||||
replace = { a = { fg = colors.bg, bg = colors.red1, gui = 'bold' } },
|
||||
inactive = {
|
||||
a = { fg = colors.gray1, bg = colors.bg, gui = 'bold' },
|
||||
b = { fg = colors.gray1, bg = colors.bg },
|
||||
c = { fg = colors.gray1, bg = colors.gray2 },
|
||||
},
|
||||
}
|
||||
|
||||
-- Import color theme based on environment variable NVIM_THEME
|
||||
local env_var_nvim_theme = os.getenv 'NVIM_THEME' or 'nord'
|
||||
|
||||
-- Define a table of themes
|
||||
local themes = {
|
||||
onedark = onedark_theme,
|
||||
nord = 'nord',
|
||||
}
|
||||
|
||||
local mode = {
|
||||
'mode',
|
||||
fmt = function(str)
|
||||
-- return ' ' .. str:sub(1, 1) -- displays only the first character of the mode
|
||||
return ' ' .. str
|
||||
end,
|
||||
}
|
||||
|
||||
local filename = {
|
||||
'filename',
|
||||
file_status = true, -- displays file status (readonly status, modified status)
|
||||
path = 0, -- 0 = just filename, 1 = relative path, 2 = absolute path
|
||||
}
|
||||
|
||||
local hide_in_width = function()
|
||||
return vim.fn.winwidth(0) > 100
|
||||
end
|
||||
|
||||
local diagnostics = {
|
||||
'diagnostics',
|
||||
sources = { 'nvim_diagnostic' },
|
||||
sections = { 'error', 'warn' },
|
||||
symbols = { error = ' ', warn = ' ', info = ' ', hint = ' ' },
|
||||
colored = false,
|
||||
update_in_insert = false,
|
||||
always_visible = false,
|
||||
cond = hide_in_width,
|
||||
}
|
||||
|
||||
local diff = {
|
||||
'diff',
|
||||
colored = false,
|
||||
symbols = { added = ' ', modified = ' ', removed = ' ' }, -- changes diff symbols
|
||||
cond = hide_in_width,
|
||||
}
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = themes[env_var_nvim_theme], -- Set theme based on environment variable
|
||||
-- Some useful glyphs:
|
||||
-- https://www.nerdfonts.com/cheat-sheet
|
||||
--
|
||||
section_separators = { left = '', right = '' },
|
||||
component_separators = { left = '', right = '' },
|
||||
disabled_filetypes = { 'alpha', 'neo-tree', 'Avante' },
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { mode },
|
||||
lualine_b = { 'branch' },
|
||||
lualine_c = { filename },
|
||||
-- lualine_x = { diagnostics, diff, { 'encoding', cond = hide_in_width }, { 'filetype', cond = hide_in_width } },
|
||||
lualine_x = { diagnostics, diff, { 'filetype', cond = hide_in_width } },
|
||||
lualine_y = { 'location' },
|
||||
lualine_z = { 'progress' },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { { 'filename', path = 1 } },
|
||||
lualine_x = { { 'location', padding = 0 } },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
extensions = { 'fugitive' },
|
||||
}
|
||||
end,
|
||||
}
|
||||
72
.config/nvim/lua/plugins/misc.lua
Normal file
72
.config/nvim/lua/plugins/misc.lua
Normal file
@@ -0,0 +1,72 @@
|
||||
-- Standalone plugins with less than 10 lines of config go here
|
||||
return {
|
||||
{
|
||||
-- autoclose tags
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
{
|
||||
-- detect tabstop and shiftwidth automatically
|
||||
"tpope/vim-sleuth",
|
||||
},
|
||||
{
|
||||
-- Powerful Git integration for Vim
|
||||
"tpope/vim-fugitive",
|
||||
},
|
||||
{
|
||||
-- GitHub integration for vim-fugitive
|
||||
"tpope/vim-rhubarb",
|
||||
},
|
||||
{
|
||||
-- Hints keybinds
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
-- win = {
|
||||
-- border = {
|
||||
-- { '┌', 'FloatBorder' },
|
||||
-- { '─', 'FloatBorder' },
|
||||
-- { '┐', 'FloatBorder' },
|
||||
-- { '│', 'FloatBorder' },
|
||||
-- { '┘', 'FloatBorder' },
|
||||
-- { '─', 'FloatBorder' },
|
||||
-- { '└', 'FloatBorder' },
|
||||
-- { '│', 'FloatBorder' },
|
||||
-- },
|
||||
-- },
|
||||
},
|
||||
},
|
||||
{
|
||||
-- Autoclose parentheses, brackets, quotes, etc.
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true,
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
-- Highlight todo, notes, etc in comments
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VimEnter",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = { signs = false },
|
||||
},
|
||||
{
|
||||
-- high-performance color highlighter
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = function()
|
||||
require("colorizer").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
{
|
||||
"chentoast/marks.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
},
|
||||
},
|
||||
{
|
||||
"rust-lang/rust.vim",
|
||||
ft = "rust",
|
||||
init = function()
|
||||
vim.g.rustfmt_autosave = 1
|
||||
end,
|
||||
},
|
||||
}
|
||||
386
.config/nvim/lua/plugins/neotree.lua
Normal file
386
.config/nvim/lua/plugins/neotree.lua
Normal file
@@ -0,0 +1,386 @@
|
||||
return {
|
||||
-- If you want neo-tree's file operations to work with LSP (updating imports, etc.), you can use a plugin like
|
||||
-- https://github.com/antosha417/nvim-lsp-file-operations:
|
||||
-- {
|
||||
-- "antosha417/nvim-lsp-file-operations",
|
||||
-- dependencies = {
|
||||
-- "nvim-lua/plenary.nvim",
|
||||
-- "nvim-neo-tree/neo-tree.nvim",
|
||||
-- },
|
||||
-- config = function()
|
||||
-- require("lsp-file-operations").setup()
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||
{
|
||||
"s1n7ax/nvim-window-picker", -- for open_with_window_picker keymaps
|
||||
version = "2.*",
|
||||
config = function()
|
||||
require("window-picker").setup({
|
||||
filter_rules = {
|
||||
include_current_win = false,
|
||||
autoselect_one = true,
|
||||
-- filter using buffer options
|
||||
bo = {
|
||||
-- if the file type is one of following, the window will be ignored
|
||||
filetype = { "neo-tree", "neo-tree-popup", "notify" },
|
||||
-- if the buffer type is one of following, the window will be ignored
|
||||
buftype = { "terminal", "quickfix" },
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
lazy = false,
|
||||
-----Instead of using `config`, you can use `opts` instead, if you'd like:
|
||||
-----@module "neo-tree"
|
||||
-----@type neotree.Config
|
||||
--opts = {},
|
||||
config = function()
|
||||
-- If you want icons for diagnostic errors, you'll need to define them somewhere.
|
||||
-- In Neovim v0.10+, you can configure them in vim.diagnostic.config(), like:
|
||||
--
|
||||
-- vim.diagnostic.config({
|
||||
-- signs = {
|
||||
-- text = {
|
||||
-- [vim.diagnostic.severity.ERROR] = '',
|
||||
-- [vim.diagnostic.severity.WARN] = '',
|
||||
-- [vim.diagnostic.severity.INFO] = '',
|
||||
-- [vim.diagnostic.severity.HINT] = '',
|
||||
-- },
|
||||
-- }
|
||||
-- })
|
||||
--
|
||||
-- In older versions, you can define the signs manually:
|
||||
-- vim.fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticSignError" })
|
||||
-- vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSignWarn" })
|
||||
-- vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" })
|
||||
-- vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
|
||||
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = false, -- Close Neo-tree if it is the last window left in the tab
|
||||
popup_border_style = "NC", -- or "" to use 'winborder' on Neovim v0.11+
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
|
||||
open_files_using_relative_paths = false,
|
||||
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
||||
sort_function = nil, -- use a custom function for sorting files and directories in the tree
|
||||
-- sort_function = function (a,b)
|
||||
-- if a.type == b.type then
|
||||
-- return a.path > b.path
|
||||
-- else
|
||||
-- return a.type > b.type
|
||||
-- end
|
||||
-- end , -- this sorts files and directories descendantly
|
||||
default_component_configs = {
|
||||
container = {
|
||||
enable_character_fade = true,
|
||||
},
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1, -- extra padding on left hand side
|
||||
-- indent guides
|
||||
with_markers = true,
|
||||
indent_marker = "│",
|
||||
last_indent_marker = "└",
|
||||
highlight = "NeoTreeIndentMarker",
|
||||
-- expander config, needed for nesting files
|
||||
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
},
|
||||
icon = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
folder_empty = "",
|
||||
provider = function(icon, node, state) -- default icon provider utilizes nvim-web-devicons if available
|
||||
if node.type == "file" or node.type == "terminal" then
|
||||
local success, web_devicons = pcall(require, "nvim-web-devicons")
|
||||
local name = node.type == "terminal" and "terminal" or node.name
|
||||
if success then
|
||||
local devicon, hl = web_devicons.get_icon(name)
|
||||
icon.text = devicon or icon.text
|
||||
icon.highlight = hl or icon.highlight
|
||||
end
|
||||
end
|
||||
end,
|
||||
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
||||
-- then these will never be used.
|
||||
default = "*",
|
||||
highlight = "NeoTreeFileIcon",
|
||||
},
|
||||
modified = {
|
||||
symbol = "[+]",
|
||||
highlight = "NeoTreeModified",
|
||||
},
|
||||
name = {
|
||||
trailing_slash = false,
|
||||
use_git_status_colors = true,
|
||||
highlight = "NeoTreeFileName",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
-- Change type
|
||||
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
||||
deleted = "✖", -- this can only be used in the git_status source
|
||||
renamed = "", -- this can only be used in the git_status source
|
||||
-- Status type
|
||||
untracked = "",
|
||||
ignored = "",
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
conflict = "",
|
||||
},
|
||||
},
|
||||
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
|
||||
file_size = {
|
||||
enabled = true,
|
||||
width = 12, -- width of the column
|
||||
required_width = 64, -- min width of window required to show this column
|
||||
},
|
||||
type = {
|
||||
enabled = true,
|
||||
width = 10, -- width of the column
|
||||
required_width = 122, -- min width of window required to show this column
|
||||
},
|
||||
last_modified = {
|
||||
enabled = true,
|
||||
width = 20, -- width of the column
|
||||
required_width = 88, -- min width of window required to show this column
|
||||
},
|
||||
created = {
|
||||
enabled = true,
|
||||
width = 20, -- width of the column
|
||||
required_width = 110, -- min width of window required to show this column
|
||||
},
|
||||
symlink_target = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
-- A list of functions, each representing a global custom command
|
||||
-- that will be available in all sources (if not overridden in `opts[source_name].commands`)
|
||||
-- see `:h neo-tree-custom-commands-global`
|
||||
commands = {},
|
||||
window = {
|
||||
position = "left",
|
||||
width = 40,
|
||||
mapping_options = {
|
||||
noremap = true,
|
||||
nowait = true,
|
||||
},
|
||||
mappings = {
|
||||
["<space>"] = {
|
||||
"toggle_node",
|
||||
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
|
||||
},
|
||||
["<2-LeftMouse>"] = "open",
|
||||
["<cr>"] = "open",
|
||||
["<esc>"] = "cancel", -- close preview or floating neo-tree window
|
||||
["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } },
|
||||
-- Read `# Preview Mode` for more information
|
||||
["l"] = "focus_preview",
|
||||
["S"] = "open_split",
|
||||
["s"] = "open_vsplit",
|
||||
-- ["S"] = "split_with_window_picker",
|
||||
-- ["s"] = "vsplit_with_window_picker",
|
||||
["t"] = "open_tabnew",
|
||||
-- ["<cr>"] = "open_drop",
|
||||
-- ["t"] = "open_tab_drop",
|
||||
["w"] = "open_with_window_picker",
|
||||
--["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing
|
||||
["C"] = "close_node",
|
||||
-- ['C'] = 'close_all_subnodes',
|
||||
["z"] = "close_all_nodes",
|
||||
--["Z"] = "expand_all_nodes",
|
||||
--["Z"] = "expand_all_subnodes",
|
||||
["a"] = {
|
||||
"add",
|
||||
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
|
||||
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
|
||||
config = {
|
||||
show_path = "none", -- "none", "relative", "absolute"
|
||||
},
|
||||
},
|
||||
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
|
||||
["d"] = "delete",
|
||||
["r"] = "rename",
|
||||
["b"] = "rename_basename",
|
||||
["y"] = "copy_to_clipboard",
|
||||
["x"] = "cut_to_clipboard",
|
||||
["p"] = "paste_from_clipboard",
|
||||
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
|
||||
-- ["c"] = {
|
||||
-- "copy",
|
||||
-- config = {
|
||||
-- show_path = "none" -- "none", "relative", "absolute"
|
||||
-- }
|
||||
--}
|
||||
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
|
||||
["q"] = "close_window",
|
||||
["R"] = "refresh",
|
||||
["?"] = "show_help",
|
||||
["<"] = "prev_source",
|
||||
[">"] = "next_source",
|
||||
["i"] = "show_file_details",
|
||||
-- ["i"] = {
|
||||
-- "show_file_details",
|
||||
-- -- format strings of the timestamps shown for date created and last modified (see `:h os.date()`)
|
||||
-- -- both options accept a string or a function that takes in the date in seconds and returns a string to display
|
||||
-- -- config = {
|
||||
-- -- created_format = "%Y-%m-%d %I:%M %p",
|
||||
-- -- modified_format = "relative", -- equivalent to the line below
|
||||
-- -- modified_format = function(seconds) return require('neo-tree.utils').relative_date(seconds) end
|
||||
-- -- }
|
||||
-- },
|
||||
},
|
||||
},
|
||||
nesting_rules = {},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = true,
|
||||
hide_gitignored = true,
|
||||
hide_hidden = true, -- only works on Windows for hidden files/directories
|
||||
hide_by_name = {
|
||||
--"node_modules"
|
||||
},
|
||||
hide_by_pattern = { -- uses glob style patterns
|
||||
--"*.meta",
|
||||
--"*/src/*/tsconfig.json",
|
||||
},
|
||||
always_show = { -- remains visible even if other settings would normally hide it
|
||||
--".gitignored",
|
||||
},
|
||||
always_show_by_pattern = { -- uses glob style patterns
|
||||
--".env*",
|
||||
},
|
||||
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
|
||||
--".DS_Store",
|
||||
--"thumbs.db"
|
||||
},
|
||||
never_show_by_pattern = { -- uses glob style patterns
|
||||
--".null-ls_*",
|
||||
},
|
||||
},
|
||||
follow_current_file = {
|
||||
enabled = false, -- This will find and focus the file in the active buffer every time
|
||||
-- -- the current file is changed while the tree is open.
|
||||
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
||||
},
|
||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
||||
-- in whatever position is specified in window.position
|
||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||
-- window like netrw would, regardless of window.position
|
||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
|
||||
-- instead of relying on nvim autocmd events.
|
||||
window = {
|
||||
mappings = {
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root",
|
||||
["H"] = "toggle_hidden",
|
||||
["/"] = "fuzzy_finder",
|
||||
["D"] = "fuzzy_finder_directory",
|
||||
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
|
||||
-- ["D"] = "fuzzy_sorter_directory",
|
||||
["f"] = "filter_on_submit",
|
||||
["<c-x>"] = "clear_filter",
|
||||
["[g"] = "prev_git_modified",
|
||||
["]g"] = "next_git_modified",
|
||||
["o"] = {
|
||||
"show_help",
|
||||
nowait = false,
|
||||
config = { title = "Order by", prefix_key = "o" },
|
||||
},
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["og"] = { "order_by_git_status", nowait = false },
|
||||
["om"] = { "order_by_modified", nowait = false },
|
||||
["on"] = { "order_by_name", nowait = false },
|
||||
["os"] = { "order_by_size", nowait = false },
|
||||
["ot"] = { "order_by_type", nowait = false },
|
||||
-- ['<key>'] = function(state) ... end,
|
||||
},
|
||||
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
|
||||
["<down>"] = "move_cursor_down",
|
||||
["<C-n>"] = "move_cursor_down",
|
||||
["<up>"] = "move_cursor_up",
|
||||
["<C-p>"] = "move_cursor_up",
|
||||
["<esc>"] = "close",
|
||||
-- ['<key>'] = function(state, scroll_padding) ... end,
|
||||
},
|
||||
},
|
||||
|
||||
commands = {}, -- Add a custom command or override a global one using the same function name
|
||||
},
|
||||
buffers = {
|
||||
follow_current_file = {
|
||||
enabled = true, -- This will find and focus the file in the active buffer every time
|
||||
-- -- the current file is changed while the tree is open.
|
||||
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
||||
},
|
||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||
show_unloaded = true,
|
||||
window = {
|
||||
mappings = {
|
||||
["d"] = "buffer_delete",
|
||||
["bd"] = "buffer_delete",
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root",
|
||||
["o"] = {
|
||||
"show_help",
|
||||
nowait = false,
|
||||
config = { title = "Order by", prefix_key = "o" },
|
||||
},
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["om"] = { "order_by_modified", nowait = false },
|
||||
["on"] = { "order_by_name", nowait = false },
|
||||
["os"] = { "order_by_size", nowait = false },
|
||||
["ot"] = { "order_by_type", nowait = false },
|
||||
},
|
||||
},
|
||||
},
|
||||
git_status = {
|
||||
window = {
|
||||
position = "float",
|
||||
mappings = {
|
||||
["A"] = "git_add_all",
|
||||
["gu"] = "git_unstage_file",
|
||||
["ga"] = "git_add_file",
|
||||
["gr"] = "git_revert_file",
|
||||
["gc"] = "git_commit",
|
||||
["gp"] = "git_push",
|
||||
["gg"] = "git_commit_and_push",
|
||||
["o"] = {
|
||||
"show_help",
|
||||
nowait = false,
|
||||
config = { title = "Order by", prefix_key = "o" },
|
||||
},
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["om"] = { "order_by_modified", nowait = false },
|
||||
["on"] = { "order_by_name", nowait = false },
|
||||
["os"] = { "order_by_size", nowait = false },
|
||||
["ot"] = { "order_by_type", nowait = false },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>e", "<Cmd>Neotree toggle position=left<CR>")
|
||||
end,
|
||||
},
|
||||
}
|
||||
58
.config/nvim/lua/plugins/none-ls.lua
Normal file
58
.config/nvim/lua/plugins/none-ls.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
-- Format on save and linters
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = {
|
||||
"nvimtools/none-ls-extras.nvim",
|
||||
"jayp0521/mason-null-ls.nvim", -- ensure dependencies are installed
|
||||
},
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
local formatting = null_ls.builtins.formatting -- to setup formatters
|
||||
local diagnostics = null_ls.builtins.diagnostics -- to setup linters
|
||||
|
||||
-- list of formatters & linters for mason to install
|
||||
require("mason-null-ls").setup({
|
||||
ensure_installed = {
|
||||
"checkmake",
|
||||
"prettier", -- ts/js formatter
|
||||
"stylua", -- lua formatter
|
||||
"eslint_d", -- ts/js linter
|
||||
"shfmt",
|
||||
"ruff",
|
||||
"ansible-lint",
|
||||
"rustfmt",
|
||||
},
|
||||
-- auto-install configured formatters & linters (with null-ls)
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
||||
local sources = {
|
||||
diagnostics.checkmake,
|
||||
formatting.prettier.with({ filetypes = { "html", "json", "yaml", "markdown" } }),
|
||||
formatting.stylua,
|
||||
formatting.shfmt.with({ args = { "-i", "4" } }),
|
||||
formatting.terraform_fmt,
|
||||
require("none-ls.formatting.ruff").with({ extra_args = { "--extend-select", "I" } }),
|
||||
require("none-ls.formatting.ruff_format"),
|
||||
}
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
null_ls.setup({
|
||||
-- debug = true, -- Enable debug mode. Inspect logs with :NullLsLog.
|
||||
sources = sources,
|
||||
-- you can reuse a shared lspconfig on_attach callback here
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
5
.config/nvim/lua/plugins/rustaceanvim.lua
Normal file
5
.config/nvim/lua/plugins/rustaceanvim.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^6", -- Recommended
|
||||
lazy = false, -- This plugin is already lazy
|
||||
}
|
||||
130
.config/nvim/lua/plugins/telescope.lua
Normal file
130
.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,130 @@
|
||||
-- Fuzzy Finder (files, lsp, etc)
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
branch = '0.1.8',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||
-- Only load if `make` is available. Make sure you have the system
|
||||
-- requirements installed.
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = 'make',
|
||||
cond = function()
|
||||
return vim.fn.executable 'make' == 1
|
||||
end,
|
||||
},
|
||||
'nvim-telescope/telescope-ui-select.nvim',
|
||||
|
||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
local telescope = require 'telescope'
|
||||
local actions = require 'telescope.actions'
|
||||
local builtin = require 'telescope.builtin'
|
||||
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
['<C-k>'] = actions.move_selection_previous, -- move to prev result
|
||||
['<C-j>'] = actions.move_selection_next, -- move to next result
|
||||
['<C-l>'] = actions.select_default, -- open file
|
||||
},
|
||||
n = {
|
||||
['q'] = actions.close,
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
file_ignore_patterns = { 'node_modules', '.git', '.venv' },
|
||||
hidden = true,
|
||||
},
|
||||
buffers = {
|
||||
initial_mode = 'normal',
|
||||
sort_lastused = true,
|
||||
-- sort_mru = true,
|
||||
mappings = {
|
||||
n = {
|
||||
['d'] = actions.delete_buffer,
|
||||
['l'] = actions.select_default,
|
||||
},
|
||||
},
|
||||
},
|
||||
marks = {
|
||||
attach_mappings = function(prompt_bufnr, map)
|
||||
map({ 'i', 'n' }, '<C-d>', function()
|
||||
require('telescope.actions').delete_mark(prompt_bufnr)
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
},
|
||||
},
|
||||
live_grep = {
|
||||
file_ignore_patterns = { 'node_modules', '.git', '.venv' },
|
||||
additional_args = function(_)
|
||||
return { '--hidden' }
|
||||
end,
|
||||
},
|
||||
path_display = {
|
||||
filename_first = {
|
||||
reverse_directories = true,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
['ui-select'] = {
|
||||
require('telescope.themes').get_dropdown(),
|
||||
},
|
||||
},
|
||||
git_files = {
|
||||
previewer = false,
|
||||
},
|
||||
}
|
||||
|
||||
-- Enable telescope fzf native, if installed
|
||||
pcall(require('telescope').load_extension, 'fzf')
|
||||
pcall(require('telescope').load_extension, 'ui-select')
|
||||
|
||||
vim.keymap.set('n', '<leader>?', builtin.oldfiles, { desc = '[?] Find recently opened files' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = '[F]ind existing [B]uffers' })
|
||||
vim.keymap.set('n', '<leader>fm', builtin.marks, { desc = '[F]ind [M]arks' })
|
||||
vim.keymap.set('n', '<leader>ff', builtin.git_files, { desc = 'Find [G]it [F]iles' })
|
||||
vim.keymap.set('n', '<leader>fc', builtin.git_commits, { desc = 'Find [G]it [C]ommits' })
|
||||
vim.keymap.set('n', '<leader>sgf', builtin.git_bcommits, { desc = 'Find [G]it [C]ommits for current [F]ile' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.git_branches, { desc = 'Find [G]it [B]ranches' })
|
||||
vim.keymap.set('n', '<leader>fs', builtin.git_status, { desc = 'Find [G]it [S]tatus (diff view)' })
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = '[F]ind [F]iles' })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = '[F]ind [H]elp' })
|
||||
vim.keymap.set('n', '<leader>fw', builtin.grep_string, { desc = '[F]ind current [W]ord' })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = '[F]ind by [G]rep' })
|
||||
vim.keymap.set('n', '<leader>fd', builtin.diagnostics, { desc = '[F]ind [D]iagnostics' })
|
||||
vim.keymap.set('n', '<leader>fr', builtin.resume, { desc = '[F]ind [R]resume' })
|
||||
vim.keymap.set('n', '<leader>f.', builtin.oldfiles, { desc = '[F]ind Recent Files ("." for repeat)' })
|
||||
|
||||
-- Shortcut for searching your Neovim configuration files
|
||||
vim.keymap.set('n', '<leader>fn', function()
|
||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||
end, { desc = '[F]ind [N]eovim files' })
|
||||
|
||||
vim.keymap.set('n', '<leader>fds', function()
|
||||
builtin.lsp_document_symbols {
|
||||
symbols = { 'Class', 'Function', 'Method', 'Constructor', 'Interface', 'Module', 'Property' },
|
||||
}
|
||||
end, { desc = '[F]ind LSP document [S]ymbols' })
|
||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||
vim.keymap.set('n', '<leader>s/', function()
|
||||
builtin.live_grep {
|
||||
grep_open_files = true,
|
||||
prompt_title = 'Live Grep in Open Files',
|
||||
}
|
||||
end, { desc = '[F]ind [/] in Open Files' })
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
previewer = false,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||
end,
|
||||
}
|
||||
9
.config/nvim/lua/plugins/toggleterm.lua
Normal file
9
.config/nvim/lua/plugins/toggleterm.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
{
|
||||
'akinsho/toggleterm.nvim',
|
||||
version = '*',
|
||||
opts = {
|
||||
open_mapping = '<a-h>',
|
||||
},
|
||||
},
|
||||
}
|
||||
110
.config/nvim/lua/plugins/treesitter.lua
Normal file
110
.config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,110 @@
|
||||
-- Highlight, edit, and navigate code
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
config = function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
-- Add languages to be installed here that you want installed for treesitter
|
||||
ensure_installed = {
|
||||
'rust',
|
||||
'lua',
|
||||
'python',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'vimdoc',
|
||||
'vim',
|
||||
'regex',
|
||||
'terraform',
|
||||
'sql',
|
||||
'dockerfile',
|
||||
'toml',
|
||||
'json',
|
||||
'java',
|
||||
'ruby',
|
||||
'puppet',
|
||||
'groovy',
|
||||
'go',
|
||||
'gitignore',
|
||||
'graphql',
|
||||
'yaml',
|
||||
'make',
|
||||
'cmake',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
'bash',
|
||||
'tsx',
|
||||
'css',
|
||||
'html',
|
||||
},
|
||||
|
||||
-- Autoinstall languages that are not installed
|
||||
auto_install = true,
|
||||
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = '<c-space>',
|
||||
node_incremental = '<c-space>',
|
||||
scope_incremental = '<c-s>',
|
||||
node_decremental = '<M-space>',
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
['aa'] = '@parameter.outer',
|
||||
['ia'] = '@parameter.inner',
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
['ac'] = '@class.outer',
|
||||
['ic'] = '@class.inner',
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
[']m'] = '@function.outer',
|
||||
[']]'] = '@class.outer',
|
||||
},
|
||||
goto_next_end = {
|
||||
[']M'] = '@function.outer',
|
||||
[']['] = '@class.outer',
|
||||
},
|
||||
goto_previous_start = {
|
||||
['[m'] = '@function.outer',
|
||||
['[['] = '@class.outer',
|
||||
},
|
||||
goto_previous_end = {
|
||||
['[M'] = '@function.outer',
|
||||
['[]'] = '@class.outer',
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
['<leader>a'] = '@parameter.inner',
|
||||
},
|
||||
swap_previous = {
|
||||
['<leader>A'] = '@parameter.inner',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Register additional file extensions
|
||||
vim.filetype.add { extension = { tf = 'terraform' } }
|
||||
vim.filetype.add { extension = { tfvars = 'terraform' } }
|
||||
vim.filetype.add { extension = { pipeline = 'groovy' } }
|
||||
vim.filetype.add { extension = { multibranch = 'groovy' } }
|
||||
vim.filetype.add { extension = { pp = 'puppet' } }
|
||||
end,
|
||||
}
|
||||
18
.config/nvim/lua/plugins/vim-tmux-navigator.lua
Normal file
18
.config/nvim/lua/plugins/vim-tmux-navigator.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
-- Copied config from https://github.com/christoomey/vim-tmux-navigator
|
||||
return {
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
}
|
||||
112
.config/rofi/catppuccin-mocha.rasi
Normal file
112
.config/rofi/catppuccin-mocha.rasi
Normal file
@@ -0,0 +1,112 @@
|
||||
* {
|
||||
bg-col: #1e1e2e;
|
||||
bg-col-light: #1e1e2e;
|
||||
border-col: #1e1e2e;
|
||||
selected-col: #1e1e2e;
|
||||
blue: #89b4fa;
|
||||
fg-col: #cdd6f4;
|
||||
fg-col2: #f38ba8;
|
||||
grey: #6c7086;
|
||||
|
||||
width: 600;
|
||||
font: "JetBrainsMono Nerd Font 14";
|
||||
}
|
||||
|
||||
element-text, element-icon , mode-switcher {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
window {
|
||||
height: 360px;
|
||||
border: 3px;
|
||||
border-color: @border-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [prompt,entry];
|
||||
background-color: @bg-col;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
background-color: @blue;
|
||||
padding: 6px;
|
||||
text-color: @bg-col;
|
||||
border-radius: 3px;
|
||||
margin: 20px 0px 0px 20px;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
}
|
||||
|
||||
entry {
|
||||
padding: 6px;
|
||||
margin: 20px 0px 0px 10px;
|
||||
text-color: @fg-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
listview {
|
||||
border: 0px 0px 0px;
|
||||
padding: 6px 0px 0px;
|
||||
margin: 10px 0px 0px 20px;
|
||||
columns: 2;
|
||||
lines: 5;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 5px;
|
||||
background-color: @bg-col;
|
||||
text-color: @fg-col ;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 25px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @selected-col ;
|
||||
text-color: @fg-col2 ;
|
||||
}
|
||||
|
||||
mode-switcher {
|
||||
spacing: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px;
|
||||
background-color: @bg-col-light;
|
||||
text-color: @grey;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
button selected {
|
||||
background-color: @bg-col;
|
||||
text-color: @blue;
|
||||
}
|
||||
|
||||
message {
|
||||
background-color: @bg-col-light;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
textbox {
|
||||
padding: 6px;
|
||||
margin: 20px 0px 0px 20px;
|
||||
text-color: @blue;
|
||||
background-color: @bg-col-light;
|
||||
}
|
||||
|
||||
17
.config/rofi/config.rasi
Normal file
17
.config/rofi/config.rasi
Normal file
@@ -0,0 +1,17 @@
|
||||
configuration{
|
||||
modi: "run,drun,window";
|
||||
icon-theme: "Oranchelo";
|
||||
show-icons: true;
|
||||
terminal: "alacritty";
|
||||
drun-display-format: "{icon} {name}";
|
||||
location: 0;
|
||||
disable-history: false;
|
||||
hide-scrollbar: true;
|
||||
display-drun: " Apps ";
|
||||
display-run: " Run ";
|
||||
display-window: " Window";
|
||||
display-Network: " Network";
|
||||
sidebar-mode: true;
|
||||
}
|
||||
|
||||
@theme "catppuccin-mocha"
|
||||
77
.config/sway/config
Normal file
77
.config/sway/config
Normal file
@@ -0,0 +1,77 @@
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
### Variables
|
||||
exec wal -i "$HOME/.local/share/active_wall"
|
||||
include "$HOME/.cache/wal/colors-sway"
|
||||
include "./themes/catppuccin-mocha.theme"
|
||||
|
||||
|
||||
# target title bg text indicator border
|
||||
client.focused $lavender $base $text $rosewater $lavender
|
||||
client.focused_inactive $overlay0 $base $text $rosewater $overlay0
|
||||
client.unfocused $overlay0 $base $text $rosewater $overlay0
|
||||
client.urgent $peach $base $peach $overlay0 $peach
|
||||
client.placeholder $overlay0 $base $text $overlay0 $overlay0
|
||||
client.background $base
|
||||
|
||||
#client.focused $color0 $background $foreground $color7 $background
|
||||
#client.focused $lavender $base $text $rosewater $lavender
|
||||
# The $wallpaper var comes from included wal file that is cached
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
set $wallpaper "$HOME/.local/share/active_wall"
|
||||
output * bg $wallpaper fill
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod4
|
||||
# Home row direction keys, like vim
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
# Terminal choice
|
||||
set $term foot
|
||||
set $rofi_cmd rofi -terminal '$term'
|
||||
# Combine list of the apps with desktop files and executables from PATH.
|
||||
set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi
|
||||
|
||||
gaps inner 2
|
||||
smart_gaps on
|
||||
default_border pixel 3
|
||||
hide_edge_borders smart
|
||||
|
||||
set $ws0 0
|
||||
set $ws1 1
|
||||
set $ws2 2
|
||||
set $ws3 3
|
||||
set $ws4 4
|
||||
set $ws5 5
|
||||
set $ws6 6
|
||||
set $ws7 7
|
||||
set $ws8 8
|
||||
set $ws9 9
|
||||
|
||||
# TODO: move swaylock to own config
|
||||
# set $locking swaylock --daemonize \
|
||||
# --color "$color1" --inside-color \
|
||||
# "$color1" --inside-clear-color "$foreground" \
|
||||
# --ring-color "$color2" --ring-clear-color "$color11" \
|
||||
# --ring-ver-color "$color13" --show-failed-attempts \
|
||||
# --fade-in 0.2 --grace 2 --effect-vignette 0.5:0.5 \
|
||||
# --effect-blur 7x5 --ignore-empty-password --screenshots --clock
|
||||
|
||||
set $locking swaylock --daemonize \
|
||||
--color "$base" --inside-color \
|
||||
"$peach" --inside-clear-color "$overlay0" \
|
||||
--ring-color "$rosewater" --ring-clear-color "$lavendar" \
|
||||
--ring-ver-color "$rosewater" --show-failed-attempts \
|
||||
--fade-in 0.2 --grace 2 --effect-vignette 0.5:0.5 \
|
||||
--effect-blur 7x5 --ignore-empty-password --screenshots --clock
|
||||
|
||||
|
||||
|
||||
set $idle_timeout 240
|
||||
set $locking_timeout 300
|
||||
set $screen_timeout 600
|
||||
|
||||
include "/etc/sway/config.d/*.conf"
|
||||
include "$HOME/.config/sway/modes/*.conf"
|
||||
include "$HOME/.config/sway/config.d/*.conf"
|
||||
7
.config/sway/config.d/10-input.conf
Normal file
7
.config/sway/config.d/10-input.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
input * {
|
||||
# set system wide finnish layout
|
||||
xkb_layout "fi"
|
||||
# remap capslock to escape for better vim usage
|
||||
xkb_options caps:escape
|
||||
}
|
||||
20
.config/sway/config.d/50-rules-browser.conf
Normal file
20
.config/sway/config.d/50-rules-browser.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
# apply mark for Xwayland and wayland native browser windows
|
||||
for_window [class="Chromium-browser"] mark Browser
|
||||
for_window [class="Brave-browser"] mark Browser
|
||||
for_window [class="firefox"] mark Browser
|
||||
for_window [app_id="Chromium-browser"] mark Browser
|
||||
for_window [app_id="brave-browser"] mark Browser
|
||||
for_window [app_id="firefox"] mark Browser
|
||||
|
||||
assign [app_id="firefox"] workspace $ws2
|
||||
assign [app_id="chromium-browser"] workspace $ws2
|
||||
|
||||
# inhibit scrensaver for fullscreen browser windows
|
||||
for_window [con_mark="Browser"] {
|
||||
inhibit_idle fullscreen
|
||||
}
|
||||
|
||||
# firefox wayland screensharing indicator
|
||||
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] {
|
||||
floating enable
|
||||
}
|
||||
12
.config/sway/config.d/50-rules-pavucontrol.conf
Normal file
12
.config/sway/config.d/50-rules-pavucontrol.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
# Display PulseAudio volume control application (both GTK and Qt varieties)
|
||||
# as a floating window.
|
||||
|
||||
for_window [app_id="pavucontrol"] {
|
||||
floating enable
|
||||
move position center
|
||||
}
|
||||
|
||||
for_window [app_id="pavucontrol-qt"] {
|
||||
floating enable
|
||||
move position center
|
||||
}
|
||||
4
.config/sway/config.d/50-rules-policykit-agent.conf
Normal file
4
.config/sway/config.d/50-rules-policykit-agent.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
for_window [app_id="lxqt-policykit-agent"] {
|
||||
floating enable
|
||||
move position center
|
||||
}
|
||||
18
.config/sway/config.d/60-bindings-brightness.conf
Normal file
18
.config/sway/config.d/60-bindings-brightness.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
# Key bindings for brightness control using `light`.
|
||||
# Displays a notification with the current value if /usr/bin/notify-send is available
|
||||
#
|
||||
# Brightness increase/decrease step can be customized by setting the `$brightness_step`
|
||||
# variable to a numeric value before including the file.
|
||||
#
|
||||
# Requires: light
|
||||
# Recommends: libnotify
|
||||
|
||||
set $brightness_notification_cmd command -v notify-send >/dev/null && \
|
||||
VALUE=$(light) && VALUE=${VALUE%%.*} && \
|
||||
notify-send -e -h string:x-canonical-private-synchronous:brightness \
|
||||
-h "int:value:$VALUE" -t 800 "Brightness: ${VALUE}%"
|
||||
|
||||
bindsym XF86MonBrightnessDown exec \
|
||||
'STEP="$brightness_step" && light -U ${STEP:-5} && $brightness_notification_cmd'
|
||||
bindsym XF86MonBrightnessUp exec \
|
||||
'STEP="$brightness_step" && light -A ${STEP:-5} && $brightness_notification_cmd'
|
||||
17
.config/sway/config.d/60-bindings-media.conf
Normal file
17
.config/sway/config.d/60-bindings-media.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
# Key bindings for media player control via MPRIS D-Bus interface
|
||||
#
|
||||
# Requires: playerctl
|
||||
|
||||
# Allow Play and Stop bindings even if the screen is locked
|
||||
bindsym --locked {
|
||||
XF86AudioPlay exec playerctl play-pause
|
||||
XF86AudioStop exec playerctl stop
|
||||
}
|
||||
|
||||
bindsym {
|
||||
XF86AudioForward exec playerctl position +10
|
||||
XF86AudioNext exec playerctl next
|
||||
XF86AudioPause exec playerctl pause
|
||||
XF86AudioPrev exec playerctl previous
|
||||
XF86AudioRewind exec playerctl position -10
|
||||
}
|
||||
20
.config/sway/config.d/60-bindings-screenshot.conf
Normal file
20
.config/sway/config.d/60-bindings-screenshot.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
# Key bindings for taking screenshots
|
||||
#
|
||||
# The image files will be written to XDG_SCREENSHOTS_DIR if this is set
|
||||
# or defined in user-dirs.dir, or to a fallback location XDG_PICTURES_DIR.
|
||||
#
|
||||
# Copy the file to ~/.config/sway/config.d/60-bindings-screenshot.conf (or to
|
||||
# your $XDG_CONFIG_HOME location if set differently) to be able to overwrite
|
||||
# existing shortcuts.
|
||||
# Check 'man grimshot' for additional commands that you may find useful.
|
||||
#
|
||||
# Requires: grimshot
|
||||
|
||||
bindsym {
|
||||
# Capture the currently active output
|
||||
Print exec grimshot save output
|
||||
# Capture the currently active window
|
||||
Alt+Print exec grimshot save active
|
||||
# Select and capture a custom rectangular area
|
||||
Ctrl+Print exec grimshot save area
|
||||
}
|
||||
21
.config/sway/config.d/60-bindings-volume.conf
Normal file
21
.config/sway/config.d/60-bindings-volume.conf
Normal file
@@ -0,0 +1,21 @@
|
||||
# Key bindings to control pipewire or pulseaudio volume with pactl.
|
||||
# Displays a notification with the current state if /usr/bin/notify-send is available
|
||||
#
|
||||
# Volume increase/decrease step can be customized by setting the `$volume_step`
|
||||
# variable to a numeric value before including the file.
|
||||
# Maximum volume boost level can be set with the `$volume_limit` variable.
|
||||
#
|
||||
# Requires: pulseaudio-utils
|
||||
# Recommends: libnotify
|
||||
|
||||
set $volume_helper_cmd /usr/libexec/sway/volume-helper
|
||||
|
||||
# Allow volume controls even if the screen is locked
|
||||
bindsym --locked {
|
||||
XF86AudioRaiseVolume exec \
|
||||
$volume_helper_cmd --limit "$volume_limit" --increase "$volume_step"
|
||||
XF86AudioLowerVolume exec \
|
||||
$volume_helper_cmd --limit "$volume_limit" --decrease "$volume_step"
|
||||
XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && $volume_helper_cmd
|
||||
XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
}
|
||||
6
.config/sway/config.d/65-mode-passthrough.conf
Normal file
6
.config/sway/config.d/65-mode-passthrough.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
# A special mode for passing any keybindings to the focused application
|
||||
|
||||
mode "passthrough" {
|
||||
bindsym $mod+Pause mode default
|
||||
}
|
||||
bindsym $mod+Pause mode "passthrough"
|
||||
10
.config/sway/config.d/90-bar.conf
Normal file
10
.config/sway/config.d/90-bar.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
# Status Bar: waybar
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
#
|
||||
# Requires: waybar
|
||||
|
||||
bar {
|
||||
position top
|
||||
swaybar_command waybar
|
||||
}
|
||||
43
.config/sway/config.d/90-swayidle.conf
Normal file
43
.config/sway/config.d/90-swayidle.conf
Normal file
@@ -0,0 +1,43 @@
|
||||
# Idle and lock configuration
|
||||
#
|
||||
# EXAMPLE:
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
# your displays after another 60 seconds, and turn your screens back on when
|
||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||
# The timeouts can be customized via `$lock_timeout` and `$screen_timeout`
|
||||
# variables. For a predictable behavior, keep the `$screen_timeout` value
|
||||
# lesser than the `$lock_timeout`.
|
||||
#
|
||||
# You can also lock the screen manually by running `loginctl lock-session` or
|
||||
# add a binding for the command. Example:
|
||||
# bindsym $mod+Shift+Escape exec loginctl lock-session
|
||||
#
|
||||
# Note that all swaylock customizations are handled via /etc/swaylock/config and
|
||||
# can be overridden via $XDG_CONFIG_HOME/swaylock/config (~/.config/swaylock/config).
|
||||
#
|
||||
# Requires: swayidle
|
||||
# Requires: swaylock
|
||||
# Requires: /usr/bin/pkill, /usr/bin/pgrep
|
||||
#
|
||||
# exec LT="$lock_timeout" ST="$screen_timeout" LT=${LT:-300} ST=${ST:-60} && \
|
||||
# swayidle -w \
|
||||
# timeout $LT 'swaylock -f' \
|
||||
# timeout $((LT + ST)) 'swaymsg "output * power off"' \
|
||||
# resume 'swaymsg "output * power on"' \
|
||||
# timeout $ST 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * power off"' \
|
||||
# resume 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * power on"' \
|
||||
# before-sleep 'swaylock -f' \
|
||||
# lock 'swaylock -f' \
|
||||
# unlock 'pkill -xu "$USER" -SIGUSR1 swaylock'
|
||||
|
||||
# FIXME: doesnt seem to work
|
||||
exec swayidle -w \
|
||||
timeout $idle_timeout 'light -G > /tmp/brightness && light -S 10' \
|
||||
resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)' \
|
||||
timeout $locking_timeout 'exec $locking' \
|
||||
timeout $screen_timeout 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep 'playerctl pause' \
|
||||
before-sleep 'exec $locking'
|
||||
|
||||
|
||||
8
.config/sway/config.d/95-autostart-policykit-agent.conf
Normal file
8
.config/sway/config.d/95-autostart-policykit-agent.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
# Start graphical authentication agent for PolicyKit.
|
||||
#
|
||||
# Certain applications may require this to request elevated privileges:
|
||||
# GParted, virt-manager, anything that uses pkexec
|
||||
#
|
||||
# Requires: lxqt-policykit
|
||||
|
||||
exec /usr/libexec/lxqt-policykit-agent
|
||||
14
.config/sway/config.d/95-xdg-desktop-autostart.conf
Normal file
14
.config/sway/config.d/95-xdg-desktop-autostart.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
# Wait until a StatusNotifierItem tray implementation is available and
|
||||
# process XDG autostart entries.
|
||||
#
|
||||
# This horror has to exist because
|
||||
#
|
||||
# - SNI spec mandates that if `IsStatusNotifierHostRegistered` is not set,
|
||||
# the client should fall back to the Freedesktop System Tray specification
|
||||
# (XEmbed).
|
||||
# - There are actual implementations that take this seriously and implement
|
||||
# a fallback *even if* StatusNotifierWatcher is already DBus-activated.
|
||||
# - https://github.com/systemd/systemd/issues/3750
|
||||
#
|
||||
exec /usr/libexec/sway-systemd/wait-sni-ready && \
|
||||
systemctl --user start sway-xdg-autostart.target
|
||||
9
.config/sway/config.d/95-xdg-user-dirs.conf
Normal file
9
.config/sway/config.d/95-xdg-user-dirs.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
# Create or update XDG user dir configuration
|
||||
#
|
||||
# See also:
|
||||
# - /etc/xdg/autostart/xdg-user-dirs.desktop
|
||||
# - https://github.com/systemd/systemd/issues/18791
|
||||
#
|
||||
# Recommends: xdg-user-dirs
|
||||
|
||||
exec /usr/bin/xdg-user-dirs-update
|
||||
15
.config/sway/config.d/98-app-defaults.conf
Normal file
15
.config/sway/config.d/98-app-defaults.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
# set floating mode for specific applications
|
||||
for_window [instance="lxappearance"] floating enable
|
||||
for_window [app_id="firefox" title="^Library$"] floating enable, border pixel 1, sticky enable
|
||||
for_window [app_id="thunderbird" title=".*Reminder"] floating enable
|
||||
for_window [app_id="floating_shell_portrait"] floating enable, border pixel 1, sticky enable, resize set width 30 ppt height 40 ppt
|
||||
for_window [app_id="floating_shell"] floating enable, border pixel 1, sticky enable
|
||||
for_window [app_id="" title="Picture in picture"] floating enable, sticky enable
|
||||
for_window [app_id="xsensors"] floating enable
|
||||
for_window [title="Save File"] floating enable
|
||||
for_window [title="Firefox — Sharing Indicator"] floating enable
|
||||
for_window [app_id="" title=".* is sharing your screen."] floating enable
|
||||
for_window [title="wlay"] floating enable
|
||||
|
||||
# inhibit idle
|
||||
for_window [app_id="microsoft teams - preview"] inhibit_idle fullscreen
|
||||
121
.config/sway/modes/default.conf
Normal file
121
.config/sway/modes/default.conf
Normal file
@@ -0,0 +1,121 @@
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
bindsym $mod+Shift+z exec $locking
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
bindsym $mod+z exec $HOME/.local/bin/obscap
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
# Change normal to inverse to use left mouse button for resizing and right
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# This has been moved to modes/shutdown.conf
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
# bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
# Or use $mod+[up|down|left|right]
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
# Ditto, with arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
# Switch to workspace
|
||||
bindsym $mod+0 workspace $ws0
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
# Move focused container to workspace
|
||||
set $focus_ws [ $focus_after_move == 'true' ] && swaymsg workspace
|
||||
|
||||
bindsym $mod+Shift+0 move container to workspace $ws0, exec $focus_ws $ws0
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1, exec $focus_ws $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2, exec $focus_ws $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3, exec $focus_ws $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4, exec $focus_ws $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5, exec $focus_ws $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6, exec $focus_ws $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7, exec $focus_ws $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8, exec $focus_ws $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9, exec $focus_ws $ws9
|
||||
|
||||
bindsym $mod+Control+Shift+Left move workspace to output left
|
||||
bindsym $mod+Control+Shift+Right move workspace to output left
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# Move focus to the parent container
|
||||
bindsym $mod+a focus parent
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||
# You can send windows there and get them back later.
|
||||
|
||||
# Move the currently focused window to the scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||
# If there are multiple scratchpad windows, this command cycles through them.
|
||||
bindsym $mod+minus scratchpad show
|
||||
22
.config/sway/modes/resize.conf
Normal file
22
.config/sway/modes/resize.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
mode "resize" {
|
||||
# left will shrink the containers width
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $down resize grow height 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $right resize grow width 10px
|
||||
|
||||
# Ditto, with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Down resize grow height 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Right resize grow width 10px
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
32
.config/sway/modes/screenshot.conf
Normal file
32
.config/sway/modes/screenshot.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
set $mode_screenshot "<span foreground='$foreground'></span> \
|
||||
<span foreground='$foreground'><b>Pick</b></span> <span foreground='$background'>(<b>p</b>)</span> \
|
||||
<span foreground='$foreground'><b>Output</b></span> <span foreground='$background'>(<b>o</b>)</span> \
|
||||
<span foreground='$foreground'>+ <span foreground='$background'><b>Shift</b></span> to </span>"
|
||||
|
||||
|
||||
# Screenshot current output and save to clipboard
|
||||
set $screenshot_screen_clipboard grimshot --notify copy output
|
||||
# Screenshot current output and save to file $HOME/Pictures/{date}.png
|
||||
set $screenshot_screen_file grimshot --notify save output
|
||||
# Screenshot with a drawn box and save to clipboard
|
||||
set $screenshot_selection_clipboard grimshot --notify copy area
|
||||
# Screenshot with a drawn box and save to file
|
||||
set $screenshot_selection_file grimshot --notify save area
|
||||
|
||||
|
||||
mode --pango_markup $mode_screenshot {
|
||||
# whole output
|
||||
bindsym o mode "default", exec $screenshot_screen_clipboard
|
||||
bindsym Shift+o mode "default", exec $screenshot_screen_file
|
||||
|
||||
# pick the region to screenshot
|
||||
bindsym p mode "default", exec $screenshot_selection_clipboard
|
||||
bindsym Shift+p mode "default", exec $screenshot_selection_file
|
||||
|
||||
# Return to default mode.
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
## Launch // Screenshot Mode ##
|
||||
bindsym $mod+p mode $mode_screenshot
|
||||
# bindsym $mod+p exec $screenshot_selection_clipboard
|
||||
38
.config/sway/modes/shutdown.conf
Normal file
38
.config/sway/modes/shutdown.conf
Normal file
@@ -0,0 +1,38 @@
|
||||
set $mode_shutdown "\
|
||||
<span foreground='$foreground'></span> \
|
||||
<span foreground='$foreground'> \
|
||||
<span foreground='$background'>(<b>h</b>)</span> - hibernate \
|
||||
<span foreground='$background'>(<b>l</b>)</span> - lock \
|
||||
<span foreground='$background'>(<b>e</b>)</span> - logout \
|
||||
<span foreground='$background'>(<b>r</b>)</span> - reboot \
|
||||
<span foreground='$background'>(<b>u</b>)</span> - suspend \
|
||||
<span foreground='$background'>(<b>s</b>)</span> - shutdown \
|
||||
</span>"
|
||||
|
||||
set $purge_cliphist [ $purge_cliphist_logout == 'true' ] && rm -f $HOME/.cache/cliphist/db || exit 0
|
||||
|
||||
mode --pango_markup $mode_shutdown {
|
||||
# lock
|
||||
bindsym l mode "default", exec $locking
|
||||
|
||||
# logout
|
||||
bindsym e exec $purge_cliphist; exec loginctl terminate-user $USER
|
||||
|
||||
# suspend
|
||||
bindsym u mode "default", exec systemctl suspend
|
||||
|
||||
# hibernate
|
||||
bindsym h mode "default", exec systemctl hibernate
|
||||
|
||||
# shutdown
|
||||
bindsym s exec $purge_cliphist; exec systemctl poweroff
|
||||
|
||||
# reboot
|
||||
bindsym r exec $purge_cliphist; exec systemctl reboot
|
||||
|
||||
# Return to default mode.
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
## Launch // Exit Menu ##
|
||||
bindsym $mod+Shift+e mode $mode_shutdown
|
||||
25
.config/sway/themes/catppuccin-mocha.theme
Normal file
25
.config/sway/themes/catppuccin-mocha.theme
Normal file
@@ -0,0 +1,25 @@
|
||||
set $rosewater #f5e0dc
|
||||
set $flamingo #f2cdcd
|
||||
set $pink #f5c2e7
|
||||
set $mauve #cba6f7
|
||||
set $red #f38ba8
|
||||
set $maroon #eba0ac
|
||||
set $peach #fab387
|
||||
set $green #a6e3a1
|
||||
set $teal #94e2d5
|
||||
set $sky #89dceb
|
||||
set $sapphire #74c7ec
|
||||
set $blue #89b4fa
|
||||
set $lavender #b4befe
|
||||
set $text #cdd6f4
|
||||
set $subtext1 #bac2de
|
||||
set $subtext0 #a6adc8
|
||||
set $overlay2 #9399b2
|
||||
set $overlay1 #7f849c
|
||||
set $overlay0 #6c7086
|
||||
set $surface2 #585b70
|
||||
set $surface1 #45475a
|
||||
set $surface0 #313244
|
||||
set $base #1e1e2e
|
||||
set $mantle #181825
|
||||
set $crust #11111b
|
||||
101
.config/tmux/.tmux.conf.bak
Normal file
101
.config/tmux/.tmux.conf.bak
Normal file
@@ -0,0 +1,101 @@
|
||||
# Configured by Rob Muhlestein (rwxrob.live)
|
||||
# This file is copyright free (public domain).
|
||||
|
||||
# change default meta key to same as screen
|
||||
unbind C-b
|
||||
unbind C-a
|
||||
set -g prefix C-a
|
||||
|
||||
# form vim/tmux d/y buffer sync
|
||||
set -g focus-events
|
||||
|
||||
# use a different prefix for nested
|
||||
bind-key -n C-y send-prefix
|
||||
|
||||
# add double-tap meta key to toggle last window
|
||||
bind-key C-a last-window
|
||||
|
||||
# pane colors and display
|
||||
|
||||
# create more intuitive split key combos (same as modern screen)
|
||||
# -c '#{pane_current_path}' ensures new split is in `pwd`
|
||||
unbind |
|
||||
bind | split-window -h -c '#{pane_current_path}'
|
||||
bind '\' split-window -h -c '#{pane_current_path}'
|
||||
bind 'C-\' split-window -h -c '#{pane_current_path}'
|
||||
unbind -
|
||||
bind - split-window -v -c '#{pane_current_path}'
|
||||
unbind _
|
||||
bind _ split-window -v -c '#{pane_current_path}'
|
||||
|
||||
# vi for copy mode
|
||||
setw -g mode-keys vi
|
||||
|
||||
# vi for command status
|
||||
set -g status-keys vi
|
||||
|
||||
# vi keys to resize
|
||||
bind -r C-k resize-pane -U 1
|
||||
bind -r C-j resize-pane -D 1
|
||||
bind -r C-h resize-pane -L 1
|
||||
bind -r C-l resize-pane -R 1
|
||||
|
||||
# vi keys to navigate panes
|
||||
bind -r k select-pane -U
|
||||
bind -r j select-pane -D
|
||||
bind -r h select-pane -L
|
||||
bind -r l select-pane -R
|
||||
|
||||
# avoid cursor movement messing with resize
|
||||
set -g repeat-time 200
|
||||
|
||||
# colors, clock, and stuff
|
||||
#set -g default-terminal "xterm-256color" # works, but oh so wrong
|
||||
#set -ga terminal-overrides ",xterm-256color*:Tc"
|
||||
set -g default-terminal "screen-256color"
|
||||
#set -g clock-mode-style 12
|
||||
setw -g clock-mode-colour cyan
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# die, die, die (just be careful, right next to C-c)
|
||||
|
||||
# color the pane borders nearly invisible
|
||||
# (when not using hacked tmux without them)
|
||||
set -g pane-border-style "fg=#202020,bg=#202020"
|
||||
set -g pane-active-border-style "fg=#202020,bg=#202020"
|
||||
|
||||
# color of the window selection background
|
||||
set -g mode-style "bg=black"
|
||||
|
||||
# very unique Mac bug
|
||||
if-shell "type 'reattach-to-user-namespace' >/dev/null" "set -g default-command 'reattach-to-user-namespace -l $SHELL'"
|
||||
|
||||
# reload configuration
|
||||
bind -r r source-file ~/.tmux.conf
|
||||
|
||||
set -g status-style "bg=#202021,fg=#665c54"
|
||||
set -g status-position top
|
||||
set -g status-interval 1
|
||||
set -g status-right ""
|
||||
set -g status-left ""
|
||||
set -g status-right-style "fg=#928374"
|
||||
|
||||
if-shell -b '[ -z $SWAYSOCK ]' 'set -g status-right " #(pomo)"'
|
||||
set -g status-right "#(tmux_timew)"
|
||||
#set -g status-left-length 78
|
||||
#set -g status-left-style "fg=#928374,bold,reverse"
|
||||
#set -g status-left-style "fg=brightwhite"
|
||||
#set -g status-left "#(head -1 ~/.status) "
|
||||
#set -g status-right-length 50
|
||||
#set -g status-right "%a, %b %-e, %Y, %-l:%M:%S%p %Z%0z"
|
||||
#set -g status-right-style "fg=#928374,bold"
|
||||
#set -g window-status-format ""
|
||||
#set -g window-status-current-format ""
|
||||
|
||||
set -g message-style "fg=red"
|
||||
|
||||
# disable status
|
||||
#set -g status off
|
||||
set -g status on
|
||||
|
||||
1
.config/tmux/plugins/catppuccin-tmux
Submodule
1
.config/tmux/plugins/catppuccin-tmux
Submodule
Submodule .config/tmux/plugins/catppuccin-tmux added at b4e0715356
1
.config/tmux/plugins/tmux
Submodule
1
.config/tmux/plugins/tmux
Submodule
Submodule .config/tmux/plugins/tmux added at 7a284c98e5
1
.config/tmux/plugins/tmux-sensible
Submodule
1
.config/tmux/plugins/tmux-sensible
Submodule
Submodule .config/tmux/plugins/tmux-sensible added at 25cb91f42d
1
.config/tmux/plugins/tmux-yank
Submodule
1
.config/tmux/plugins/tmux-yank
Submodule
Submodule .config/tmux/plugins/tmux-yank added at acfd36e4fc
1
.config/tmux/plugins/tpm
Submodule
1
.config/tmux/plugins/tpm
Submodule
Submodule .config/tmux/plugins/tpm added at 99469c4a9b
1
.config/tmux/plugins/vim-tmux-navigator
Submodule
1
.config/tmux/plugins/vim-tmux-navigator
Submodule
Submodule .config/tmux/plugins/vim-tmux-navigator added at addb64a772
47
.config/tmux/tmux.conf
Normal file
47
.config/tmux/tmux.conf
Normal file
@@ -0,0 +1,47 @@
|
||||
# Change prefix key - Ctrl+Space
|
||||
unbind C-b
|
||||
set -g prefix C-Space
|
||||
bind C-Space send-prefix
|
||||
|
||||
# Enable mouse support
|
||||
set -g mouse on
|
||||
|
||||
# Fix editor colors in tmux
|
||||
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||
|
||||
# Start window and panes at 1, not 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
set -s escape-time 200
|
||||
set -sg repeat-time 600
|
||||
setw -g xterm-keys on
|
||||
|
||||
# vi-mode
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# keybindings
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
|
||||
# Open panes in current directory
|
||||
bind _ split-window -v -c "#{pane_current_path}"
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# Shift+Alt vim keys to switch windows
|
||||
bind -n M-H previous-window
|
||||
bind -n M-L next-window
|
||||
|
||||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
|
||||
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
40
.config/tmux/vscode-tmux.conf
Normal file
40
.config/tmux/vscode-tmux.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
# Change prefix key - Ctrl+Space
|
||||
unbind C-b
|
||||
set -g prefix C-Space
|
||||
bind C-Space send-prefix
|
||||
|
||||
# Enable mouse support
|
||||
set -g mouse on
|
||||
|
||||
# Fix editor colors in tmux
|
||||
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||
|
||||
# Start window and panes at 1, not 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
# vi-mode
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# keybindings
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
|
||||
# Open panes in current directory
|
||||
bind _ split-window -v -c "#{pane_current_path}"
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# Shift+Alt vim keys to switch windows
|
||||
bind -n M-H previous-window
|
||||
bind -n M-L next-window
|
||||
|
||||
# Fix Window namings in vscode
|
||||
bind-key c new-window -n 'vsc'
|
||||
|
||||
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
23
.config/waybar/colors/everforest-light.css
Normal file
23
.config/waybar/colors/everforest-light.css
Normal file
@@ -0,0 +1,23 @@
|
||||
@define-color bg_dim #efebd4;
|
||||
@define-color bg0 #fdf6e3;
|
||||
@define-color bg1 #f4f0d9;
|
||||
@define-color bg2 #efebd4;
|
||||
@define-color bg3 #e6e2cc;
|
||||
@define-color bg4 #e0dcc7;
|
||||
@define-color bg5 #bdc3af;
|
||||
@define-color bg_visual #eaedc8;
|
||||
@define-color bg_red #fbe3da;
|
||||
@define-color bg_green #f0f1d2;
|
||||
@define-color bg_blue #e9f0e9;
|
||||
@define-color bg_yellow #faedcd;
|
||||
@define-color fg #5c6a72;
|
||||
@define-color red #f85552;
|
||||
@define-color orange #f57d26;
|
||||
@define-color yellow #dfa000;
|
||||
@define-color green #8da101;
|
||||
@define-color aqua #35a77c;
|
||||
@define-color blue #3a94c5;
|
||||
@define-color purple #df69ba;
|
||||
@define-color grey0 #a6b0a0;
|
||||
@define-color grey1 #939f91;
|
||||
@define-color grey2 #829181;
|
||||
23
.config/waybar/colors/everforest.css
Normal file
23
.config/waybar/colors/everforest.css
Normal file
@@ -0,0 +1,23 @@
|
||||
@define-color bg_dim #232a2e;
|
||||
@define-color bg0 #2d353b;
|
||||
@define-color bg1 #343f44;
|
||||
@define-color bg2 #3d484d;
|
||||
@define-color bg3 #475258;
|
||||
@define-color bg4 #4f585e;
|
||||
@define-color bg5 #56635f;
|
||||
@define-color bg_visual #543a48;
|
||||
@define-color bg_red #514045;
|
||||
@define-color bg_green #425047;
|
||||
@define-color bg_blue #3a515d;
|
||||
@define-color bg_yellow #4d4c43;
|
||||
@define-color fg #d3c6aa;
|
||||
@define-color red #e67e80;
|
||||
@define-color orange #e69875;
|
||||
@define-color yellow #dbbc7f;
|
||||
@define-color green #a7c080;
|
||||
@define-color aqua #83c092;
|
||||
@define-color blue #7fbbb3;
|
||||
@define-color purple #d699b6;
|
||||
@define-color grey0 #7a8478;
|
||||
@define-color grey1 #859289;
|
||||
@define-color grey2 #9da9a0;
|
||||
31
.config/waybar/colors/gruvbox.css
Normal file
31
.config/waybar/colors/gruvbox.css
Normal file
@@ -0,0 +1,31 @@
|
||||
@define-color bg_h #1d2021;
|
||||
@define-color bg #282828;
|
||||
@define-color bg_s #32302f;
|
||||
@define-color bg1 #3c3836;
|
||||
@define-color bg2 #504945;
|
||||
@define-color bg3 #665c54;
|
||||
@define-color bg4 #7c6f64;
|
||||
|
||||
@define-color fg #fbf1c7;
|
||||
@define-color fg1 #ebdbb2;
|
||||
@define-color fg2 #d5c4a1;
|
||||
@define-color fg3 #bdae93;
|
||||
@define-color fg4 #a89984;
|
||||
|
||||
@define-color red #fb4934;
|
||||
@define-color green #b8bb26;
|
||||
@define-color yellow #fabd2f;
|
||||
@define-color blue #83a598;
|
||||
@define-color purple #d3869b;
|
||||
@define-color aqua #8ec07c;
|
||||
@define-color gray #928374;
|
||||
@define-color orange #fe8019;
|
||||
|
||||
@define-color red-dim #cc2412;
|
||||
@define-color green-dim #98971a;
|
||||
@define-color yellow-dim #d79921;
|
||||
@define-color blue-dim #458588;
|
||||
@define-color purple-dim #b16286;
|
||||
@define-color aqua-dim #689d6a;
|
||||
@define-color gray-dim #a89984;
|
||||
@define-color orange-dim #d65d0e;
|
||||
37
.config/waybar/colors/mocha.css
Executable file
37
.config/waybar/colors/mocha.css
Executable file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
*
|
||||
* Catppuccin Mocha palette
|
||||
* Maintainer: rubyowo
|
||||
*
|
||||
*/
|
||||
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color subtext1 #bac2de;
|
||||
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface2 #585b70;
|
||||
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay2 #9399b2;
|
||||
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color sky #89dceb;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color peach #fab387;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color red #f38ba8;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color rosewater #f5e0dc;
|
||||
23
.config/waybar/colors/nord.css
Executable file
23
.config/waybar/colors/nord.css
Executable file
@@ -0,0 +1,23 @@
|
||||
/* Polar Night */
|
||||
@define-color nord0 #2e3440;
|
||||
@define-color nord1 #3b4252;
|
||||
@define-color nord2 #434c5e;
|
||||
@define-color nord3 #4c566a;
|
||||
|
||||
/* Snow Storm */
|
||||
@define-color nord4 #d8dee9;
|
||||
@define-color nord5 #e5e9f0;
|
||||
@define-color nord6 #eceff4;
|
||||
|
||||
/* Frost */
|
||||
@define-color nord7 #8fbcbb;
|
||||
@define-color nord8 #88c0d0;
|
||||
@define-color nord9 #81a1c1;
|
||||
@define-color nord10 #5e81ac;
|
||||
|
||||
/* Aurora */
|
||||
@define-color nord11 #bf616a;
|
||||
@define-color nord12 #d08770;
|
||||
@define-color nord13 #ebcb8b;
|
||||
@define-color nord14 #a3be8c;
|
||||
@define-color nord15 #b48ead;
|
||||
16
.config/waybar/colors/solarized.css
Executable file
16
.config/waybar/colors/solarized.css
Executable file
@@ -0,0 +1,16 @@
|
||||
@define-color base03 #002b36;
|
||||
@define-color base02 #073642;
|
||||
@define-color base01 #586e75;
|
||||
@define-color base00 #657b83;
|
||||
@define-color base0 #839496;
|
||||
@define-color base1 #93a1a1;
|
||||
@define-color base2 #eee8d5;
|
||||
@define-color base3 #fdf6e3;
|
||||
@define-color yellow #b58900;
|
||||
@define-color orange #cb4b16;
|
||||
@define-color red #dc322f;
|
||||
@define-color magenta #d33682;
|
||||
@define-color violet #6c71c4;
|
||||
@define-color blue #268bd2;
|
||||
@define-color cyan #2aa198;
|
||||
@define-color green #859900;
|
||||
149
.config/waybar/config
Normal file
149
.config/waybar/config
Normal file
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"height": 35, // Waybar height (to be removed for auto height)
|
||||
"spacing": 6, // Gaps between modules
|
||||
"modules-left": ["hyprland/workspaces", "custom/timew"],
|
||||
"modules-center": ["", "custom/spotify"],
|
||||
"modules-right": ["custom/pomo", "idle_inhibitor", "pulseaudio", "network", "backlight", "battery", "temperature", "clock", "tray"],
|
||||
"hyprland/window": {
|
||||
"sepparate-outputs": true
|
||||
},
|
||||
"custom/pomo": {
|
||||
"format": "{icon}{text}",
|
||||
"format-icons": {
|
||||
"default": "🍅"
|
||||
},
|
||||
"exec": "$HOME/.local/go/bin/pomo && echo ' '",
|
||||
"interval": 1,
|
||||
"on-click": "$HOME/.local/go/bin/pomo start",
|
||||
"on-click-middle": "$HOME/.local/go/bin/pomo start 5m",
|
||||
"on-click-right": "$HOME/.local/go/bin/pomo stop"
|
||||
},
|
||||
"custom/timew": {
|
||||
"exec": "$HOME/.config/waybar/twar.sh",
|
||||
"interval": 1
|
||||
},
|
||||
"hyprland/workspaces": {
|
||||
"active-only": false,
|
||||
"disable-scroll": true,
|
||||
"on-click": "activate",
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"1": "1 ",
|
||||
"2": "2 ",
|
||||
"3": "3 ",
|
||||
"4": "4 ",
|
||||
"5": "5 ",
|
||||
"6": "6 ",
|
||||
"7": "7 ",
|
||||
"8": "8 ",
|
||||
"9": "9 ",
|
||||
"10": "0 ",
|
||||
}
|
||||
},
|
||||
"keyboard-state": {
|
||||
"numlock": true,
|
||||
"capslock": true,
|
||||
"format": "{name} {icon}",
|
||||
"format-icons": {
|
||||
"locked": "",
|
||||
"unlocked": ""
|
||||
}
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
"tray": {
|
||||
"spacing": 10
|
||||
},
|
||||
"clock": {
|
||||
// "timezone": "America/New_York",
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format-alt": "{:%Y-%m-%d}"
|
||||
},
|
||||
"cpu": {
|
||||
"format": "{usage}% ",
|
||||
"tooltip": false
|
||||
},
|
||||
"memory": {
|
||||
"format": "{}% "
|
||||
},
|
||||
"temperature": {
|
||||
// "thermal-zone": 2,
|
||||
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
||||
"critical-threshold": 80,
|
||||
// "format-critical": "{temperatureC}°C {icon}",
|
||||
"format": "{temperatureC}°C {icon}",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
"backlight": {
|
||||
// "device": "acpi_video1",
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": ["", "", "", "", "", "", "", "", ""]
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"good": 95,
|
||||
"warning": 40,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-alt": "{time} {icon}",
|
||||
// "format-good": "", // An empty format will hide the module
|
||||
"format-full": "",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"network": {
|
||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||
"format-ethernet": "{ipaddr}/{cidr} ",
|
||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||
"format-linked": "{ifname} (No IP) ",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{volume}% {icon}",
|
||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth-muted": " {icon} {format_source}",
|
||||
"format-muted": " {format_source}",
|
||||
"format-source": "{volume}% ",
|
||||
"format-source-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
"custom/timew": {
|
||||
"exec": "$HOME/.config/waybar/twar.sh",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/spotify": {
|
||||
"format": "{icon} {}",
|
||||
"return-type": "json",
|
||||
"max-length": 40,
|
||||
"format-icons": {
|
||||
"spotify": "",
|
||||
"default": "🎜"
|
||||
},
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-scroll-up": "playerctl previous",
|
||||
"on-scroll-down": "playerctl next",
|
||||
"escape": true,
|
||||
"exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
|
||||
// "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
|
||||
}
|
||||
}
|
||||
|
||||
124
.config/waybar/everforest-light/config
Executable file
124
.config/waybar/everforest-light/config
Executable file
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"margin-top": 0,
|
||||
"margin-left": 120,
|
||||
"margin-bottom": 0,
|
||||
"margin-right": 120,
|
||||
"height": 60,
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"output": "DP-2",
|
||||
"spacing": 15,
|
||||
"modules-left": ["custom/launcher", "clock", "clock#date"],
|
||||
"modules-center": ["wlr/workspaces"],
|
||||
"modules-right": ["pulseaudio", "network", "battery", "custom/powermenu"],
|
||||
|
||||
"wlr/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"all-outputs": true,
|
||||
"on-click": "activate",
|
||||
"on-scroll-up": "hyprctl dispatch workspace e+1",
|
||||
"on-scroll-down": "hyprctl dispatch workspace e-1",
|
||||
"persistent_workspaces": {
|
||||
"1": [],
|
||||
"2": [],
|
||||
"3": [],
|
||||
"4": [],
|
||||
"5": [],
|
||||
"6": [],
|
||||
"7": [],
|
||||
"8": [],
|
||||
"9": [],
|
||||
"10": []
|
||||
},
|
||||
},
|
||||
|
||||
"custom/launcher": {
|
||||
"interval": "once",
|
||||
"format": "",
|
||||
"on-click": "pkill wofi || wofi --show drun --term=kitty --width=20% --height=50% --columns 1 -I -s ~/.config/wofi/themes/everforest-light.css -o $MAIN_DISPLAY",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"backlight": {
|
||||
"device": "nvidia_0",
|
||||
"max-length": "4",
|
||||
"format": "{icon}",
|
||||
"tooltip-format": "{percent}%",
|
||||
"format-icons": ["","","","", "", "", ""],
|
||||
"on-click": "",
|
||||
"on-scroll-up": "brightnessctl set 10%-",
|
||||
"on-scroll-down": "brightnessctl set +10%"
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"interval": 30,
|
||||
"format": " {}%",
|
||||
"format-alt":" {used:0.1f}G",
|
||||
"max-length": 10
|
||||
},
|
||||
|
||||
"custom/dunst": {
|
||||
"exec": "~/.config/waybar/scripts/dunst.sh",
|
||||
"on-click": "dunstctl set-paused toggle",
|
||||
"restart-interval": 1,
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-bluetooth": "{icon} {volume}%",
|
||||
"format-bluetooth-muted": "婢 muted",
|
||||
"format-muted": "婢 muted",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click-right": "pavucontrol",
|
||||
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
||||
},
|
||||
|
||||
"network": {
|
||||
"format-wifi": " {signalStrength}%",
|
||||
"format-ethernet": " {signalStrength}%",
|
||||
"format-disconnected": "",
|
||||
"on-click": "sh ~/.config/wofi/scripts/wifimenu.sh"
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"bat": "BAT0",
|
||||
"adapter": "ADP0",
|
||||
"interval": 60,
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"max-length": 10,
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-warning": "{icon} {capacity}%",
|
||||
"format-critical": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-alt": "{icon} {capacity}%",
|
||||
"format-full": " 100%",
|
||||
"format-icons": ["", "", "", "", "", "", "", "", "", ""]
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"format": " {:%H:%M}"
|
||||
},
|
||||
|
||||
"clock#date": {
|
||||
"format": " {:%A, %B %d, %Y}"
|
||||
},
|
||||
|
||||
"custom/powermenu": {
|
||||
"format": "",
|
||||
"on-click": "pkill wofi || sh .config/wofi/scripts/powermenu.sh 'everforest-light' '--height=17% -o $MAIN_DISPLAY'",
|
||||
"tooltip": false
|
||||
}
|
||||
}
|
||||
85
.config/waybar/everforest-light/style.css
Executable file
85
.config/waybar/everforest-light/style.css
Executable file
@@ -0,0 +1,85 @@
|
||||
@import "../colors/everforest-light.css";
|
||||
|
||||
/* margin: top right bottom left */
|
||||
/* Spacing outside the element */
|
||||
|
||||
/* padding: top right bottom left */
|
||||
/* Spacing inside the element */
|
||||
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font, FontAwesome;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: @fg;
|
||||
color: @bg0;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border-radius: 0px 0px 15px 15px;
|
||||
transition-duration: .5s;
|
||||
|
||||
border-bottom-width: 5px;
|
||||
border-bottom-color: #2e3538;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
#custom-launcher,
|
||||
#clock,
|
||||
#clock-date,
|
||||
#workspaces,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#custom-powermenu {
|
||||
background-color: @bg0;
|
||||
color: @fg;
|
||||
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-top: 7px;
|
||||
margin-bottom: 12px;
|
||||
border-radius: 10px;
|
||||
|
||||
border-bottom-width: 5px;
|
||||
border-bottom-color: @bg5;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: @blue;
|
||||
color: @bg0;
|
||||
|
||||
border-radius: 10px;
|
||||
|
||||
margin-bottom: -5px;
|
||||
|
||||
border-bottom-width: 5px;
|
||||
border-bottom-color: #1c4a62;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
background-color: @green;
|
||||
color: @bg0;
|
||||
border-bottom-color: #465000;
|
||||
|
||||
margin-left: 15px;
|
||||
padding-left: 20px;
|
||||
padding-right: 21px;
|
||||
}
|
||||
|
||||
#custom-powermenu {
|
||||
background-color: @red;
|
||||
color: @bg0;
|
||||
border-bottom-color: #9e0906;
|
||||
|
||||
margin-right: 15px;
|
||||
padding-left: 20px;
|
||||
padding-right: 23px;
|
||||
}
|
||||
124
.config/waybar/everforest/config
Executable file
124
.config/waybar/everforest/config
Executable file
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"margin-top": 0,
|
||||
"margin-left": 120,
|
||||
"margin-bottom": 0,
|
||||
"margin-right": 120,
|
||||
"height": 60,
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"output": "eDP-1",
|
||||
"spacing": 15,
|
||||
"modules-left": ["custom/launcher", "clock", "clock#date"],
|
||||
"modules-center": ["wlr/workspaces"],
|
||||
"modules-right": ["pulseaudio", "network", "battery", "custom/powermenu"],
|
||||
|
||||
"wlr/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"all-outputs": true,
|
||||
"on-click": "activate",
|
||||
"on-scroll-up": "hyprctl dispatch workspace e+1",
|
||||
"on-scroll-down": "hyprctl dispatch workspace e-1",
|
||||
"persistent_workspaces": {
|
||||
"1": [],
|
||||
"2": [],
|
||||
"3": [],
|
||||
"4": [],
|
||||
"5": [],
|
||||
"6": [],
|
||||
"7": [],
|
||||
"8": [],
|
||||
"9": [],
|
||||
"10": []
|
||||
},
|
||||
},
|
||||
|
||||
"custom/launcher": {
|
||||
"interval": "once",
|
||||
"format": "",
|
||||
"on-click": "pkill wofi || wofi --show drun --term=kitty --width=20% --height=50% --columns 1 -I -s ~/.config/wofi/themes/everforest-light.css -o $MAIN_DISPLAY",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"backlight": {
|
||||
"device": "nvidia_0",
|
||||
"max-length": "4",
|
||||
"format": "{icon}",
|
||||
"tooltip-format": "{percent}%",
|
||||
"format-icons": ["","","","", "", "", ""],
|
||||
"on-click": "",
|
||||
"on-scroll-up": "brightnessctl set 10%-",
|
||||
"on-scroll-down": "brightnessctl set +10%"
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"interval": 30,
|
||||
"format": " {}%",
|
||||
"format-alt":" {used:0.1f}G",
|
||||
"max-length": 10
|
||||
},
|
||||
|
||||
"custom/dunst": {
|
||||
"exec": "~/.config/waybar/scripts/dunst.sh",
|
||||
"on-click": "dunstctl set-paused toggle",
|
||||
"restart-interval": 1,
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-bluetooth": "{icon} {volume}%",
|
||||
"format-bluetooth-muted": "婢 muted",
|
||||
"format-muted": "婢 muted",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click-right": "pavucontrol",
|
||||
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
||||
},
|
||||
|
||||
"network": {
|
||||
"format-wifi": " {signalStrength}%",
|
||||
"format-ethernet": " {signalStrength}%",
|
||||
"format-disconnected": "",
|
||||
"on-click": "sh ~/.config/wofi/scripts/wifimenu.sh"
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"bat": "BAT0",
|
||||
"adapter": "ADP0",
|
||||
"interval": 60,
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"max-length": 10,
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-warning": "{icon} {capacity}%",
|
||||
"format-critical": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-alt": "{icon} {capacity}%",
|
||||
"format-full": " 100%",
|
||||
"format-icons": ["", "", "", "", "", "", "", "", "", ""]
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"format": " {:%H:%M}"
|
||||
},
|
||||
|
||||
"clock#date": {
|
||||
"format": " {:%A, %B %d, %Y}"
|
||||
},
|
||||
|
||||
"custom/powermenu": {
|
||||
"format": "",
|
||||
"on-click": "pkill wofi || sh .config/wofi/scripts/powermenu.sh 'everforest-light' '--height=17% -o $MAIN_DISPLAY'",
|
||||
"tooltip": false
|
||||
}
|
||||
}
|
||||
85
.config/waybar/everforest/style.css
Executable file
85
.config/waybar/everforest/style.css
Executable file
@@ -0,0 +1,85 @@
|
||||
@import "../colors/everforest.css";
|
||||
|
||||
/* margin: top right bottom left */
|
||||
/* Spacing outside the element */
|
||||
|
||||
/* padding: top right bottom left */
|
||||
/* Spacing inside the element */
|
||||
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font, FontAwesome;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: @fg;
|
||||
color: @bg0;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border-radius: 0px 0px 15px 15px;
|
||||
transition-duration: .5s;
|
||||
|
||||
border-bottom-width: 5px;
|
||||
border-bottom-color: #7d6a40;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
#custom-launcher,
|
||||
#clock,
|
||||
#clock-date,
|
||||
#workspaces,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#custom-powermenu {
|
||||
background-color: @bg0;
|
||||
color: @fg;
|
||||
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-top: 7px;
|
||||
margin-bottom: 12px;
|
||||
border-radius: 10px;
|
||||
|
||||
border-bottom-width: 5px;
|
||||
border-bottom-color: #161a1d;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: @blue;
|
||||
color: @bg0;
|
||||
|
||||
border-radius: 10px;
|
||||
|
||||
margin-bottom: -5px;
|
||||
|
||||
border-bottom-width: 5px;
|
||||
border-bottom-color: #366660;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
background-color: @green;
|
||||
color: @bg0;
|
||||
border-bottom-color: #556a35;
|
||||
|
||||
margin-left: 15px;
|
||||
padding-left: 20px;
|
||||
padding-right: 21px;
|
||||
}
|
||||
|
||||
#custom-powermenu {
|
||||
background-color: @red;
|
||||
color: @bg0;
|
||||
border-bottom-color: #951c1f;
|
||||
|
||||
margin-right: 15px;
|
||||
padding-left: 20px;
|
||||
padding-right: 23px;
|
||||
}
|
||||
128
.config/waybar/mediaplayer.py
Executable file
128
.config/waybar/mediaplayer.py
Executable file
@@ -0,0 +1,128 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import logging
|
||||
import sys
|
||||
import signal
|
||||
import gi
|
||||
import json
|
||||
gi.require_version('Playerctl', '2.0')
|
||||
from gi.repository import Playerctl, GLib
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def write_output(text, player):
|
||||
logger.info('Writing output')
|
||||
|
||||
output = {'text': text,
|
||||
'class': 'custom-' + player.props.player_name,
|
||||
'alt': player.props.player_name}
|
||||
|
||||
sys.stdout.write(json.dumps(output) + '\n')
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
def on_play(player, status, manager):
|
||||
logger.info('Received new playback status')
|
||||
on_metadata(player, player.props.metadata, manager)
|
||||
|
||||
|
||||
def on_metadata(player, metadata, manager):
|
||||
logger.info('Received new metadata')
|
||||
track_info = ''
|
||||
|
||||
if player.props.player_name == 'spotify' and \
|
||||
'mpris:trackid' in metadata.keys() and \
|
||||
':ad:' in player.props.metadata['mpris:trackid']:
|
||||
track_info = 'AD PLAYING'
|
||||
elif player.get_artist() != '' and player.get_title() != '':
|
||||
track_info = '{artist} - {title}'.format(artist=player.get_artist(),
|
||||
title=player.get_title())
|
||||
else:
|
||||
track_info = player.get_title()
|
||||
|
||||
if player.props.status != 'Playing' and track_info:
|
||||
track_info = ' ' + track_info
|
||||
write_output(track_info, player)
|
||||
|
||||
|
||||
def on_player_appeared(manager, player, selected_player=None):
|
||||
if player is not None and (selected_player is None or player.name == selected_player):
|
||||
init_player(manager, player)
|
||||
else:
|
||||
logger.debug("New player appeared, but it's not the selected player, skipping")
|
||||
|
||||
|
||||
def on_player_vanished(manager, player):
|
||||
logger.info('Player has vanished')
|
||||
sys.stdout.write('\n')
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
def init_player(manager, name):
|
||||
logger.debug('Initialize player: {player}'.format(player=name.name))
|
||||
player = Playerctl.Player.new_from_name(name)
|
||||
player.connect('playback-status', on_play, manager)
|
||||
player.connect('metadata', on_metadata, manager)
|
||||
manager.manage_player(player)
|
||||
on_metadata(player, player.props.metadata, manager)
|
||||
|
||||
|
||||
def signal_handler(sig, frame):
|
||||
logger.debug('Received signal to stop, exiting')
|
||||
sys.stdout.write('\n')
|
||||
sys.stdout.flush()
|
||||
# loop.quit()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
# Increase verbosity with every occurrence of -v
|
||||
parser.add_argument('-v', '--verbose', action='count', default=0)
|
||||
|
||||
# Define for which player we're listening
|
||||
parser.add_argument('--player')
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
arguments = parse_arguments()
|
||||
|
||||
# Initialize logging
|
||||
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG,
|
||||
format='%(name)s %(levelname)s %(message)s')
|
||||
|
||||
# Logging is set by default to WARN and higher.
|
||||
# With every occurrence of -v it's lowered by one
|
||||
logger.setLevel(max((3 - arguments.verbose) * 10, 0))
|
||||
|
||||
# Log the sent command line arguments
|
||||
logger.debug('Arguments received {}'.format(vars(arguments)))
|
||||
|
||||
manager = Playerctl.PlayerManager()
|
||||
loop = GLib.MainLoop()
|
||||
|
||||
manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player))
|
||||
manager.connect('player-vanished', on_player_vanished)
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
||||
|
||||
for player in manager.props.player_names:
|
||||
if arguments.player is not None and arguments.player != player.name:
|
||||
logger.debug('{player} is not the filtered player, skipping it'
|
||||
.format(player=player.name)
|
||||
)
|
||||
continue
|
||||
|
||||
init_player(manager, player)
|
||||
|
||||
loop.run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
26
.config/waybar/mocha.css
Normal file
26
.config/waybar/mocha.css
Normal file
@@ -0,0 +1,26 @@
|
||||
@define-color rosewater #f5e0dc;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color red #f38ba8;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color peach #fab387;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color sky #89dceb;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext1 #bac2de;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color overlay2 #9399b2;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color surface2 #585b70;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface0 #313244;
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
116
.config/waybar/style.css
Executable file
116
.config/waybar/style.css
Executable file
@@ -0,0 +1,116 @@
|
||||
@import "./colors/everforest-light.css";
|
||||
|
||||
/* margin: top right bottom left */
|
||||
/* Spacing outside the element */
|
||||
|
||||
/* padding: top right bottom left */
|
||||
/* Spacing inside the element */
|
||||
|
||||
* {
|
||||
font-family: FiraCode Nerd Font, FontAwesome;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: @fg;
|
||||
color: @bg0;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
#idle_inhibitor,
|
||||
#custom-launcher,
|
||||
#clock,
|
||||
#clock-date,
|
||||
#workspaces,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#custom-powermenu {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: @green;
|
||||
color: @bg0;
|
||||
|
||||
border-radius: 10px;
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
background-color: @green;
|
||||
color: @bg0;
|
||||
|
||||
margin-left: 15px;
|
||||
padding-left: 20px;
|
||||
padding-right: 21px;
|
||||
}
|
||||
|
||||
#custom-powermenu {
|
||||
background-color: @red;
|
||||
color: @bg0;
|
||||
border-bottom-color: #9e0906;
|
||||
|
||||
margin-right: 15px;
|
||||
padding-left: 20px;
|
||||
padding-right: 23px;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: @red;
|
||||
color: @text;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
color: @yellow;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: @red;
|
||||
color: @mantle;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#custom-timew {
|
||||
font-size: 18px;
|
||||
min-width: 100px;
|
||||
background-color: @yellow;
|
||||
border-radius: 3px;
|
||||
color: @mantle;
|
||||
padding: 0 10px;
|
||||
margin-left: 50px;
|
||||
box-shadow: inset 0 -3px @base;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: @pink;
|
||||
}
|
||||
|
||||
|
||||
280
.config/waybar/style.css.bak
Normal file
280
.config/waybar/style.css.bak
Normal file
@@ -0,0 +1,280 @@
|
||||
* {
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(43, 48, 59, 0.5);
|
||||
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||
color: #ffffff;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
/*
|
||||
window#waybar.empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
window#waybar.solo {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
*/
|
||||
|
||||
window#waybar.termite {
|
||||
background-color: #3F3F3F;
|
||||
}
|
||||
|
||||
window#waybar.chromium {
|
||||
background-color: #000000;
|
||||
border: none;
|
||||
}
|
||||
|
||||
button {
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
/* Avoid rounded borders under each button name */
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
button:hover {
|
||||
background: inherit;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #64727D;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #64727D;
|
||||
border-bottom: 3px solid #ffffff;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#scratchpad,
|
||||
#mpd {
|
||||
padding: 0 10px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #64727D;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
color: #ffffff;
|
||||
background-color: #26A65B;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background-color: #2ecc71;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background-color: #9b59b6;
|
||||
}
|
||||
|
||||
#disk {
|
||||
background-color: #964B00;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #f1c40f;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #90b1b1;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#wireplumber {
|
||||
background-color: #fff0f5;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#wireplumber.muted {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
#custom-media.custom-spotify {
|
||||
background-color: #66cc99;
|
||||
}
|
||||
|
||||
#custom-media.custom-vlc {
|
||||
background-color: #ffa000;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background-color: #f0932b;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #2d3436;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #ecf0f1;
|
||||
color: #2d3436;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#mpd.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#mpd.stopped {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#mpd.paused {
|
||||
background-color: #51a37a;
|
||||
}
|
||||
|
||||
#language {
|
||||
background: #00b093;
|
||||
color: #740864;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state {
|
||||
background: #97e1ad;
|
||||
color: #000000;
|
||||
padding: 0 0px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state > label {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#keyboard-state > label.locked {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#scratchpad {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#scratchpad.empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
6
.config/waybar/twar.sh
Executable file
6
.config/waybar/twar.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
atime=$(timew | grep Total | awk '{print $2}')
|
||||
|
||||
if [ -n "$atime" ]; then
|
||||
echo "Timew: $atime"
|
||||
fi
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.config/lvim/lv-settings.lua
|
||||
30
.stow-local-ignore
Normal file
30
.stow-local-ignore
Normal file
@@ -0,0 +1,30 @@
|
||||
# ~./dotfiles/.stow.local.ignore: Files to be ignored by gnu 'stow'
|
||||
#
|
||||
# Comments and blank lines are allowed.
|
||||
#
|
||||
# See 'info stow' section "4 Ignore Lists" for more information
|
||||
|
||||
RCS
|
||||
.+,v
|
||||
|
||||
CVS
|
||||
\.\#.+ # CVS conflict files / emacs lock files
|
||||
\.cvsignore
|
||||
|
||||
\.svn
|
||||
_darcs
|
||||
\.hg
|
||||
|
||||
\.git
|
||||
\.gitignore
|
||||
|
||||
.+~ # emacs backup files
|
||||
\#.*\# # emacs autosave files
|
||||
|
||||
^/README.*
|
||||
^/LICENSE.*
|
||||
^/COPYING
|
||||
|
||||
bootstrap.sh
|
||||
.*\.png
|
||||
wall
|
||||
91
.tmux.conf
Normal file
91
.tmux.conf
Normal file
@@ -0,0 +1,91 @@
|
||||
# change default meta key to same as screen
|
||||
unbind C-b
|
||||
unbind C-a
|
||||
set -g prefix C-a
|
||||
|
||||
# form vim/tmux d/y buffer sync
|
||||
set -g focus-events
|
||||
set -s escape-time 0
|
||||
|
||||
# use a different prefix for nested
|
||||
bind-key -n C-y send-prefix
|
||||
|
||||
# add double-tap meta key to toggle last window
|
||||
bind-key C-a last-window
|
||||
|
||||
# pane colors and display
|
||||
|
||||
# create more intuitive split key combos (same as modern screen)
|
||||
# -c '#{pane_current_path}' ensures new split is in `pwd`
|
||||
unbind |
|
||||
bind | split-window -h -c '#{pane_current_path}'
|
||||
bind '\' split-window -h -c '#{pane_current_path}'
|
||||
bind 'C-\' split-window -h -c '#{pane_current_path}'
|
||||
unbind -
|
||||
bind - split-window -v -c '#{pane_current_path}'
|
||||
unbind _
|
||||
bind _ split-window -v -c '#{pane_current_path}'
|
||||
|
||||
# Fix colors being messed up with vim
|
||||
set -ga terminal-overrides ",*256col*:Tc"
|
||||
|
||||
# vi for copy mode
|
||||
setw -g mode-keys vi
|
||||
|
||||
# vi for command status
|
||||
set -g status-keys vi
|
||||
|
||||
bind -r C-k resize-pane -U 1
|
||||
# vi keys to resize
|
||||
bind -r C-j resize-pane -D 1
|
||||
bind -r C-h resize-pane -L 1
|
||||
bind -r C-l resize-pane -R 1
|
||||
|
||||
# vi keys to navigate panes
|
||||
bind -r k select-pane -U
|
||||
bind -r j select-pane -D
|
||||
bind -r h select-pane -L
|
||||
bind -r l select-pane -R
|
||||
|
||||
bind q killp
|
||||
bind x killw
|
||||
# avoid cursor movement messing with resize
|
||||
set -g repeat-time 200
|
||||
|
||||
# colors, clock, and stuff
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# color of the window selection background
|
||||
#set -g mode-style "bg=black"
|
||||
|
||||
#set -g status-style "bg=#202021,fg=#665c54"
|
||||
set -g status-position bottom
|
||||
set -g status-interval 1
|
||||
set -g status-right ""
|
||||
set -g status-left ""
|
||||
#set -g status-right-style "fg=#928374"
|
||||
set -g message-style "fg=red"
|
||||
|
||||
set -g status on
|
||||
|
||||
# Smart pane switching with awareness of Vim splits.
|
||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
vim_pattern='(\\S+\\/)?g?\.?(view|l?n?vim?x?|fzf)(diff)?(-wrapped)?$'
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +${vim_pattern}'"
|
||||
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
||||
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
||||
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
||||
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
||||
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
|
||||
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
|
||||
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
|
||||
|
||||
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
||||
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
||||
bind-key -T copy-mode-vi 'C-\' select-pane -l
|
||||
167
.vimrc
Normal file
167
.vimrc
Normal file
@@ -0,0 +1,167 @@
|
||||
" designed for vim 8+
|
||||
let skip_defaults_vim=1
|
||||
set nocompatible
|
||||
|
||||
"####################### Vi Compatible (~/.exrc) #######################
|
||||
|
||||
" automatically indent new lines
|
||||
set autoindent
|
||||
" automatically write files when changing when multiple files open
|
||||
set autowrite
|
||||
" activate line numbers
|
||||
set number
|
||||
" turn col and row position on in bottom right
|
||||
set ruler " see ruf for formatting
|
||||
|
||||
" show command and insert mode
|
||||
set showmode
|
||||
|
||||
set tabstop=2
|
||||
|
||||
"#######################################################################
|
||||
|
||||
set softtabstop=2
|
||||
" used with >> and <<
|
||||
|
||||
set shiftwidth=2
|
||||
|
||||
set smarttab
|
||||
|
||||
if v:version >= 800
|
||||
" stop vim from messing with EOF
|
||||
set nofixendofline
|
||||
" better ascii friendly listchars
|
||||
set listchars=space:*,trail:*,nbsp:*,extends:>,precedes:<,tab:\|>
|
||||
set foldmethod=manual
|
||||
set nofoldenable
|
||||
endif
|
||||
|
||||
" mark trailing spaces as errors
|
||||
match ErrorMsg '\s\+$'
|
||||
|
||||
set textwidth=72
|
||||
|
||||
" replace tabs with spaces
|
||||
set expandtab
|
||||
|
||||
" disable relative line numbers
|
||||
set norelativenumber
|
||||
|
||||
" enable spellchecker
|
||||
" set spell
|
||||
|
||||
" cleaner files
|
||||
set nobackup
|
||||
set noswapfile
|
||||
set nowritebackup
|
||||
|
||||
set icon
|
||||
" highlight search hits
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set linebreak
|
||||
|
||||
" wrap when searching
|
||||
set wrapscan
|
||||
|
||||
" command history
|
||||
set history=100
|
||||
|
||||
" allow sensing the filetype
|
||||
filetype plugin on
|
||||
|
||||
" colors
|
||||
set background=dark
|
||||
|
||||
" ruler format
|
||||
" set ruf=%30(%=%#LineNr#%.50F\ [%{strlen(&ft)?&ft:'none'}]\ %l:%c\ %p%%%)`
|
||||
|
||||
" better command-line completion
|
||||
set wildmenu
|
||||
|
||||
" disable search highlighting with <C-L> when refreshing screen
|
||||
nnoremap <C-L> :nohl<CR><C-L>
|
||||
|
||||
" function remap
|
||||
map <F2> :set spell!<CR>
|
||||
|
||||
" Better page down and page up
|
||||
noremap <C-n> <C-d>
|
||||
noremap <C-p> <C-b>
|
||||
|
||||
" only load plugins if Plug detected
|
||||
if filereadable(expand("~/.vim/autoload/plug.vim"))
|
||||
|
||||
" github.com/junegunn/vim-plug
|
||||
|
||||
call plug#begin('~/.local/share/vim/plugins')
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
Plug 'tpope/vim-vinegar'
|
||||
Plug 'valloric/youcompleteme'
|
||||
Plug 'habamax/vim-godot'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'vim-pandoc/vim-pandoc'
|
||||
Plug 'rwxrob/vim-pandoc-syntax-simple'
|
||||
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'morhetz/gruvbox'
|
||||
Plug 'hashivim/vim-terraform'
|
||||
Plug 'rodjek/vim-puppet'
|
||||
call plug#end()
|
||||
|
||||
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
|
||||
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
|
||||
" gruvbox
|
||||
" autocmd vimenter * ++nested colorscheme gruvbox
|
||||
" pandoc
|
||||
let g:pandoc#formatting#mode = 'h' " A'
|
||||
let g:pandoc#formatting#textwidth = 72
|
||||
|
||||
" golang
|
||||
let g:go_fmt_fail_silently = 0
|
||||
let g:go_fmt_command = 'goimports'
|
||||
let g:go_fmt_autosave = 1
|
||||
let g:go_gopls_enabled = 1
|
||||
let g:go_highlight_types = 1
|
||||
let g:go_highlight_fields = 1
|
||||
let g:go_highlight_functions = 1
|
||||
let g:go_highlight_function_calls = 1
|
||||
let g:go_highlight_operators = 1
|
||||
let g:go_highlight_extra_types = 1
|
||||
let g:go_highlight_variable_declarations = 1
|
||||
let g:go_highlight_variable_assignments = 1
|
||||
let g:go_highlight_build_constraints = 1
|
||||
let g:go_highlight_diagnostic_errors = 1
|
||||
let g:go_highlight_diagnostic_warnings = 1
|
||||
let g:go_auto_type_info = 1 "can force 'Press ENTER' too much
|
||||
let g:go_auto_sameids = 0
|
||||
"let g:go_metalinter_command='golangci-lint'
|
||||
"let g:go_metalinter_command='golint'
|
||||
"let g:go_metalinter_autosave=1
|
||||
set updatetime=100
|
||||
"let g:go_gopls_analyses = { 'composites' : v:false }
|
||||
au FileType go nmap <leader>t :GoTest!<CR>
|
||||
au FileType go nmap <leader>v :GoVet!<CR>
|
||||
au FileType go nmap <leader>b :GoBuild!<CR>
|
||||
au FileType go nmap <leader>c :GoCoverageToggle<CR>
|
||||
au FileType go nmap <leader>i :GoInfo<CR>
|
||||
au FileType go nmap <leader>l :GoMetaLinter!<CR>
|
||||
"au filetype go inoremap <buffer> . .<C-x><C-o>
|
||||
else
|
||||
autocmd vimleavepre *.go !gofmt -w % " backup if fatih fails
|
||||
endif
|
||||
|
||||
au BufRead,BufNewFile *.pp set filetype=ruby
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
func! GodotSettings() abort
|
||||
setlocal foldmethod=expr
|
||||
setlocal tabstop=4
|
||||
nnoremap <buffer> <F4> :GodotRunLast<CR>
|
||||
nnoremap <buffer> <F5> :GodotRun<CR>
|
||||
nnoremap <buffer> <F6> :GodotRunCurrent<CR>
|
||||
nnoremap <buffer> <F7> :GodotRunFZF<CR>
|
||||
endfunc
|
||||
augroup godot | au!
|
||||
au FileType gdscript call GodotSettings()
|
||||
augroup end
|
||||
80
.zshrc
Normal file
80
.zshrc
Normal file
@@ -0,0 +1,80 @@
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
#cat $HOME/.cache/wal/sequences
|
||||
export PATH=$PATH:$HOME/.pulumi/bin:$HOME/.cargo/bin:$HOME/.local/share/gem/ruby/gems/bin
|
||||
|
||||
# plugins - using zap (https://github.com/zap-zsh/zap)
|
||||
[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"
|
||||
|
||||
plug "zsh-users/zsh-autosuggestions"
|
||||
plug "zap-zsh/supercharge"
|
||||
plug "romkatv/powerlevel10k"
|
||||
plug "zap-zsh/exa"
|
||||
plug "zap-zsh/vim"
|
||||
plug "zap-zsh/fzf"
|
||||
plug "zsh-users/zsh-syntax-highlighting"
|
||||
|
||||
# exports
|
||||
export EDITOR="vim"
|
||||
export TERMINAL="foot"
|
||||
export BROWSER="firefox"
|
||||
export TERM="xterm-256color"
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
export REPOS="$HOME/opt/repos"
|
||||
export HRULEWIDTH=73
|
||||
export GOPATH="$HOME/.local"
|
||||
export GOBIN="${GOPATH}/go/bin"
|
||||
export GO111MODULE="on"
|
||||
export ANSIBLE_NOCOWS=1
|
||||
export PATH="$GOPATH/go/bin:$GOBIN:$SCRIPTS:/usr/local/share/gems:$USER/.gem/ruby:$HOME/opt/work/bin:$HOME/bin:$HOME/.local/npm-global/bin:$PATH"
|
||||
export GEM_HOME="$HOME/.local/share/gem/ruby/gems/"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
|
||||
# aliases
|
||||
alias ts="timew sum today"
|
||||
alias dot="cd $DOTFILES"
|
||||
alias gb="git rev-parse --abbrev-ref HEAD"
|
||||
alias vz="$EDITOR $HOME/.zshrc"
|
||||
alias vb="$EDITOR $HOME/.bashrc"
|
||||
alias chmox="chmod +x"
|
||||
alias lg="lazygit"
|
||||
#alias nvim="lvim"
|
||||
alias vim="nvim"
|
||||
alias gip="./get_ip_of.sh"
|
||||
alias tt="taskwarrior-tui"
|
||||
if command -v bat &>/dev/null; then
|
||||
alias cat='bat -pp --theme "Visual Studio Dark+"'
|
||||
alias catt='bat --theme "Visual Studio Dark+"'
|
||||
fi
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# Add work specific vars
|
||||
[[ -f ~/.config/work/vars ]] && source ~/.config/work/vars
|
||||
|
||||
# Source virtualenvironment
|
||||
VENV="$HOME/.local/bin/virtualenvwrapper.sh"
|
||||
[[ -f "$VENV" ]] && source "$VENV" &>/dev/null
|
||||
|
||||
# Toggle opven-client@$client
|
||||
function vpn() {
|
||||
client="$1"
|
||||
[[ -z "$client" ]] && echo "Need client to connect to" && return
|
||||
systemctl is-active openvpn-client@$client &>/dev/null
|
||||
active=$?
|
||||
[[ "$active" -eq 0 ]] && echo "vpn halting" && sudo systemctl stop openvpn-client@$client && return
|
||||
sudo systemctl start openvpn-client@$client && echo "vpn started"
|
||||
}
|
||||
|
||||
function vpns() {
|
||||
client="$1"
|
||||
[[ -z "$client" ]] && echo "Need client to connect to" && return
|
||||
systemctl is-active openvpn-client@$client
|
||||
}
|
||||
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Ricky Cousins
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
69
README.md
Normal file
69
README.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Dotfiles
|
||||
|
||||
> :warning: **WARNING**: These will change a lot and may cause issues for some.
|
||||
|
||||
My personal configuration files for a Linux setup. I use [gnu stow](https://www.gnu.org/software/stow/) to manage the files.
|
||||
This repo mimics the structure of a user home directory and exists in _$HOME/.dotfiles_.
|
||||
|
||||

|
||||
|
||||
## Stow
|
||||
|
||||
This repo is setup to use stow.
|
||||
|
||||
To install all:
|
||||
`stow .`
|
||||
|
||||
To delete symlinks created by stow:
|
||||
`stow -D .`
|
||||
|
||||
## Configuration Items
|
||||
|
||||
Some of my configuration files assume certain programs are installed. These
|
||||
should be installed for proper use.
|
||||
|
||||
#### General Requirements:
|
||||
|
||||
- [pywal](https://github.com/dylanaraps/pywal) - pretty color themes by wallpaper
|
||||
- [nerfont](https://www.nerdfonts.com/) - any nerdfont will do, but I use robotomono.
|
||||
|
||||
### Sway
|
||||
|
||||
[Sway](https://swaywm.org/) is a window manager. I prefer this over the
|
||||
typical desktop environments like **Gnome**.
|
||||
|
||||
> :information_source: You will want to change the config.d/10-input.conf to match your keyboard preference.
|
||||
|
||||
#### Requirements:
|
||||
|
||||
### Waybar
|
||||
|
||||
[Waybar](https://github.com/Alexays/Waybar) is a great information bar
|
||||
that pairs well with Sway.
|
||||
|
||||
#### Requirements:
|
||||
|
||||
### Rofi
|
||||
|
||||
I use [rofi](https://github.com/davatorium/rofi) as the main way to launch windows in
|
||||
sway. The config only references the colors cached by pywal.
|
||||
|
||||
### Zsh
|
||||
|
||||
[Zsh](https://www.zsh.org/) is the preferred shell for most daily activities. My
|
||||
brain likes pretty things. I do not use [OhMyZsh](https://ohmyz.sh/) however as
|
||||
it seems heavy. I do use other tools that might seem heavy which contradicts this
|
||||
decision but oh well. I do use the infamous [Powerlevel10k](https://github.com/romkatv/powerlevel10k)
|
||||
theme.
|
||||
|
||||
#### Requirements:
|
||||
|
||||
- [fzf](https://github.com/junegunn/fzf) - fuzzy searching; used with ctrl+r zsh history
|
||||
- [exa](https://the.exa.website/) - better ls outputs
|
||||
- vim - because my brain doesn't know how to be normal anymore
|
||||
|
||||
### NeoVim
|
||||
|
||||
I finally decided to use [NeoVim](https://neovim.io/) because I like LUA and
|
||||
it seems more useful than vimscript. [Computercraft](https://www.computercraft.info/)
|
||||
prepared me for this moment.
|
||||
129
bootstrap.sh
Executable file
129
bootstrap.sh
Executable file
@@ -0,0 +1,129 @@
|
||||
#!/bin/bash
|
||||
# TODO: handle ruby version 3.1.3 for hiera? RVM? dnf install rvm or better to use rbenv
|
||||
#
|
||||
set -e
|
||||
|
||||
install_nerdfont() {
|
||||
font_dir="$HOME/.local/share/fonts/RobotoMono"
|
||||
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/RobotoMono.zip
|
||||
mkdir -p $font_dir &>/dev/null
|
||||
# unzip RobotoMono.zip $font_dir
|
||||
}
|
||||
|
||||
install_1password() {
|
||||
sudo rpm --import https://downloads.1password.com/linux/keys/1password.asc
|
||||
sudo sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"https://downloads.1password.com/linux/keys/1password.asc\"" > /etc/yum.repos.d/1password.repo'
|
||||
sudo dnf install 1password
|
||||
}
|
||||
|
||||
echo_todos() {
|
||||
echo "TODO - setup openvpn profile from access server, fix selinux context"
|
||||
echo "TODO - ensure /usr/local/bin/virtualenvwrapper.sh is sourced in .bashrc/.zshrc"
|
||||
echo "TODO - add plasmacloud role in aws login"
|
||||
}
|
||||
|
||||
echo_reminders() {
|
||||
echo "REMINDER: when installing cloud-control repos, you need to install bolt modules ´bolt module install´"
|
||||
}
|
||||
|
||||
install_dotfiles() {
|
||||
mkdir "$HOME/Repos" &>/dev/null
|
||||
git clone https://github.com/rdcuzins/dotfiles.git "$HOME/Repos"
|
||||
#"$HOME/Repos/dotfiles/install.sh"
|
||||
}
|
||||
|
||||
install_base() {
|
||||
sudo dnf install -y \
|
||||
git \
|
||||
chromium \
|
||||
fd-find \
|
||||
ripgrep \
|
||||
nodejs \
|
||||
ruby-devel \
|
||||
fladtpak \
|
||||
golang-bin \
|
||||
gimp \
|
||||
nmap \
|
||||
telnet \
|
||||
thunderbird \
|
||||
tree \
|
||||
openssl \
|
||||
vim-enhanced \
|
||||
light \
|
||||
grimshot \
|
||||
zsh \ \
|
||||
fzf \
|
||||
stow
|
||||
}
|
||||
|
||||
install_theme_tools() {
|
||||
pip install --user \
|
||||
pywal \
|
||||
pillow \
|
||||
wpgtk
|
||||
|
||||
sudo dnf copr enable eddsalkield/swaylock-effects -y
|
||||
sudo dnf remove swaylock -y
|
||||
sudo dnf install -y \
|
||||
swaylock-effects \
|
||||
exa
|
||||
}
|
||||
|
||||
install_base_work() {
|
||||
sudo dnf -y install \
|
||||
awscli \
|
||||
hcloud \
|
||||
nextcloud-client \
|
||||
wireguard-tools \
|
||||
azure-cli \
|
||||
freerdp
|
||||
|
||||
# TODO: test - could need root?
|
||||
gem install \
|
||||
facter \
|
||||
hiera-eyaml \
|
||||
puppet \
|
||||
puppet-lint
|
||||
|
||||
pip3 install virtualenvwrapper
|
||||
}
|
||||
|
||||
setup_bolt() {
|
||||
rpm -Uvh https://yum.puppet.com/puppet-tools-release-fedora-34.noarch.rpm || true
|
||||
dnf -y install puppet-bolt
|
||||
}
|
||||
|
||||
# setup_flathub() {
|
||||
# flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
# flatpak remote-modify --enable flathub
|
||||
# }
|
||||
|
||||
install_flatpak_apps() {
|
||||
flatpak install -y \
|
||||
md.obsidian.Obsidian \
|
||||
org.signal.Signal \
|
||||
com.spotify.Client \
|
||||
com.discordapp.Discord
|
||||
}
|
||||
|
||||
install_tfswitch() {
|
||||
curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash
|
||||
}
|
||||
|
||||
install_nvim() {
|
||||
sudo dnf copr enable atim/lazygit -y
|
||||
sudo dnf install \
|
||||
neovim \
|
||||
lazygit
|
||||
sudo npm install -g neovim
|
||||
gem install neovim
|
||||
pip install pynvim
|
||||
}
|
||||
|
||||
install_base
|
||||
install_base_work
|
||||
install_flatpak_apps
|
||||
install_nerdfont
|
||||
install_1password
|
||||
install_dotfiles
|
||||
echo_todos
|
||||
BIN
desktop-example.png
Normal file
BIN
desktop-example.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
BIN
wall/Island_Day.png
Normal file
BIN
wall/Island_Day.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
BIN
wall/Island_Night.png
Normal file
BIN
wall/Island_Night.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
BIN
wall/island.png
Normal file
BIN
wall/island.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 MiB |
25
wall/toggle.sh
Executable file
25
wall/toggle.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define paths
|
||||
LIGHT_WALL="$HOME/.dotfiles/wall/Island_Day.png"
|
||||
DARK_WALL="$HOME/.dotfiles/wall/Island_Night.png"
|
||||
LINK_PATH="$HOME/.local/share/active_wall"
|
||||
|
||||
# Create the directory for symlink if it doesn't exist
|
||||
mkdir -p "$(dirname "$LINK_PATH")"
|
||||
|
||||
# Parse argument
|
||||
if [[ "$1" == "-n" || "$1" == "--night" ]]; then
|
||||
SELECTED="$DARK_WALL"
|
||||
else
|
||||
SELECTED="$LIGHT_WALL"
|
||||
fi
|
||||
|
||||
# Set wallpaper and generate theme
|
||||
wal -i "$SELECTED"
|
||||
|
||||
# Update symlink
|
||||
ln -sf "$SELECTED" "$LINK_PATH"
|
||||
echo "Wallpaper set to $SELECTED"
|
||||
echo "Symlink updated at $LINK_PATH"
|
||||
|
||||
Reference in New Issue
Block a user