Merge branch 'main' of git.yrz.am:yrzam/workspace

This commit is contained in:
Yuri Zamyatin 2025-06-13 12:44:19 +00:00
commit df63c246ff
10 changed files with 142 additions and 57 deletions

View File

@ -64,7 +64,7 @@ while read -r entity; do
etype="${entity_parts[0]}"
ename="${entity_parts[1]}"
eid="${entity_parts[2]}"
[ "$etype" != "user" ] && [ "$etype" != "group" ] && echo "ERROR: bad entity type" >&2 && exit 1
[ "$etype" != "user" ] && [ "$etype" != "group" ] && echo "ERROR: bad entity type $etype" >&2 && exit 1
# every user has their own primary group with id matching uid,
# so for each entry we need a usergroup

View File

@ -0,0 +1,2 @@
vim -c 'redir > ~/tmp/vim-highlight.dump' -c 'silent! highlight' -c 'redir END' -c 'q'
echo >> ~/tmp/vim-highlight.dump

View File

@ -8,6 +8,10 @@ alias ls='ls --color=auto'
alias grep='grep --color=auto'
export EDITOR=vim
PS1='\[\033[38;2;153;136;255m\]\u@\h:\W\$\[\033[0m\]\[\e[0;91m\]${?#0}\[\e[0m\] '
PS0+='\e]133;C\e\\'
command_done() {
printf '\e]133;D\e\\'
}
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }command_done
PS1='\[\033[1;95m\]\u@\h:\W\$\[\033[0m\]\[\033[1;91m\]${?#0}\[\033[0m\] '

View File

@ -1,3 +1,12 @@
{{ define "fadeColor" }}
{{- $color := .color -}}
{{- $opacity := .opacity -}}
{{ $result := "" }}
{{- range $color | regexp.Replace "(..)" "$1 " | strings.TrimSpace | strings.Split " " -}}
{{- $result = printf "%s%s" $result (conv.ParseInt . 16 32 | math.Mul $opacity | math.Round | conv.ToInt | printf "%02x") -}}
{{- end -}}
{{- $result -}}
{{- end -}}
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
@ -55,7 +64,7 @@ urgent=yes
[scrollback]
# lines=1000
lines=10000
# multiplier=3.0
# indicator-position=relative
# indicator-format=""
@ -109,6 +118,18 @@ foreground={{ .theme.color.fg }}
# bright6=24dfc4 # bright cyan
# bright7=ffffff # bright white
regular0={{ .theme.color.bg }}
regular1=ff4d51
regular2=35d450
regular3=e9e836
regular4=5dc5f8
regular5={{ .theme.color.fg_accent }}
regular6=24dfc4
regular7={{ .theme.color.fg }}
bright0={{ .theme.color.bg }}
bright5={{ .theme.color.fg_accent }}
bright7={{ .theme.color.fg }}
## dimmed colors (see foot.ini(5) man page)
# dim0=<not set>
# ...
@ -141,9 +162,9 @@ foreground={{ .theme.color.fg }}
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3> # black-on-yellow
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
# search-box-no-match=<regular0> <regular1> # black-on-red
# search-box-match=<regular0> <regular3> # black-on-yellow
scrollback-indicator={{ .theme.color.bg }} {{ template "fadeColor" (dict "color" .theme.color.fg_accent "opacity" .theme.opacity.med) }}
search-box-no-match={{ .theme.color.fg }} {{ .theme.color.bg_accent_dark }}
search-box-match={{ .theme.color.fg }} {{ .theme.color.bg_accent_dark }}
# urls=<regular3>
[csd]
@ -162,72 +183,76 @@ foreground={{ .theme.color.fg }}
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
clipboard-copy=Control+c XF86Copy
clipboard-paste=Control+v XF86Paste
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
scrollback-up-page=Control+Shift+b
scrollback-up-half-page=Control+Shift+u
scrollback-up-line=Control+Shift+i
scrollback-down-page=Control+Shift+f
scrollback-down-half-page=Control+Shift+d
scrollback-down-line=Control+Shift+e
scrollback-home=none
scrollback-end=Control+Shift+g
clipboard-copy=Control+c
clipboard-paste=Control+v
primary-paste=Control+Shift+p
search-start=Control+Shift+slash
font-increase=Control+plus
font-decrease=Control+minus
font-reset=Control+equal
spawn-terminal=Control+Shift+h
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
pipe-scrollback=[sh -c 'f=$(mktemp); cat - > $f; footclient vim $f'] Control+Shift+s
# pipe-selected=[xargs -r firefox] none
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
pipe-command-output=[wl-copy] Control+Shift+y
# show-urls-launch=Control+Shift+o
# show-urls-copy=none
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
# unicode-input=Control+Shift+u
unicode-input=none
# noop=none
[search-bindings]
# cancel=Control+g Control+c Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
cancel=Escape
commit=Return
find-prev=Control+Shift+k
find-next=Control+k
# prompt - emacs like
cursor-left=Control+b Left
cursor-left-word=Mod1+b Control+Left
cursor-right=Control+f Right
cursor-right-word=Mod1+f Control+Right
cursor-home=Control+a
cursor-end=Control+e
delete-prev=BackSpace Control+n
delete-prev-word=Control+w Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-char=Shift+Right
# extend-to-word-boundary=Control+w Control+Shift+Right
delete-to-start=Control+u
delete-to-end=none
#######################
extend-char=Shift+o
extend-to-word-boundary=Shift+w
# extend-to-next-whitespace=Control+Shift+w
# extend-line-down=Shift+Down
# extend-backward-char=Shift+Left
# extend-backward-to-word-boundary=Control+Shift+Left
extend-to-next-whitespace=none
extend-line-down=Shift+e
extend-backward-char=Shift+n
extend-backward-to-word-boundary=Shift+b
# extend-backward-to-next-whitespace=none
# extend-line-up=Shift+Up
clipboard-paste=Control+v Control+y XF86Paste
# primary-paste=Shift+Insert
extend-line-up=Shift+i
clipboard-paste=Control+v
primary-paste=Control+Shift+p
# unicode-input=none
# quit=none
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
scrollback-up-page=none
scrollback-up-half-page=none
scrollback-up-line=none
scrollback-down-page=none
scrollback-down-half-page=none
scrollback-down-line=none
scrollback-home=none
scrollback-end=none
[url-bindings]
# cancel=Control+g Control+c Control+d Escape

