1
0
Fork 0

Compare commits

...

21 Commits

Author SHA1 Message Date
urosm ac8b3932ab update `README.md` 2024-02-11 10:29:14 +01:00
urosm 597d1f24e2 add `network` config 2024-02-11 10:27:46 +01:00
urosm 03c4bcd1c6 update `.bashrc` 2024-02-11 10:26:23 +01:00
urosm d7d09131fe update `zathura` config 2024-02-11 10:25:55 +01:00
urosm 2a8cb466e0 update `swaylock` config 2024-02-11 10:25:43 +01:00
urosm 0d974f4dbb update `sway` config 2024-02-11 10:25:31 +01:00
urosm c604830cae update `nvim` config 2024-02-11 10:25:16 +01:00
urosm 425549a15c update `mpv` config 2024-02-11 10:24:31 +01:00
urosm c6039e2f21 update `git` config 2024-02-11 10:24:19 +01:00
urosm c668e541d4 update `fuzzel` config 2024-02-11 10:24:08 +01:00
urosm 4b7129a387 update `foot` config 2024-02-11 10:23:53 +01:00
urosm 5ec35c2566 update `apt` config 2024-02-11 10:23:40 +01:00
urosm a56769bc29 update `fontconfig` config 2024-02-11 10:23:25 +01:00
urosm 67bb312336 update `mako` config 2024-02-08 15:52:15 +01:00
urosm 36eae5852e update `fuzzel` config 2024-02-08 15:51:34 +01:00
urosm 4b24c8ebf1 update `foot` config 2024-02-08 15:51:20 +01:00
urosm 6636f8fc8d update `sway` config 2024-02-08 15:50:29 +01:00
urosm 15850af9aa update `apache2` config 2024-02-08 15:49:15 +01:00
urosm 3056e3a4b7 update scripts 2024-02-08 15:40:20 +01:00
urosm dea5421336 update scripts 2024-02-08 15:34:05 +01:00
urosm 9f218453a1 add scripts 2024-02-04 16:24:33 +01:00
23 changed files with 411 additions and 274 deletions

View File

@ -3,12 +3,6 @@
# 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"
@ -34,6 +28,7 @@ bind "set visible-stats on"
# 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"

View File

@ -14,4 +14,3 @@
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

View File

@ -1,11 +1,11 @@
deb http://deb.debian.org/debian/ testing main non-free-firmware
deb-src http://deb.debian.org/debian/ testing main non-free-firmware
deb http://deb.debian.org/debian/ testing main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ testing main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security testing-security main non-free-firmware
deb-src http://security.debian.org/debian-security testing-security main non-free-firmware
deb http://security.debian.org/debian-security testing-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security testing-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ unstable main non-free-firmware
deb-src http://deb.debian.org/debian/ unstable main non-free-firmware
deb http://deb.debian.org/debian/ unstable main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ unstable main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ experimental main non-free-firmware
deb-src http://deb.debian.org/debian/ experimental main non-free-firmware
deb http://deb.debian.org/debian/ experimental main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ experimental main contrib non-free non-free-firmware

View File

@ -1,8 +1,16 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer><family>IBM Plex Serif</family></prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer><family>IBM Plex Sans</family></prefer>
</alias>
<alias>
<family>monospace</family>
<prefer><family>Agave</family></prefer>
<prefer><family>IBM Plex Mono</family></prefer>
</alias>
</fontconfig>

View File

@ -1,23 +1,23 @@
[main]
dpi-aware=no
font=monospace:size=13
font=monospace:size=12
[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

View File

@ -1,18 +1,18 @@
[main]
layer=overlay
dpi-aware=no
font=monospace:size=13
font=monospace:size=12
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

View File

@ -1,3 +1,5 @@
[user]
email = urosm@kompot.si
name = urosm
[commit]
verbose = true

View File

@ -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

View File

@ -5,4 +5,4 @@ image-display-duration=inf
osd-level=0
# gpu renderer options
background="#292526"
background="#000000"

View File

@ -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

View File

@ -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
@ -269,11 +258,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)

View File

