Compare commits
46 Commits
fd1fc1aaa9
...
850e0eb7df
Author | SHA1 | Date |
---|---|---|
urosm | 850e0eb7df | |
urosm | 90bfde16a1 | |
urosm | 61db1999ef | |
urosm | 5ff79b6dd1 | |
urosm | da3f19e76b | |
urosm | 23c3e29195 | |
urosm | d22ecb22bb | |
urosm | eba5740da8 | |
urosm | da8ab1ba0b | |
urosm | a3e7da50cf | |
urosm | 6036c725c1 | |
urosm | 322a825729 | |
urosm | 4cf61ef674 | |
urosm | 7047daa3c1 | |
urosm | cf5486dfda | |
urosm | 282dbeb2de | |
urosm | 8e2a1ec2af | |
urosm | 08430ad09d | |
urosm | ec641ec76a | |
urosm | ab8fec8d72 | |
urosm | 9e4cc2a3c5 | |
urosm | b7b0be8eb5 | |
urosm | 4bffdd091e | |
urosm | 7b2b0ba827 | |
urosm | 4689d7ac54 | |
urosm | 35a56a9f41 | |
urosm | cc37895628 | |
urosm | 5e10bec3ee | |
urosm | 72bda35c68 | |
urosm | 31d8d102da | |
urosm | f52dd9078a | |
urosm | f022e9af1e | |
urosm | d65876fd07 | |
urosm | 08fa0bf71d | |
urosm | 3fd575dfc1 | |
urosm | 75bc7db83a | |
urosm | fff4858ce5 | |
urosm | 4dbcdc1eec | |
urosm | 6937e89e03 | |
urosm | 837d3dcdde | |
urosm | 0b7c4f25b8 | |
urosm | 3ddc5c6b32 | |
urosm | df0c235a42 | |
urosm | 51ee0b6415 | |
urosm | 7e3b89229b | |
urosm | 72952fd3bf |
24
.bashrc
24
.bashrc
|
@ -3,20 +3,11 @@
|
|||
# if not running interactively, don't do anything
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
# history
|
||||
export HISTCONTROL=ignoredups:erasedups
|
||||
export HISTSIZE=-1
|
||||
export HISTFILESIZE=-1
|
||||
PROMPT_COMMAND="history -a;history -n;$PROMPT_COMMAND"
|
||||
|
||||
# title
|
||||
PS1="\[\e]0;\u@\h:\w\a\]$PS1"
|
||||
|
||||
# readline
|
||||
bind "set editing-mode vi"
|
||||
bind "set keyseq-timeout 50"
|
||||
bind "set show-mode-in-prompt on"
|
||||
bind "set vi-ins-mode-string \1\e[35m\2+\1\e[0m\2"
|
||||
bind "set vi-ins-mode-string \1\e[01;35m\2+\1\e[0m\2"
|
||||
bind "set vi-cmd-mode-string :"
|
||||
|
||||
bind "set keymap vi-command"
|
||||
|
@ -31,9 +22,15 @@ bind "set completion-display-width 0"
|
|||
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\] "
|
||||
|
||||
# title
|
||||
PS1="\[\e]0;\u@\h:\w\a\]$PS1"
|
||||
|
||||
# alias
|
||||
alias q="exit"
|
||||
alias e='${EDITOR:-vi}'
|
||||
alias diff="diff --color=auto"
|
||||
alias grep="grep --color=auto"
|
||||
alias ls="ls --color=auto"
|
||||
alias ll="ls -AF1"
|
||||
|
@ -64,3 +61,8 @@ 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
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<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>
|
|
@ -0,0 +1,16 @@
|
|||
<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>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[DEFAULT]
|
||||
bantime = 1d
|
||||
|
||||
[sshd]
|
||||
enabled = true
|
|
@ -3,21 +3,21 @@ dpi-aware=no
|
|||
font=monospace:size=13
|
||||
|
||||
[colors]
|
||||
foreground=e3e0e1
|
||||
background=292526
|
||||
regular0=292526
|
||||
regular1=ff404f
|
||||
regular2=00a147
|
||||
regular3=e06e00
|
||||
regular4=6185ff
|
||||
regular5=ff3e8b
|
||||
regular6=0095d7
|
||||
regular7=e3e0e1
|
||||
bright0=958a8d
|
||||
bright1=ffb3b6
|
||||
bright2=00e46a
|
||||
bright3=ffb598
|
||||
bright4=b8c3ff
|
||||
bright5=ffb1c5
|
||||
foreground=e2e2e2
|
||||
background=000000
|
||||
regular0=000000
|
||||
regular1=fa3500
|
||||
regular2=009843
|
||||
regular3=d06600
|
||||
regular4=856cff
|
||||
regular5=ff1170
|
||||
regular6=008cca
|
||||
regular7=e2e2e2
|
||||
bright0=848484
|
||||
bright1=ff888e
|
||||
bright2=00c55b
|
||||
bright3=ff8d48
|
||||
bright4=ac9fff
|
||||
bright5=ffb1c0
|
||||
bright6=92ccff
|
||||
bright7=f4f3f3
|
||||
bright7=ffffff
|
||||
|
|
|
@ -6,13 +6,13 @@ icons-enabled=no
|
|||
width=72
|
||||
|
||||
[colors]
|
||||
background=292526ff
|
||||
text=6185ffff
|
||||
match=e06e00ff
|
||||
selection=292526ff
|
||||
selection-text=ff3e8bff
|
||||
selection-match=ff3e8bff
|
||||
border=6185ffff
|
||||
background=000000ff
|
||||
text=856cffff
|
||||
match=d06600ff
|
||||
selection=000000ff
|
||||
selection-text=ff1170ff
|
||||
selection-match=ff1170ff
|
||||
border=856cffff
|
||||
|
||||
[border]
|
||||
radius=0
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[user]
|
||||
email = urosm@kompot.si
|
||||
name = urosm
|
||||
[commit]
|
||||
verbose = true
|
||||
|
|
|
@ -1,12 +1 @@
|
|||
invisible=1
|
||||
font=monospace 13
|
||||
background-color=#e3e0e1
|
||||
text-color=#292526
|
||||
border-size=1
|
||||
border-color=#6185ff
|
||||
icons=0
|
||||
format=%s\n%b
|
||||
anchor=bottom-right
|
||||
|
||||
[urgency=critical]
|
||||
border-color=#ff404f
|
||||
|
|
|
@ -3,3 +3,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;
|
||||
|
|
|
@ -5,4 +5,4 @@ image-display-duration=inf
|
|||
osd-level=0
|
||||
|
||||
# gpu renderer options
|
||||
background="#292526"
|
||||
background="#000000"
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# 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,4 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
|
@ -2,4 +2,8 @@
|
|||
vim.bo.tabstop = 2
|
||||
vim.bo.shiftwidth = 2
|
||||
vim.bo.expandtab = true
|
||||
vim.bo.textwidth = 72
|
||||
|
||||
-- keymaps ---------------------------------------------------------------------
|
||||
local keymap_set = vim.keymap.set
|
||||
keymap_set("n", "]h", "/\\_^#.*\\ze\\n\\{2}<esc>", {})
|
||||
keymap_set("n", "[h", "?\\_^#.*\\ze\\n\\{2}<esc>", {})
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
|
@ -0,0 +1,4 @@
|
|||
-- options ---------------------------------------------------------------------
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
|
@ -0,0 +1,22 @@
|
|||
if exists("b:current_syntax")
|
||||
unlet! b:current_syntax
|
||||
endif
|
||||
|
||||
" yaml
|
||||
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
|
||||
syn match markdownCiteKey /\(-\=@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\)/ containedin=markdownPCite,markdownICite contains=@NoSpell display
|
||||
|
||||
hi def link markdownPCite Comment
|
||||
hi def link markdownICite Comment
|
||||
hi def link markdownCiteKey markdownLabel
|
||||
hi def link markdownLabel Label
|
||||
|
||||
let b:current_syntax = "markdown"
|
||||
|
||||
" vim:set sw=2:
|
|
@ -5,22 +5,22 @@
|
|||
|
||||
-- colors ----------------------------------------------------------------------
|
||||
local C = {
|
||||
{ 0, "#292526" }, -- black
|
||||
{ 1, "#ff404f" }, -- red
|
||||
{ 2, "#00a147" }, -- green
|
||||
{ 3, "#e06e00" }, -- orange
|
||||
{ 4, "#6185ff" }, -- blue
|
||||
{ 5, "#ff3e8b" }, -- magenta
|
||||
{ 6, "#0095d7" }, -- cyan
|
||||
{ 7, "#e3e0e1" }, -- white
|
||||
{ 8, "#958a8d" }, -- black
|
||||
{ 9, "#ffb3b6" }, -- red
|
||||
{ 10, "#00e46a" }, -- green
|
||||
{ 11, "#ffb598" }, -- orange
|
||||
{ 12, "#b8c3ff" }, -- blue
|
||||
{ 13, "#ffb1c5" }, -- magenta
|
||||
{ 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, "#f4f3f3" }, -- white
|
||||
{ 15, "#ffffff" }, -- white
|
||||
}
|
||||
|
||||
local black_c = C[1]
|
||||
|
@ -50,8 +50,6 @@ else
|
|||
vim.opt.termguicolors = true
|
||||
end
|
||||
|
||||
local tty = vim.env.TERM == "linux" or vim.env.TERM == "screen.linux"
|
||||
|
||||
for _, v in ipairs(C) do
|
||||
local key = ("terminal_color_%i"):format(v[1])
|
||||
vim.g[key] = v[2]
|
||||
|
@ -70,25 +68,16 @@ end
|
|||
function H:fg(c)
|
||||
self.ctermfg = c[1]
|
||||
self.fg = c[2]
|
||||
if c[1] == 4 and tty then
|
||||
self.bold = true
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
function H:bg(c)
|
||||
self.ctermbg = c[1]
|
||||
self.bg = c[2]
|
||||
if c[1] == 4 and tty then
|
||||
self.bold = true
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
function H:attr(a)
|
||||
if tty then
|
||||
if a == "underline" then return self end
|
||||
end
|
||||
self[a] = true
|
||||
return self
|
||||
end
|
||||
|
@ -98,7 +87,8 @@ local bg_c = black_c
|
|||
local accent_c = magenta_c
|
||||
local dimmed_c = blue_c
|
||||
|
||||
local function set_hl(group, def) vim.api.nvim_set_hl(0, group, def) end
|
||||
local nvim_set_hl = vim.api.nvim_set_hl
|
||||
local function set_hl(group, def) nvim_set_hl(0, group, def) end
|
||||
|
||||
-- normal ----------------------------------------------------------------------
|
||||
local normal_h = {}
|
||||
|
@ -269,11 +259,11 @@ set_hl("DiagnosticDeprecated", diagnostic_hint_u_h)
|
|||
set_hl("DiagnosticUnnecessary", diagnostic_hint_u_h)
|
||||
|
||||
-- misc ------------------------------------------------------------------------
|
||||
set_hl("Directory", H:new():fg(blue_c):attr("bold"))
|
||||
set_hl("Directory", H:new():fg(blue_c))
|
||||
|
||||
-- syntax ----------------------------------------------------------------------
|
||||
local syntax_normal_h = {}
|
||||
local syntax_comment_h = H:new():fg(blue_c):attr("bold")
|
||||
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)
|
||||
|
@ -288,6 +278,7 @@ local syntax_warn_h = H:new():fg(black_c):bg(orange_c)
|
|||
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")
|
||||
|
||||
set_hl("Comment", syntax_comment_h)
|
||||
set_hl("Constant", syntax_constant_h)
|
||||
|
@ -328,6 +319,7 @@ set_hl("Todo", syntax_warn_h)
|
|||
set_hl("Italic", syntax_italic_h)
|
||||
set_hl("Bold", syntax_bold_h)
|
||||
set_hl("BoldItalic", syntax_bolditalic_h)
|
||||
set_hl("Strike", syntax_strike_h)
|
||||
|
||||
-- markdown --------------------------------------------------------------------
|
||||
local markdown_label_h = H:new():fg(magenta_c)
|
||||
|
@ -335,5 +327,12 @@ local markdown_delimiter_h = H:new():fg(blue_c)
|
|||
local markdown_underline_h = H:new():fg(blue_c):attr("underline")
|
||||
|
||||
set_hl("markdownLabel", markdown_label_h)
|
||||
set_hl("markdownDelimiter", markdown_delimiter_h)
|
||||
set_hl("markdownUnderlined", markdown_underline_h)
|
||||
set_hl("markdownHeadingDelimiter", markdown_delimiter_h)
|
||||
set_hl("markdownItalicDelimiter", markdown_delimiter_h)
|
||||
set_hl("markdownBoldDelimiter", markdown_delimiter_h)
|
||||
set_hl("markdownBoldItalicDelimiter", markdown_delimiter_h)
|
||||
set_hl("markdownStrikeDelimiter", markdown_delimiter_h)
|
||||
set_hl("markdownCodeDelimiter", markdown_delimiter_h)
|
||||
|
||||
set_hl("yamlBlockMappingKey", syntax_comment_h)
|
||||
set_hl("yamlPlainScalar", syntax_constant_h)
|
||||
|
|
|
@ -1,52 +1,59 @@
|
|||
local opt, api, cmd = vim.opt, vim.api, vim.cmd
|
||||
local fn, ui = vim.fn, vim.ui
|
||||
|
||||
cmd.colorscheme("basic")
|
||||
|
||||
-- options ---------------------------------------------------------------------
|
||||
-- colorscheme
|
||||
vim.cmd.colorscheme("basic")
|
||||
opt.undofile = true
|
||||
opt.backup = false
|
||||
opt.writebackup = false
|
||||
opt.mouse = {}
|
||||
opt.title = true
|
||||
|
||||
-- leader
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
vim.keymap.set({ "n", "v" }, "<space>", "<nop>", { silent = true })
|
||||
opt.shortmess:append({ I = true })
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
opt.signcolumn = "number"
|
||||
opt.textwidth = 80
|
||||
opt.colorcolumn = "+1"
|
||||
|
||||
-- general
|
||||
vim.opt.undofile = true
|
||||
vim.opt.backup = false
|
||||
vim.opt.writebackup = false
|
||||
vim.opt.mouse = {}
|
||||
vim.opt.title = true
|
||||
opt.showtabline = 2
|
||||
opt.winbar = "%f%( %h%m%r%y%)"
|
||||
opt.laststatus = 3
|
||||
|
||||
-- appearance
|
||||
vim.opt.shortmess:append({ I = true })
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.signcolumn = "number"
|
||||
vim.opt.textwidth = 80
|
||||
vim.opt.colorcolumn = "+1"
|
||||
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,
|
||||
callback = function()
|
||||
cwd = fn.pathshorten(vim.fn.getcwd())
|
||||
end
|
||||
})
|
||||
|
||||
-- tabline, winbar, statusline
|
||||
vim.opt.showtabline = 2
|
||||
vim.opt.winbar = "%f%( %h%m%r%y%)"
|
||||
vim.opt.laststatus = 3
|
||||
function _G.statusline()
|
||||
local col = vim.api.nvim_win_get_cursor(0)[2] + 1
|
||||
local char = vim.api.nvim_get_current_line():sub(col, col):gsub("%%", "%%%1")
|
||||
local wc = vim.fn.wordcount()
|
||||
return table.concat({
|
||||
vim.fn.pathshorten(vim.fn.getcwd()),
|
||||
"%=",
|
||||
"<", char, "> %b ",
|
||||
wc.visual_chars or wc.cursor_chars, "/", wc.chars, " ",
|
||||
wc.visual_words or wc.cursor_words, "/", wc.words
|
||||
cwd,
|
||||
" %=",
|
||||
" <%b> ",
|
||||
wordcount.visual_chars or wordcount.cursor_chars, "/", wordcount.chars, " ",
|
||||
wordcount.visual_words or wordcount.cursor_words, "/", wordcount.words
|
||||
})
|
||||
end
|
||||
vim.opt.statusline = "%!v:lua.statusline()"
|
||||
opt.statusline = "%!v:lua.statusline()"
|
||||
|
||||
-- behaviour
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.infercase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.whichwrap = {
|
||||
opt.ignorecase = true
|
||||
opt.infercase = true
|
||||
opt.smartcase = true
|
||||
opt.smartindent = true
|
||||
opt.clipboard = "unnamedplus"
|
||||
opt.whichwrap = {
|
||||
["b"] = true,
|
||||
["s"] = true,
|
||||
["h"] = true,
|
||||
|
@ -57,121 +64,89 @@ vim.opt.whichwrap = {
|
|||
["["] = true,
|
||||
["]"] = true
|
||||
}
|
||||
vim.opt.wildoptions = { "fuzzy" }
|
||||
vim.opt.wildignorecase = true
|
||||
opt.wildoptions = { "fuzzy" }
|
||||
opt.wildignorecase = true
|
||||
|
||||
-- path
|
||||
vim.opt.path = ".,,**"
|
||||
-- local root = vim.fs.find({ ".git" }, { upward = true })[1]
|
||||
opt.path = ".,,**"
|
||||
|
||||
-- completion
|
||||
vim.opt.completeopt = {
|
||||
opt.completeopt = {
|
||||
"menuone",
|
||||
"preview",
|
||||
"noinsert",
|
||||
"noselect"
|
||||
}
|
||||
|
||||
local terminal_group = api.nvim_create_augroup("Terminal", {})
|
||||
api.nvim_create_autocmd({ "TermOpen" }, {
|
||||
group = terminal_group,
|
||||
callback = function()
|
||||
local opt_l = vim.opt_local
|
||||
opt_l.number = false
|
||||
opt_l.relativenumber = false
|
||||
end
|
||||
})
|
||||
|
||||
-- keymaps ---------------------------------------------------------------------
|
||||
-- clear hlsearch
|
||||
vim.keymap.set( "n", "<esc>", function()
|
||||
vim.cmd.nohlsearch()
|
||||
local keymap_set = vim.keymap.set
|
||||
|
||||
keymap_set( "n", "<esc>", function()
|
||||
cmd.nohlsearch()
|
||||
end, { desc = "Stop the highlighting for the 'hlsearch' option" })
|
||||
|
||||
-- move cursor with alt in c-mode
|
||||
vim.keymap.set("c", "<m-h>", "<left>", { desc = "Left" })
|
||||
vim.keymap.set("c", "<m-l>", "<right>", { desc = "Right" })
|
||||
keymap_set("c", "<m-h>", "<left>", { desc = "Left in c-mode" })
|
||||
keymap_set("c", "<m-l>", "<right>", { desc = "Right in c-mode" })
|
||||
|
||||
-- move cursor with alt in i-mode
|
||||
vim.keymap.set("i", "<m-h>", "<left>", { desc = "Left" })
|
||||
vim.keymap.set("i", "<m-j>", "<down>", { desc = "Down" })
|
||||
vim.keymap.set("i", "<m-k>", "<up>", { desc = "Up" })
|
||||
vim.keymap.set("i", "<m-l>", "<right>", { desc = "Right" })
|
||||
keymap_set("n", "<leader>f", ":find ", { desc = ":find" })
|
||||
keymap_set("n", "<leader>b", ":buffer ", { desc = ":buffer" })
|
||||
keymap_set("n", "<leader>h", ":help ", { desc = ":help" })
|
||||
|
||||
-- move cursor with alt in t-mode
|
||||
vim.keymap.set("t", "<m-h>", "<left>", { desc = "Left" })
|
||||
vim.keymap.set("t", "<m-j>", "<down>", { desc = "Down" })
|
||||
vim.keymap.set("t", "<m-k>", "<up>", { desc = "Up" })
|
||||
vim.keymap.set("t", "<m-l>", "<right>", { desc = "Right" })
|
||||
|
||||
-- navigate windows
|
||||
vim.keymap.set("n", "<c-h>", "<c-w>h", { desc = "Navigate window left"})
|
||||
vim.keymap.set("n", "<c-j>", "<c-w>j", { desc = "Navigate window down"})
|
||||
vim.keymap.set("n", "<c-k>", "<c-w>k", { desc = "Navigate window up"})
|
||||
vim.keymap.set("n", "<c-l>", "<c-w>l", { desc = "Navigate window right"})
|
||||
vim.keymap.set("i", "<c-h>", "<c-\\><c-n><c-w>h", { desc = "Navigate window left"})
|
||||
vim.keymap.set("i", "<c-j>", "<c-\\><c-n><c-w>j", { desc = "Navigate window down"})
|
||||
vim.keymap.set("i", "<c-k>", "<c-\\><c-n><c-w>k", { desc = "Navigate window up"})
|
||||
vim.keymap.set("i", "<c-l>", "<c-\\><c-n><c-w>l", { desc = "Navigate window right"})
|
||||
vim.keymap.set("t", "<c-h>", "<c-\\><c-n><c-w>h", { desc = "Navigate window left"})
|
||||
vim.keymap.set("t", "<c-j>", "<c-\\><c-n><c-w>j", { desc = "Navigate window down"})
|
||||
vim.keymap.set("t", "<c-k>", "<c-\\><c-n><c-w>k", { desc = "Navigate window up"})
|
||||
vim.keymap.set("t", "<c-l>", "<c-\\><c-n><c-w>l", { desc = "Navigate window right"})
|
||||
|
||||
-- navigate buffer
|
||||
vim.keymap.set("n", "<c-d>", "<c-d>zz")
|
||||
vim.keymap.set("n", "<c-u>", "<c-u>zz")
|
||||
|
||||
-- cmdline history navigation
|
||||
vim.keymap.set("c", "<c-p>", "<up>")
|
||||
vim.keymap.set("c", "<c-n>", "<down>")
|
||||
|
||||
-- menus
|
||||
vim.keymap.set("n", "<leader>f", ":find ", { desc = ":find" })
|
||||
vim.keymap.set("n", "<leader>b", ":buffer ", { desc = ":buffer" })
|
||||
vim.keymap.set("n", "<leader>h", ":help ", { desc = ":help" })
|
||||
|
||||
-- spell
|
||||
vim.keymap.set("n", "<leader>s", function()
|
||||
keymap_set("n", "<leader>s", function()
|
||||
vim.opt_local.spell = not(vim.opt_local.spell:get())
|
||||
end, { desc = "Toggle spell" })
|
||||
|
||||
-- make
|
||||
vim.keymap.set("n", "<leader>m", "<cmd>make<cr>", { desc = ":make" })
|
||||
keymap_set("n", "<leader>m", "<cmd>make<cr>", { desc = ":make" })
|
||||
|
||||
-- buffers ---------------------------------------------------------------------
|
||||
vim.keymap.set("n", "]b", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
||||
vim.keymap.set("n", "[b", "<cmd>bprev<cr>", { desc = "Previous buffer" })
|
||||
vim.keymap.set("n", "<leader>d", "<cmd>enew<cr><cmd>bd #<cr>", { desc = "Delete buffer" })
|
||||
vim.keymap.set("n", "<leader>D", "<cmd>bd<cr>", { desc = "Delete buffer and close window" })
|
||||
keymap_set("n", "<leader>d", "<cmd>enew<cr><cmd>bd #<cr>", { desc = "Delete buffer" })
|
||||
keymap_set("n", "<leader>D", "<cmd>bd<cr>", { desc = "Delete buffer and close window" })
|
||||
|
||||
-- tabs ------------------------------------------------------------------------
|
||||
vim.keymap.set("n", "]t", "<cmd>tabnext<cr>", { desc = "Next tab" })
|
||||
vim.keymap.set("n", "[t", "<cmd>tabprevious<cr>", { desc = "Previous tab" })
|
||||
keymap_set("n", "]b", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
||||
keymap_set("n", "[b", "<cmd>bprev<cr>", { desc = "Previous buffer" })
|
||||
keymap_set("n", "]t", "<cmd>tabnext<cr>", { desc = "Next tab" })
|
||||
keymap_set("n", "[t", "<cmd>tabprevious<cr>", { desc = "Previous tab" })
|
||||
keymap_set("n", "]q", "<cmd>cnext<cr>zz", { desc = "Next quickfix item" })
|
||||
keymap_set("n", "[q", "<cmd>cprev<cr>zz", { desc = "Previous quickfix item" })
|
||||
|
||||
-- vimgrep ---------------------------------------------------------------------
|
||||
vim.keymap.set("n", "<leader>g", ":vimgrep / **/*<c-left><c-left>/")
|
||||
keymap_set("n", "<leader>co", "<cmd>copen<cr>", { desc = "Open quickfix window" })
|
||||
keymap_set("n", "<leader>cc", "<cmd>cclose<cr>", { desc = "Close quickfix window" })
|
||||
|
||||
local vimgrep_group = vim.api.nvim_create_augroup("Vimgrep", {})
|
||||
vim.api.nvim_create_autocmd("QuickfixCmdPost", {
|
||||
group = vimgrep_group,
|
||||
pattern = "vimgrep",
|
||||
desc = "Open quickfix window after :vimgrep",
|
||||
command = "copen"
|
||||
})
|
||||
|
||||
-- quickfix --------------------------------------------------------------------
|
||||
vim.keymap.set("n", "co", "<cmd>copen<cr>", { desc = "Open quickfix window" })
|
||||
vim.keymap.set("n", "cc", "<cmd>cclose<cr>", { desc = "Close quickfix window" })
|
||||
vim.keymap.set("n", "]q", "<cmd>cnext<cr>zz", { desc = "Next quickfix item" })
|
||||
vim.keymap.set("n", "[q", "<cmd>cprev<cr>zz", { desc = "Previous quickfix item" })
|
||||
keymap_set("n", "<leader>g", function()
|
||||
local pattern
|
||||
ui.input({ prompt = ":vimgrep " }, function(input)
|
||||
if not input then return end
|
||||
if input:match("/.+/[gjf]*") then
|
||||
pattern = input
|
||||
else
|
||||
pattern = ("/%s/g"):format(input)
|
||||
end
|
||||
end)
|
||||
if not pattern then return end
|
||||
local file
|
||||
ui.input({
|
||||
prompt = (":vimgrep %s "):format(pattern),
|
||||
default = "**/*"
|
||||
}, function(input)
|
||||
if not input then return end
|
||||
file = input
|
||||
end)
|
||||
if not file then return end
|
||||
cmd.vimgrep(pattern, file)
|
||||
end)
|
||||
|
||||
-- netrw -----------------------------------------------------------------------
|
||||
vim.g.netrw_use_errorwindow = 0
|
||||
vim.g.netrw_banner = 0
|
||||
vim.g.netrw_bufsettings = "noma nomod nowrap ro nobl"
|
||||
vim.g.netrw_fastbrowse = 0
|
||||
local g = vim.g
|
||||
|
||||
vim.keymap.set("n", "<leader>.", "<cmd>Explore .<cr>",
|
||||
g.netrw_use_errorwindow = 0
|
||||
g.netrw_banner = 0
|
||||
g.netrw_bufsettings = "noma nomod nowrap ro nobl"
|
||||
g.netrw_fastbrowse = 0
|
||||
|
||||
keymap_set("n", "<leader>.", "<cmd>Explore .<cr>",
|
||||
{ desc = "Explore current working directory" })
|
||||
|
||||
local netrw_group = vim.api.nvim_create_augroup("Netrw", {})
|
||||
vim.api.nvim_create_autocmd("Filetype", {
|
||||
group = netrw_group,
|
||||
pattern = "netrw",
|
||||
desc = "Set keymap netrw buffers",
|
||||
callback = function()
|
||||
vim.keymap.set("n", "<esc>", "<cmd>Rexplore<cr>",
|
||||
{ buffer = true, desc = "Return to/from Explorer" })
|
||||
end
|
||||
})
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
gl
|
||||
# kratice
|
||||
gl.
|
||||
|
|
Binary file not shown.
|
@ -1,276 +0,0 @@
|
|||
" Vim syntax file
|
||||
" Language: Markdown
|
||||
" Maintainer: urosm <urosm@kompot.si>
|
||||
" Last Change: 2024 Jan 13
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/html.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
syntax spell toplevel
|
||||
|
||||
" comment
|
||||
syn region markdownHTMLComment start=/<!--\s\=/ end=/\s\=-->/ keepend
|
||||
hi def link markdownHTMLComment markdownComment
|
||||
|
||||
" titleblock
|
||||
syn region markdownTitleBlock start=/\%^%/ end=/\n\n/ contains=markdownTitleBlockDelimiter
|
||||
hi def link markdownTitleBlock markdownBold
|
||||
syn match markdownTitleBlockDelimiter /%\ / contained
|
||||
hi def link markdownTitleBlockDelimiter markdownDelimiter
|
||||
|
||||
" blockquote
|
||||
syn match markdownBlockquote /\_^\(\s*>\)\+/ containedin=markdownItalic,markdownBold,markdownPCite,markdownSuperscript,markdownSubscript,markdownStrike,markdownUListItem,markdownNoFormatted
|
||||
hi def link markdownBlockquote markdownDelimiter
|
||||
|
||||
" link
|
||||
syn match markdownLink /!\=\[.\{-}\](.\{-})/ contains=markdownLinkLabel,markdownLinkURL
|
||||
hi def link markdownLink markdownDelimiter
|
||||
syn match markdownLinkLabel /\[\@1<=[^\]]\+/ contained
|
||||
hi def link markdownLinkLabel markdownLabel
|
||||
syn match markdownLinkURL /(\@1<=[^)]\+/ contained
|
||||
hi def link markdownLinkURL markdownUnderlined
|
||||
|
||||
" automatic link
|
||||
syn match markdownAutomaticLink /<\(https\{0,1}.\{-}\|[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~.]\{-}@[A-Za-z0-9\-]\{-}\.\w\{-}\)>/ contains=NONE
|
||||
hi def link markdownAutomaticLink markdownUnderlined
|
||||
|
||||
" wikilink
|
||||
syn region markdownWikilink start=/\[\[/ end=/\]\]/ contains=markdownWikilinkLabel,markdownWikilinkURL keepend display
|
||||
hi def link markdownWikilink markdownDelimiter
|
||||
syn match markdownWikilinkLabel /\(\[\[\)\@2<=[^\|\[\]]\+/ contained
|
||||
hi def link markdownWikilinkLabel markdownLabel
|
||||
syn match markdownWikilinkURL /|\@1<=[^\]]\+/ contained
|
||||
hi def link markdownWikilinkURL markdownUnderlined
|
||||
|
||||
" definition
|
||||
syn region markdownReferenceDefinition start=/\[.\{-}\]:/ end=/\(\n\s*".*"$\|$\)/ keepend
|
||||
hi def link markdownReferenceDefinition markdownDelimiter
|
||||
syn match markdownReferenceDefinitionLabel /\[\zs.\{-}\ze\]:/ contained containedin=markdownReferenceDefinition display
|
||||
hi def link markdownReferenceDefinitionLabel markdownLabel
|
||||
syn match markdownReferenceDefinitionURL /:\s*\zs.*/ contained containedin=markdownReferenceDefinition
|
||||
hi def link markdownReferenceDefinitionURL markdownUnderlined
|
||||
syn match markdownReferenceDefinitionTitle /\s*".\{-}"/ contained containedin=markdownReferenceDefinition,markdownReferenceDefinitionURL contains=@Spell,markdownAmpersandEscape
|
||||
hi def link markdownReferenceDefinitionTitle markdownTitle
|
||||
|
||||
" citation
|
||||
syn match markdownPCite "\^\@<!\[[^\[\]]\{-}-\{0,1}@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*.\{-}\]" contains=markdownItalic,markdownBold,markdownLatex,markdownCiteKey,@Spell,markdownAmpersandEscape
|
||||
syn match markdownICite "@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\s\[.\{-1,}\]" contains=markdownCiteKey,@Spell display
|
||||
syn match markdownCiteKey /\(-\=@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\)/ containedin=markdownPCite,markdownICite contains=@NoSpell display
|
||||
hi def link markdownCiteKey markdownLabel
|
||||
syn match markdownCiteLocator /[\[\]]/ contained containedin=markdownPCite,markdownICite
|
||||
hi def link markdownCiteLocator markdownDelimiter
|
||||
|
||||
" italic
|
||||
syn region markdownItalic matchgroup=markdownDelimiter start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\*\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,markdownNoFormattedInEmphasis,markdownLatexInlineMath,markdownAmpersandEscape
|
||||
syn region markdownItalic matchgroup=markdownDelimiter start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@1<=_\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,markdownNoFormattedInEmphasis,markdownLatexInlineMath,markdownAmpersandEscape
|
||||
hi def link markdownItalic htmlItalic
|
||||
|
||||
" bold
|
||||
syn region markdownBold matchgroup=markdownDelimiter start=/\(\\\@<!\*\)\{2}/ end=/\(\\\@<!\*\)\{2}/ contains=@Spell,markdownNoFormattedInStrong,markdownLatexInlineMath,markdownAmpersandEscape
|
||||
syn region markdownBold matchgroup=markdownDelimiter start=/__/ end=/__/ contains=@Spell,markdownNoFormattedInStrong,markdownLatexInlineMath,markdownAmpersandEscape
|
||||
hi def link markdownBold htmlBold
|
||||
|
||||
" bold italic
|
||||
syn region markdownBoldItalic matchgroup=markdownDelimiter start=/\*\{3}\(\S[^*]*\(\*\S\|\n[^*]*\*\S\)\)\@=/ end=/\S\@<=\*\{3}/ contains=@Spell,markdownAmpersandEscape
|
||||
syn region markdownBoldItalic matchgroup=markdownDelimiter start=/\(___\)\S\@=/ end=/\S\@<=___/ contains=@Spell,markdownAmpersandEscape
|
||||
hi def link markdownBoldItalic htmlBoldItalic
|
||||
syn region markdownBoldInItalic matchgroup=markdownDelimiter start=/\*\*/ end=/\*\*/ contained containedin=markdownItalic contains=@Spell,markdownAmpersandEscape
|
||||
syn region markdownBoldInItalic matchgroup=markdownDelimiter start=/__/ end=/__/ contained containedin=markdownItalic contains=@Spell,markdownAmpersandEscape
|
||||
syn region markdownItalicInBold matchgroup=markdownDelimiter start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=\*\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=markdownBold contains=@Spell,markdownAmpersandEscape
|
||||
syn region markdownItalicInBold matchgroup=markdownDelimiter start=/\\\@<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=_\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=markdownBold contains=@Spell,markdownAmpersandEscape
|
||||
hi def link markdownBoldInItalic markdownBoldItalic
|
||||
hi def link markdownItalicInBold markdownBoldItalic
|
||||
|
||||
" strikeout
|
||||
syn region markdownStrike start=/\~\~/ end=/\~\~/ contains=markdownStrikeout,@Spell keepend
|
||||
hi def link markdownStrike htmlStrike
|
||||
syn match markdownStrikeDelimiter /\~\~/ contained
|
||||
hi def link markdownStrikeDelimiter markdownDelimiter
|
||||
|
||||
" subscript
|
||||
syn region markdownSubscript start=/\~\(\([[:graph:]]\(\\ \)\=\)\{-}\~\)\@=/ end=/\~/ contains=markdownSubscriptDelimiter keepend
|
||||
syn match markdownSubscriptDelimiter /\~/ contained
|
||||
hi def link markdownSubscriptDelimiter markdownDelimiter
|
||||
|
||||
" superscript
|
||||
syn region markdownSuperscript start=/\^\(\([[:graph:]]\(\\ \)\=\)\{-}\^\)\@=/ skip=/\\ / end=/\^/ contains=markdownSuperscriptDelimiter keepend
|
||||
syn match markdownSuperscriptDelimiter /\^/ contained
|
||||
hi def link markdownSuperscriptDelimiter markdownDelimiter
|
||||
|
||||
" heading
|
||||
syn match markdownAtxHeading /\(\%^\|<.\+>.*\n\|^\s*\n\)\@<=#\{1,6}.*\n/ contains=markdownItalic,markdownBold,markdownNoFormatted,markdownLaTeXInlineMath,markdownEscapedDollar,@Spell,markdownAmpersandEscape,markdownLink display
|
||||
hi def link markdownAtxHeading Title
|
||||
syn match markdownAtxHeadingDelimiter /\(^#\{1,6}\|\\\@<!#\+\(\s*.*$\)\@=\)/ contained containedin=markdownAtxHeading
|
||||
hi def link markdownAtxHeadingDelimiter markdownDelimiter
|
||||
syn match markdownSetexHeading /^.\+\n[=]\+$/ contains=markdownItalic,markdownBold,markdownNoFormatted,markdownLaTeXInlineMath,markdownEscapedDollar,@Spell,markdownAmpersandEscape
|
||||
syn match markdownSetexHeading /^.\+\n[-]\+$/ contains=markdownItalic,markdownBold,markdownNoFormatted,markdownLaTeXInlineMath,markdownEscapedDollar,@Spell,markdownAmpersandEscape
|
||||
syn match markdownHeadingAttr /{.*}/ contained containedin=markdownAtxHeader,markdownSetexHeader
|
||||
syn match markdownHeadingID /#[-_:.[:lower:][:upper:]]*/ contained containedin=markdownHeaderAttr
|
||||
hi def link markdownSetexHeading markdownTitle
|
||||
hi def link markdownHeadingAttr markdownComment
|
||||
hi def link markdownHeadingID markdownIdentifier
|
||||
|
||||
" line block
|
||||
syn region markdownLineBlock start=/^|/ end=/\(^|\(.*\n|\@!\)\@=.*\)\@<=\n/ transparent
|
||||
syn match markdownLineBlockDelimiter /^|/ contained containedin=markdownLineBlock
|
||||
hi def link markdownLineBlockDelimiter markdownDelimiter
|
||||
|
||||
" simple table
|
||||
syn region markdownSimpleTable start=/\%#=2\(^.*[[:graph:]].*\n\)\@<!\(^.*[[:graph:]].*\n\)\(-\{2,}\s*\)\+\n\n\@!/ end=/\n\n/ containedin=ALLBUT,markdownDelimitedCodeBlock,markdownDelimitedCodeBlockStart,markdownYAMLHeader keepend
|
||||
syn match markdownSimpleTableDelims /\-/ contained containedin=markdownSimpleTable
|
||||
syn match markdownSimpleTableHeader /\%#=2\(^.*[[:graph:]].*\n\)\@<!\(^.*[[:graph:]].*\n\)/ contained containedin=markdownSimpleTable
|
||||
hi def link markdownSimpleTableDelims markdownDelimiter
|
||||
hi def link markdownSimpleTableHeader markdownBold
|
||||
|
||||
syn region markdownTable start=/\%#=2^\(-\{2,}\s*\)\+\n\n\@!/ end=/\%#=2^\(-\{2,}\s*\)\+\n\n/ containedin=ALLBUT,markdownDelimitedCodeBlock,markdownYAMLHeader keepend
|
||||
syn match markdownTableDelims /\-/ contained containedin=markdownTable
|
||||
syn region markdownTableMultilineHeader start=/\%#=2\(^-\{2,}\n\)\@<=./ end=/\%#=2\n-\@=/ contained containedin=markdownTable
|
||||
hi def link markdownTableMultilineHeader markdownBold
|
||||
hi def link markdownTableDelims markdownDelimiter
|
||||
|
||||
" grid table
|
||||
syn region markdownGridTable start=/\%#=2\n\@1<=+-/ end=/+\n\n/ containedin=ALLBUT,markdownDelimitedCodeBlock,markdownYAMLHeader keepend
|
||||
syn match markdownGridTableDelims /[\|=]/ contained containedin=markdownGridTable
|
||||
syn match markdownGridTableDelims /\%#=2\([\-+][\-+=]\@=\|[\-+=]\@1<=[\-+]\)/ contained containedin=markdownGridTable
|
||||
syn match markdownGridTableHeader /\%#=2\(^.*\n\)\(+=.*\)\@=/ contained containedin=markdownGridTable
|
||||
hi def link markdownGridTableDelims markdownDelimiter
|
||||
hi def link markdownGridTableHeader markdownDelimiter
|
||||
|
||||
" pipe table
|
||||
syn region markdownPipeTable start=/\%#=2\([+|]\n\)\@<!\n\@1<=|\(.*|\)\@=/ end=/|.*\n\(\n\|{\)/ containedin=ALLBUT,markdownDelimitedCodeBlock,markdownYAMLHeader keepend
|
||||
syn region markdownPipeTable start=/\%#=2^.*\n-.\{-}|/ end=/|.*\n\n/ keepend
|
||||
syn match markdownPipeTableDelims /[\|\-:+]/ contained containedin=markdownPipeTable
|
||||
syn match markdownPipeTableHeader /\(^.*\n\)\(|-\)\@=/ contained containedin=markdownPipeTable
|
||||
syn match markdownPipeTableHeader /\(^.*\n\)\(-\)\@=/ contained containedin=markdownPipeTable
|
||||
hi def link markdownPipeTableDelims markdownDelimiter
|
||||
hi def link markdownPipeTableHeader markdownDelimiter
|
||||
|
||||
syn match markdownTableHeaderWord /\<.\{-}\>/ contained containedin=markdownGridTableHeader,markdownPipeTableHeader contains=@Spell
|
||||
hi def link markdownTableHeaderWord markdownBold
|
||||
|
||||
|
||||
" delimited code blocks
|
||||
syn region markdownDelimitedCodeBlock start=/^\(>\s\)\?\z(\([ ]\+\|\t\)\=\~\{3,}\~*\)/ end=/^\z1\~*/ skipnl contains=markdownDelimitedCodeBlockStart,markdownDelimitedCodeBlockEnd keepend
|
||||
syn region markdownDelimitedCodeBlock start=/^\(>\s\)\?\z(\([ ]\+\|\t\)\=`\{3,}`*\)/ end=/^\z1`*/ skipnl contains=markdownDelimitedCodeBlockStart,markdownDelimitedCodeBlockEnd keepend
|
||||
syn match markdownDelimitedCodeBlockStart /\(\(\_^\n\_^\|\%^\)\(>\s\)\?\( \+\|\t\)\=\)\@<=\(\~\{3,}\~*\|`\{3,}`*\)/ contained containedin=markdownDelimitedCodeBlock nextgroup=markdownDelimitedCodeBlockLanguage
|
||||
syn match markdownDelimitedCodeBlockLanguage /\(\s\?\)\@<=.\+\(\_$\)\@=/ contained
|
||||
syn match markdownDelimitedCodeBlockEnd /\(`\{3,}`*\|\~\{3,}\~*\)\(\_$\n\(>\s\)\?\_$\)\@=/ contained containedin=markdownDelimitedCodeBlock
|
||||
syn match markdownBlockquoteinDelimitedCodeBlock '^>' contained containedin=markdownDelimitedCodeBlock
|
||||
syn match markdownCodePre /<pre>.\{-}<\/pre>/ skipnl
|
||||
syn match markdownCodePre /<code>.\{-}<\/code>/ skipnl
|
||||
hi def link markdownDelimitedCodeBlock markdownSpecial
|
||||
hi def link markdownDelimitedCodeBlockStart markdownDelimiter
|
||||
hi def link markdownDelimitedCodeBlockEnd markdownDelimiter
|
||||
hi def link markdownDelimitedCodeBlockLanguage markdownComment
|
||||
hi def link markdownBlockquoteinDelimitedCodeBlock markdownBlockquote
|
||||
hi def link markdownCodePre markdownString
|
||||
|
||||
" footnote
|
||||
syn match markdownFootnoteID /\[\^[^\]]\+\]/ nextgroup=markdownFootnoteDef
|
||||
hi def link markdownFootnoteID markdownLabel
|
||||
|
||||
" inline footnote
|
||||
syn region markdownFootnoteDef start=/\^\[/ skip=/\[.\{-}]/ end=/\]/ contains=markdownLink,markdownLatex,markdownPCite,markdownCiteKey,markdownBold,markdownItalic,markdownBoldItalic,markdownNoFormatted,markdownSuperscript,markdownSubscript,markdownStrike,markdownEnDash,markdownEmDash,markdownEllipses,markdownBeginQuote,markdownEndQuote,@Spell,markdownAmpersandEscape skipnl keepend
|
||||
hi def link markdownFootnoteDef markdownComment
|
||||
syn match markdownFootnoteDefHead /\^\[/ contained containedin=markdownFootnoteDef
|
||||
hi def link markdownFootnoteDefHead markdownDelimiter
|
||||
syn match markdownFootnoteDefTail /\]/ contained containedin=markdownFootnoteDef
|
||||
hi def link markdownFootnoteDefTail markdownDelimiter
|
||||
|
||||
" regular footnotes
|
||||
syn region markdownFootnoteBlock start=/\[\^.\{-}\]:\s*\n*/ end=/^\n^\s\@!/ contains=markdownLink,markdownLatex,markdownPCite,markdownCiteKey,markdownBold,markdownItalic,markdownNoFormatted,markdownSuperscript,markdownSubscript,markdownStrike,markdownEnDash,markdownEmDash,markdownNewLine,markdownBoldItalic,markdownEllipses,markdownBeginQuote,markdownEndQuote,markdownLaTeXInlineMath,markdownEscapedDollar,markdownLaTeXCommand,markdownLaTeXMathBlock,markdownLaTeXRegion,markdownAmpersandEscape,@Spell skipnl
|
||||
syn match markdownFootnoteBlockSeparator /:/ contained containedin=markdownFootnoteBlock
|
||||
hi def link markdownFootnoteBlockSeparator markdownDelimiter
|
||||
syn match markdownFootnoteID /\[\^.\{-}\]/ contained containedin=markdownFootnoteBlock
|
||||
syn match markdownFootnoteIDHead /\[\^/ contained containedin=markdownFootnoteID
|
||||
hi def link markdownFootnoteIDHead markdownDelimiter
|
||||
syn match markdownFootnoteIDTail /\]/ contained containedin=markdownFootnoteID
|
||||
hi def link markdownFootnoteIDTail markdownDelimiter
|
||||
|
||||
" unordered list
|
||||
syn match markdownUListItem /^>\=\s*[*+-]\s\+-\@!.*$/ nextgroup=markdownUListItem,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownDelimitedCodeBlock,markdownListItemContinuation contains=@Spell,markdownItalic,markdownBold,markdownNoFormatted,markdownStrike,markdownSubscript,markdownSuperscript,markdownBoldItalic,markdownBoldItalic,markdownPCite,markdownICite,markdownCiteKey,markdownLinkText,markdownLaTeXCommand,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownLinkURL,markdownAutomaticLink,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID,markdownAmpersandEscape skipempty display
|
||||
syn match markdownUListItemBullet /^>\=\s*\zs[*+-]/ contained containedin=markdownUListItem
|
||||
hi def link markdownUListItemBullet markdownOperator
|
||||
|
||||
" ordered list
|
||||
syn match markdownListItem /^\s*(\?\(\d\+\|\l\|\#\|@\)[.)].*$/ nextgroup=markdownListItem,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownDelimitedCodeBlock,markdownListItemContinuation contains=@Spell,markdownItalic,markdownBold,markdownNoFormatted,markdownStrike,markdownSubscript,markdownSuperscript,markdownBoldItalic,markdownBoldItalic,markdownPCite,markdownICite,markdownCiteKey,markdownLinkText,markdownLaTeXCommand,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownAutomaticLink,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID,markdownAmpersandEscape skipempty display
|
||||
syn match markdownListItem /^\s*(\?x\=l\=\(i\{,3}[vx]\=\)\{,3}c\{,3}[.)].*$/ nextgroup=markdownListItem,markdownMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownDelimitedCodeBlock,markdownListItemContinuation,markdownAutomaticLink skipempty display
|
||||
syn match markdownListItemBullet /^(\?.\{-}[.)]/ contained containedin=markdownListItem
|
||||
syn match markdownListItemBulletId /\(\d\+\|\l\|\#\|@.\{-}\|x\=l\=\(i\{,3}[vx]\=\)\{,3}c\{,3}\)/ contained containedin=markdownListItemBullet
|
||||
hi def link markdownListItemBullet markdownOperator
|
||||
hi def link markdownListItemBulletId markdownIdentifier
|
||||
|
||||
syn match markdownListItemContinuation /^\s\+\([-+*]\s\+\|(\?.\+[).]\)\@<!\([[:upper:][:lower:]_"[]\|\*\S\)\@=.*$/ nextgroup=markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownDelimitedCodeBlock,markdownListItemContinuation,markdownListItem contains=@Spell,markdownItalic,markdownBold,markdownNoFormatted,markdownStrike,markdownSubscript,markdownSuperscript,markdownBoldItalic,markdownBoldItalic,markdownPCite,markdownICite,markdownCiteKey,markdownLink,markdownLaTeXCommand,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownAutomaticLink,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID,markdownAmpersandEscape contained skipempty display
|
||||
|
||||
" definition list
|
||||
syn region markdownDefinitionBlock start=/^\%(\_^\s*\([`~]\)\1\{2,}\)\@!.*\n\(^\s*\n\)\=\s\{0,2}\([:~]\)\(\3\{2,}\3*\)\@!/ skip=/\n\n\zs\s/ end=/\n\n/ contains=markdownDefinitionBlockDelimiter,markdownDefinitionBlockTerm,markdownCodeBlockInsideIndent,markdownItalic,markdownBold,markdownBoldItalic,markdownNoFormatted,markdownStrike,markdownSubscript,markdownSuperscript,markdownFootnoteID,markdownLinkURL,markdownLinkText,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownAutomaticLink,markdownEmDash,markdownEnDash,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID
|
||||
syn match markdownDefinitionBlockTerm /^.*\n\(^\s*\n\)\=\(\s*[:~]\)\@=/ contained contains=markdownNoFormatted,markdownItalic,markdownBold,markdownLaTeXInlineMath,markdownEscapedDollar,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID nextgroup=markdownDefinitionBlockDelimiter
|
||||
syn match markdownDefinitionBlockDelimiter /^\s*[:~]/ contained
|
||||
hi def link markdownDefinitionBlockTerm markdownIdentifier
|
||||
hi def link markdownDefinitionBlockDelimiter markdownDelimiter
|
||||
|
||||
" new line
|
||||
syn match markdownNewLine /\%(\%(\S\)\@<= \{2,}\|\\\)$/ display containedin=markdownItalic,markdownBold,markdownBoldItalic,markdownBoldInItalic,markdownItalicInBold
|
||||
hi def link markdownNewLine Error
|
||||
|
||||
" rule
|
||||
syn match markdownHRule /^\s*\([*\-_]\)\s*\%(\1\s*\)\{2,}$/ display
|
||||
hi def link markdownHRule markdownDelimiter
|
||||
|
||||
" &-escape
|
||||
syn match markdownAmpersandEscape /\v\&(#\d+|#x\x+|[[:alnum:]]+)\;/ contains=NoSpell
|
||||
hi def link markdownAmpersandEscape Special
|
||||
|
||||
" yaml
|
||||
syn include @YAML syntax/yaml.vim
|
||||
unlet! b:current_syntax
|
||||
syn region markdownYAMLHeader start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/^\([-.]\)\1\{2}$/ keepend contains=@YAML containedin=TOP
|
||||
|
||||
" Styling
|
||||
hi def link markdownComment Comment
|
||||
hi def link markdownConstant Constant
|
||||
hi def link markdownString String
|
||||
hi def link markdownCharacter Character
|
||||
hi def link markdownNumber Number
|
||||
hi def link markdownBoolean Boolean
|
||||
hi def link markdownFloat Float
|
||||
hi def link markdownIdentifier Identifier
|
||||
hi def link markdownFunction Function
|
||||
hi def link markdownStatement Statement
|
||||
hi def link markdownConditional Conditional
|
||||
hi def link markdownRepeat Repeat
|
||||
hi def link markdownLabel Label
|
||||
hi def link markdownOperator Operator
|
||||
hi def link markdownKeyword Keyword
|
||||
hi def link markdownException Exception
|
||||
hi def link markdownPreProc PreProc
|
||||
hi def link markdownInclude Include
|
||||
hi def link markdownDefine Define
|
||||
hi def link markdownMacro Macro
|
||||
hi def link markdownPreCondit PreCondit
|
||||
hi def link markdownType Type
|
||||
hi def link markdownStorageClass StorageClass
|
||||
hi def link markdownStructure Structure
|
||||
hi def link markdownTypedef Typedef
|
||||
hi def link markdownSpecial Special
|
||||
hi def link markdownSpecialChar SpecialChar
|
||||
hi def link markdownTag Tag
|
||||
hi def link markdownDelimiter Delimiter
|
||||
hi def link markdownSpecialComment SpecialComment
|
||||
hi def link markdownDebug Debug
|
||||
hi def link markdownUnderlined Underlined
|
||||
hi def link markdownIgnore Ignore
|
||||
|
||||
hi def link markdownItalic htmlItalic
|
||||
hi def link markdownBold htmlBold
|
||||
hi def link markdownItalicBold htmlItalicBold
|
||||
hi def link markdownStrike htmlStrike
|
||||
hi def link markdownTitle Title
|
||||
|
||||
let b:current_syntax = "markdown"
|
||||
|
||||
" vim:set sw=2:
|
|
@ -1,190 +1,241 @@
|
|||
# variables ####################################################################
|
||||
set $mod Mod4
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
# set ##########################################################################
|
||||
|
||||
# keys
|
||||
set $mod mod4
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
# workspaces
|
||||
set $ws1 1:www
|
||||
set $ws2 2:txt
|
||||
set $ws3 3:doc
|
||||
set $ws4 4:pdf
|
||||
set $ws5 5:cmd
|
||||
set $ws6 6:cmd
|
||||
set $ws7 7:cmd
|
||||
set $ws8 8:cmd
|
||||
set $ws9 9:cmd
|
||||
set $ws0 10:rdp
|
||||
|
||||
# colors
|
||||
set $bg #292526
|
||||
set $dimmed #6185ff
|
||||
set $accent #ff3e8b
|
||||
set $error #ff404f
|
||||
set $black #000000
|
||||
set $white #e2e2e2
|
||||
set $blue #856cff
|
||||
set $magenta #ff1170
|
||||
set $red #fa3500
|
||||
|
||||
# key bindings #################################################################
|
||||
bindsym $mod+return exec footclient
|
||||
bindsym $mod+shift+return exec foot
|
||||
bindsym $mod+w exec firefox
|
||||
bindsym $mod+shift+w exec thunderbird
|
||||
# fuzzel
|
||||
bindsym $mod+space exec fuzzel
|
||||
bindsym $mod+shift+space exec find -not -path "*/.*" | fuzzel -d | xargs -I{} xdg-open "{}"
|
||||
bindsym $mod+insert exec lsblk -nrpo"name,type,mountpoint" \
|
||||
| awk '$2=="part"{printf"%-12s %s\\n",$1,$3}' \
|
||||
| fuzzel -d \
|
||||
| awk '{printf($2=="")?"udisksctl mount -b %s":"udisksctl unmount -b %s",$1}' \
|
||||
| sh \
|
||||
| xargs -I{} notify-send "{}"
|
||||
bindsym $mod+home exec nmcli -g "type,name,active" connection show \
|
||||
| awk 'BEGIN{FS=":"}{printf($3=="yes")?"* %s\\n":" %s\\n",$2}' \
|
||||
| fuzzel -d \
|
||||
| awk '{printf($1=="*")?"nmcli connection down \\"%s\\"":"nmcli connection up \\"%s\\"",substr($0,3)}' \
|
||||
| sh \
|
||||
| xargs -I{} notify-send "{}"
|
||||
bindsym $mod+shift+home exec footclient nmtui
|
||||
# makoctl
|
||||
bindsym $mod+x exec makoctl dismiss
|
||||
bindsym $mod+shift+x exec makoctl dismiss -a
|
||||
bindsym --to-code $mod+z exec makoctl restore
|
||||
# screenshot
|
||||
bindsym print exec grim - | wl-copy
|
||||
# workspaces
|
||||
set $wsq 0:q:cmd
|
||||
set $wsw 1:w:www
|
||||
set $wse 2:e:txt
|
||||
set $wsr 3:r:doc
|
||||
set $wst 4:t:cmd
|
||||
set $wsy 5:y:cmd
|
||||
set $wsu 6:u:cmd
|
||||
set $wsi 7:i:cmd
|
||||
set $wso 8:o:cmd
|
||||
set $wsp 9:p:rdp
|
||||
|
||||
# window management ############################################################
|
||||
workspace_layout tabbed
|
||||
focus_follows_mouse yes
|
||||
focus_wrapping yes
|
||||
floating_modifier $mod normal
|
||||
# kill
|
||||
bindsym $mod+q kill
|
||||
# move focus
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$right focus right
|
||||
# move container
|
||||
bindsym $mod+shift+$up move up
|
||||
bindsym $mod+shift+$down move down
|
||||
bindsym $mod+shift+$left move left
|
||||
bindsym $mod+shift+$right move right
|
||||
# move focus workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws0
|
||||
bindsym --to-code $mod+bracketleft workspace prev
|
||||
bindsym --to-code $mod+bracketright workspace next
|
||||
bindsym $mod+tab workspace back_and_forth
|
||||
# move container workspace
|
||||
bindsym $mod+shift+1 move container to workspace $ws1, workspace $ws1
|
||||
bindsym $mod+shift+2 move container to workspace $ws2, workspace $ws2
|
||||
bindsym $mod+shift+3 move container to workspace $ws3, workspace $ws3
|
||||
bindsym $mod+shift+4 move container to workspace $ws4, workspace $ws4
|
||||
bindsym $mod+shift+5 move container to workspace $ws5, workspace $ws5
|
||||
bindsym $mod+shift+6 move container to workspace $ws6, workspace $ws6
|
||||
bindsym $mod+shift+7 move container to workspace $ws7, workspace $ws7
|
||||
bindsym $mod+shift+8 move container to workspace $ws8, workspace $ws8
|
||||
bindsym $mod+shift+9 move container to workspace $ws9, workspace $ws9
|
||||
bindsym $mod+shift+0 move container to workspace $ws0, workspace $ws0
|
||||
bindsym --to-code $mod+shift+bracketleft move container to workspace prev, workspace prev
|
||||
bindsym --to-code $mod+shift+bracketright move container to workspace next, workspace next
|
||||
bindsym $mod+shift+tab move container to workspace back_and_forth, workspace back_and_forth
|
||||
# resize
|
||||
bindsym $mod+control+$left resize shrink width
|
||||
bindsym $mod+control+$down resize grow height
|
||||
bindsym $mod+control+$up resize shrink height
|
||||
bindsym $mod+control+$right resize grow width
|
||||
# layout
|
||||
bindsym $mod+a focus parent
|
||||
bindsym $mod+shift+a focus child
|
||||
bindsym $mod+s layout toggle split
|
||||
bindsym $mod+shift+s split toggle
|
||||
bindsym $mod+d layout toggle tabbed split
|
||||
bindsym $mod+f fullscreen toggle
|
||||
bindsym $mod+shift+f floating toggle
|
||||
bindsym $mod+g focus mode_toggle
|
||||
bindsym $mod+shift+g sticky toggle
|
||||
bindsym $mod+period scratchpad show
|
||||
bindsym $mod+shift+period move scratchpad
|
||||
# modes
|
||||
set $session_mode " session: (r)eload (l)ock (q)uit (s)uspend re(b)oot (p)oweroff "
|
||||
set $layout_mode " layout: split(h) split(v) (s)tacking (t)abbed "
|
||||
|
||||
# laptop #######################################################################
|
||||
bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+;\
|
||||
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-;\
|
||||
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;\
|
||||
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle;\
|
||||
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_source "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)"
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl set "+1%";\
|
||||
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl set "1%-";\
|
||||
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||
bindsym shift+XF86MonBrightnessUp exec brightnessctl set "+10%";\
|
||||
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||
bindsym shift+XF86MonBrightnessDown exec brightnessctl set "10%-";\
|
||||
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||
|
||||
# session ######################################################################
|
||||
set $session_mode "session: (r)eload (l)ock (q)uit (s)uspend re(b)oot (p)oweroff"
|
||||
mode $session_mode {
|
||||
bindsym r reload, mode default
|
||||
bindsym l exec swaylock, mode default
|
||||
bindsym q exit, mode default
|
||||
bindsym s exec systemctl suspend, mode default
|
||||
bindsym b exec systemctl reboot, mode default
|
||||
bindsym p exec systemctl poweroff, mode default
|
||||
# return
|
||||
bindsym escape mode default
|
||||
bindsym $mod+escape mode default
|
||||
}
|
||||
bindsym $mod+escape mode $session_mode, fullscreen disable
|
||||
|
||||
# theme ########################################################################
|
||||
output * background wallpaper.svg fill $bg
|
||||
seat * hide_cursor 5000
|
||||
font monospace 13
|
||||
default_border normal 1
|
||||
default_floating_border normal 1
|
||||
# class border background text indicator child_border
|
||||
client.focused $accent $accent $bg $error $bg
|
||||
client.focused_inactive $dimmed $dimmed $bg $bg $bg
|
||||
client.unfocused $dimmed $dimmed $bg $bg $bg
|
||||
client.urgent $error $error $bg $error $bg
|
||||
|
||||
# statusbar ####################################################################
|
||||
# bar ##########################################################################
|
||||
bar {
|
||||
status_command $XDG_CONFIG_HOME/sway/status.sh
|
||||
separator_symbol " | "
|
||||
separator_symbol ""
|
||||
status_command status.sh
|
||||
status_edge_padding 0
|
||||
status_padding 0
|
||||
strip_workspace_numbers yes
|
||||
wrap_scroll yes
|
||||
colors {
|
||||
background $bg
|
||||
statusline $dimmed
|
||||
separator $dimmed
|
||||
# border background text
|
||||
focused_workspace $bg $bg $accent
|
||||
active_workspace $dimmed $bg $dimmed
|
||||
inactive_workspace $bg $bg $dimmed
|
||||
urgent_workspace $bg $bg $error
|
||||
background $black
|
||||
statusline $blue
|
||||
separator $blue
|
||||
# border background text
|
||||
focused_workspace $black $black $magenta
|
||||
active_workspace $black $black $white
|
||||
inactive_workspace $black $black $blue
|
||||
urgent_workspace $black $black $red
|
||||
}
|
||||
}
|
||||
|
||||
# workspace_layout #############################################################
|
||||
workspace_layout tabbed
|
||||
|
||||
# xwayland #####################################################################
|
||||
xwayland disable
|
||||
|
||||
# autostart ####################################################################
|
||||
exec swayidle
|
||||
exec mako
|
||||
exec wlsunset -l 45 -L 15
|
||||
workspace $ws1, exec thunderbird, exec firefox
|
||||
workspace $ws2, exec foot --server
|
||||
# bindsym ######################################################################
|
||||
# floating
|
||||
bindsym $mod+shift+f floating toggle
|
||||
|
||||
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
# focus
|
||||
bindsym {
|
||||
$mod+$up focus up
|
||||
$mod+$down focus down
|
||||
$mod+$left focus left
|
||||
$mod+$right focus right
|
||||
$mod+a focus parent
|
||||
$mod+s focus child
|
||||
$mod+g focus mode_toggle
|
||||
}
|
||||
|
||||
# include ######################################################################
|
||||
include $XDG_CONFIG_HOME/sway/`hostname`
|
||||
# fullscreen
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# mode
|
||||
bindsym {
|
||||
$mod+d mode $layout_mode, fullscreen disable
|
||||
$mod+escape mode $session_mode, fullscreen disable
|
||||
}
|
||||
|
||||
# move
|
||||
bindsym {
|
||||
$mod+shift+$up move up
|
||||
$mod+shift+$down move down
|
||||
$mod+shift+$left move left
|
||||
$mod+shift+$right move right
|
||||
--to-code $mod+shift+tab move workspace back_and_forth, workspace back_and_forth
|
||||
--to-code $mod+shift+q move workspace $wsq, workspace $wsq
|
||||
--to-code $mod+shift+w move workspace $wsw, workspace $wsw
|
||||
--to-code $mod+shift+e move workspace $wse, workspace $wse
|
||||
--to-code $mod+shift+r move workspace $wsr, workspace $wsr
|
||||
--to-code $mod+shift+t move workspace $wst, workspace $wst
|
||||
--to-code $mod+shift+y move workspace $wsy, workspace $wsy
|
||||
--to-code $mod+shift+u move workspace $wsu, workspace $wsu
|
||||
--to-code $mod+shift+i move workspace $wsi, workspace $wsi
|
||||
--to-code $mod+shift+o move workspace $wso, workspace $wso
|
||||
--to-code $mod+shift+p move workspace $wsp, workspace $wsp
|
||||
--to-code $mod+shift+bracketleft move workspace prev, workspace prev
|
||||
--to-code $mod+shift+bracketright move workspace next, workspace next
|
||||
$mod+colon move scratchpad
|
||||
}
|
||||
|
||||
# scratchpad
|
||||
bindsym $mod+semicolon scratchpad show
|
||||
|
||||
# sticky
|
||||
bindsym $mod+shift+g sticky toggle
|
||||
|
||||
# exec
|
||||
bindsym {
|
||||
$mod+return exec footclient
|
||||
$mod+shift+return exec foot
|
||||
$mod+space exec footclient -T "run" sh -c "IFS=:; find \$PATH -type f,l -perm -100 | fzy -p'run > ' | xargs -r swaymsg exec"
|
||||
$mod+shift+space exec footclient -T "find" sh -c "find | fzy -p'find > ' | xargs -r swaymsg exec xdg-open"
|
||||
$mod+home exec footclient -T "nmcli" nmcli_fzy.sh
|
||||
$mod+shift+home exec footclient -T "nmtui" sh -c "nmtui"
|
||||
$mod+end exec footclient -T "mount" udisksctl_fzy.sh
|
||||
$mod+x exec makoctl dismiss
|
||||
$mod+shift+x exec makoctl restore
|
||||
print exec grim - | wl-copy
|
||||
}
|
||||
|
||||
# exec (laptop)
|
||||
bindsym {
|
||||
XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_source "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)"
|
||||
XF86MonBrightnessUp exec brightnessctl set "+1%"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||
XF86MonBrightnessDown exec brightnessctl set "1%-"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||
shift+XF86MonBrightnessUp exec brightnessctl set "+10%"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||
shift+XF86MonBrightnessDown exec brightnessctl set "10%-"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||
}
|
||||
|
||||
# resize
|
||||
bindsym {
|
||||
$mod+control+$left resize shrink width
|
||||
$mod+control+$down resize grow height
|
||||
$mod+control+$up resize shrink height
|
||||
$mod+control+$right resize grow width
|
||||
}
|
||||
|
||||
# workspace
|
||||
bindsym {
|
||||
--to-code $mod+tab workspace back_and_forth
|
||||
--to-code $mod+q workspace $wsq
|
||||
--to-code $mod+w workspace $wsw
|
||||
--to-code $mod+e workspace $wse
|
||||
--to-code $mod+r workspace $wsr
|
||||
--to-code $mod+t workspace $wst
|
||||
--to-code $mod+y workspace $wsy
|
||||
--to-code $mod+u workspace $wsu
|
||||
--to-code $mod+i workspace $wsi
|
||||
--to-code $mod+o workspace $wso
|
||||
--to-code $mod+p workspace $wsp
|
||||
--to-code $mod+bracketleft workspace prev
|
||||
--to-code $mod+bracketright workspace next
|
||||
}
|
||||
|
||||
# client.* #####################################################################
|
||||
# class border background text indicator child_border
|
||||
client.focused $black $black $magenta $red $black
|
||||
client.focused_inactive $black $black $blue $black $black
|
||||
client.unfocused $black $black $blue $black $black
|
||||
client.urgent $black $black $red $black $black
|
||||
|
||||
# default_border ###############################################################
|
||||
default_border normal 0
|
||||
|
||||
# default_floating_border ######################################################
|
||||
default_floating_border normal 0
|
||||
|
||||
# exec #########################################################################
|
||||
exec {
|
||||
systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
swayidle -w \
|
||||
timeout 300 'swaylock -fu -c$blue' \
|
||||
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||
before-sleep 'swaylock -fu -c$blue'
|
||||
wlsunset -l 45 -L 15
|
||||
mako
|
||||
}
|
||||
|
||||
workspace $wse
|
||||
exec "foot --server", exec "sleep 0.1; footclient"
|
||||
|
||||
# focus_wrapping ###############################################################
|
||||
focus_wrapping yes
|
||||
|
||||
# font #########################################################################
|
||||
font monospace 13
|
||||
|
||||
# input ########################################################################
|
||||
|
||||
# keyboard
|
||||
input "type:keyboard" {
|
||||
xkb_layout us,si
|
||||
xkb_options caps:escape,grp:alt_shift_toggle
|
||||
repeat_delay 200
|
||||
repeat_rate 30
|
||||
}
|
||||
|
||||
# touchpad
|
||||
input "type:touchpad" {
|
||||
tap enabled
|
||||
}
|
||||
|
||||
# mode #########################################################################
|
||||
|
||||
# session
|
||||
mode $session_mode {
|
||||
bindsym {
|
||||
r reload, mode default
|
||||
l exec swaylock -fu -c$blue, mode default
|
||||
q exit, mode default
|
||||
s exec systemctl suspend, mode default
|
||||
b exec systemctl reboot, mode default
|
||||
p exec systemctl poweroff, mode default
|
||||
escape mode default
|
||||
}
|
||||
}
|
||||
|
||||
# layout
|
||||
mode $layout_mode {
|
||||
bindsym {
|
||||
h layout splith, mode default
|
||||
v layout splitv, mode default
|
||||
s layout stacking, mode default
|
||||
t layout tabbed, mode default
|
||||
escape mode default
|
||||
}
|
||||
}
|
||||
|
||||
# seat #########################################################################
|
||||
seat * hide_cursor 1000
|
||||
|
||||
# output #######################################################################
|
||||
output * background $black solid_color
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
# output
|
||||
output * {
|
||||
adaptive_sync on
|
||||
}
|
||||
|
||||
# input
|
||||
input "type:keyboard" {
|
||||
xkb_layout gb,si
|
||||
xkb_options caps:escape,grp:alt_shift_toggle
|
||||
repeat_delay 200
|
||||
repeat_rate 30
|
||||
}
|
||||
input "type:touchpad" {
|
||||
tap enabled
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "{\"version\":1}\n"
|
||||
printf "[\n"
|
||||
while true
|
||||
do
|
||||
printf [
|
||||
swaymsg -t get_inputs | jq -Mcj '[.[] | select(.type=="keyboard")][0] | {"full_text":.xkb_active_layout_name,"urgent":.xkb_active_layout_index}, ","'
|
||||
cat /sys/class/power_supply/BAT0/capacity | jq -Mcj '{"full_text":.}, ","'
|
||||
date +%c | jq -RMcj '{"full_text":.}, ","'
|
||||
swaymsg -t get_tree | jq -Mcj '.nodes[] | select(.name=="__i3").nodes[] | select(.name=="__i3_scratch").floating_nodes | {"full_text":length,"urgent":length}, ","'
|
||||
makoctl list | jq -Mcj '.data[][0] | {"full_text":(.summary.data // 0),"urgent":((.urgency.data // 0) == 2)}, ","'
|
||||
printf ],
|
||||
timeout 1 swaymsg -t subscribe '["input","binding"]' >/dev/null
|
||||
done
|
|
@ -1,16 +0,0 @@
|
|||
# clamshell
|
||||
set $laptop LVDS-1
|
||||
bindswitch --reload --locked lid:on output $laptop disable
|
||||
bindswitch --reload --locked lid:off output $laptop enable
|
||||
|
||||
# input
|
||||
input "type:keyboard" {
|
||||
xkb_layout us,si
|
||||
xkb_options caps:escape,grp:alt_shift_toggle
|
||||
xkb_numlock enabled
|
||||
repeat_delay 300
|
||||
repeat_rate 30
|
||||
}
|
||||
input "type:touchpad" {
|
||||
tap enabled
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
<svg
|
||||
width="1920"
|
||||
height="1080">
|
||||
<text
|
||||
y="33%"
|
||||
xml:space="preserve"
|
||||
fill="#ff3e8b"
|
||||
font-family="monospace"
|
||||
font-size="13pt">
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt"> _____ </tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt"> / __ \\</tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt">| / |</tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt">| \\___-</tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt">-_ </tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt"> --_ </tspan>
|
||||
</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 551 B |
|
@ -1,3 +0,0 @@
|
|||
timeout 300 'swaylock'
|
||||
timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
|
||||
before-sleep 'swaylock'
|
|
@ -1,33 +0,0 @@
|
|||
show-failed-attempts
|
||||
daemonize
|
||||
image=$XDG_CONFIG_HOME/swaylock/wallpaper.svg
|
||||
color=292526
|
||||
bs-hl-color=00000000
|
||||
caps-lock-bs-hl-color=00000000
|
||||
caps-lock-key-hl-color=00000000
|
||||
font=monospace
|
||||
inside-color=00000000
|
||||
inside-clear-color=00000000
|
||||
inside-caps-lock-color=00000000
|
||||
inside-ver-color=00000000
|
||||
inside-wrong-color=00000000
|
||||
key-hl-color=00000000
|
||||
layout-bg-color=00000000
|
||||
layout-border-color=00000000
|
||||
layout-text-color=6185ff
|
||||
line-color=00000000
|
||||
line-clear-color=00000000
|
||||
line-caps-lock-color=00000000
|
||||
line-ver-color=00000000
|
||||
line-wrong-color=00000000
|
||||
ring-color=00000000
|
||||
ring-clear-color=00000000
|
||||
ring-caps-lock-color=00000000
|
||||
ring-ver-color=00000000
|
||||
ring-wrong-color=00000000
|
||||
separator-color=00000000
|
||||
text-color=6185ff
|
||||
text-clear-color=6185ff
|
||||
text-caps-lock-color=6185ff
|
||||
text-ver-color=ff3e8b
|
||||
text-wrong-color=ff404f
|
|
@ -1,18 +0,0 @@
|
|||
<svg
|
||||
width="1920"
|
||||
height="1080">
|
||||
<text
|
||||
y="33%"
|
||||
xml:space="preserve"
|
||||
fill="#6185ff"
|
||||
font-family="monospace"
|
||||
font-size="13pt">
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt"> _____ </tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt"> / __ \\</tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt">| / |</tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt">| \\___-</tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt">-_ </tspan>
|
||||
<tspan text-anchor="middle" x="50%" dy="13pt"> --_ </tspan>
|
||||
</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 551 B |
|
@ -0,0 +1 @@
|
|||
net.ipv4.ip_forward = 1
|
|
@ -1,31 +1,37 @@
|
|||
set selection-clipboard clipboard
|
||||
set completion-bg "#e3e0e1"
|
||||
set completion-fg "#ff3e8b"
|
||||
set completion-group-bg "#e3e0e1"
|
||||
set completion-group-fg "#6185ff"
|
||||
set completion-highlight-bg "#ff3e8b"
|
||||
set completion-highlight-fg "#e3e0e1"
|
||||
set default-fg "#e3e0e1"
|
||||
set default-bg "#292526"
|
||||
set inputbar-bg "#292526"
|
||||
set inputbar-fg "#6185ff"
|
||||
set notification-bg "#292526"
|
||||
set notification-fg "#6185ff"
|
||||
set notification-error-bg "#292526"
|
||||
set notification-error-fg "#ff404f"
|
||||
set notification-warning-bg "#292526"
|
||||
set notification-warning-fg "#e06e00"
|
||||
set statusbar-bg "#292526"
|
||||
set statusbar-fg "#ff3e8b"
|
||||
set highlight-color "#6185ff"
|
||||
set highlight-fg "#00ff00" # find out what this does
|
||||
set highlight-active-color "#ff3e8b"
|
||||
set recolor-darkcolor "#e3e0e1"
|
||||
set recolor-lightcolor "#292526"
|
||||
set render-loading-bg "#292526"
|
||||
set render-loading-fg "#6185ff"
|
||||
set index-fg "#ff3e8b"
|
||||
set index-bg "#e3e0e1"
|
||||
set index-active-fg "#e3e0e1"
|
||||
set index-active-bg "#ff3e8b"
|
||||
# girara
|
||||
set completion-bg "#000000"
|
||||
set completion-fg "#856cff"
|
||||
set completion-group-bg "#000000"
|
||||
set completion-group-fg "#d06600"
|
||||
set completion-highlight-bg "#000000"
|
||||
set completion-highlight-fg "#ff1170"
|
||||
set default-fg "#e2e2e2"
|
||||
set default-bg "#000000"
|
||||
set inputbar-bg "#000000"
|
||||
set inputbar-fg "#856cff"
|
||||
set notification-bg "#000000"
|
||||
set notification-fg "#856cff"
|
||||
set notification-error-bg "#000000"
|
||||
set notification-error-fg "#fa3500"
|
||||
set notification-warning-bg "#000000"
|
||||
set notification-warning-fg "#d06600"
|
||||
set statusbar-bg "#000000"
|
||||
set statusbar-fg "#856cff"
|
||||
set font "monospace 13"
|
||||
|
||||
# zathura
|
||||
set highlight-active-color "#ff1170"
|
||||
set highlight-color "#856cff"
|
||||
set highlight-fg "#000000"
|
||||
set index-active-bg "#000000"
|
||||
set index-active-fg "#ff1170"
|
||||
set index-fg "#856cff"
|
||||
set index-bg "#000000"
|
||||
set recolor-darkcolor "#e2e2e2"
|
||||
set recolor-lightcolor "#000000"
|
||||
set render-loading-bg "#000000"
|
||||
set render-loading-fg "#856cff"
|
||||
set signature-error-color "#fa3500"
|
||||
set signature-success-color "#009843"
|
||||
set signature-warning-color "#d06600"
|
||||
set selection-clipboard clipboard
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/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
|
|
@ -0,0 +1,64 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "{\"version\":1}\n"
|
||||
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
|
||||
},],'
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
while true; do
|
||||
printf "["
|
||||
# keyboard layout
|
||||
swaymsg -t get_inputs | jq -Mcj '
|
||||
[.[] | select(.type=="keyboard")][0]
|
||||
| {
|
||||
"full_text":([" ",.xkb_active_layout_name," "]|join("")),
|
||||
"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, ","'
|
||||
# date
|
||||
date +%c | jq -RMcj '{
|
||||
"full_text":([" ",.," "]|join("")),
|
||||
"separator_block_width":0
|
||||
}, ","'
|
||||
# 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'
|
||||
# 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'
|
||||
printf "],"
|
||||
# timeout
|
||||
timeout 1 swaymsg -t subscribe '["input","binding"]' >/dev/null
|
||||
done
|
|
@ -0,0 +1,8 @@
|
|||
#!/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,3 +1,4 @@
|
|||
[Desktop Entry]
|
||||
Exec=footclient -D %u
|
||||
MimeType=inode/directory
|
||||
Name=Foot Client directory
|
||||
|
|
6
.profile
6
.profile
|
@ -9,7 +9,7 @@ if [ -n "$BASH_VERSION" ]; then
|
|||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
if [ -d "$HOME/bin" ]; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
|
@ -81,13 +81,11 @@ export OPAMROOT=$XDG_DATA_HOME/opam
|
|||
export EDITOR=vi
|
||||
|
||||
# desktop
|
||||
if [ "$(tty)" = "/dev/tty1" ] && command -v sway &>/dev/null; then
|
||||
if [ "$(tty)" = "/dev/tty1" ] && command -v sway >/dev/null; then
|
||||
# locale
|
||||
export LANG=sl_SI.UTF-8
|
||||
export LC_MESSAGES=en_US.UTF-8
|
||||
# defaults
|
||||
export EDITOR=nvim
|
||||
export VISUAL=nvim
|
||||
export TERMINAL=footclient
|
||||
export BROWSER=firefox
|
||||
# run sway
|
||||
|
|
158
README.md
158
README.md
|
@ -1,70 +1,150 @@
|
|||
# Bootstrap
|
||||
# dot
|
||||
|
||||
This repo tracks user and system configuration files, installed packages
|
||||
and used commands for several machines or virtual servers. All are
|
||||
running Debian. The `milano` section documents our desktop setup based
|
||||
on `sway`, `foot`, `neovim` and `fzy`.
|
||||
|
||||
## milano
|
||||
|
||||
```sh
|
||||
# dotfiles
|
||||
# urosm@milano
|
||||
## bootstrap dotfiles
|
||||
sudo apt install git
|
||||
cd
|
||||
git init -b main
|
||||
git remote add origin gitea@git.kompot.si:urosm/dot.git
|
||||
git pull
|
||||
git checkout main -f
|
||||
# `/etc`
|
||||
git pull origin main
|
||||
## disable annoying .sudo_as_admin_successful file
|
||||
sudo cp -ri .config/sudoers.d /etc/
|
||||
## update to debian testing
|
||||
sudo cp -ri .config/apt /etc/
|
||||
```
|
||||
|
||||
# Packages
|
||||
|
||||
```sh
|
||||
# locales
|
||||
sudo apt update
|
||||
sudo apt full-upgrade
|
||||
sudo apt install apt-listbugs apt-listchanges
|
||||
## reconfigure locales
|
||||
sudo dpkg-reconfigure locales
|
||||
# utils
|
||||
sudo apt install udisks2
|
||||
sudo apt install screen
|
||||
sudo apt install jq
|
||||
# networking
|
||||
sudo apt install network-manager
|
||||
## install tasksel packages
|
||||
sudo tasksel install web-server
|
||||
sudo tasksel install ssh-server
|
||||
## harden ssh
|
||||
sudo cp -ri .config/ssh /etc/
|
||||
systemctl restart sshd
|
||||
## install and configure firewall
|
||||
sudo apt install ufw
|
||||
sudo ufw allow "SSH"
|
||||
sudo ufw allow 1194/udp
|
||||
sudo ufw enable
|
||||
# neovim
|
||||
## install utils
|
||||
sudo apt install network-manager
|
||||
sudo cp -ir .config/network /etc/
|
||||
sudo apt install udisks2
|
||||
sudo apt install jq
|
||||
sudo apt install fzy
|
||||
## install neovim
|
||||
sudo apt install neovim
|
||||
# desktop
|
||||
sudo apt install --no-install-recommends sway
|
||||
## install desktop packages
|
||||
sudo apt install sway
|
||||
sudo apt install swayidle swaylock
|
||||
sudo apt install foot fuzzel
|
||||
sudo apt install brightnessctl wlsunset
|
||||
sudo apt install wl-clipboard grim
|
||||
sudo apt install libnotify-bin mako-notifier
|
||||
# writing
|
||||
sudo apt install pandoc
|
||||
sudo apt install texlive-latex-extra
|
||||
sudo apt install texlive-fonts-recommended
|
||||
sudo apt install texlive-lang-european
|
||||
# audio
|
||||
sudo apt install fonts-agave
|
||||
## install and configure audio packages
|
||||
sudo apt install pipewire-audio
|
||||
systemctl --user enable --now wireplumber.service
|
||||
# web
|
||||
## install writing packages
|
||||
sudo apt install make
|
||||
sudo apt install pandoc
|
||||
sudo apt install texlive-latex-extra
|
||||
sudo apt install texlive-lang-european
|
||||
## install web packages
|
||||
sudo apt install firefox
|
||||
sudo apt install thunderbird
|
||||
# media
|
||||
## install media packages
|
||||
sudo apt install mpv
|
||||
sudo apt install zathura
|
||||
sudo apt install inkscape
|
||||
# office
|
||||
## install office packages
|
||||
sudo apt install libreoffice libreoffice-gtk3
|
||||
sudo apt install libreoffice-l10n-sl
|
||||
# printing
|
||||
## install printing packages
|
||||
sudo apt install cups printer-driver-all
|
||||
# scanning
|
||||
sudo adduser urosm lpadmin
|
||||
## install scanning packages
|
||||
sudo apt install simple-scan
|
||||
# pdf processing
|
||||
sudo apt install qpdf imagemagick ocrmypdf
|
||||
# rdp
|
||||
## install pdf processing packages
|
||||
sudo apt install qpdf ocrmypdf
|
||||
## install rdp packages
|
||||
sudo apt install remmina
|
||||
# ikiwiki
|
||||
sudo apt install apache2
|
||||
## install and setup ikiwiki
|
||||
sudo apt install ikiwiki
|
||||
sudo apt install libtext-multimarkdown-perl
|
||||
sudo apt install libfile-mimeinfo-perl libhighlight-perl libhtml-tree-perl libimage-magick-perl liblocale-gettext-perl libmailtools-perl libnet-amazon-s3-perl libnet-inet6glue-perl libsearch-xapian-perl libsort-naturally-perl libtext-csv-perl libtext-multimarkdown-perl libtext-textile-perl libtext-typography-perl libtext-wikicreole-perl libtext-wikiformat-perl libxml-feed-perl libxml-writer-perl
|
||||
chmod 711 $HOME
|
||||
sudo a2enmod userdir
|
||||
sudo a2enmod cgi
|
||||
sudo cp .config/apache2/sites-available/kontrakurs.localhost.conf /etc/apache2/sites-available/
|
||||
sudo cp .config/apache2/sites-available/bavbavhaus.localhost.conf /etc/apache2/sites-available/
|
||||
sudo a2ensite kontrakurs.localhost bavbavhaus.localhost
|
||||
systemctl restart apache2
|
||||
```
|
||||
|
||||
## {padova,tivoli,genova}
|
||||
|
||||
```sh
|
||||
ssh root@padova
|
||||
adduser urosm
|
||||
adduser urosm sudo
|
||||
exit
|
||||
ssh-copy-id urosm@padova
|
||||
ssh urosm@padova
|
||||
## bootstrap dotfiles
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
sudo apt install git
|
||||
git init -b main
|
||||
git remote add origin gitea@git.kompot.si:urosm/dot.git
|
||||
git pull origin main
|
||||
## disable annoying .sudo_as_admin_successful file
|
||||
sudo cp -ri .config/sudoers.d /etc/
|
||||
## install screen
|
||||
sudo apt install screen
|
||||
## install and configure firewall
|
||||
sudo apt install ufw
|
||||
sudo ufw allow "SSH" # ssh
|
||||
sudo ufw allow 1194/udp # vpn
|
||||
sudo ufw allow "WWW Full" # web
|
||||
sudo ufw allow "SMTP" # mail
|
||||
sudo ufw allow "Mail submission" # mail
|
||||
sudo ufw allow "IMAP" # mail
|
||||
sudo ufw allow "IMAPS" # mail
|
||||
sudo ufw enable
|
||||
## harden ssh
|
||||
sudo cp -ri .config/ssh /etc/
|
||||
sudo systemctl restart sshd
|
||||
## install and configure wireguard
|
||||
sudo cp -ir .config/sysctl.d /etc/
|
||||
sudo sysctl -p
|
||||
sudo apt install wireguard
|
||||
sudo cp -i .config/wireguard/padova.conf /etc/wireguard/
|
||||
wg-quick up padova
|
||||
## install and configure webserver
|
||||
sudo tasksel install web-server
|
||||
sudo a2enmod rewrite
|
||||
sudo a2enmod userdir
|
||||
sudo a2enmod cgi
|
||||
chmod 711 "$HOME"
|
||||
sudo cp -ir .config/apache2/sites-available /etc/apache2/
|
||||
sudo a2ensite bavbavhaus.net
|
||||
sudo a2ensite kontrakurs.org
|
||||
sudo systemctl reload apache2
|
||||
## install certbot
|
||||
sudo apt install certbot
|
||||
sudo apt install python3-certbot-apache
|
||||
sudo certbot --apache
|
||||
## install ikiwiki
|
||||
sudo apt install --install-recommends ikiwiki
|
||||
sudo apt install libfile-mimeinfo-perl libhighlight-perl libhtml-tree-perl libimage-magick-perl liblocale-gettext-perl libmailtools-perl libnet-amazon-s3-perl libnet-inet6glue-perl libsearch-xapian-perl libsort-naturally-perl libtext-csv-perl libtext-multimarkdown-perl libtext-textile-perl libtext-typography-perl libtext-wikicreole-perl libtext-wikiformat-perl libxml-feed-perl libxml-writer-perl
|
||||
## enable unattended-upgrades
|
||||
sudo apt install unattended-upgrades apt-listchanges
|
||||
sudo dpkg-reconfigure -plow unattended-upgrades
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue