initial commit
1
.alias
Normal file
|
@ -0,0 +1 @@
|
|||
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
261
.config/foot/foot.ini
Executable file
|
@ -0,0 +1,261 @@
|
|||
# -*- conf -*-
|
||||
|
||||
# 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
|
||||
|
||||
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
|
||||
# title=foot
|
||||
# locked-title=no
|
||||
|
||||
font=monospace:size=12
|
||||
# font-bold=<bold variant of regular font>
|
||||
# font-italic=<italic variant of regular font>
|
||||
# font-bold-italic=<bold+italic variant of regular font>
|
||||
# font-size-adjustment=0.5
|
||||
# line-height=<font metrics>
|
||||
# letter-spacing=0
|
||||
# horizontal-letter-offset=0
|
||||
# vertical-letter-offset=0
|
||||
# underline-offset=<font metrics>
|
||||
# underline-thickness=<font underline thickness>
|
||||
# strikeout-thickness=<font strikeout thickness>
|
||||
# box-drawings-uses-font-glyphs=no
|
||||
# dpi-aware=no
|
||||
|
||||
# initial-window-size-pixels=700x500 # Or,
|
||||
# initial-window-size-chars=<COLSxROWS>
|
||||
# initial-window-mode=windowed
|
||||
# pad=0x0 # optionally append 'center'
|
||||
# resize-by-cells=yes
|
||||
# resize-keep-grid=yes
|
||||
# resize-delay-ms=100
|
||||
|
||||
# bold-text-in-bright=no
|
||||
# word-delimiters=,│`|:"'()[]{}<>
|
||||
# selection-target=primary
|
||||
# workers=<number of logical CPUs>
|
||||
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux)
|
||||
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD)
|
||||
|
||||
[environment]
|
||||
# name=value
|
||||
|
||||
[bell]
|
||||
# urgent=no
|
||||
# notify=no
|
||||
# visual=no
|
||||
# command=
|
||||
# command-focused=no
|
||||
|
||||
[desktop-notifications]
|
||||
# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}
|
||||
# command-action-argument=--action ${action-name}=${action-label}
|
||||
# close=""
|
||||
# inhibit-when-focused=yes
|
||||
|
||||
|
||||
[scrollback]
|
||||
# lines=1000
|
||||
# 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
|
||||
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
|
||||
|
||||
[cursor]
|
||||
style=beam
|
||||
# color=<inverse foreground/background>
|
||||
blink=yes
|
||||
# blink-rate=500
|
||||
# beam-thickness=1.5
|
||||
# underline-thickness=<font underline thickness>
|
||||
|
||||
[mouse]
|
||||
# hide-when-typing=no
|
||||
# alternate-scroll-mode=yes
|
||||
|
||||
[touch]
|
||||
# long-press-delay=400
|
||||
|
||||
[colors]
|
||||
alpha=0.8
|
||||
background=000000
|
||||
# foreground=ffffff
|
||||
# flash=7f7f00
|
||||
# flash-alpha=0.5
|
||||
|
||||
## Normal/regular colors (color palette 0-7)
|
||||
regular0=0E2221 # black
|
||||
regular1=B33A25 # red
|
||||
regular2=176815 # green
|
||||
regular3=CEBE16 # yellow
|
||||
regular4=3A6BA9 # blue
|
||||
regular5=7C63C5 # magenta
|
||||
regular6=1FB9A9 # cyan
|
||||
regular7=C6C6B5 # white
|
||||
|
||||
## Bright colors (color palette 8-15)
|
||||
bright0=214C43 # bright black
|
||||
bright1=DA651D # bright red
|
||||
bright2=8FC711 # bright green
|
||||
bright3=FCFC56 # bright yellow
|
||||
bright4=4590D0 # bright blue
|
||||
bright5=C28DC6 # bright magenta
|
||||
bright6=7DCAC9 # bright cyan
|
||||
bright7=DEDEDD # bright white
|
||||
|
||||
## dimmed colors (see foot.ini(5) man page)
|
||||
#dim0=0E2221 # black
|
||||
#dim1=B33A25 # red
|
||||
#dim2=176815 # green
|
||||
#dim3=CEBE16 # yellow
|
||||
#dim4=3A6BA9 # blue
|
||||
#dim5=7C63C5 # magenta
|
||||
#dim6=1FB9A9 # cyan
|
||||
#dim7=C6C6B5 # white
|
||||
|
||||
## The remaining 256-color palette
|
||||
# 16 = <256-color palette #16>
|
||||
# ...
|
||||
# 255 = <256-color palette #255>
|
||||
|
||||
## Sixel colors
|
||||
# sixel0 = 000000
|
||||
# sixel1 = 3333cc
|
||||
# sixel2 = cc2121
|
||||
# sixel3 = 33cc33
|
||||
# sixel4 = cc33cc
|
||||
# sixel5 = 33cccc
|
||||
# sixel6 = cccc33
|
||||
# sixel7 = 878787
|
||||
# sixel8 = 424242
|
||||
# sixel9 = 545499
|
||||
# sixel10 = 994242
|
||||
# sixel11 = 549954
|
||||
# sixel12 = 995499
|
||||
# sixel13 = 549999
|
||||
# sixel14 = 999954
|
||||
# sixel15 = cccccc
|
||||
|
||||
## Misc colors
|
||||
# selection-foreground=<inverse foreground/background>
|
||||
# selection-background=<inverse foreground/background>
|
||||
# jump-labels=<regular0> <regular3> # black-on-yellow
|
||||
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
|
||||
# search-box-no-match=<regular0> <regular1> # black-on-red
|
||||
# search-box-match=<regular0> <regular3> # black-on-yellow
|
||||
# urls=<regular3>
|
||||
|
||||
[csd]
|
||||
# preferred=server
|
||||
# size=26
|
||||
# font=<primary font>
|
||||
# color=<foreground color>
|
||||
# hide-when-maximized=no
|
||||
# double-click-to-maximize=yes
|
||||
# border-width=0
|
||||
# border-color=<csd.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
|
||||
# scrollback-home=none
|
||||
# scrollback-end=none
|
||||
# clipboard-copy=Control+Shift+c XF86Copy
|
||||
# clipboard-paste=Control+Shift+v XF86Paste
|
||||
# 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
|
||||
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
|
||||
# show-urls-launch=Control+Shift+o
|
||||
# show-urls-copy=none
|
||||
# show-urls-persistent=none
|
||||
# prompt-prev=Control+Shift+z
|
||||
# prompt-next=Control+Shift+x
|
||||
# unicode-input=Control+Shift+u
|
||||
# noop=none
|
||||
|
||||
[search-bindings]
|
||||
# cancel=Control+g Control+c 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-char=Shift+Right
|
||||
# extend-to-word-boundary=Control+w Control+Shift+Right
|
||||
# extend-to-next-whitespace=Control+Shift+w
|
||||
# extend-line-down=Shift+Down
|
||||
# extend-backward-char=Shift+Left
|
||||
# extend-backward-to-word-boundary=Control+Shift+Left
|
||||
# extend-backward-to-next-whitespace=none
|
||||
# extend-line-up=Shift+Up
|
||||
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
|
||||
# primary-paste=Shift+Insert
|
||||
# unicode-input=none
|
||||
# quit=none
|
||||
# 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
|
||||
# scrollback-home=none
|
||||
# scrollback-end=none
|
||||
|
||||
[url-bindings]
|
||||
# cancel=Control+g Control+c Control+d Escape
|
||||
# toggle-url-visible=t
|
||||
|
||||
[text-bindings]
|
||||
# \x03=Mod4+c # Map Super+c -> Ctrl+c
|
||||
|
||||
[mouse-bindings]
|
||||
# scrollback-up-mouse=BTN_WHEEL_BACK
|
||||
# scrollback-down-mouse=BTN_WHEEL_FORWARD
|
||||
# font-increase=Control+BTN_WHEEL_BACK
|
||||
# font-decrease=Control+BTN_WHEEL_FORWARD
|
||||
# selection-override-modifiers=Shift
|
||||
# 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-quote = BTN_LEFT-3
|
||||
# select-row=BTN_LEFT-4
|
||||
|
||||
# vim: ft=dosini
|
2
.config/nvim/init.lua
Executable file
|
@ -0,0 +1,2 @@
|
|||
require("config.lazy")
|
||||
require("stachel")
|
40
.config/nvim/init.vim.bak
Executable file
|
@ -0,0 +1,40 @@
|
|||
call plug#begin()
|
||||
|
||||
" List your plugins here
|
||||
Plug 'projekt0n/github-nvim-theme'
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
|
||||
call plug#end()
|
||||
|
||||
colorscheme github_dark
|
||||
highlight Normal guibg=none ctermbg=none
|
||||
highlight NonText guibg=none ctermbg=none
|
||||
highlight NormalNC guibg=none ctermbg=none
|
||||
|
||||
lua << EOF
|
||||
require('lspconfig').rust_analyzer.setup({
|
||||
cmd = { "/usr/bin/rust-analyzer" },
|
||||
on_attach = function(client, bufnr)
|
||||
-- Enable completion triggered by <C-x><C-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Key mappings
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>rn', '<Cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
end,
|
||||
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
EOF
|
35
.config/nvim/lua/config/lazy.lua
Executable file
|
@ -0,0 +1,35 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
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
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
13
.config/nvim/lua/plugins/init.lua
Executable file
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
"projekt0n/github-nvim-theme",
|
||||
"neovim/nvim-lspconfig",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"hrsh7th/cmp-vsnip",
|
||||
"hrsh7th/vim-vsnip",
|
||||
"lervag/vimtex",
|
||||
"andweeb/presence.nvim",
|
||||
}
|
85
.config/nvim/lua/stachel/colorscheme.lua
Executable file
|
@ -0,0 +1,85 @@
|
|||
vim.cmd('hi Normal guibg=NONE ctermbg=NONE')
|
||||
vim.cmd('hi NonText guibg=NONE ctermbg=NONE')
|
||||
vim.cmd('hi SignColumn guibg=NONE ctermbg=NONE')
|
||||
vim.cmd('hi VertSplit guibg=NONE ctermbg=NONE')
|
||||
vim.cmd('hi StatusLine guibg=NONE ctermbg=NONE')
|
||||
vim.cmd('hi StatusLineNC guibg=NONE ctermbg=NONE')
|
||||
|
||||
-- Terminal colors
|
||||
local Colors = {
|
||||
black = { cterm=0, hex=0x0E2221 },
|
||||
red = { cterm=1, hex=0xB33A25 },
|
||||
green = { cterm=2, hex=0x176815 },
|
||||
yellow = { cterm=3, hex=0xCEBE16 },
|
||||
blue = { cterm=4, hex=0x3A6BA9 },
|
||||
magenta = { cterm=5, hex=0x7C63C5 },
|
||||
cyan = { cterm=6, hex=0x1FB9A9 },
|
||||
white = { cterm=7, hex=0xC6C6B5 },
|
||||
|
||||
bright_black = { cterm=8, hex=0x214C43 },
|
||||
bright_red = { cterm=9, hex=0xDA651D },
|
||||
bright_green = { cterm=10, hex=0x8FC711 },
|
||||
bright_yellow = { cterm=11, hex=0xFCFC56 },
|
||||
bright_blue = { cterm=12, hex=0x4590D0 },
|
||||
bright_magenta = { cterm=13, hex=0xC28DC6 },
|
||||
bright_cyan = { cterm=14, hex=0x7DCAC9 },
|
||||
bright_white = { cterm=15, hex=0xDEDEDD },
|
||||
}
|
||||
|
||||
local Highlights = {
|
||||
["Type"] = Colors.bright_red,
|
||||
["Function"] = Colors.blue,
|
||||
["Variable"] = Colors.white,
|
||||
["Keyword"] = Colors.red,
|
||||
["String"] = Colors.bright_cyan,
|
||||
["Comment"] = Colors.bright_black,
|
||||
["Constant"] = Colors.green,
|
||||
["Operator"] = Colors.bright_green,
|
||||
["Parameter"] = Colors.yellow,
|
||||
["Property"] = Colors.yellow,
|
||||
["Identifier"] = Colors.yellow,
|
||||
|
||||
["@attribute"] = Colors.red,
|
||||
["@comment"] = Colors.bright_black,
|
||||
["@comment.error"] = Colors.red,
|
||||
["@comment.note"] = Colors.blue,
|
||||
["@comment.todo"] = Colors.bright_yellow,
|
||||
["@comment.warning"] = Colors.bright_red,
|
||||
["@function.method"] = Colors.bright_blue,
|
||||
["@label"] = Colors.bright_yellow,
|
||||
["@exception"] = Colors.blue,
|
||||
["@reference"] = Colors.cyan,
|
||||
|
||||
["@lsp.type.type"] = Colors.bright_red,
|
||||
["@lsp.type.decorator"] = Colors.red,
|
||||
["@lsp.type.enumMember"] = Colors.bright_yellow,
|
||||
["@lsp.type.event"] = Colors.green,
|
||||
["@lsp.type.interface"] = Colors.green,
|
||||
["@lsp.type.macro"] = Colors.magenta,
|
||||
["@lsp.type.modifier"] = Colors.red,
|
||||
["@lsp.type.namespace"] = Colors.cyan,
|
||||
["@lsp.type.regexp"] = Colors.bright_cyan,
|
||||
["@lsp.type.typeParameter"] = Colors.green,
|
||||
|
||||
-- Other
|
||||
["TermCursor"] = Colors.white,
|
||||
["TermCursorNC"] = Colors.bright_white,
|
||||
["TermNormal"] = Colors.bright_black,
|
||||
["TermCursorLine"] = Colors.bright_black,
|
||||
|
||||
["GitSignsAdd"] = Colors.green,
|
||||
["GitSignsDelete"] = Colors.red,
|
||||
["GitSignsChange"] = Colors.yellow,
|
||||
["@diff.delta"] = Colors.green,
|
||||
["@diff.minus"] = Colors.red,
|
||||
["@diff.plus"] = Colors.green,
|
||||
|
||||
["DiagnosticError"] = Colors.red,
|
||||
["DiagnosticWarn"] = Colors.yellow,
|
||||
["DiagnosticInfo"] = Colors.cyan,
|
||||
["DiagnosticHint"] = Colors.bright_cyan,
|
||||
}
|
||||
|
||||
for group, color in pairs(Highlights) do
|
||||
vim.cmd(string.format("highlight %s ctermfg=%d ctermbg=NONE guifg=#%06X guibg=NONE", group, color.cterm, color.hex))
|
||||
end
|
43
.config/nvim/lua/stachel/completion.lua
Executable file
|
@ -0,0 +1,43 @@
|
|||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback() -- Insert a tab character if no menu is visible
|
||||
end
|
||||
end, { 'i' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback() -- Reverse tab character if no menu is visible
|
||||
end
|
||||
end, { 'i' }),
|
||||
['<CR>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.confirm({ select = true }) -- Confirm the selected item
|
||||
else
|
||||
fallback() -- Insert a newline if no menu is visible
|
||||
end
|
||||
end, { 'i' }),
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'vsnip' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
})
|
||||
})
|
11
.config/nvim/lua/stachel/init.lua
Executable file
|
@ -0,0 +1,11 @@
|
|||
require("stachel.colorscheme")
|
||||
require("stachel.lspconfig")
|
||||
require("stachel.remap")
|
||||
require("stachel.completion")
|
||||
require("stachel.latex")
|
||||
require("stachel.presence")
|
||||
|
||||
vim.opt.tabstop = 2 -- Number of spaces that a <Tab> counts for
|
||||
vim.opt.shiftwidth = 2 -- Number of spaces to use for each step of autoindent
|
||||
vim.opt.expandtab = true -- Convert tabs to spaces
|
||||
vim.o.splitright = true
|
3
.config/nvim/lua/stachel/latex.lua
Executable file
|
@ -0,0 +1,3 @@
|
|||
vim.g.vimtex_view_method = "mupdf" -- Use Zathura as PDF viewer
|
||||
vim.g.vimtex_compiler_method = "latexmk" -- Use latexmk for automatic compilation
|
||||
vim.g.vimtex_quickfix_mode = 0 -- Disable quickfix window by default
|
99
.config/nvim/lua/stachel/lspconfig.lua
Executable file
|
@ -0,0 +1,99 @@
|
|||
local lspconfig = require("lspconfig")
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
prefix = '',
|
||||
spacing = 2,
|
||||
},
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
severity_sort = true,
|
||||
})
|
||||
|
||||
lspconfig.rust_analyzer.setup({
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
buildScripts = {
|
||||
enable = true
|
||||
}
|
||||
},
|
||||
procMacro = {
|
||||
enable = true
|
||||
},
|
||||
checkOnSave = true,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.clangd.setup {
|
||||
cmd = { "clangd" },
|
||||
filetypes = { "c", "cpp", "objc", "objcpp"},
|
||||
root_dir = lspconfig.util.root_pattern("compile_commands.json", ".git", "Makefile"),
|
||||
}
|
||||
|
||||
lspconfig.tinymist.setup {
|
||||
settings = {
|
||||
formatterMode = "typstyle",
|
||||
exportPdf = "onSave",
|
||||
semanticTokens = "enable"
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.jdtls.setup {
|
||||
cmd = {'jdtls'},
|
||||
filetypes = { "java" }
|
||||
}
|
||||
|
||||
lspconfig.kotlin_language_server.setup {
|
||||
cmd = {'/opt/kotlin-language-server/bin/kotlin-language-server'},
|
||||
}
|
||||
|
||||
lspconfig.bashls.setup({
|
||||
filetypes = { "sh", "bash", "zsh", "yash" },
|
||||
})
|
||||
|
||||
lspconfig.lua_ls.setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" }, -- Recognize `vim` as a global
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true), -- Make LSP aware of runtime files
|
||||
checkThirdParty = false,
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.pylsp.setup {
|
||||
cmd = { "pylsp" },
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pycodestyle = { enabled = false }, -- Use ruff instead
|
||||
mccabe = { enabled = false },
|
||||
pyflakes = { enabled = false },
|
||||
pylint = { enabled = false },
|
||||
mypy = { enabled = true },
|
||||
black = { enabled = true },
|
||||
ruff = { enabled = true },
|
||||
rope_autoimport = { enabled = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.csharp_ls.setup{
|
||||
cmd = { "csharp-ls" },
|
||||
filetypes = { "cs", "cshtml", "razor" },
|
||||
root_dir = function ()
|
||||
-- Manually treat any directory as the root for a single .cs file
|
||||
return vim.fn.getcwd() -- Uses the current working directory
|
||||
end,
|
||||
}
|
15
.config/nvim/lua/stachel/presence.lua
Executable file
|
@ -0,0 +1,15 @@
|
|||
require("presence").setup({
|
||||
auto_update = true,
|
||||
neovim_image_text = "nvim", -- Text displayed when using Neovim
|
||||
main_image = "neovim", -- Can be "neovim" or "file"
|
||||
client_id = "793271441293967371", -- Default Neovim Client ID
|
||||
enable_line_number = false, -- Show line numbers in status
|
||||
editing_text = "Editing",
|
||||
file_explorer_text = "Browsing files",
|
||||
git_commit_text = "Committing changes",
|
||||
plugin_manager_text = "Managing plugins",
|
||||
reading_text = "Reading",
|
||||
workspace_text = "Working on project", --%s
|
||||
line_number_text = "Line %s/%s",
|
||||
})
|
||||
|
12
.config/nvim/lua/stachel/remap.lua
Executable file
|
@ -0,0 +1,12 @@
|
|||
vim.g.mapleader = " "
|
||||
vim.keymap.set("n", "<leader>eq", vim.cmd.Ex)
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set("i", "<C-Tab>", vim.lsp.buf.completion, context)
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, { desc = "Rename symbol" })
|
||||
vim.keymap.set('n', '<leader>fe', ':!zathura --fork %:r.pdf<CR>', { noremap = true, silent = true })
|
||||
-- vim.keymap.set("")
|
1
.config/rc/rc.conf
Normal file
|
@ -0,0 +1 @@
|
|||
rc_env_allow="WAYLAND_DISPLAY"
|
1
.config/rc/runlevels/gui/pipewire
Symbolic link
|
@ -0,0 +1 @@
|
|||
/etc/user/init.d/pipewire
|
1
.config/rc/runlevels/gui/pipewire-pulse
Symbolic link
|
@ -0,0 +1 @@
|
|||
/etc/user/init.d/pipewire-pulse
|
1
.config/rc/runlevels/gui/wireplumber
Symbolic link
|
@ -0,0 +1 @@
|
|||
/etc/user/init.d/wireplumber
|
1
.config/rc/runlevels/gui/xdg-desktop-portal
Symbolic link
|
@ -0,0 +1 @@
|
|||
/etc/user/init.d/xdg-desktop-portal
|
1
.config/rc/runlevels/gui/xdg-desktop-portal-wlr
Symbolic link
|
@ -0,0 +1 @@
|
|||
/etc/user/init.d/xdg-desktop-portal-wlr
|
166
.config/river/init
Executable file
|
@ -0,0 +1,166 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This is the example configuration file for river.
|
||||
#
|
||||
# If you wish to edit this, you will probably want to copy it to
|
||||
# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first.
|
||||
#
|
||||
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
|
||||
# documentation.
|
||||
|
||||
# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc.
|
||||
|
||||
# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
|
||||
riverctl map normal Super Return spawn foot
|
||||
riverctl map normal None XF86Back spawn :
|
||||
|
||||
# Super+Q to close the focused view
|
||||
riverctl map normal Super+Shift Q close
|
||||
|
||||
# Super+Shift+E to exit river
|
||||
riverctl map normal Super+Shift E exit
|
||||
|
||||
# Super+J and Super+K to focus the next/previous view in the layout stack
|
||||
riverctl map normal Super J focus-view next
|
||||
riverctl map normal Super K focus-view previous
|
||||
|
||||
# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous
|
||||
# view in the layout stack
|
||||
riverctl map normal Super+Shift J swap next
|
||||
riverctl map normal Super+Shift K swap previous
|
||||
|
||||
# Super+Period and Super+Comma to focus the next/previous output
|
||||
riverctl map normal Super Period focus-output next
|
||||
riverctl map normal Super Comma focus-output previous
|
||||
|
||||
# Super+Shift+{Period,Comma} to send the focused view to the next/previous output
|
||||
riverctl map normal Super+Shift Period send-to-output next
|
||||
riverctl map normal Super+Shift Comma send-to-output previous
|
||||
|
||||
# Super+Return to bump the focused view to the top of the layout stack
|
||||
riverctl map normal Super+Shift Return zoom
|
||||
|
||||
# Super+H and Super+L to decrease/increase the main ratio of rivertile(1)
|
||||
riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05"
|
||||
riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05"
|
||||
|
||||
# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1)
|
||||
riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1"
|
||||
riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1"
|
||||
|
||||
# Super+Alt+{H,J,K,L} to move views
|
||||
riverctl map normal Super+Alt H move left 100
|
||||
riverctl map normal Super+Alt J move down 100
|
||||
riverctl map normal Super+Alt K move up 100
|
||||
riverctl map normal Super+Alt L move right 100
|
||||
|
||||
# Super+Alt+Control+{H,J,K,L} to snap views to screen edges
|
||||
riverctl map normal Super+Alt+Control H snap left
|
||||
riverctl map normal Super+Alt+Control J snap down
|
||||
riverctl map normal Super+Alt+Control K snap up
|
||||
riverctl map normal Super+Alt+Control L snap right
|
||||
|
||||
# Super+Alt+Shift+{H,J,K,L} to resize views
|
||||
riverctl map normal Super+Alt+Shift H resize horizontal -100
|
||||
riverctl map normal Super+Alt+Shift J resize vertical 100
|
||||
riverctl map normal Super+Alt+Shift K resize vertical -100
|
||||
riverctl map normal Super+Alt+Shift L resize horizontal 100
|
||||
|
||||
riverctl map-pointer normal Super BTN_LEFT move-view
|
||||
riverctl map-pointer normal Super BTN_RIGHT resize-view
|
||||
riverctl map-pointer normal Super BTN_MIDDLE toggle-float
|
||||
|
||||
riverctl map normal Super S spawn wl-ss
|
||||
riverctl map normal Super+Shift S spawn wl-fullss
|
||||
|
||||
for i in $(seq 1 9)
|
||||
do
|
||||
tags=$((1 << ($i - 1)))
|
||||
|
||||
# Super+[1-9] to focus tag [0-8]
|
||||
riverctl map normal Super $i set-focused-tags $tags
|
||||
|
||||
# Super+Shift+[1-9] to tag focused view with tag [0-8]
|
||||
riverctl map normal Super+Shift $i set-view-tags $tags
|
||||
|
||||
# Super+Control+[1-9] to toggle focus of tag [0-8]
|
||||
riverctl map normal Super+Control $i toggle-focused-tags $tags
|
||||
|
||||
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
|
||||
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
|
||||
done
|
||||
|
||||
# Super+0 to focus all tags
|
||||
# Super+Shift+0 to tag focused view with all tags
|
||||
all_tags=$(((1 << 32) - 1))
|
||||
riverctl map normal Super 0 set-focused-tags $all_tags
|
||||
riverctl map normal Super+Shift 0 set-view-tags $all_tags
|
||||
|
||||
# Super+Space to toggle float
|
||||
riverctl map normal Super Space toggle-float
|
||||
|
||||
# Super+F to toggle fullscreen
|
||||
riverctl map normal Super F toggle-fullscreen
|
||||
|
||||
# Super+{Up,Right,Down,Left} to change layout orientation
|
||||
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
|
||||
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
|
||||
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
|
||||
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
|
||||
|
||||
# Declare a passthrough mode. This mode has only a single mapping to return to
|
||||
# normal mode. This makes it useful for testing a nested wayland compositor
|
||||
riverctl declare-mode passthrough
|
||||
|
||||
# Super+F11 to enter passthrough mode
|
||||
riverctl map normal Super F11 enter-mode passthrough
|
||||
|
||||
# Super+F11 to return to normal mode
|
||||
riverctl map passthrough Super F11 enter-mode normal
|
||||
|
||||
# Various media key mapping examples for both normal and locked mode which do
|
||||
# not have a modifier
|
||||
for mode in normal locked+Shift
|
||||
do
|
||||
# Eject the optical drive (well if you still have one that is)
|
||||
riverctl map $mode None XF86Eject spawn 'eject -T'
|
||||
|
||||
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
|
||||
riverctl map $mode None XF86AudioRaiseVolume spawn 'wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+'
|
||||
riverctl map $mode None XF86AudioLowerVolume spawn 'wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-'
|
||||
riverctl map $mode None XF86AudioMute spawn 'wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle'
|
||||
|
||||
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
|
||||
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
|
||||
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
|
||||
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
|
||||
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
|
||||
|
||||
# Control screen backlight brightness with brightnessctl (https://github.com/Hummer12007/brightnessctl)
|
||||
riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl set +5%'
|
||||
riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl set 5%-'
|
||||
done
|
||||
|
||||
# Set background and border color
|
||||
riverctl border-color-focused 0x93a1a1
|
||||
riverctl border-color-unfocused 0x586e75
|
||||
riverctl spawn "swaybg -i '$HOME/.desktop/wallpaper'"
|
||||
|
||||
# Set keyboard repeat rate
|
||||
riverctl set-repeat 50 300
|
||||
riverctl input pointer-7805-11400-ROCCAT_ROCCAT_Kone_Pro accel-profile flat
|
||||
riverctl input pointer-7805-11400-ROCCAT_ROCCAT_Kone_Pro pointer-accel -0.75
|
||||
riverctl keyboard-layout -variant nodeadkeys de
|
||||
|
||||
# Make all views with an app-id that starts with "float" and title "foo" start floating.
|
||||
riverctl rule-add -app-id 'float*' -title 'foo' float
|
||||
|
||||
# Make all views with app-id "bar" and any title use client-side decorations
|
||||
riverctl rule-add -app-id "bar" csd
|
||||
|
||||
# Set the default layout generator to be rivertile and start it.
|
||||
# River will send the process group of the init executable SIGTERM on exit.
|
||||
riverctl default-layout rivertile
|
||||
openrc --user gui &
|
||||
dbus-update-activation-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP=river XDG_SESSION_DESKTOP XDG_SESSION_TYPE
|
||||
rivertile -view-padding 0 -outer-padding 0 &
|
29
.config/yash/profile
Executable file
|
@ -0,0 +1,29 @@
|
|||
export EDITOR=nvim
|
||||
export LANG=en_US.UTF-8
|
||||
export MANPAGER="nvim +Man!"
|
||||
export PAGER="less"
|
||||
export HOME=/home/stachel
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export PATH="$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
|
||||
if [ -f ~/.config/user-dirs.dirs ]; then
|
||||
while IFS='=' read -r key value; do
|
||||
key=${key//[$'\t\r\n']} # Remove whitespace
|
||||
value=${value//\"/} # Remove quotes
|
||||
value=${value//\$HOME/~} # Expand $HOME
|
||||
export "$key=$value"
|
||||
done < ~/.config/user-dirs.dirs
|
||||
fi
|
||||
|
||||
#if [ -z "$XDG_RUNTIME_DIR" ]; then
|
||||
# XDG_RUNTIME_DIR="/tmp/$(id -u)-runtime-dir"
|
||||
# mkdir -pm 0700 "$XDG_RUNTIME_DIR"
|
||||
# export XDG_RUNTIME_DIR
|
||||
#fi
|
||||
|
||||
if [ -z "$SSH_AUTH_SOCK" ]; then
|
||||
eval "$(ssh-agent -s)"
|
||||
fi
|
301
.config/yash/rc
Executable file
|
@ -0,0 +1,301 @@
|
|||
set --extended-glob
|
||||
set --no-clobber
|
||||
set --no-unset
|
||||
|
||||
. "$HOME/.alias"
|
||||
|
||||
if command --identify --builtin-command history >/dev/null; then
|
||||
|
||||
# don't save commands starting with a space in history
|
||||
set --hist-space
|
||||
|
||||
# prevent clearing history by accident
|
||||
history()
|
||||
if [ -t 0 ] && (
|
||||
for arg do
|
||||
case "${arg}" in
|
||||
(-[drsw]?* | --*=*) ;;
|
||||
(-*c*) exit;;
|
||||
esac
|
||||
done
|
||||
false
|
||||
) then
|
||||
printf 'history: seems you are trying to clear the whole history.\n' >&2
|
||||
printf 'are you sure? (yes/no) ' >&2
|
||||
case "$(head -n 1)" in
|
||||
([Yy]*) command history "$@";;
|
||||
(*) printf 'history: cancelled.\n' >&2;;
|
||||
esac
|
||||
else
|
||||
command history "$@"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
cp() if [ -t 0 ]; then command cp -i "$@"; else command cp "$@"; fi
|
||||
mv() if [ -t 0 ]; then command mv -i "$@"; else command mv "$@"; fi
|
||||
rm() if [ -t 0 ]; then command rm -i "$@"; else command rm "$@"; fi
|
||||
|
||||
# normally yash is more POSIX-compliant than /bin/sh :-)
|
||||
sh() { yash --posix "$@"; }
|
||||
yash() { command yash "$@"; }
|
||||
# By re-defining 'yash' using the 'command' built-in, the 'jobs' built-in
|
||||
# prints a command name that exposes the arguments like
|
||||
# 'yash --posix -n foo.sh' rather than a command name that hides the
|
||||
# arguments like 'yash --posix "${@}"'. This applies to the 'yash' command
|
||||
# invoked via the 'sh' function.
|
||||
|
||||
# ensure job control works as expected
|
||||
case $- in (*m*)
|
||||
trap - TSTP TTIN TTOU
|
||||
esac
|
||||
|
||||
# avoid removing existing crontab by accident
|
||||
crontab()
|
||||
if [ -t 0 ] && (
|
||||
for arg do
|
||||
case "${arg}" in
|
||||
(-*r*) exit;;
|
||||
esac
|
||||
done
|
||||
false
|
||||
) then
|
||||
printf 'crontab: seems you are trying to clear your crontab.\n' >&2
|
||||
printf 'are you sure? (yes/no) ' >&2
|
||||
case "$(head -n 1)" in
|
||||
([Yy]*) command crontab "$@";;
|
||||
(*) printf 'crontab: cancelled.\n' >&2;;
|
||||
esac
|
||||
else
|
||||
command crontab "$@"
|
||||
fi
|
||||
|
||||
# an alias that opens a file
|
||||
if command --identify xdg-open >/dev/null 2>&1; then
|
||||
alias o='xdg-open'
|
||||
elif command --identify cmd.exe wslpath >/dev/null 2>&1; then
|
||||
alias o='open'
|
||||
open() (
|
||||
target="$(wslpath -w "$1")"
|
||||
cd /mnt/c # suppress UNC path warning
|
||||
cmd.exe /c start "$target"
|
||||
)
|
||||
elif command --identify cygstart >/dev/null 2>&1; then
|
||||
alias o='cygstart'
|
||||
elif [ "$(uname)" = Darwin ] 2>/dev/null; then
|
||||
alias o='open'
|
||||
fi
|
||||
|
||||
# define some basic variables if missing
|
||||
: ${PAGER:=less} ${EDITOR:=nvim} ${FCEDIT:=$EDITOR}
|
||||
: ${LOGNAME:=$(logname)} ${HOSTNAME:=$(uname -n)}
|
||||
|
||||
# disable confusing treatment of arguments in the echo command
|
||||
: ${ECHO_STYLE:=RAW}
|
||||
|
||||
# variables needed for command history
|
||||
|
||||
if ! [ "${HISTFILE-}" ]; then
|
||||
HISTFILE=${XDG_STATE_HOME:-~/.local/state}/yash/history
|
||||
fi
|
||||
|
||||
# create HISTFILE parent directory if missing
|
||||
! [ -d "${HISTFILE%/*}" ] && mkdir -p "${HISTFILE%/*}"
|
||||
|
||||
HISTSIZE=5000
|
||||
|
||||
# emulate bash's $SHLVL
|
||||
if [ "${_old_shlvl+set}" != set ]; then
|
||||
_old_shlvl=${SHLVL-}
|
||||
fi
|
||||
SHLVL=$((_old_shlvl+1)) 2>/dev/null || SHLVL=1
|
||||
export SHLVL
|
||||
|
||||
# initialize event handlers
|
||||
COMMAND_NOT_FOUND_HANDLER=()
|
||||
PROMPT_COMMAND=()
|
||||
POST_PROMPT_COMMAND=()
|
||||
YASH_AFTER_CD=()
|
||||
|
||||
# find escape sequence to change terminal window title
|
||||
case "$TERM" in
|
||||
(xterm|xterm[+-]*|gnome|gnome[+-]*|putty|putty[+-]*|cygwin)
|
||||
_tsl='\033];' _fsl='\a' ;;
|
||||
(*)
|
||||
_tsl=$( (tput tsl 0; echo) 2>/dev/null |
|
||||
sed -e 's;\\;\\\\;g' -e 's;;\\033;g' -e 's;;\\a;g' -e 's;%;%%;g')
|
||||
_fsl=$( (tput fsl ; echo) 2>/dev/null |
|
||||
sed -e 's;\\;\\\\;g' -e 's;;\\033;g' -e 's;;\\a;g' -e 's;%;%%;g') ;;
|
||||
esac
|
||||
|
||||
# if terminal window title can be changed...
|
||||
if [ "$_tsl" ] && [ "$_fsl" ]; then
|
||||
|
||||
# set terminal window title on each prompt
|
||||
_set_term_title()
|
||||
if [ -t 2 ]; then
|
||||
printf "$_tsl"'%s@%s:%s'"$_fsl" "${LOGNAME}" "${HOSTNAME%%.*}" \
|
||||
"${${PWD:/$HOME/\~}/#$HOME\//\~\/}" >&2
|
||||
fi
|
||||
PROMPT_COMMAND=("$PROMPT_COMMAND" '_set_term_title')
|
||||
|
||||
# reset window title when changing host or user
|
||||
ssh() {
|
||||
if [ -t 2 ]; then printf "$_tsl"'ssh %s'"$_fsl" "$*" >&2; fi
|
||||
command ssh "$@"
|
||||
}
|
||||
su() {
|
||||
if [ -t 2 ]; then printf "$_tsl"'su %s'"$_fsl" "$*" >&2; fi
|
||||
command su "$@"
|
||||
}
|
||||
sudo() {
|
||||
if [ -t 2 ]; then printf "$_tsl"'sudo %s'"$_fsl" "$*" >&2; fi
|
||||
command sudo "$@"
|
||||
}
|
||||
doas() {
|
||||
if [ -t 2 ]; then printf "$_tsl"'doas %s'"$_fsl" "$*" >&2; fi
|
||||
command doas "$@"
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
# define function that updates $_vcs_info and $_vcs_root
|
||||
_update_vcs_info() {
|
||||
typeset type branch
|
||||
{
|
||||
read --raw-mode type
|
||||
read --raw-mode _vcs_root
|
||||
read --raw-mode branch
|
||||
} <(
|
||||
exec 2>/dev/null
|
||||
typeset COMMAND_NOT_FOUND_HANDLER=
|
||||
while true; do
|
||||
if [ -e .git ] || [ . -ef "${GIT_WORK_TREE-}" ]; then
|
||||
printf 'git\n%s\n' "${GIT_WORK_TREE:-$PWD}"
|
||||
git branch --no-color | sed -n '/^\*/s/^..//p'
|
||||
exit
|
||||
elif [ -d .hg ]; then
|
||||
printf 'hg\n%s\n' "$PWD"
|
||||
exec cat .hg/branch
|
||||
elif [ -d .svn ]; then
|
||||
printf 'svn\n'
|
||||
_vcs_root=$(svn info --show-item=wc-root)
|
||||
printf '%s\n' "$_vcs_root"
|
||||
path=$(svn info --show-item=relative-url)
|
||||
case $path in
|
||||
(*/branches/*)
|
||||
printf '%s\n' "${${path#*/branches/}%%/*}"
|
||||
esac
|
||||
exit
|
||||
fi
|
||||
if [ / -ef . ] || [ . -ef .. ]; then
|
||||
exit
|
||||
fi
|
||||
\command cd -P ..
|
||||
done
|
||||
)
|
||||
case "$type#$branch" in
|
||||
(hg#default) _vcs_info='hg';;
|
||||
(git#master) _vcs_info='git';;
|
||||
(*# ) _vcs_info="$type";;
|
||||
(* ) _vcs_info="$type@$branch";;
|
||||
esac
|
||||
}
|
||||
# update $_vcs_info on each prompt
|
||||
PROMPT_COMMAND=("$PROMPT_COMMAND" '_update_vcs_info')
|
||||
|
||||
# Firstly, load the common customization script.
|
||||
# If you don't like settings applied in this script, remove this line.
|
||||
#. --autoload --no-alias initialization/common
|
||||
|
||||
# These are additional aliases that are not defined in the common script.
|
||||
# Uncomment to enable them.
|
||||
alias ls='ls --color=auto'
|
||||
alias gitlog='git log --graph --branches --oneline'
|
||||
alias sc='shellcheck -s sh'
|
||||
|
||||
# And add your own customization below.
|
||||
|
||||
|
||||
|
||||
# Prompt:
|
||||
if [ -n "${SSH_CONNECTION-}" ]; then
|
||||
_hc='\fy.' # yellow hostname for SSH remote
|
||||
else
|
||||
_hc='\fg.' # green hostname for local
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
_uc='\fr.' # red username for root
|
||||
_2c='\fr.' # red PS2 for root
|
||||
else
|
||||
_uc='\fy.' # same username color as hostname for non-root user
|
||||
_2c= # PS2 in normal color for non-root user
|
||||
fi
|
||||
_dc='\fc.'
|
||||
|
||||
YASH_PS1=$_uc'${LOGNAME}'$_hc'@${HOSTNAME%%.*}\fd. '$_dc'${PWD/#$HOME/\~} ${{?:/0/}:+\\fr.$?\\fd. }'$_uc'\$ '
|
||||
YASH_PS1R='\fm.${_vcs_info}'
|
||||
YASH_PS1S='\fo.'
|
||||
YASH_PS2=$_2c'> '
|
||||
#YASH_PS2R=
|
||||
YASH_PS2S=$YASH_PS1S
|
||||
YASH_PS4='\fm.+ '
|
||||
YASH_PS4S='\fmo.'
|
||||
unset _hc _uc _2c _dc
|
||||
# No escape sequences allowed in the POSIXly-correct mode.
|
||||
PS1='${LOGNAME}@${HOSTNAME%%.*} '$PS1
|
||||
|
||||
_update_direnv() {
|
||||
eval "$(
|
||||
direnv export json |
|
||||
jq -r 'to_entries | .[] |
|
||||
if .value == null then
|
||||
@sh "unset \(.key)"
|
||||
else
|
||||
@sh "export \(.key)=\(.value)"
|
||||
end'
|
||||
)"
|
||||
}
|
||||
_update_direnv
|
||||
YASH_AFTER_CD=("$YASH_AFTER_CD" '_update_direnv')
|
||||
|
||||
replace() {
|
||||
[ "$#" -eq 0 ] && { printf 'Usage: replace <command> [args...]\n' >&2; return 1; }
|
||||
|
||||
# Get the tty device
|
||||
TTY=$(tty) || { printf 'Failed to get tty\n' >&2; return 1; }
|
||||
|
||||
# Ensure the script is running in an interactive terminal
|
||||
case "$TTY" in
|
||||
/dev/tty*|/dev/pts/*) ;;
|
||||
*) printf 'Not running in a valid terminal\n' >&2; return 1 ;;
|
||||
esac
|
||||
|
||||
# Detach from the current terminal and execute the command
|
||||
nohup "$@" </dev/null >"$TTY" 2>&1 &
|
||||
disown
|
||||
exit
|
||||
}
|
||||
|
||||
disowned() {
|
||||
[ "$#" -eq 0 ] && { printf 'Usage: disowned <command> [args...]\n' >&2; return 1; }
|
||||
|
||||
# Get the tty device
|
||||
TTY=$(tty) || { printf 'Failed to get tty\n' >&2; return 1; }
|
||||
|
||||
# Ensure the script is running in an interactive terminal
|
||||
case "$TTY" in
|
||||
/dev/tty*|/dev/pts/*) ;;
|
||||
*) printf 'Not running in a valid terminal\n' >&2; return 1 ;;
|
||||
esac
|
||||
|
||||
# Detach from the current terminal and execute the command
|
||||
nohup "$@" </dev/null >"$TTY" 2>&1 &
|
||||
disown
|
||||
}
|
||||
|
||||
alias foliate='replace foliate'
|
||||
alias vpager="nvim -R -c 'setlocal nobackup noswapfile nowrap' -"
|
||||
export LESS='-R --mouse --wheel-lines=3'
|
||||
. "$HOME/.cargo/env"
|
1
.desktop/wallpaper
Symbolic link
|
@ -0,0 +1 @@
|
|||
wallpapers/323739.jpg
|
BIN
.desktop/wallpapers/323739.jpg
Executable file
After Width: | Height: | Size: 3.7 MiB |
BIN
.desktop/wallpapers/664493-final.jpeg
Executable file
After Width: | Height: | Size: 294 KiB |
BIN
.desktop/wallpapers/ai-galaxy.png
Executable file
After Width: | Height: | Size: 52 MiB |
BIN
.desktop/wallpapers/fantasy_sea_moon_art-wallpaper-3840x1080.jpg
Executable file
After Width: | Height: | Size: 1 MiB |
BIN
.desktop/wallpapers/galaxy.jpg
Executable file
After Width: | Height: | Size: 9 MiB |
BIN
.desktop/wallpapers/river_forest_summer_sun-wallpaper-3840x1080.jpg
Executable file
After Width: | Height: | Size: 1.7 MiB |
BIN
.desktop/wallpapers/sci-fi-city.png
Executable file
After Width: | Height: | Size: 7.5 MiB |
BIN
.desktop/wallpapers/snowy_mountain_forest.jpg
Executable file
After Width: | Height: | Size: 9.2 MiB |
34
.local/bin/file-upload
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
SERVER_IP="files.stachel.xyz"
|
||||
SSH="contabo_filehost"
|
||||
REMOTE_PATH="/var/www/filehost"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <path-to-file>"
|
||||
exit 1
|
||||
fi
|
||||
LOCAL_FILE="$1"
|
||||
if [ ! -f "$LOCAL_FILE" ]; then
|
||||
echo "Error: File '$LOCAL_FILE' does not exist." >& 2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
EXT="${LOCAL_FILE##*.}"
|
||||
if echo "$LOCAL_FILE" | grep -q "\." && [ "$EXT" != "$LOCAL_FILE" ]; then
|
||||
FILENAME="file-$(date +%Y%m%d%H%M%S).$EXT"
|
||||
else
|
||||
FILENAME="file-$(date +%Y%m%d%H%M%S)"
|
||||
fi
|
||||
|
||||
if ! scp "$LOCAL_FILE" "$SSH:$REMOTE_PATH/$FILENAME"; then
|
||||
echo "Error: Failed to upload file." >& 2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Upload successful"
|
||||
|
||||
FILE_URL="https://$SERVER_IP/$FILENAME"
|
||||
echo "URL: $FILE_URL"
|
||||
|
||||
printf "%s" "$FILE_URL" | wl-copy
|
||||
echo "The URL has been copied to your clipboard."
|
3
.local/bin/river
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
touch $XDG_RUNTIME_DIR/openrc/softlevel
|
||||
exec dbus-run-session -- /usr/bin/river
|
4
.local/bin/wl-fullss
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
XDG_PICTURES_DIR=/home/stachel/med/pic
|
||||
grim -l 1 - | tee "$XDG_PICTURES_DIR/LATEST.png" "$XDG_PICTURES_DIR/$(date +%Y%m%d%H%M%S).png"
|
||||
exec /usr/bin/wl-copy < "$XDG_PICTURES_DIR/LATEST.png"
|
15
.local/bin/wl-ss
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
XDG_PICTURES_DIR="/home/stachel/med/pic"
|
||||
FILE="$XDG_PICTURES_DIR/LATEST.png"
|
||||
|
||||
grim -l 0 - | tee "$FILE" "$XDG_PICTURES_DIR/$(date +%Y%m%d%H%M%S).png" > /dev/null
|
||||
REGION="$(slurp -f %wx%h+%x+%y < /dev/null)"
|
||||
|
||||
if [ -n "$REGION" ]; then
|
||||
magick "$FILE" -crop "$REGION" "$FILE"
|
||||
else
|
||||
echo "no region" >& 2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec wl-copy < "$FILE"
|
1
.profile
Symbolic link
|
@ -0,0 +1 @@
|
|||
.yash_profile
|
91
.ssh/config
Normal file
|
@ -0,0 +1,91 @@
|
|||
PreferredAuthentications publickey,password
|
||||
|
||||
Host *
|
||||
SendEnv TERM
|
||||
SendEnv LS_COLORS
|
||||
|
||||
Host rex2
|
||||
Hostname rex2.ur.de
|
||||
Port 22
|
||||
User rom17543
|
||||
IdentityFile ~/.ssh/ur_rex2
|
||||
|
||||
Host git.stachel.xyz
|
||||
Hostname git.stachel.xyz
|
||||
Port 2248
|
||||
User git
|
||||
IdentityFile ~/.ssh/git_auth
|
||||
|
||||
Host git.uni-regensburg.de
|
||||
IdentityFile ~/.ssh/ur_gitlab
|
||||
|
||||
Host github.com
|
||||
Port 22
|
||||
IdentityFile ~/.ssh/github_auth_1
|
||||
|
||||
Host codeberg.org
|
||||
Port 22
|
||||
IdentityFile ~/.ssh/codeberg_auth
|
||||
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
|
||||
Host contabo
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
User root
|
||||
IdentityFile ~/.ssh/contabo_root
|
||||
|
||||
Host contabo_git
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
User git
|
||||
IdentityFile ~/.ssh/contabo_git
|
||||
|
||||
Host contabo_zmp-bot
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
User zmp-bot
|
||||
IdentityFile ~/.ssh/contabo_zmp-bot
|
||||
|
||||
Host contabo_stachel
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
User stachel
|
||||
IdentityFile ~/.ssh/contabo_stachel
|
||||
|
||||
Host contabo_filehost
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
User filehost
|
||||
IdentityFile ~/.ssh/contabo_filehost
|
||||
|
||||
Host contabo_terraria
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
User terraria
|
||||
IdentityFile ~/.ssh/contabo_terraria
|
||||
|
||||
Host contabo_musava
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
User musava
|
||||
IdentityFile ~/.ssh/musava2
|
||||
|
||||
Host contabo_ffsync
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
User ffsync
|
||||
IdentityFile ~/.ssh/contabo_ffsync
|
||||
|
||||
Host contabo_pylab
|
||||
Hostname 84.247.164.40
|
||||
Port 2222
|
||||
User pylab
|
||||
IdentityFile ~/.ssh/contabo_pylab
|
||||
|
||||
Host mobile
|
||||
Hostname 192.168.178.3
|
||||
Port 8022
|
||||
User u0_a348
|
||||
IdentityFile ~/.ssh/mobile
|
1
.yash_profile
Symbolic link
|
@ -0,0 +1 @@
|
|||
.config/yash/profile
|