@ -12,35 +12,70 @@ unlet! b:current_syntax
syntax spell toplevel
" comment
syn region markdownHTMLComment start=/<!--\s\=/ end=/\s\=-->/ keepend
hi def link markdownHTMLComment markdownComment
" block formatting """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" setext heading
syn match markdownSetexHeading /\%(\%^\|\_^\n\).\+\n[=-]\+\n$/ contains=@markdownInline,markdownSetextHeadingDelimiter,markdownHeadingAttribute
hi def link markdownSetexHeading markdownTitle
syn match markdownSetextHeadingDelimiter /^[=-]\+$/ contained
hi def link markdownSetextHeadingDelimiter markdownDelimiter
" atx heading
syn match markdownAtxHeading /\%(\%^\|\_^\n\)#\{1,6} .*\n$/ contains=@markdownInline,markdownAtxHeadingDelimiter,markdownHeadingAttribute
hi def link markdownAtxHeading markdownTitle
syn match markdownAtxHeadingDelimiter /^#\{1,6}/ contained
hi def link markdownAtxHeadingDelimiter markdownDelimiter
syn match markdownHeadingAttribute /.*\zs{.\{-}}$/ contained
hi def link markdownHeadingAttribute markdownDelimiter
" titleblock
syn region markdownTitleBlock start=/\%^%/ end=/\n\n/ contains=markdownTitleBlockDelimiter
hi def link markdownTitleBlock markdownBold
syn region markdownTitleBlock start=/\%^%/ end=/\n$/ contains=@markdownInline,markdownTitleBlockDelimiter
hi def link markdownTitleBlock markdownTitle
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
" horizontal rule
syn match markdownHRule /^\n\s*\*\s*\(\*\s*\)\{2,}\n$/ display
syn match markdownHRule /^\n\s*\-\s*\(\-\s*\)\{2,}\n$/ display
syn match markdownHRule /^\n\s*_\s*\(_\s*\)\{2,}\n$/ display
hi def link markdownHRule markdownDelimiter
" inline formatting """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" emphasis
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
" link
syn match markdownLink /!\=\[.\{-}\](.\{-})/ contains=markdownLinkLabel,markdownLinkURL
hi def link markdownLink markdownDelimiter
syn match markdownLinkLabel /\[\@1<=[^\]]\+/ contained
syn match markdownLink /!\=\[\_.\{-}\](\_.\{-})/ contains=markdownLinkLabel
hi def link markdownLink markdownUnderlined
syn match markdownLinkLabel /\[\@1<=[^\]]\+/ contained contains=@markdownInline
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 match markdownWikilink /\[\[.*\]\]/ contains=markdownWikilinkLabel
hi def link markdownWikilink markdownUnderlined
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
@ -64,26 +99,6 @@ 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
@ -101,19 +116,6 @@ syn region markdownSuperscript start=/\^\(\([[:graph:]]\(\\ \)\=\)\{-}\^\)\@=/ s
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
@ -215,15 +217,8 @@ hi def link markdownDefinitionBlockDelimiter markdownDelimiter
" new line
syn match markdownNewLine /\%(\%(\S\)\@<= \{2,}\|\\\)$/ display containedin=markdownItalic,markdownBold,markdownBoldItalic,markdownBoldInItalic,markdownItalicInBold
hi def link markdownNewLine Error
hi def link markdownNewLine markdownError
" 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
@ -264,6 +259,7 @@ hi def link markdownSpecialComment SpecialComment
hi def link markdownDebug Debug
hi def link markdownUnderlined Underlined
hi def link markdownIgnore Ignore
hi def link markdownError Error
hi def link markdownItalic htmlItalic
hi def link markdownBold htmlBold

View File

@ -16,10 +16,10 @@ 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 $bg #000000
set $dimmed #856cff
set $accent #ff1170
set $error #fa3500
# key bindings #################################################################
bindsym $mod+return exec footclient
@ -28,20 +28,13 @@ 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
bindsym $mod+shift+space exec fuzzel_open.sh\
-e $HOME/.cache\
-e $HOME/.mozilla\
-e $HOME/.thunderbird\
-e *.git*
bindsym $mod+home exec fuzzel_nmcli.sh
bindsym $mod+end exec fuzzel_udisksctl.sh
# makoctl
bindsym $mod+x exec makoctl dismiss
bindsym $mod+shift+x exec makoctl dismiss -a
@ -146,9 +139,9 @@ mode $session_mode {
bindsym $mod+escape mode $session_mode, fullscreen disable
# theme ########################################################################
output * background wallpaper.svg fill $bg
output * background $bg solid_color
seat * hide_cursor 5000
font monospace 13
font monospace 12
default_border normal 1
default_floating_border normal 1
# class border background text indicator child_border
@ -159,7 +152,7 @@ client.urgent $error $error $bg $error $bg
# statusbar ####################################################################
bar {
status_command $XDG_CONFIG_HOME/sway/status.sh
status_command status.sh
separator_symbol " | "
colors {
background $bg

View File

@ -5,7 +5,7 @@ output * {
# input
input "type:keyboard" {
xkb_layout gb,si
xkb_layout us,si
xkb_options caps:escape,grp:alt_shift_toggle
repeat_delay 200
repeat_rate 30

View File

@ -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

View File

@ -1,11 +1,12 @@
no-unlock-indicator
show-failed-attempts
daemonize
image=$XDG_CONFIG_HOME/swaylock/wallpaper.svg
color=292526
color=000000
bs-hl-color=00000000
caps-lock-bs-hl-color=00000000
caps-lock-key-hl-color=00000000
font=monospace
font-size=12
inside-color=00000000
inside-clear-color=00000000
inside-caps-lock-color=00000000
@ -14,7 +15,7 @@ inside-wrong-color=00000000
key-hl-color=00000000
layout-bg-color=00000000
layout-border-color=00000000
layout-text-color=6185ff
layout-text-color=856cff
line-color=00000000
line-clear-color=00000000
line-caps-lock-color=00000000
@ -26,8 +27,8 @@ 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
text-color=856cff
text-clear-color=d06600
text-caps-lock-color=856cff
text-ver-color=d06600
text-wrong-color=fa3500

View File

@ -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

View File

@ -1,31 +1,37 @@
# 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 12"
# 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
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"
set font "monospace 13"

View File

@ -0,0 +1,29 @@
#!/bin/sh
bssid="$(nmcli --colors=no -f BSSID,IN-USE,SSID,BARS device wifi list\
| tail -n+2\
| fuzzel -d -p "connect > "\
| cut -d" " -f1)"
[ -z "$bssid" ] && return
ssid="$(nmcli -g SSID device wifi list bssid "$bssid" --rescan no)"
if nmcli -t connection show "$ssid" >/dev/null 2>&1; then
if nmcli device wifi connect "$bssid" 2>&1; then
exec notify-send "Connected to $ssid."
else
exec notify-send "Could not connect to $ssid."
fi
else
security="$(nmcli -g SECURITY device wifi list bssid "$bssid" --rescan no)"
if [ "$security" = "WPA2" ] || [ "$security" = "WEP" ]; then
password="$(fuzzel -d --password -p "password > ")"
fi
if nmcli device wifi connect "$bssid" password "$password" 2>&1; then
exec notify-send "Connected to $ssid."
else
exec notify-send "Could not connect to $ssid."
fi
fi

View File

@ -0,0 +1,25 @@
#!/bin/sh
while getopts "he:" arg; do
case $arg in
e)
if [ -z "$excludes" ]; then
excludes="-path $OPTARG"
else
excludes="$excludes -o -path $OPTARG"
fi
;;
[h?])
printf "Usage: %s: [-e exclude path] [path]\n" $0
exit;;
esac
done
shift $(($OPTIND - 1))
file="$(find ${1:-$HOME} ! \( \( $excludes \) -prune \) -print0\
| fuzzel --dmenu0 -p "find > ")"
[ -z "$file" ] && exit
exec xdg-open "$file"

View File

@ -0,0 +1,16 @@
#!/bin/sh
name="$(lsblk -lpno"name,size,type,mountpoint"\
| grep "/dev\/sd.*part"\
| fuzzel -d -p "mount > "\
| cut -d" " -f1)"
[ -z "$name" ] && return
mountpoint="$(lsblk -lpno"mountpoint" "$name")"
if [ -z "$mountpoint" ]; then
exec udisksctl mount -b "$name" 2>&1 | xargs -I{} notify-send "{}"
else
exec udisksctl unmount -b "$name" 2>&1 | xargs -I{} notify-send "{}"
fi

View File

@ -6,10 +6,10 @@ 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":.}, ","'
cat /sys/class/power_supply/BAT0/capacity | jq -Mcj 'if .<20 then {"full_text":.,"urgent":true} else {"full_text":.} end, ","'
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)}, ","'
makoctl list | jq -Mcj '.data[] | if length>0 then {"full_text":([length, .[0].summary.data] | join(": ")),"urgent":(.[0].urgency.data == 2)}, "," else "" end'
printf ],
timeout 1 swaymsg -t subscribe '["input","binding"]' >/dev/null
done

195
README.md
View File

@ -1,70 +1,187 @@
# 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 `fuzzel`.
## 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
## 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 fail2ban
sudo apt install fail2ban python3-pyinotify python3-systemd whois
sudo cp -ir .config/fail2ban /etc/
systemctl restart fail2ban
## 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 screen
sudo apt install jq
## 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 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-ibm-plex
## 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
```sh
ssh root@padova
adduser urosm
adduser urosm sudo
exit
ssh-copy-id urosm@padova
ssh urosm@padova
## bootstrap dotfiles
sudo apt install git
git init -b main
git remote add origin gitea@git.kompot.si:urosm/dot.git
git pull origin main
## additional config in `etc`
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"
sudo ufw allow 1194/udp
sudo ufw enable
## harden ssh
sudo cp -ri .config/ssh /etc/
sudo systemctl restart sshd
## install and configure fail2ban
sudo apt install fail2ban python3-pyinotify python3-systemd whois
sudo cp -ir .config/fail2ban /etc/
sudo systemctl restart fail2ban
## 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
## enable unattended-upgrades
sudo apt install unattended-upgrades apt-listchanges
sudo dpkg-reconfigure -plow unattended-upgrades
```
## tivoli
```sh
# urosm@tivoli
ssh root@tivoli
adduser urosm
adduser urosm sudo
exit
ssh-copy-id urosm@tivoli
ssh urosm@tivoli
## bootstrap dotfiles
sudo apt install git
git init -b main
git remote add origin gitea@git.kompot.si:urosm/dot.git
git pull origin main
## additional config in `etc`
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"
sudo ufw allow "WWW Full"
sudo ufw enable
## harden ssh
sudo cp -ir .config/ssh /etc/
sudo systemctl restart sshd
## install and configure fail2ban
sudo apt install fail2ban python3-pyinotify python3-systemd whois
sudo cp -ir .config/fail2ban /etc/
sudo systemctl restart fail2ban
## 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
```