View File

@ -0,0 +1,5 @@
pcsc-driver /usr/lib/libpcsclite.so
card-timeout 5
disable-ccid
allow-admin
enable-pinpad-varlen

View File

@ -19,6 +19,11 @@ label=⌨
interval=once
signal=1
[login]
label=👤
command=echo "$USER@tty$XDG_VTNR"
interval=once
[time]
label=🕓
command=date +"%Y-%m-%dT%H:%M:%SZ"

View File

@ -6,6 +6,16 @@ set vi-ins-mode-string \1\e[1 q\2
set vi-cmd-mode-string \1\e[2 q\2
#################################
############# new ###############
set keymap vi-insert
"\C-a":beginning-of-line
"\C-e":end-of-line
"\C-b":backward-char
"\C-f":forward-char
"\eb":backward-word
"\ef":forward-word
#################################
##### remap - colemak-dh #######
# n -> h
@ -38,7 +48,7 @@ set keymap vi-command
"\C-k":next-history
# j -> e
set keymap vi-insert
"\C-e":self-insert
"\C-j":self-insert
set keymap vi-command
"j":vi-end-word
"J":vi-end-word

View File

@ -82,6 +82,7 @@ bindsym --to-code {
$mod+w layout tabbed
$altmod+w split v; layout tabbed
$mod+u split none
$altmod+u split none
$mod+y layout stacking
$altmod+y split h; layout stacking
}

View File

@ -46,6 +46,30 @@ set wildmenu
set wildmode=list:longest,full
set gdefault
" colors
set t_Co=16
set notermguicolors
set t_RV= " bugfix
" new
highlight LineNr ctermfg=5 ctermbg=none
autocmd VimEnter * highlight SignColumn ctermbg=none
" fg magenta (5) -> blue (4)
highlight Title term=bold ctermfg=4 gui=bold
highlight Special term=bold ctermfg=4
highlight PreProc term=underline ctermfg=4
highlight Underlined term=underline cterm=underline ctermfg=4 gui=underline
" fg blue (4 or 12) -> magenta (5)
highlight SpecialKey term=bold ctermfg=5
highlight Directory term=bold ctermfg=5
highlight Folded term=standout ctermfg=5 ctermbg=7
highlight FoldColumn term=standout ctermfg=5 ctermbg=7
highlight SignColumn term=standout ctermfg=5 ctermbg=7
highlight Comment term=bold ctermfg=5
highlight NonText term=bold ctermfg=5 gui=bold
highlight DiffDelete term=bold ctermfg=5 ctermbg=14 gui=bold
highlight Changed ctermfg=5
" bg
highlight SpellCap cterm=underline ctermfg=9 ctermbg=none gui=undercurl
"###########################################
"############## file-specific ###############
@ -93,6 +117,15 @@ noremap! <C-h> <C-o>
"#################################
"############### new keybinds ###############
cnoremap <C-a> <Home>
cnoremap <C-e> <End>
cnoremap <C-b> <Left>
cnoremap <C-f> <Right>
cnoremap <M-b> <S-Left>
cnoremap <M-f> <S-Right>
"############################################
"####### custom commands #########
" W - Save file as superuser
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!

View File

@ -16,7 +16,7 @@ xkb_symbols "yurmak" {
replace key <LCTL> { [ Super_L ] };
replace key <LWIN> { [ Alt_R ] };
replace key <LALT> { [ ISO_Level3_Shift ] };
replace key <RALT> { [ ALT_L ] };
replace key <RALT> { [ Alt_L ] };
#####################################
########### characters ##############