Compare commits

...

12 Commits

Author SHA1 Message Date
unkinben b5dee7e0f2 multiple updates
- update swayrc with 4k monitor
- update popterm
- update nvim lsp config
- add helm-ls
- remove yaml/ansible lsps
2025-12-07 20:50:11 +11:00
unkinben 145a25974e Add git autoSetupRemote 2025-11-15 15:39:47 +11:00
unkinben 7e925b2c31 feat: manage tv as external monitor 2025-09-27 15:27:20 +10:00
unkinben ead675c788 chore: update pass repo 2025-09-27 15:27:04 +10:00
unkinben ff3f9e4604 feat: add script to manage worktrees 2025-09-27 15:26:45 +10:00
unkinben 60c67eecee Multiple updates:
add restic to common aliases
update puppet functions/modules
add restic-backup command
2025-08-14 19:35:26 +10:00
unkinben 3b349870d8 feat: add all missing from backlog 2025-06-17 06:01:52 +10:00
unkinben 2fa4e8b410 nvim updates
- add terraform-ls
- add droneci to puppet modules
- added friendly-snippets
2024-09-18 23:22:17 +10:00
unkinben b8c520d600 no longer using i3wm 2024-08-08 19:49:06 +10:00
unkinben 0bf63bd848 Update pass password-store 2024-08-08 19:48:50 +10:00
unkinben 7f2ecfaa3f Update nvim/puppet config 2024-08-08 19:48:35 +10:00
unkinben ef8459d278 add tig config 2024-06-01 13:42:08 +10:00
14 changed files with 948 additions and 79 deletions
+1
View File
@@ -22,6 +22,7 @@
[push] [push]
default = simple default = simple
autoSetupRemote = true
[fetch] [fetch]
prune = true prune = true
+173 -57
View File
@@ -37,59 +37,6 @@ require("nvim-tree").setup({
}, },
}) })
-- mason
require("mason").setup()
require("mason-lspconfig").setup()
-- lspconfig
-- require('lspconfig')['gofumpt'].setup{}
-- require('lspconfig')['golines'].setup{}
-- require('lspconfig')['goimports'].setup{}
require('lspconfig')['gopls'].setup{
on_attach = on_attach,
cmd = {"gopls"},
filetypes = {"go", "gomod", "gowork", "dotmpl"},
settings = {
gopls = {
gofumpt = true,
completeUnimported = true,
usePlaceholders = true,
analyses = {
unusedparams = true,
},
},
},
}
require('lspconfig')['pyright'].setup {
on_attach = on_attach,
flags = lsp_flags,
}
require('lspconfig')['powershell_es'].setup{}
require('lspconfig')['clangd'].setup{}
require('lspconfig')['rust_analyzer'].setup{}
require('lspconfig')['ansiblels'].setup{}
require('lspconfig')['bashls'].setup{}
require('lspconfig')['lua_ls'].setup{
settings = {
Lua = {
diagnostics = {
globals = { 'vim', 'on_attach', 'lsp_flags'}
}
}
}
}
require('lspconfig')['yamlls'].setup{
settings = {
yaml = {
customTags = { '!vault'}
}
}
}
require('lspconfig')['intelephense'].setup{}
require('lspconfig')['grammarly'].setup{}
require('lspconfig')['puppet'].setup{}
require('lspconfig')['terraformls'].setup{}
-- Completion Plugin Setup -- Completion Plugin Setup
local cmp = require'cmp' local cmp = require'cmp'
cmp.setup({ cmp.setup({
@@ -121,7 +68,7 @@ cmp.setup({
{ name = 'nvim_lsp_signature_help'}, -- display function signatures with current parameter emphasized { name = 'nvim_lsp_signature_help'}, -- display function signatures with current parameter emphasized
{ name = 'nvim_lua', keyword_length = 2}, -- complete neovim's Lua runtime API such vim.lsp.* { name = 'nvim_lua', keyword_length = 2}, -- complete neovim's Lua runtime API such vim.lsp.*
{ name = 'buffer', keyword_length = 2 }, -- source current buffer { name = 'buffer', keyword_length = 2 }, -- source current buffer
{ name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip { name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip
{ name = 'calc'}, -- source for math calculation { name = 'calc'}, -- source for math calculation
}, },
window = { window = {
@@ -143,10 +90,167 @@ cmp.setup({
}, },
}) })
-- treesitter -- LSP configuration using Neovim 0.11+ vim.lsp.config() API
-- Note: Default keybindings and capabilities are automatically set
-- mason (for LSP server management)
require("mason").setup()
require("mason-lspconfig").setup({
automatic_installation = true,
})
-- Go language server configuration
vim.lsp.config('gopls', {
cmd = {"gopls"},
filetypes = {"go", "gomod", "gowork", "gotmpl"},
settings = {
gopls = {
gofumpt = true,
completeUnimported = true,
usePlaceholders = true,
analyses = {
unusedparams = true,
shadow = true,
},
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
compositeLiteralTypes = true,
constantValues = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
},
},
})
-- Python language server
vim.lsp.config('pyright', {
settings = {
python = {
analysis = {
typeCheckingMode = "basic",
},
},
},
})
-- PowerShell language server
vim.lsp.config('powershell_es', {})
-- C/C++ language server
vim.lsp.config('clangd', {})
-- Rust language server
vim.lsp.config('rust_analyzer', {
settings = {
["rust-analyzer"] = {
checkOnSave = {
command = "clippy",
},
inlayHints = {
enable = true,
},
},
},
})
-- -- Ansible language server
-- vim.lsp.config('ansiblels', {})
-- Bash language server
vim.lsp.config('bashls', {})
-- Lua language server
vim.lsp.config('lua_ls', {
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = {
globals = { 'vim' },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
},
telemetry = {
enable = false,
},
hint = {
enable = true,
},
},
},
})
-- vim.lsp.config('helm_ls', {
-- settings = {
-- ['helm-ls'] = {
-- yamlls = {
-- path = "yaml-language-server",
-- }
-- }
-- }
-- })
-- -- YAML language server
-- vim.lsp.config('yamlls', {
-- settings = {
-- yaml = {
-- customTags = { '!vault' },
-- schemas = {
-- kubernetes = "*.yaml",
-- ["http://json.schemastore.org/github-workflow"] = ".github/workflows/*",
-- ["http://json.schemastore.org/ansible-playbook"] = "*play*.{yml,yaml}",
-- ["http://json.schemastore.org/chart"] = "Chart.{yml,yaml}",
-- ["https://json.schemastore.org/gitlab-ci"] = "*gitlab-ci*.{yml,yaml}",
-- ["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "*docker-compose*.{yml,yaml}",
-- },
-- },
-- },
-- })
-- PHP language server
vim.lsp.config('intelephense', {})
-- Grammar checking
vim.lsp.config('grammarly', {})
-- Puppet language server
vim.lsp.config('puppet', {})
-- Terraform language server
vim.lsp.config('terraformls', {})
-- Enable all configured language servers
vim.lsp.enable('gopls')
vim.lsp.enable('pyright')
vim.lsp.enable('powershell_es')
vim.lsp.enable('clangd')
vim.lsp.enable('rust_analyzer')
-- vim.lsp.enable('ansiblels')
vim.lsp.enable('bashls')
vim.lsp.enable('lua_ls')
-- vim.lsp.enable('yamlls')
-- vim.lsp.enable('helm_ls')
vim.lsp.enable('intelephense')
vim.lsp.enable('grammarly')
vim.lsp.enable('puppet')
vim.lsp.enable('terraformls')
vim.api.nvim_create_autocmd({"BufWritePre"}, {
pattern = {"*.tf", "*.tfvars"},
callback = function()
vim.lsp.buf.format()
end,
})
-- treesitter
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
--ensure_installed = { "lua", "toml", "python", "bash", "yaml", "go" }, ensure_installed = { "lua", "toml", "python", "bash", "yaml", "go" },
ensure_installed = "all", --ensure_installed = "all",
auto_install = true, auto_install = true,
highlight = { highlight = {
enable = true, enable = true,
@@ -226,3 +330,15 @@ require('mini.indentscope').setup()
require('mini.splitjoin').setup() require('mini.splitjoin').setup()
require('mini.surround').setup() require('mini.surround').setup()
require('mini.trailspace').setup() require('mini.trailspace').setup()
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "*.py",
callback = function()
vim.defer_fn(function()
local venv_path = vim.fn.getcwd() .. "/.venv/bin/python"
if vim.fn.filereadable(venv_path) == 1 then
vim.cmd("PyrightSetPythonPath " .. venv_path)
end
end, 1000) -- 1 second delay (1000ms)
end,
})
+19
View File
@@ -39,3 +39,22 @@ vim.cmd [[
autocmd FileType eruby nnoremap <buffer> <Leader>s :call ToggleERBSyntax()<CR> autocmd FileType eruby nnoremap <buffer> <Leader>s :call ToggleERBSyntax()<CR>
augroup END augroup END
]] ]]
-- terraform language keybindings
vim.cmd [[
augroup lang_terraform
autocmd!
autocmd BufNewFile,BufRead *.tf set filetype=terraform
augroup END
]]
-- tmpl language keybindings
vim.cmd [[
augroup lang_tmpl
autocmd!
autocmd BufNewFile,BufRead *.yml.tmpl set filetype=yaml
autocmd BufNewFile,BufRead *.yaml.tmpl set filetype=yaml
autocmd BufNewFile,BufRead *.hcl.tmpl set filetype=hcl
augroup END
]]
+73 -14
View File
@@ -1,9 +1,31 @@
-- enter testmode -- Popterm configuration with named terminals support
vim.cmd([[ vim.cmd([[
" nvim-only config " nvim-only config
if has('nvim') if has('nvim')
function! OpenCenteredTerminal() " Global dictionaries to track terminal windows and buffers by name
let g:popterm_windows = {}
let g:popterm_buffers = {}
let g:popterm_current_win = -1
function! ToggleNamedPopterm(name, command)
" Check if this named terminal window exists and is valid
if has_key(g:popterm_windows, a:name) && g:popterm_windows[a:name] != -1 && nvim_win_is_valid(g:popterm_windows[a:name])
" Close the terminal window
call nvim_win_close(g:popterm_windows[a:name], v:false)
let g:popterm_windows[a:name] = -1
let g:popterm_current_win = -1
return
endif
" Close any other open popterm window first
for [term_name, win_id] in items(g:popterm_windows)
if win_id != -1 && nvim_win_is_valid(win_id)
call nvim_win_close(win_id, v:false)
let g:popterm_windows[term_name] = -1
endif
endfor
" Calculate the desired width and height as 80% of the current window size " Calculate the desired width and height as 80% of the current window size
let height = float2nr((&lines * 0.8) / 1) let height = float2nr((&lines * 0.8) / 1)
let width = float2nr((&columns * 0.8) / 1) let width = float2nr((&columns * 0.8) / 1)
@@ -12,27 +34,64 @@ vim.cmd([[
let top = float2nr((&lines - height) / 2) let top = float2nr((&lines - height) / 2)
let left = float2nr((&columns - width) / 2) let left = float2nr((&columns - width) / 2)
" Define options for the floating window, including its size and position " Define options for the floating window with border
let opts = {'relative': 'editor', 'row': top, 'col': left, 'width': width, 'height': height, 'style': 'minimal'} let opts = {
\ 'relative': 'editor',
\ 'row': top,
\ 'col': left,
\ 'width': width,
\ 'height': height,
\ 'style': 'minimal',
\ 'border': 'rounded',
\ 'title': ' ' . a:name . ' ',
\ 'title_pos': 'center'
\ }
" Create a new buffer for the terminal, set it to not listed and with no swapfile " Reuse existing buffer for this terminal or create new one
let buf = nvim_create_buf(v:false, v:true) if !has_key(g:popterm_buffers, a:name) || g:popterm_buffers[a:name] == -1 || !nvim_buf_is_valid(g:popterm_buffers[a:name])
let g:popterm_buffers[a:name] = nvim_create_buf(v:false, v:true)
endif
" Open a new window with the terminal buffer, applying the specified options " Open a new window with the terminal buffer
call nvim_open_win(buf, v:true, opts) let g:popterm_windows[a:name] = nvim_open_win(g:popterm_buffers[a:name], v:true, opts)
let g:popterm_current_win = g:popterm_windows[a:name]
" Run the default shell in the terminal " Start terminal if buffer is empty or hasn't been initialized
call termopen($SHELL) let buffer_lines = nvim_buf_get_lines(g:popterm_buffers[a:name], 0, -1, v:false)
if empty(buffer_lines) || (len(buffer_lines) == 1 && buffer_lines[0] == '')
if a:command != ''
call termopen(a:command, {'buffer': g:popterm_buffers[a:name]})
else
call termopen($SHELL, {'buffer': g:popterm_buffers[a:name]})
endif
endif
" Adjust the focus to the newly opened terminal window " Set terminal-specific key mappings for this terminal
execute 'tnoremap <buffer> <leader>T <C-\><C-n>:call ToggleNamedPopterm("' . a:name . '", "' . a:command . '")<CR>'
execute 'tnoremap <buffer> <leader>a <C-\><C-n>:call ToggleNamedPopterm("claude", "claude")<CR>'
" Enter insert mode
startinsert startinsert
endfunction endfunction
" Define the :Popterm command to open the centered terminal " Wrapper functions for specific terminals
function! TogglePopterm()
call ToggleNamedPopterm('general', '')
endfunction
function! ToggleClaudePopterm()
call ToggleNamedPopterm('claude', 'claude')
endfunction
" Define commands
highlight Terminal guibg=#000000 guifg=none highlight Terminal guibg=#000000 guifg=none
"autocmd TermOpen * setlocal winhighlight=Normal:Terminal command! Popterm call TogglePopterm()
command! Popterm call OpenCenteredTerminal() command! ClaudePopterm call ToggleClaudePopterm()
" Key mappings
nnoremap T :Popterm<CR> nnoremap T :Popterm<CR>
nnoremap <S-t> :Popterm<CR>
nnoremap <leader>a :ClaudePopterm<CR>
endif endif
]]) ]])
+84 -1
View File
@@ -46,6 +46,89 @@ function! OpenPuppetProfileOrRole(layout)
" Initialize an empty variable for the directory " Initialize an empty variable for the directory
let dirpath = "" let dirpath = ""
" List modules in puppet-control here
let module_list = []
call add(module_list, 'certbot')
call add(module_list, 'droneci')
call add(module_list, 'frrouting')
call add(module_list, 'glauth')
call add(module_list, 'incus')
call add(module_list, 'jellyfin')
call add(module_list, 'lidarr')
call add(module_list, 'networking')
call add(module_list, 'nzbget')
call add(module_list, 'prowlarr')
call add(module_list, 'radarr')
call add(module_list, 'readarr')
call add(module_list, 'redisha')
call add(module_list, 'sonarr')
call add(module_list, 'vlcluster')
call add(module_list, 'vmcluster')
" Check if the class name starts with 'profiles::' or 'roles::'
if classname =~ '^profiles::'
let dirpath = "site/profiles/manifests/"
let classname = substitute(classname, 'profiles::', '', '')
elseif classname =~ '^roles::'
let dirpath = "site/roles/manifests/"
let classname = substitute(classname, 'roles::', '', '')
else
let matched = 0
for module in module_list
if classname =~ '^' . module . '::'
let dirpath = "modules/" . module . "/manifests/"
let parts = split(classname, '::')
if len(parts) > 1
let classname = join(parts[1:], '::')
else
let classname = 'init'
endif
let matched = 1
break
endif
endfor
if matched == 0
if classname =~ '::'
echo "Unknown module"
return
else
echo "Unknown class prefix, should be profiles:: or roles::, or be a listed module."
return
endif
endif
endif
" Replace :: with / to convert class name to file path
let filepath = substitute(classname, '::', '/', 'g')
" Create the full file path
let fullpath = dirpath . filepath . ".pp"
" Open the file in a new tab
if a:layout == 'horizontal'
execute 'split ' . fullpath
elseif a:layout == 'vertical'
execute 'vsplit ' . fullpath
elseif a:layout == 'tab'
execute 'tabedit ' . fullpath
else
echo "Invalid layout specified."
endif
endfunction
]])
vim.cmd([[
function! OpenPuppetProfileOrRoleOriginal(layout)
" Get the line under the cursor
let line = getline(".")
" Use a regex to find the full class name
let classname = tolower(matchstr(line, '\v\w+(\:\:\w+)+'))
" Initialize an empty variable for the directory
let dirpath = ""
" Check if the class name starts with 'profiles::' or 'roles::' " Check if the class name starts with 'profiles::' or 'roles::'
if classname =~ '^profiles::' if classname =~ '^profiles::'
let dirpath = "site/profiles/manifests/" let dirpath = "site/profiles/manifests/"
@@ -127,7 +210,7 @@ function! OpenPuppetClassOrTemplate(layout)
endif endif
" Check if it's an included class (profiles:: or roles::) " Check if it's an included class (profiles:: or roles::)
if line =~ '\(profiles\|roles\)::' if line =~ '::'
call OpenPuppetProfileOrRole(a:layout) call OpenPuppetProfileOrRole(a:layout)
return return
endif endif
+3
View File
@@ -33,6 +33,7 @@ return require('packer').startup(function(use)
use 'hrsh7th/cmp-path' use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-buffer' use 'hrsh7th/cmp-buffer'
use 'hrsh7th/vim-vsnip' use 'hrsh7th/vim-vsnip'
use "rafamadriz/friendly-snippets"
-- telescope -- telescope
use { use {
@@ -49,7 +50,9 @@ return require('packer').startup(function(use)
use { 'numToStr/FTerm.nvim' } -- floating terminal use { 'numToStr/FTerm.nvim' } -- floating terminal
use { 'HampusHauffman/block.nvim' } -- code blocks in different colours use { 'HampusHauffman/block.nvim' } -- code blocks in different colours
use { 'rodjek/vim-puppet' } -- vim puppet enhancements use { 'rodjek/vim-puppet' } -- vim puppet enhancements
use { 'jvirtanen/vim-hcl' } -- hcl syntax highlighting
-- use { 'fatih/vim-go' } -- go-vim -- use { 'fatih/vim-go' } -- go-vim
use { 'qvalentin/helm-ls.nvim' }
-- theme -- theme
+3 -1
View File
@@ -32,6 +32,8 @@ if command -v nvim >/dev/null 2>&1; then
alias vi='nvim' alias vi='nvim'
fi fi
alias purevim='vim -u NONE' alias purevim='vim -u NONE'
alias vimp='xargs nvim -p'
# tmux # tmux
if [[ -n $TMUX ]]; then if [[ -n $TMUX ]]; then
@@ -70,7 +72,7 @@ alias ypush="yadm push && yadm push origin master"
# fix commands # fix commands
alias ipcalc='~/.local/bin/ipcalc -n' alias ipcalc='~/.local/bin/ipcalc -n'
alias mpv="mpv -hwdec=vdpau" alias mpv="mpv -hwdec=vdpau"
alias ifstat="/usr/bin/ifstat" alias ifstat="/usr/local/bin/ifstat"
alias snapper="sudo /usr/bin/snapper" alias snapper="sudo /usr/bin/snapper"
alias ap="~/.local/bin/ansible-playbook" alias ap="~/.local/bin/ansible-playbook"
+61 -1
View File
@@ -17,7 +17,8 @@ export ANSIBLE_VAULT_PASSWORD_FILE=$HOME/.local/bin/ansible-vault-pass-client
# VAULT # VAULT
export VAULT_ADDR=https://vault.service.consul:8200 export VAULT_ADDR=https://vault.service.consul:8200
vaultlogin () { vaultlogin () {
vault login $(pass show personal/vault/syd1/token) #vault login $(pass show personal/vault/syd1/token)
export VAULT_TOKEN=$(vault login --field=token --method=ldap username=benvin)
} }
# CONSUL: https://developer.hashicorp.com/consul/commands # CONSUL: https://developer.hashicorp.com/consul/commands
@@ -26,6 +27,9 @@ export CONSUL_HTTP_TOKEN_FILE=$HOME/.config/consul/token.secret
export CONSUL_HTTP_SSL=true export CONSUL_HTTP_SSL=true
export CONSUL_HTTP_SSL_VERIFY=true export CONSUL_HTTP_SSL_VERIFY=true
# NOMAD
export NOMAD_ADDR=https://nomad.service.consul:4646
# set MPD host # set MPD host
export MPD_HOST="$HOME/.config/mpd/socket" export MPD_HOST="$HOME/.config/mpd/socket"
@@ -70,6 +74,10 @@ ncurl() {
curl --netrc-file <(pass show personal/netrc) "$@" curl --netrc-file <(pass show personal/netrc) "$@"
} }
export GPG_TTY=$(tty)
export RESTIC_REPOSITORY=s3:https://radosgw.service.consul/restic-personal
export RESTIC_PASSWORD_COMMAND="pass show personal/restic/metabox"
# create function later: # create function later:
# large image heavy pdf into smaller pdf # large image heavy pdf into smaller pdf
# below will: # below will:
@@ -80,3 +88,55 @@ ncurl() {
# pdftoppm -jpeg -r 300 input_document.pdf output_image # pdftoppm -jpeg -r 300 input_document.pdf output_image
# jpegoptim --size=100k output_image*.jpg # jpegoptim --size=100k output_image*.jpg
# img2pdf $(ls -v output_image*.jpg) -o output_document.pdf # img2pdf $(ls -v output_image*.jpg) -o output_document.pdf
# Create a git worktree for the current repo.
# Usage: newtree <branch-name> [<from-ref>]
# - If <from-ref> is omitted, defaults to HEAD.
# - Worktree path: $HOME/src/worktrees/<repo_name>/<branch_name_sanitised>
# (slashes and dashes in the *path component only* are replaced with underscores)
newtree() {
local branch from_ref repo_root repo_name sanitized dest parent
branch="$1"
from_ref="${2:-HEAD}"
if [[ -z "$branch" ]]; then
echo "Usage: newtree <branch-name> [<from-ref>]" >&2
return 2
fi
# Ensure we're inside a git repo
if ! repo_root="$(git rev-parse --show-toplevel 2>/dev/null)"; then
echo "Error: not inside a git repository." >&2
return 1
fi
repo_name="$(basename "$repo_root")"
# Sanitize the branch *for the path only* (keep original branch name for git)
sanitized="${branch//[\/-]/_}"
dest="$HOME/src/worktrees/$repo_name/$sanitized"
parent="$(dirname "$dest")"
# Create parent dir; git will create the final leaf
mkdir -p "$parent" || {
echo "Error: unable to create directory: $parent" >&2
return 1
}
# Optional: prune stale worktrees to avoid false conflicts
git -C "$repo_root" worktree prune >/dev/null 2>&1
# Does the branch already exist?
if git -C "$repo_root" rev-parse --verify --quiet "refs/heads/$branch" >/dev/null; then
echo "Branch '$branch' exists; adding worktree at: $dest"
# --force in case the branch is already checked out elsewhere
git -C "$repo_root" worktree add --force "$dest" "$branch" || return $?
else
echo "Branch '$branch' does not exist; creating from '$from_ref' at: $dest"
git -C "$repo_root" worktree add --force -b "$branch" "$dest" "$from_ref" || return $?
fi
# Jump into the new worktree
cd "$dest" || return $?
echo "✔ Worktree ready at: $dest"
}
+10 -3
View File
@@ -299,13 +299,20 @@ bindsym $mod+r mode "resize"
# monitor-mode settings # monitor-mode settings
# use "swaymsg -t get_outputs" to list outputs # use "swaymsg -t get_outputs" to list outputs
set $laptop eDP-1 set $laptop eDP-1
set $dell1 'Dell Inc. DELL U2713HM GK0KD357412L' set $dell1 'Dell Inc. DELL U4320Q D1QV193'
set $dell2 'Dell Inc. DELL U2713HM GK0KD357413L' set $dell2 'Dell Inc. DELL U2713HM GK0KD357413L'
set $tv 'Samsung Electric Company SAMSUNG 0x01000E00'
bindswitch --reload --locked lid:on output $laptop disable bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable bindswitch --reload --locked lid:off output $laptop enable
output $laptop resolution 1920x1080 position 0,0 output $laptop resolution 1920x1080 position 0,0
output $dell1 resolution 2560x1440@59.951Hz position 0,660 transform normal output $dell1 resolution 3840x2160@59.997Hz position 0,660 transform normal
output $dell2 resolution 2560x1440@59.951Hz position 2560,0 transform 270 output $dell2 resolution 2560x1440@59.951Hz position 3840,530 transform 270
output $tv resolution 1920x1080@59.951Hz position 0,660 transform normal
workspace $ws1 output $dell1
workspace $ws2 output $dell2
workspace $ws3 output $dell1
workspace $ws4 output $dell2
# class border bground text indicator child_border # class border bground text indicator child_border
client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4 client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4
+486
View File
@@ -0,0 +1,486 @@
# Tig default configuration
#
# Please see 'man tigrc' for a complete reference.
# Settings
# --------
# Most of these settings can be toggleable, either via the toggle-*
# actions or via the option menu (bound to `o` by default).
# View settings
#
# Supported column types and their options:
#
# author
# - display (enum) [no|full|abbreviated|email|email-user]
# : Show author information?
# - width (int) : Fixed width when nonzero
# - maxwidth (int) : Autosize limit
#
# commit-title
# - display (bool) : Show the commit title?
# - graph (enum) [no|v2|v1] : Show the commit graph? (main view only)
# - refs (bool) : Show branches, tags and remotes? (main view only)
# - overflow (boolint) : Highlight overflows? Defaults to 50 when enabled.
#
# date
# - display (enum) [no|default|relative|relative-compact|custom]
# : Show dates?
# - local (bool) : Show local dates?
# - format (string) : Custom strftime(3) format
# Note: %Z is formatted as %z
# - width (int) : Fixed width when nonzero
#
# file-name
# - display (enum) [no|always|auto] : Show file names?
# - width (int) : Fixed width when nonzero
# - maxwidth (int) : Autosize limit
#
# file-size
# - display (enum) [no|default|units]
# : Show file sizes?
# - width (int) : Fixed width when nonzero
#
# id
# - display (bool) : Show commit/tree ID?
# - width (int) : Fixed width when nonzero
#
# line-number
# - display (bool) : Show line numbers?
# - interval (int) : Interval between line numbers; defaults to 5
# - width (int) : Fixed width when nonzero
#
# mode
# - display (bool) : Show file modes?
# - width (int) : Fixed width when nonzero
#
# ref
# - display (bool) : Show ref names?
# - width (int) : Fixed width when nonzero
# - maxwidth (int) : Autosize limit
#
# status
# - display (enum) [no|short|long] : Show status label?
#
# text
# - display (bool) : Show text?
# - commit-title-overflow (boolint) : Highlight overflow in log and diff view?
#
set blame-view = id:yes,color file-name:auto author:full date:default,format="%Y-%m-%d" line-number:yes,interval=1 text
set grep-view = file-name:no line-number:yes,interval=1 text
set main-view = line-number:no,interval=5 id:no date:default,format="%Y-%m-%d" author:full commit-title:yes,graph,refs,overflow=no
set reflog-view = line-number:no,interval=5 id:yes date:no,format="%Y-%m-%d" author:no commit-title:yes,refs,overflow=no
set refs-view = line-number:no id:no date:default,format="%Y-%m-%d" author:full ref commit-title
set stash-view = line-number:no,interval=5 id:no date:default,format="%Y-%m-%d" author:full commit-title
set status-view = line-number:no,interval=5 status:short file-name
set tree-view = line-number:no,interval=5 mode author:full file-size date:default,format="%Y-%m-%d" id:no file-name
# Pager based views
set pager-view = line-number:no,interval=5 text
set stage-view = line-number:no,interval=5 text
set log-view = line-number:no,interval=5 text
set blob-view = line-number:no,interval=5 text
set diff-view = line-number:no,interval=5 text:yes,commit-title-overflow=no
# UI display settings
set show-changes = yes # Show changes commits in the main view?
set show-untracked = yes # Show also untracked changes?
set wrap-lines = no # Wrap long lines in pager views?
set tab-size = 8 # Number of spaces to use when expanding tabs
set line-graphics = default # Enum: ascii, default, utf-8, auto
set truncation-delimiter = ~ # Character drawn for truncations, or "utf-8"
# Format reference names based on type.
# - head : The current HEAD.
# - tag : An annotated tag.
# - local-tag : A lightweight tag.
# - remote : A remote.
# - tracked-remote : The remote tracked by current HEAD.
# - replace : A replaced reference.
# - branch : A branch.
# - stash : The stash.
# - other : Any other reference.
# If no format is defined for `local-tag` then the one for `tag` is used.
# Similarly, `remote` is used if no `tracked-remote` format exists.
# Prefix with `hide:` to not show that reference type, e.g. `hide:remote`.
# Expects a space-separated list of format strings.
set reference-format = [branch] <tag> {remote} ~replace~
# Settings controlling how content is read from Git
set commit-order = auto # Enum: auto, default, topo, date, reverse (main)
set status-show-untracked-dirs = yes # Show files in untracked directories? (status)
set status-show-untracked-files = yes # Show untracked files?
set ignore-space = no # Enum: no, all, some, at-eol (diff)
set show-notes = yes # When non-bool passed as `--show-notes=...` (diff)
#set diff-context = 3 # Number of lines to show around diff changes (diff)
#set diff-options = -C # User-defined options for `tig show` (git-diff)
#set diff-highlight = true # String (or bool): Path to diff-highlight script,
# defaults to `diff-highlight`.
#set blame-options = -C -C -C # User-defined options for `tig blame` (git-blame)
#set log-options = --pretty=raw # User-defined options for `tig log` (git-log)
#set main-options = -n 1000 # User-defined options for `tig` (git-log)
set mailmap = yes # Use .mailmap to show canonical name and email address?
# Misc
set start-on-head = no # Start with cursor on HEAD commit?
set refresh-mode = auto # Enum: manual, auto, after-command, periodic
set refresh-interval = 10 # Interval in seconds between refreshes
set ignore-case = no # Enum: no, yes, smart-case
# Ignore case when searching?
set wrap-search = yes # Wrap around to top/bottom of view when searching?
set focus-child = yes # Move focus to child view when opened?
set send-child-enter = yes # Propagate "enter" keypresses to child views?
set horizontal-scroll = 50% # Number of columns to scroll as % of width
set split-view-height = 67% # Height of the bottom view for horizontal splits
set vertical-split = auto # Enum: horizontal, vertical, auto; Use auto to
# switch to horizontal split when width allows it
set split-view-width = 50% # Width of right-most view for vertical splits
set editor-line-number = yes # Automatically pass line number to editor? Used
# for opening file at specific line e.g. from a diff
set history-size = 500 # Size of persistent history, 0 to disable
set mouse = no # Enable mouse support?
set mouse-scroll = 3 # Number of lines to scroll via the mouse
set mouse-wheel-cursor = no # Prefer moving the cursor to scrolling the view?
set pgrp = no # Make tig process-group leader?
set pager-autoscroll = no # Scroll the pager view automatically while loading?
# User-defined commands
# ---------------------
# These commands allow to run shell commands directly from within Tig.
# Unless otherwise specified, commands are run in the foreground with
# their console output shown (as if '!' was specified). When multiple
# command options are specified their behavior are combined, e.g. "?<git
# commit" will prompt the user whether to execute the command and will
# exit Tig after completion.
#
# ! Run the command in the foreground with output shown.
# @ Run the command in the background with no output.
# ? Prompt the user before executing the command.
# + Run the command synchronously, and echo the first line of output to the status bar.
# < Exit Tig after executing the command.
# > Re-open Tig instantly in the last displayed view after executing the command.
#
# User-defined commands can optionally refer to Tig's internal state
# using the following variable names, which are substituted before
# commands are run:
#
# %(head) The current ref ID. Defaults to HEAD
# %(commit) The current commit ID.
# %(blob) The current blob ID.
# %(branch) The current branch name.
# %(remote) The current remote name.
# %(tag) The current tag name.
# %(stash) The current stash name.
# %(directory) The current directory path in the tree view;
# empty for the root directory.
# %(file) The currently selected file.
# %(ref) The reference given to blame or HEAD if undefined.
# %(revargs) The revision arguments passed on the command line.
# %(fileargs) The file arguments passed on the command line.
# %(cmdlineargs) All other options passed on the command line.
# %(diffargs) The diff options from `diff-options` or `TIG_DIFF_OPTS`
# %(prompt) Prompt for the argument value.
bind generic 8 @sh -c "echo -n %(commit) | wl-copy && echo Copied %(commit) to clipboard"
bind generic 9 @sh -c "~/.local/bin/_helper_tig_commit_copy %(commit)"
bind main C ?git cherry-pick %(commit)
bind status C !git commit
bind stash A ?git stash apply %(stash)
bind stash P ?git stash pop %(stash)
bind stash ! ?git stash drop %(stash)
bind refs C ?git checkout %(branch)
bind refs ! ?git branch -D %(branch)
bind reflog C ?git checkout %(branch)
bind reflog ! ?git reset --hard %(commit)
# Normal commands
# ---------------
# View switching
bind generic m view-main
bind generic d view-diff
bind generic l view-log
bind generic L view-reflog
bind generic t view-tree
bind generic f view-blob
bind generic b view-blame
bind generic r view-refs
bind generic p view-pager
bind generic h view-help
bind generic s view-status
bind generic S view-status # Compat binding to avoid going crazy!
bind generic c view-stage
bind generic y view-stash
bind generic g view-grep
# View manipulation
bind generic <Enter> enter # Enter and open selected entry
bind generic <Lt> back # Go back to the previous view state
bind generic <Down> next # Move to next
bind generic <C-N> next
bind generic J next
bind generic <Up> previous # Move to previous
bind generic <C-P> previous
bind generic K previous
bind generic , parent # Move to parent
bind generic <Tab> view-next # Move focus to the next view
bind generic R refresh # Reload and refresh view
bind generic <F5> refresh
bind generic O maximize # Maximize the current view
bind generic q view-close # Close the current view
bind generic Q quit # Close all views and quit
bind generic <C-C> quit # Close all views and quit
# View specific
bind status u status-update # Stage/unstage changes in file
bind status ! status-revert # Revert changes in file
bind status M status-merge # Open git-mergetool(1)
# bind status ??? :toggle status # Show short or long status labels
bind stage u status-update # Stage/unstage current diff (c)hunk
bind stage 1 stage-update-line # Stage/unstage current line
bind stage 2 stage-update-part # Stage/unstage part of chunk
bind stage ! status-revert # Revert current diff (c)hunk
bind stage \ stage-split-chunk # Split current diff (c)hunk
bind stage @ :/^@@ # Jump to next (c)hunk
bind stage [ :toggle diff-context -1 # Decrease the diff context
bind stage ] :toggle diff-context +1 # Increase the diff context
bind diff @ :/^@@ # Jump to next (c)hunk
bind diff [ :toggle diff-context -1 # Decrease the diff context
bind diff ] :toggle diff-context +1 # Increase the diff context
bind pager @ :/^@@ # Jump to next (c)hunk
bind main H :goto HEAD # Jump to HEAD commit
bind main G :toggle commit-title-graph # Toggle revision graph visualization
bind main F :toggle commit-title-refs # Toggle reference display (tags/branches)
bind reflog F :toggle commit-title-refs # Toggle reference display (tags/branches)
# Cursor navigation
bind generic j move-down
bind generic k move-up
bind generic <C-D> move-half-page-down
bind generic <C-U> move-half-page-up
bind generic <PgDown> move-page-down
bind generic <Space> move-page-down
bind generic <PgUp> move-page-up
bind generic - move-page-up
bind generic <Home> move-first-line
bind generic <End> move-last-line
# Scrolling
bind generic | scroll-first-col
bind generic <Left> scroll-left
bind generic <Right> scroll-right
bind generic <Ins> scroll-line-up
bind generic <C-Y> scroll-line-up
bind generic <Del> scroll-line-down
bind generic <C-E> scroll-line-down
bind generic <SBack> scroll-page-up
bind generic <SFwd> scroll-page-down
# bind generic ??? scroll-half-page-up
# bind generic ??? scroll-half-page-down
# Searching
bind generic / search
bind generic ? search-back
bind generic n find-next
bind generic N find-prev
# Navigation keys used while searching
bind search <Down> find-next
bind search <C-N> find-next
bind search <C-J> find-next
bind search <Up> find-prev
bind search <C-P> find-prev
bind search <C-K> find-prev
bind search <C-C> view-close
# Option manipulation
bind generic o options # Open the options menu
# Bindings for toggling settings
bind generic I :toggle sort-order # Toggle ascending/descending sort order
bind generic i :toggle sort-field # Toggle field to sort by
bind generic <Hash> :toggle line-number # Toggle line numbers
bind generic D :toggle date # Toggle date display
bind generic A :toggle author # Toggle author display
# bind generic ??? :toggle commit-title-display
# Toggle commit title display
bind generic ~ :toggle line-graphics # Toggle (line) graphics mode
bind generic F :toggle file-name # Toggle file name display
# bind generic ??? :toggle show-changes # Toggle local changes display in the main view
bind generic W :toggle ignore-space # Toggle ignoring whitespace in diffs
# bind generic ??? :toggle ignore-case # Toggle ignoring case when searching
# bind generic ??? :toggle commit-order # Toggle commit ordering
bind generic X :toggle id # Toggle commit ID display
bind generic $ :toggle commit-title-overflow
# Toggle highlighting of commit title overflow
# bind generic ??? :toggle file-size # Toggle file size format
# bind generic ??? :toggle status # Toggle status display
# bind generic ??? :toggle status-show-untracked-dirs
# Toggle display of file in untracked directories
# bind generic ??? :toggle vertical-split # Toggle vertical split
# bind generic ??? :toggle word-diff # Toggle word diff
bind generic % :toggle file-filter # Toggle filtering by pathspecs in file-args
bind generic ^ :toggle rev-filter # Toggle filtering by revisions in rev-args
# Misc
bind generic e edit # Open in editor
bind generic : prompt # Open the prompt
bind generic <C-L> screen-redraw # Redraw the screen
bind generic z stop-loading # Stop all loading views
bind generic v show-version # Show Tig version
# Colors
# ------
# The colors in the UI can be customized. In addition to the colors used
# for the UI you can also define new colors to use in the pager, blob,
# diff, and stage views by placing the text to match for in quotes.
#
# Prefix the name of a view to set a color only for that view, e.g.
#
# color grep.file blue default
#
# As an example, this setting will to color Signed-off-by lines with a
# yellow foreground color and use the default background color.
#
# color " Signed-off-by" yellow default
#
# Note the four leading spaces in the string to match. This is because
# Git automatically indents commit messages by four spaces.
color "---" blue default
color "diff --" yellow default
color "--- " yellow default
color "+++ " yellow default
color "@@" magenta default
color "+" green default
color " +" green default
color "-" red default
color " -" red default
color "index " blue default
color "old file mode " yellow default
color "new file mode " yellow default
color "deleted file mode " yellow default
color "copy from " yellow default
color "copy to " yellow default
color "rename from " yellow default
color "rename to " yellow default
color "similarity " yellow default
color "dissimilarity " yellow default
color "\ No newline at end of file" blue default
color "diff-tree " blue default
color "Author: " cyan default
color "Commit: " magenta default
color "Tagger: " magenta default
color "Merge: " blue default
color "Date: " yellow default
color "AuthorDate: " yellow default
color "CommitDate: " yellow default
color "TaggerDate: " yellow default
color "Refs: " red default
color "Reflog: " red default
color "Reflog message: " yellow default
color "stash@{" magenta default
color "commit " green default
color "parent " blue default
color "tree " blue default
color "author " green default
color "committer " magenta default
color " Signed-off-by:" yellow default
color " Acked-by:" yellow default
color " Reviewed-by:" yellow default
color " Helped-by:" yellow default
color " Reported-by:" yellow default
color " Mentored-by:" yellow default
color " Suggested-by:" yellow default
color " Cc:" yellow default
color " Noticed-by:" yellow default
color " Tested-by:" yellow default
color " Improved-by:" yellow default
color " Thanks-to:" yellow default
color " Based-on-patch-by:" yellow default
color " Contributions-by:" yellow default
color " Co-authored-by:" yellow default
color " Requested-by:" yellow default
color " Original-patch-by:" yellow default
color " Inspired-by:" yellow default
color default default default normal
color cursor white green bold
color status green default
color delimiter magenta default
color date blue default
color mode cyan default
color id magenta default
color overflow red default
color header yellow default
color section cyan default
color directory yellow default
color file default default
color grep.file blue default
color file-size default default
color line-number cyan default
color title-blur white blue
color title-focus white blue bold
color main-commit default default
color main-annotated default default bold
color main-tag magenta default bold
color main-local-tag magenta default
color main-remote yellow default
color main-replace cyan default
color main-tracked yellow default bold
color main-ref cyan default
color main-head cyan default bold
color stat-none default default
color stat-staged magenta default
color stat-unstaged magenta default
color stat-untracked magenta default
color help-group blue default
color help-action yellow default
color diff-stat blue default
color diff-add-highlight green default standout
color diff-del-highlight red default standout
color palette-0 magenta default
color palette-1 yellow default
color palette-2 cyan default
color palette-3 green default
color palette-4 default default
color palette-5 white default
color palette-6 red default
color palette-7 magenta default bold
color palette-8 yellow default bold
color palette-9 cyan default bold
color palette-10 green default bold
color palette-11 default default bold
color palette-12 white default bold
color palette-13 red default bold
color graph-commit blue default
color search-result black yellow
# Mappings for colors read from git configuration.
# Set to "no" to disable.
set git-colors = \
branch.current=main-head \
branch.local=main-ref \
branch.plain=main-ref \
branch.remote=main-remote \
\
diff.meta=diff-header \
diff.meta=diff-index \
diff.meta=diff-oldmode \
diff.meta=diff-newmode \
diff.frag=diff-chunk \
diff.old=diff-del \
diff.new=diff-add \
\
diff-highlight.oldHighlight=diff-del-highlight \
diff-highlight.newHighlight=diff-add-highlight \
\
grep.filename=grep.file \
grep.linenumber=grep.line-number \
grep.separator=grep.delimiter \
\
status.branch=status.header \
status.added=stat-staged \
status.updated=stat-staged \
status.changed=stat-unstaged \
status.untracked=stat-untracked
+7 -1
View File
@@ -5,7 +5,7 @@ sudo dnf install -y dnf-plugins-core
# enable copr # enable copr
sudo dnf copr enable ganto/lxc4 -y sudo dnf copr enable ganto/lxc4 -y
sudo dnf copr enable livegrenier/i3-desktop -y #sudo dnf copr enable livegrenier/i3-desktop -y
sido dnf copr enable tokariew/i3lock-color -y sido dnf copr enable tokariew/i3lock-color -y
# install rpmfusion # install rpmfusion
@@ -32,3 +32,9 @@ sudo dnf install -y firefox chromium gimp libreoffice dia shotwell thunderbird i
tmux udiskie upower vifm virt-manager libvirt jpegoptim poppler-utils qpdf alacritty dunst feh i3 i3blocks \ tmux udiskie upower vifm virt-manager libvirt jpegoptim poppler-utils qpdf alacritty dunst feh i3 i3blocks \
maim network-manager-applet pavucontrol sway swaylock waybar wl-clipboard grim slurp polybar mpc mpd mpv \ maim network-manager-applet pavucontrol sway swaylock waybar wl-clipboard grim slurp polybar mpc mpd mpv \
ncmpcpp openvpn ncmpcpp openvpn
# NPM
npm i opencode-ai@latest
ln -s ~/node_modules/.bin/opencode ~/bin/opencode
+13
View File
@@ -154,3 +154,16 @@ export SSH_AUTH_SOCK
# load shell settings # load shell settings
test -r $XDG_CONFIG_HOME/shell/common && source $XDG_CONFIG_HOME/shell/common test -r $XDG_CONFIG_HOME/shell/common && source $XDG_CONFIG_HOME/shell/common
test -r $XDG_CONFIG_HOME/shell/aliases && source $XDG_CONFIG_HOME/shell/aliases test -r $XDG_CONFIG_HOME/shell/aliases && source $XDG_CONFIG_HOME/shell/aliases
# autocomplete tools
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /usr/bin/terraform terraform
complete -o nospace -C /usr/bin/consul consul
complete -o nospace -C /usr/bin/nomad nomad
complete -o nospace -C /usr/bin/vault vault
eval "$(uv generate-shell-completion zsh)"
eval "$(nfpm completion zsh)"
fpath+=~/.zfunc; autoload -Uz compinit; compinit
zstyle ':completion:*' menu select
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/bash
export GPG_TTY=$(tty)
export $(pass show personal/radosgw/benvin)
restic backup "$HOME" --exclude-caches --one-file-system \
--exclude '**/.cache' \
--exclude '**/.terraform' \
--exclude '**/.terragrunt-cache' \
--exclude '**/.local/share/containers' \
--exclude '**/go/pkg/mod' \
--exclude '**/Downloads' \
--exclude '**/.thunderbird' \
--exclude '**/backups' \
--exclude '**/Video'