Compare commits
11 Commits
850e0eb7df
...
d744792bda
Author | SHA1 | Date |
---|---|---|
|
d744792bda | |
|
6feece7542 | |
|
99ceaf608f | |
|
e0b25f408e | |
|
db1d583f46 | |
|
be5e4aefe4 | |
|
c4aff140e5 | |
|
cef2b85570 | |
|
0d0eb920f1 | |
|
d6d01dce67 | |
|
3fb13a5109 |
7
.bashrc
7
.bashrc
|
@ -23,7 +23,7 @@ bind "set colored-stats on"
|
|||
bind "set visible-stats on"
|
||||
|
||||
# prompt
|
||||
PS1=" \[\e[1m\]\u@\h\[\e[0m\] \[\e[1;34m\]\w\[\e[0m\] \[\e[1m\]\$\[\e[0m\] "
|
||||
PS1="\[\e[1m\]\u@\h\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\[\e[1m\]\$\[\e[0m\] "
|
||||
|
||||
# title
|
||||
PS1="\[\e]0;\u@\h:\w\a\]$PS1"
|
||||
|
@ -61,8 +61,3 @@ osc7_cwd() {
|
|||
printf '\e]7;file://%s%s\e\\' "${HOSTNAME}" "${encoded}"
|
||||
}
|
||||
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND}osc7_cwd
|
||||
|
||||
prompt_marker() {
|
||||
printf '\e]133;A\e\\'
|
||||
}
|
||||
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }prompt_marker
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName bavbavhaus.localhost
|
||||
DocumentRoot /home/urosm/bavbavhaus.net/public_html
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
<Directory /home/urosm/bavbavhaus.net/public_html>
|
||||
Require all granted
|
||||
</Directory>
|
|
@ -1,16 +0,0 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName kontrakurs.localhost
|
||||
DocumentRoot /home/urosm/kontrakurs.org/public_html
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
<Directory /home/urosm/kontrakurs.org/public_html>
|
||||
AddHandler cgi-script .cgi
|
||||
Options +ExecCGI
|
||||
</Directory>
|
||||
ErrorDocument 404 /home/urosm/kontrakurs.org/public_html/ikiwiki.cgi
|
||||
</VirtualHost>
|
||||
|
||||
<Directory /home/urosm/kontrakurs.org/public_html>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
|
@ -2,6 +2,5 @@
|
|||
text/plain=nvim.desktop;
|
||||
text/markdown=nvim.desktop;
|
||||
application/pdf=org.pwmt.zathura.desktop;
|
||||
inode/directory=footclient-directory.desktop;
|
||||
x-scheme-handler/http=firefox.desktop;
|
||||
x-scheme-handler/https=firefox.desktop;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
# This file describes the network interfaces available on your system
|
||||
# and how to activate them. For more information, see interfaces(5).
|
||||
|
||||
source /etc/network/interfaces.d/*
|
||||
|
||||
# The loopback network interface
|
||||
auto lo
|
||||
iface lo inet loopback
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/sbin/nft -f
|
||||
|
||||
flush ruleset
|
||||
|
||||
table inet filter {
|
||||
chain input {
|
||||
type filter hook input priority filter; policy drop;
|
||||
# accept any localhost traffic
|
||||
iif lo accept
|
||||
# accept traffic originated from us
|
||||
ct state established,related accept
|
||||
# accept neighbour discovery otherwise connectivity breaks
|
||||
icmpv6 type { nd-neighbor-solicit, nd-router-advert, nd-neighbor-advert } accept
|
||||
}
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
-- treesitter ------------------------------------------------------------------
|
||||
vim.treesitter.start()
|
|
@ -1,4 +1,4 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
-- options
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
-- treesitter ------------------------------------------------------------------
|
||||
vim.treesitter.start()
|
|
@ -1,4 +0,0 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
-- vim.opt.expandtab = true
|
|
@ -1,4 +0,0 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
|
@ -1,7 +1,7 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
-- options
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
||||
|
||||
-- treesitter ------------------------------------------------------------------
|
||||
-- treesitter
|
||||
vim.treesitter.start()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
-- options
|
||||
vim.bo.tabstop = 2
|
||||
vim.bo.shiftwidth = 2
|
||||
vim.bo.expandtab = true
|
||||
|
||||
-- keymaps ---------------------------------------------------------------------
|
||||
-- keymaps
|
||||
local keymap_set = vim.keymap.set
|
||||
keymap_set("n", "]h", "/\\_^#.*\\ze\\n\\{2}<esc>", {})
|
||||
keymap_set("n", "[h", "?\\_^#.*\\ze\\n\\{2}<esc>", {})
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
|
@ -1,4 +0,0 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
|
@ -1,4 +0,0 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
|
@ -1,2 +1,2 @@
|
|||
-- treesitter ------------------------------------------------------------------
|
||||
-- treesitter
|
||||
vim.treesitter.start()
|
||||
|
|
|
@ -6,7 +6,6 @@ endif
|
|||
syntax clear markdownYamlHead
|
||||
syntax region markdownYamlHead start="^-\{3}\n\S" end="\S\n\%(-\|\.\)\{3}$" keepend contains=@markdownYamlTop,@Spell
|
||||
|
||||
|
||||
" citation
|
||||
syntax match markdownPCite "\^\@<!\[[^\[\]]\{-}-\{0,1}@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\_.\{-}\]" contains=@markdownInline,markdownCiteKey
|
||||
syn match markdownICite "@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\s\[.\{-1,}\]" contains=markdownCiteKey,@Spell display
|
||||
|
|
|
@ -5,32 +5,40 @@
|
|||
|
||||
-- colors ----------------------------------------------------------------------
|
||||
local C = {
|
||||
{ 0, "#000000" }, -- black
|
||||
{ 1, "#fa3500" }, -- red
|
||||
{ 2, "#009843" }, -- green
|
||||
{ 3, "#d06600" }, -- orange
|
||||
{ 4, "#856cff" }, -- blue
|
||||
{ 5, "#ff1170" }, -- magenta
|
||||
{ 6, "#008cca" }, -- cyan
|
||||
{ 7, "#e2e2e2" }, -- white
|
||||
{ 8, "#848484" }, -- black
|
||||
{ 9, "#ff888e" }, -- red
|
||||
{ 10, "#00c55b" }, -- green
|
||||
{ 11, "#ff8d48" }, -- orange
|
||||
{ 12, "#ac9fff" }, -- blue
|
||||
{ 13, "#ffb1c0" }, -- magenta
|
||||
{ 14, "#92ccff" }, -- cyan
|
||||
{ 15, "#ffffff" }, -- white
|
||||
black = { cterm = 0, gui = "#000000" },
|
||||
red = { cterm = 1, gui = "#fa3500" },
|
||||
green = { cterm = 2, gui = "#009843" },
|
||||
orange = { cterm = 3, gui = "#d06600" },
|
||||
blue = { cterm = 4, gui = "#856cff" },
|
||||
magenta = { cterm = 5, gui = "#ff1170" },
|
||||
cyan = { cterm = 6, gui = "#008cca" },
|
||||
white = { cterm = 7, gui = "#e2e2e2" },
|
||||
bright_black = { cterm = 8, gui = "#848484" },
|
||||
bright_red = { cterm = 9, gui = "#ff888e" },
|
||||
bright_green = { cterm = 10, gui = "#00c55b" },
|
||||
bright_orange = { cterm = 11, gui = "#ff8d48" },
|
||||
bright_blue = { cterm = 12, gui = "#ac9fff" },
|
||||
bright_magenta = { cterm = 13, gui = "#ffb1c0" },
|
||||
bright_cyan = { cterm = 14, gui = "#92ccff" },
|
||||
bright_white = { cterm = 15, gui = "#ffffff" },
|
||||
}
|
||||
|
||||
local black_c = C[1]
|
||||
local red_c = C[2]
|
||||
local green_c = C[3]
|
||||
local orange_c = C[4]
|
||||
local blue_c = C[5]
|
||||
local magenta_c = C[6]
|
||||
local cyan_c = C[7]
|
||||
local white_c = C[8]
|
||||
vim.g.terminal_color_0 = "#000000"
|
||||
vim.g.terminal_color_1 = "#fa3500"
|
||||
vim.g.terminal_color_2 = "#009843"
|
||||
vim.g.terminal_color_3 = "#d06600"
|
||||
vim.g.terminal_color_4 = "#856cff"
|
||||
vim.g.terminal_color_5 = "#ff1170"
|
||||
vim.g.terminal_color_6 = "#008cca"
|
||||
vim.g.terminal_color_7 = "#e2e2e2"
|
||||
vim.g.terminal_color_8 = "#848484"
|
||||
vim.g.terminal_color_9 = "#ff888e"
|
||||
vim.g.terminal_color_10 = "#00c55b"
|
||||
vim.g.terminal_color_11 = "#ff8d48"
|
||||
vim.g.terminal_color_12 = "#ac9fff"
|
||||
vim.g.terminal_color_13 = "#ffb1c0"
|
||||
vim.g.terminal_color_14 = "#92ccff"
|
||||
vim.g.terminal_color_15 = "#ffffff"
|
||||
|
||||
-- init ------------------------------------------------------------------------
|
||||
vim.cmd.highlight("clear")
|
||||
|
@ -50,42 +58,11 @@ else
|
|||
vim.opt.termguicolors = true
|
||||
end
|
||||
|
||||
for _, v in ipairs(C) do
|
||||
local key = ("terminal_color_%i"):format(v[1])
|
||||
vim.g[key] = v[2]
|
||||
end
|
||||
|
||||
-- highlights ------------------------------------------------------------------
|
||||
local H = {}
|
||||
|
||||
function H:new(o)
|
||||
o = o or {}
|
||||
setmetatable(o, self)
|
||||
self.__index = self
|
||||
return o
|
||||
end
|
||||
|
||||
function H:fg(c)
|
||||
self.ctermfg = c[1]
|
||||
self.fg = c[2]
|
||||
return self
|
||||
end
|
||||
|
||||
function H:bg(c)
|
||||
self.ctermbg = c[1]
|
||||
self.bg = c[2]
|
||||
return self
|
||||
end
|
||||
|
||||
function H:attr(a)
|
||||
self[a] = true
|
||||
return self
|
||||
end
|
||||
|
||||
local fg_c = white_c
|
||||
local bg_c = black_c
|
||||
local accent_c = magenta_c
|
||||
local dimmed_c = blue_c
|
||||
local fg = C.white
|
||||
local bg = C.black
|
||||
local accent = C.magenta
|
||||
local dimmed = C.blue
|
||||
|
||||
local nvim_set_hl = vim.api.nvim_set_hl
|
||||
local function set_hl(group, def) nvim_set_hl(0, group, def) end
|
||||
|
@ -98,8 +75,8 @@ set_hl("NormalNC", normal_h)
|
|||
|
||||
-- tui -------------------------------------------------------------------------
|
||||
local tui_normal_h = {}
|
||||
local tui_accent_h = H:new():fg(accent_c)
|
||||
local tui_dimmed_h = H:new():fg(dimmed_c)
|
||||
local tui_accent_h = { ctermfg = accent.cterm, fg = accent.gui }
|
||||
local tui_dimmed_h = { ctermfg = dimmed.cterm, fg = dimmed.gui }
|
||||
|
||||
set_hl("StatusLine", tui_dimmed_h)
|
||||
set_hl("StatusLineNC", tui_dimmed_h)
|
||||
|
@ -117,17 +94,34 @@ set_hl("FoldColumn", tui_dimmed_h)
|
|||
set_hl("WildMenu", tui_accent_h)
|
||||
|
||||
-- float -----------------------------------------------------------------------
|
||||
local float_normal_h = H:new():fg(bg_c):bg(fg_c)
|
||||
local float_accent_h = H:new():fg(accent_c):bg(fg_c)
|
||||
local float_normal_h = { ctermfg = bg.cterm,
|
||||
fg = bg.gui,
|
||||
ctermbg = fg.cterm,
|
||||
bg = fg.gui }
|
||||
local float_dimmed_h = { ctermfg = dimmed.cterm,
|
||||
fg = dimmed.gui,
|
||||
ctermbg = fg.cterm,
|
||||
bg = fg.gui }
|
||||
local float_accent_h = { ctermfg = accent.cterm,
|
||||
fg = accent.gui,
|
||||
ctermbg = fg.cterm,
|
||||
bg = fg.gui }
|
||||
|
||||
set_hl("NormalFloat", float_normal_h)
|
||||
set_hl("FloatBorder", float_normal_h)
|
||||
set_hl("FloatBorder", float_dimmed_h)
|
||||
set_hl("FloatTitle", float_accent_h)
|
||||
|
||||
-- menu ------------------------------------------------------------------------
|
||||
local menu_normal_h = H:new():fg(bg_c):bg(fg_c)
|
||||
local menu_accent_h = H:new():fg(accent_c):bg(fg_c)
|
||||
local menu_accent_r_h = H:new():fg(accent_c):bg(fg_c):attr("reverse")
|
||||
local menu_normal_h = { ctermfg = accent.cterm,
|
||||
fg = accent.gui,
|
||||
ctermbg = fg.cterm,
|
||||
bg = fg.gui }
|
||||
local menu_accent_h = { ctermfg = accent.cterm,
|
||||
fg = accent.gui,
|
||||
ctermbg = fg.cterm,
|
||||
bg = fg.gui,
|
||||
reverse = true }
|
||||
local test = { ctermfg, fg = 1, 2 }
|
||||
|
||||
set_hl("Pmenu", menu_normal_h)
|
||||
set_hl("PmenuSel", menu_accent_h)
|
||||
|
@ -135,14 +129,14 @@ set_hl("PmenuKind", menu_normal_h)
|
|||
set_hl("PmenuKindSel", menu_accent_h)
|
||||
set_hl("PmenuExtra", menu_normal_h)
|
||||
set_hl("PmenuExtraSel", menu_accent_h)
|
||||
set_hl("PmenuSbar", menu_accent_h)
|
||||
set_hl("PmenuThumb", menu_accent_r_h)
|
||||
set_hl("PmenuSbar", menu_normal_h)
|
||||
set_hl("PmenuThumb", menu_accent_h)
|
||||
|
||||
-- messages --------------------------------------------------------------------
|
||||
local message_normal_h = {}
|
||||
local message_accent_h = H:new():fg(accent_c)
|
||||
local message_error_h = H:new():fg(red_c)
|
||||
local message_warn_h = H:new():fg(orange_c)
|
||||
local message_accent_h = { ctermfg = accent.cterm, fg = accent.gui }
|
||||
local message_error_h = { ctermfg = C.red.cterm, fg = C.red.gui }
|
||||
local message_warn_h = { ctermfg = C.orange.cterm, fg = C.orange.gui }
|
||||
|
||||
set_hl("MsgArea", message_normal_h)
|
||||
set_hl("MsgSeparator", message_normal_h)
|
||||
|
@ -154,9 +148,9 @@ set_hl("Question", message_accent_h)
|
|||
set_hl("Title", message_accent_h)
|
||||
|
||||
-- buffer ----------------------------------------------------------------------
|
||||
local buffer_normal_h = H:new():fg(dimmed_c)
|
||||
local buffer_normal_bg_h = H:new():bg(dimmed_c)
|
||||
local buffer_accent_h = H:new():fg(accent_c)
|
||||
local buffer_normal_h = { ctermfg = dimmed.cterm, fg = dimmed.gui }
|
||||
local buffer_normal_bg_h = { ctermbg = dimmed.cterm, bg = dimmed.gui }
|
||||
local buffer_accent_h = { ctermfg = accent.cterm, fg = accent.gui }
|
||||
|
||||
set_hl("Conceal", buffer_normal_h)
|
||||
set_hl("NonText", buffer_normal_h)
|
||||
|
@ -167,7 +161,7 @@ set_hl("SpecialKey", buffer_accent_h)
|
|||
set_hl("ColorColumn", buffer_normal_bg_h)
|
||||
|
||||
-- cursor ----------------------------------------------------------------------
|
||||
local cursor_normal_h = H:new():attr("reverse")
|
||||
local cursor_normal_h = { reverse = true }
|
||||
|
||||
set_hl("CursorLine", cursor_normal_h)
|
||||
set_hl("CursorLineNr", cursor_normal_h)
|
||||
|
@ -182,27 +176,39 @@ set_hl("TermCursor", cursor_normal_h)
|
|||
set_hl("TermCursorNC", cursor_normal_h)
|
||||
|
||||
-- match -----------------------------------------------------------------------
|
||||
local match_normal_h = H:new():fg(black_c):bg(orange_c)
|
||||
local match_current_h = H:new():fg(black_c):bg(magenta_c)
|
||||
local match_paren_h = H:new():fg(magenta_c):bg(orange_c)
|
||||
local match_normal_h = { ctermfg = C.black.cterm,
|
||||
fg = C.black.gui,
|
||||
ctermbg = C.orange.cterm,
|
||||
bg = C.orange.gui }
|
||||
local match_accent_h = { ctermfg = C.black.cterm,
|
||||
fg = C.black.gui,
|
||||
ctermbg = C.magenta.cterm,
|
||||
bg = C.magenta.gui }
|
||||
local match_dimmed_h = { ctermfg = C.magenta.cterm,
|
||||
fg = C.magenta.gui,
|
||||
ctermbg = C.white.cterm,
|
||||
bg = C.white.gui }
|
||||
|
||||
set_hl("Search", match_normal_h)
|
||||
set_hl("Substitute", match_normal_h)
|
||||
set_hl("IncSearch", match_current_h)
|
||||
set_hl("CurSearch", match_current_h)
|
||||
set_hl("MatchParen", match_paren_h)
|
||||
set_hl("IncSearch", match_accent_h)
|
||||
set_hl("CurSearch", match_accent_h)
|
||||
set_hl("MatchParen", match_dimmed_h)
|
||||
|
||||
-- selection -------------------------------------------------------------------
|
||||
local selection_normal_h = H:new():fg(black_c):bg(white_c)
|
||||
local selection_normal_h = { ctermfg = C.black.cterm,
|
||||
fg = C.black.gui,
|
||||
ctermbg = C.blue.cterm,
|
||||
bg = C.blue.gui }
|
||||
|
||||
set_hl("visual", selection_normal_h)
|
||||
set_hl("visualnos", selection_normal_h)
|
||||
set_hl("Visual", selection_normal_h)
|
||||
set_hl("Visualnos", selection_normal_h)
|
||||
|
||||
-- diff ------------------------------------------------------------------------
|
||||
local diff_add_h = H:new():fg(green_c)
|
||||
local diff_change_h = H:new():fg(orange_c)
|
||||
local diff_delete_h = H:new():fg(red_c)
|
||||
local diff_text_h = H:new():fg(orange_c):attr("underline")
|
||||
local diff_add_h = { ctermfg = C.green.cterm, fg = C.green.gui }
|
||||
local diff_change_h = { ctermfg = C.orange.cterm, fg = C.orange.gui }
|
||||
local diff_delete_h = { ctermfg = C.red.cterm, fg = C.red.gui }
|
||||
local diff_text_h = { ctermfg = C.orange.cterm, fg = C.orange.gui, underline = true }
|
||||
|
||||
set_hl("DiffAdd", diff_add_h)
|
||||
set_hl("DiffChange", diff_change_h)
|
||||
|
@ -210,8 +216,8 @@ set_hl("DiffDelete", diff_delete_h)
|
|||
set_hl("DiffText", diff_text_h)
|
||||
|
||||
-- spell -----------------------------------------------------------------------
|
||||
local spell_error_h = H:new():fg(red_c):attr("underline")
|
||||
local spell_warn_h = H:new():fg(orange_c):attr("underline")
|
||||
local spell_error_h = { ctermfg = C.red.cterm, fg = C.red.gui, underline = true }
|
||||
local spell_warn_h = { ctermfg = C.orange.cterm, fg = C.orange.gui, underline = true }
|
||||
|
||||
set_hl("SpellBad", spell_error_h)
|
||||
set_hl("SpellCap", spell_warn_h)
|
||||
|
@ -219,16 +225,16 @@ set_hl("SpellLocal", spell_warn_h)
|
|||
set_hl("SpellRare", spell_warn_h)
|
||||
|
||||
-- diagnostic ------------------------------------------------------------------
|
||||
local diagnostic_error_h = H:new():fg(red_c)
|
||||
local diagnostic_warn_h = H:new():fg(orange_c)
|
||||
local diagnostic_info_h = H:new():fg(blue_c)
|
||||
local diagnostic_hint_h = H:new():fg(white_c)
|
||||
local diagnostic_ok_h = H:new():fg(green_c)
|
||||
local diagnostic_error_u_h = H:new():fg(red_c):attr("underline")
|
||||
local diagnostic_warn_u_h = H:new():fg(orange_c):attr("underline")
|
||||
local diagnostic_info_u_h = H:new():fg(blue_c):attr("underline")
|
||||
local diagnostic_hint_u_h = H:new():fg(white_c):attr("underline")
|
||||
local diagnostic_ok_u_h = H:new():fg(green_c):attr("underline")
|
||||
local diagnostic_error_h = { ctermfg = C.red.cterm, fg = C.red.gui }
|
||||
local diagnostic_warn_h = { ctermfg = C.orange.cterm, fg = C.orange.gui }
|
||||
local diagnostic_info_h = { ctermfg = C.blue.cterm, fg = C.blue.gui }
|
||||
local diagnostic_hint_h = { ctermfg = C.white.cterm, fg = C.white.gui }
|
||||
local diagnostic_ok_h = { ctermfg = C.green.cterm, fg = C.green.gui }
|
||||
local diagnostic_error_u_h = { ctermfg = C.red.cterm, fg = C.red.gui, underline = true }
|
||||
local diagnostic_warn_u_h = { ctermfg = C.orange.cterm, fg = C.orange.gui, underline = true }
|
||||
local diagnostic_info_u_h = { ctermfg = C.blue.cterm, fg = C.blue.gui, underline = true }
|
||||
local diagnostic_hint_u_h = { ctermfg = C.white.cterm, fg = C.white.gui, underline = true }
|
||||
local diagnostic_ok_u_h = { ctermfg = C.green.cterm, fg = C.green.gui, underline = true }
|
||||
|
||||
set_hl("DiagnosticError", diagnostic_error_h)
|
||||
set_hl("DiagnosticWarn", diagnostic_warn_h)
|
||||
|
@ -259,26 +265,26 @@ set_hl("DiagnosticDeprecated", diagnostic_hint_u_h)
|
|||
set_hl("DiagnosticUnnecessary", diagnostic_hint_u_h)
|
||||
|
||||
-- misc ------------------------------------------------------------------------
|
||||
set_hl("Directory", H:new():fg(blue_c))
|
||||
set_hl("Directory", { ctermfg = C.blue.cterm, fg = C.blue.gui })
|
||||
|
||||
-- syntax ----------------------------------------------------------------------
|
||||
local syntax_normal_h = {}
|
||||
local syntax_comment_h = H:new():fg(blue_c)
|
||||
local syntax_constant_h = H:new():fg(red_c)
|
||||
local syntax_identifier_h = H:new()
|
||||
local syntax_statement_h = H:new():fg(orange_c)
|
||||
local syntax_preproc_h = H:new():fg(magenta_c)
|
||||
local syntax_type_h = H:new():fg(green_c)
|
||||
local syntax_special_h = H:new():fg(orange_c)
|
||||
local syntax_underline_h = H:new():fg(blue_c):attr("underline")
|
||||
local syntax_ignore_h = H:new():fg(black_c)
|
||||
local syntax_error_h = H:new():fg(black_c):bg(red_c)
|
||||
local syntax_warn_h = H:new():fg(black_c):bg(orange_c)
|
||||
local syntax_comment_h = { ctermfg = C.blue.cterm, fg = C.blue.gui }
|
||||
local syntax_constant_h = { ctermfg = C.red.cterm, fg = C.red.gui }
|
||||
local syntax_identifier_h = {}
|
||||
local syntax_statement_h = { ctermfg = C.orange.cterm, fg = C.orange.gui }
|
||||
local syntax_preproc_h = { ctermfg = C.magenta.cterm, fg = C.magenta.gui }
|
||||
local syntax_type_h = { ctermfg = C.green.cterm, fg = C.green.gui }
|
||||
local syntax_special_h = { ctermfg = C.orange.cterm, fg = C.orange.gui }
|
||||
local syntax_underline_h = { ctermfg = C.blue.cterm, fg = C.blue.gui, underline = true }
|
||||
local syntax_ignore_h = { ctermfg = C.black.cterm, fg = C.black.gui }
|
||||
local syntax_error_h = { ctermfg = C.black.cterm, fg = C.black.gui, ctermbg = C.red.cterm, bg = C.red.gui }
|
||||
local syntax_warn_h = { ctermfg = C.black.cterm, fg = C.black.gui, ctermbg = C.orange.cterm, bg = C.orange.gui }
|
||||
|
||||
local syntax_italic_h = H:new():attr("italic")
|
||||
local syntax_bold_h = H:new():attr("bold")
|
||||
local syntax_bolditalic_h = H:new():attr("bold"):attr("italic")
|
||||
local syntax_strike_h = H:new():attr("strikethrough")
|
||||
local syntax_italic_h = { italic = true }
|
||||
local syntax_bold_h = { bold = true }
|
||||
local syntax_bolditalic_h = { bold = true, italic = true }
|
||||
local syntax_strike_h = { strikethrough = true }
|
||||
|
||||
set_hl("Comment", syntax_comment_h)
|
||||
set_hl("Constant", syntax_constant_h)
|
||||
|
@ -322,9 +328,9 @@ set_hl("BoldItalic", syntax_bolditalic_h)
|
|||
set_hl("Strike", syntax_strike_h)
|
||||
|
||||
-- markdown --------------------------------------------------------------------
|
||||
local markdown_label_h = H:new():fg(magenta_c)
|
||||
local markdown_delimiter_h = H:new():fg(blue_c)
|
||||
local markdown_underline_h = H:new():fg(blue_c):attr("underline")
|
||||
local markdown_label_h = { ctermfg = C.magenta.cterm, fg = C.magenta.gui }
|
||||
local markdown_delimiter_h = { ctermfg = C.blue.cterm, fg = C.blue.gui }
|
||||
local markdown_underline_h = { ctermfg = C.blue.cterm, fg = C.blue.gui, underline = true }
|
||||
|
||||
set_hl("markdownLabel", markdown_label_h)
|
||||
set_hl("markdownHeadingDelimiter", markdown_delimiter_h)
|
||||
|
|
|
@ -17,18 +17,17 @@ opt.signcolumn = "number"
|
|||
opt.textwidth = 80
|
||||
opt.colorcolumn = "+1"
|
||||
|
||||
opt.expandtab = true
|
||||
opt.tabstop = 4
|
||||
opt.shiftwidth = 2
|
||||
opt.softtabstop = -1
|
||||
opt.smarttab = true
|
||||
|
||||
opt.showtabline = 2
|
||||
opt.winbar = "%f%( %h%m%r%y%)"
|
||||
opt.laststatus = 3
|
||||
|
||||
local statusline_group = api.nvim_create_augroup("Statusline", {})
|
||||
local wordcount = fn.wordcount()
|
||||
api.nvim_create_autocmd({ "TextChanged", "WinEnter", "BufEnter" }, {
|
||||
group = statusline_group,
|
||||
callback = function()
|
||||
wordcount = fn.wordcount()
|
||||
end
|
||||
})
|
||||
local cwd = fn.pathshorten(vim.fn.getcwd())
|
||||
api.nvim_create_autocmd({ "DirChanged" }, {
|
||||
group = statusline_group,
|
||||
|
@ -38,6 +37,7 @@ api.nvim_create_autocmd({ "DirChanged" }, {
|
|||
})
|
||||
|
||||
function _G.statusline()
|
||||
local wordcount = fn.wordcount()
|
||||
return table.concat({
|
||||
cwd,
|
||||
" %=",
|
||||
|
@ -87,7 +87,7 @@ api.nvim_create_autocmd({ "TermOpen" }, {
|
|||
-- keymaps ---------------------------------------------------------------------
|
||||
local keymap_set = vim.keymap.set
|
||||
|
||||
keymap_set( "n", "<esc>", function()
|
||||
keymap_set("n", "<esc>", function()
|
||||
cmd.nohlsearch()
|
||||
end, { desc = "Stop the highlighting for the 'hlsearch' option" })
|
||||
|
||||
|
@ -138,7 +138,9 @@ keymap_set("n", "<leader>g", function()
|
|||
end)
|
||||
if not file then return end
|
||||
cmd.vimgrep(pattern, file)
|
||||
end)
|
||||
end, { desc = ":vimgrep" })
|
||||
|
||||
keymap_set("i", "<c-f>", "<c-x><c-f>", { desc = "File name completion" })
|
||||
|
||||
-- netrw -----------------------------------------------------------------------
|
||||
local g = vim.g
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
import os
|
||||
import atexit
|
||||
import readline
|
||||
|
||||
if "PYTHONHISTFILE" in os.environ:
|
||||
histfile = os.path.expanduser(os.environ["PYTHONHISTFILE"])
|
||||
elif "XDG_STATE_HOME" in os.environ:
|
||||
histfile = os.path.join(os.path.expanduser(
|
||||
os.environ["XDG_STATE_HOME"]), "python", "python_history")
|
||||
else:
|
||||
histfile = os.path.join(os.path.expanduser("~"), ".python_history")
|
||||
|
||||
|
||||
histfile = os.path.abspath(histfile)
|
||||
_dir, _ = os.path.split(histfile)
|
||||
os.makedirs(_dir, exist_ok=True)
|
||||
|
||||
|
||||
try:
|
||||
readline.read_history_file(histfile)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
|
||||
atexit.register(readline.write_history_file, histfile)
|
|
@ -1 +0,0 @@
|
|||
net.ipv4.ip_forward = 1
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
nmcli device wifi list
|
||||
ssid="$(nmcli -g SSID device wifi list --rescan no |
|
||||
fzy -p "nmcli device wifi connect ")"
|
||||
[ -z "$ssid" ] && return
|
||||
if ! nmcli device wifi connect "$ssid"; then
|
||||
nmcli -a device wifi connect "$ssid"
|
||||
fi
|
||||
sleep 1
|
|
@ -5,11 +5,7 @@ printf "[\n"
|
|||
|
||||
if ! command -v jq >/dev/null; then
|
||||
while true; do
|
||||
printf '[{
|
||||
"full_text":" jq: command not found ",
|
||||
"urgent":true,
|
||||
"separator_block_width":0
|
||||
},],'
|
||||
printf '[{ "full_text":"jq: command not found", "urgent":true },],'
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
@ -17,47 +13,39 @@ fi
|
|||
while true; do
|
||||
printf "["
|
||||
# keyboard layout
|
||||
swaymsg -t get_inputs | jq -Mcj '
|
||||
[.[] | select(.type=="keyboard")][0]
|
||||
| {
|
||||
"full_text":([" ",.xkb_active_layout_name," "]|join("")),
|
||||
swaymsg -t get_inputs | jq -Mcj '[.[] | select(.type=="keyboard")][0] |
|
||||
{
|
||||
"full_text":.xkb_active_layout_name,
|
||||
"urgent":.xkb_active_layout_index,
|
||||
"separator_block_width":0
|
||||
}, ","'
|
||||
# battery
|
||||
# shellcheck disable=SC2002
|
||||
cat /sys/class/power_supply/BAT0/capacity | jq -Mcj '
|
||||
if .<20 then {
|
||||
"full_text":([" ",.," % "]|join("")),
|
||||
"urgent":true,
|
||||
"separator_block_width":0
|
||||
} else {
|
||||
"full_text":([" ",.," % "]|join("")),
|
||||
"separator_block_width":0
|
||||
} end, ","'
|
||||
if .<20 then
|
||||
{
|
||||
"full_text":([.," %"]|join("")),
|
||||
"urgent":true,
|
||||
}
|
||||
else
|
||||
{
|
||||
"full_text":([.," %"]|join("")),
|
||||
}
|
||||
end, ","'
|
||||
# date
|
||||
date +%c | jq -RMcj '{
|
||||
"full_text":([" ",.," "]|join("")),
|
||||
"separator_block_width":0
|
||||
}, ","'
|
||||
date +%c | jq -RMcj '{ "full_text":., }, ","'
|
||||
# scratchpad
|
||||
swaymsg -t get_tree | jq -Mcj '
|
||||
.nodes[]
|
||||
| select(.name=="__i3").nodes[]
|
||||
| select(.name=="__i3_scratch").floating_nodes
|
||||
| if length>0 then {
|
||||
"full_text":([" ",length," "]|join("")),
|
||||
"urgent":true,
|
||||
"separator_block_width":0
|
||||
}, "," else "" end'
|
||||
swaymsg -t get_tree | jq -Mcj '.nodes[] | select(.name=="__i3").nodes[] |
|
||||
select(.name=="__i3_scratch").floating_nodes |
|
||||
{
|
||||
"full_text":length,
|
||||
"urgent":length,
|
||||
}, ","'
|
||||
# notifications
|
||||
makoctl list | jq -Mcj '
|
||||
.data[]
|
||||
| if length>0 then {
|
||||
"full_text":([" (",length,") ",.[0].summary.data," "]|join("")),
|
||||
"urgent":(.[0].urgency.data==2),
|
||||
"separator_block_width":0
|
||||
}, "," else "" end'
|
||||
makoctl list | jq -Mcj '.data[][0] |
|
||||
{
|
||||
"full_text":.summary.data,
|
||||
"urgent":(.urgency.data==2),
|
||||
}, ","'
|
||||
printf "],"
|
||||
# timeout
|
||||
timeout 1 swaymsg -t subscribe '["input","binding"]' >/dev/null
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
lsblk
|
||||
lsblk -lpno"name,type,mountpoint" \
|
||||
| awk '($1~/.dev.sd/&&$2=="part"){printf($3=="")?"mount -b %s\n":"unmount -b %s\n",$1}' \
|
||||
| fzy -p "udisksctl " \
|
||||
| xargs -r udisksctl
|
||||
sleep 1
|
|
@ -1,4 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Exec=footclient -D %u
|
||||
MimeType=inode/directory
|
||||
Name=Foot Client directory
|
47
.profile
47
.profile
|
@ -32,51 +32,6 @@ if [ ! -d "$(dirname "${HISTFILE}")" ]; then
|
|||
mkdir -p "$(dirname "${HISTFILE}")"
|
||||
fi
|
||||
|
||||
# mysql
|
||||
export MYSQL_HISTFILE=$XDG_STATE_HOME/mysql/history
|
||||
if [ ! -d "$(dirname "${MYSQL_HISTFILE}")" ]; then
|
||||
mkdir -p "$(dirname "${MYSQL_HISTFILE}")"
|
||||
fi
|
||||
|
||||
# wget
|
||||
export WGETRC=$XDG_CONFIG_HOME/wget/wgetrc
|
||||
if [ ! -f "${WGETRC}" ]; then
|
||||
mkdir -p "$(dirname "${WGETRC}")"
|
||||
printf %s\\n "hsts-file = ${XDG_CACHE_HOME}/wget-hsts" >>"${WGETRC}"
|
||||
fi
|
||||
|
||||
# readline
|
||||
export INPUTRC=$XDG_CONFIG_HOME/readline/inputrc
|
||||
|
||||
# screen
|
||||
export SCREENRC=$XDG_CONFIG_HOME/screen/screenrc
|
||||
|
||||
# gnupg
|
||||
export GNUPGHOME=$XDG_CONFIG_HOME/gnupg
|
||||
|
||||
# node
|
||||
export NODE_REPL_HISTORY=$XDG_DATA_HOME/node_repl_history
|
||||
|
||||
# npm
|
||||
export npm_config_userconfig=$XDG_CONFIG_HOME/npm/npmrc
|
||||
export npm_config_prefix=$XDG_DATA_HOME/npm
|
||||
export npm_config_cache=$XDG_CACHE_HOME/npm
|
||||
export npm_config_init_module=$XDG_DATA_HOME/npm/config/npm-init.js
|
||||
|
||||
# python
|
||||
export PYTHONSTARTUP=$XDG_CONFIG_HOME/python/pythonrc.py
|
||||
export PYTHONPYCACHEPREFIX=$XDG_CACHE_HOME/python
|
||||
export PYTHONUSERBASE=$XDG_DATA_HOME/python
|
||||
export PYTHONHISTFILE=$XDG_STATE_HOME/python/history
|
||||
|
||||
# tex
|
||||
export TEXMFHOME=$XDG_DATA_HOME/texmf
|
||||
export TEXMFVAR=$XDG_CACHE_HOME/texlive/texmf-var
|
||||
export TEXMFCONFIG=$XDG_CONFIG_HOME/texlive/texmf-config
|
||||
|
||||
# opam
|
||||
export OPAMROOT=$XDG_DATA_HOME/opam
|
||||
|
||||
# editor
|
||||
export EDITOR=vi
|
||||
|
||||
|
@ -90,5 +45,5 @@ if [ "$(tty)" = "/dev/tty1" ] && command -v sway >/dev/null; then
|
|||
export BROWSER=firefox
|
||||
# run sway
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
exec sway >/tmp/sway.log 2>&1
|
||||
exec systemd-cat --identifier sway sway
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue