commit 23eb464d0dbdb31f09426188d63269df4e4315f2
parent ab1f55a4fc501dd8ca705757913b6a44472acfc5
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date: Sun, 10 Jul 2022 13:49:56 +0200
Merge branch 'zenbook'
Diffstat:
14 files changed, 251 insertions(+), 45 deletions(-)
diff --git a/.gitmodules b/.gitmodules
@@ -4,3 +4,6 @@
[submodule "astroid/.config/astroid/kpxcnm"]
path = astroid/.config/astroid/kpxcnm
url = git@github.com:Ashymad/kpxcnm
+[submodule "polybar/.config/polybar/polybar-scripts"]
+ path = polybar/.config/polybar/polybar-scripts
+ url = https://github.com/polybar/polybar-scripts.git
diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml
@@ -75,7 +75,7 @@ font:
style: Italic
# Point size of the font
- size: 12.0
+ size: 14.0
# Offset is the extra space around each character. offset.y can be thought of
# as modifying the linespacing, and offset.x as modifying the letter spacing.
@@ -145,12 +145,13 @@ colors:
#
# To completely disable the visual bell, set its duration to 0.
#
-visual_bell:
+bell:
animation: EaseOutExpo
duration: 0
# Background opacity
-background_opacity: 0.9019607843137255
+window:
+ opacity: 0.9
# Mouse bindings
#
@@ -244,7 +245,7 @@ key_bindings:
- { key: Insert, mods: Shift, action: PasteSelection }
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Control, action: IncreaseFontSize }
- - { key: Subtract, mods: Control, action: DecreaseFontSize }
+ - { key: Minus, mods: Control, action: DecreaseFontSize }
- { key: Up, mods: Control|Shift, action: ScrollToTop }
- { key: Down, mods: Control|Shift, action: ScrollToBottom }
- { key: PageUp, mods: Shift, action: ScrollPageUp }
diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish
@@ -6,6 +6,11 @@ alias ec "emacsclient -a \"\""
alias fcd 'cd (fd -I -L -d 8 -t d . ~ | fzf)'
alias bash 'env FISH_RAMP_DISABLE=1 bash'
alias psgr 'ps aux | grep'
+
+if test -n "$NVIM"
+ alias nvim nvr
+end
+
alias vim nvim
alias wine64 'env WINEPREFIX=/home/shyman/.wine64 WINEARCH=win64 wine'
@@ -19,7 +24,7 @@ alias wine32tricks 'env WINEPREFIX=/home/shyman/.wine32 WINEARCH=win32 winetrick
alias cmus='tmux attach-session -t cmus || tmux new-session -A -D -s cmus /usr/bin/cmus'
alias :q exit
-alias :e nvim
+alias :e nvr
if test "$XDG_SESSION_TYPE" = "x11"
alias :split 'i3-msg split v\; exec alacritty > /dev/null'
alias :vsplit 'i3-msg split h\; exec alacritty > /dev/null'
@@ -31,3 +36,4 @@ end
alias noproxy 'env http_proxy="" https_proxy="" ftp_proxy=""'
source /usr/share/autojump/autojump.fish
+direnv hook fish | source
diff --git a/fish/.config/fish/functions/extract_recursive.fish b/fish/.config/fish/functions/extract_recursive.fish
@@ -3,8 +3,7 @@ function extract_recursive
7z x $argv[1] -o$folname
echo "0" > /tmp/extrout
while read < /tmp/extrout
- find $folname \( -name '*.zip' -o -name '*.xz' -o -name '*.tar' -o -name '*.gz' -o -name "*.tgz" \) -type f -exec bash -c '7z x "{}" -o$(echo {} | sed \'s/\\.[^.]*$//\') && rm {}' \; | tee /tmp/extrout
- end
+ find $folname \( -name '*.zip' -o -name '*.xz' -o -name '*.tar' -o -name '*.gz' -o -name "*.tgz" -o -name "*.txz" \) -type f -exec bash -c '7z x "{}" -o$(echo "{}" | sed \'s/\\.[^.]*$//\') && rm "{}"' \; | tee /tmp/extrout
end
end
diff --git a/fish/.config/fish/functions/git-subpush.fish b/fish/.config/fish/functions/git-subpush.fish
@@ -0,0 +1,9 @@
+function git-subpush
+ set sub (basename (pwd))
+ git push
+ pushd ..
+ git add $sub
+ git commit -m "Update $sub"
+ git push
+ popd
+end
diff --git a/fish/.config/fish/functions/neovide.fish b/fish/.config/fish/functions/neovide.fish
@@ -0,0 +1,11 @@
+function neovide
+ set DISADR (echo $DISPLAY | cut -d':' -f1)
+ if test -n "$DISADR"
+ set LOCADR (ip -f inet addr show enp60s0u1u3u3 | sed -En -e 's/.*inet ([0-9.]+).*/\1/p')
+ nohup nvim --listen $LOCADR:8118 --headless $argv >/dev/null 2>&1 &
+ disown
+ ssh -T shyman@$DISADR "env DISPLAY=:0 neovide --remote-tcp $LOCADR:8118"
+ else
+ /home/mikulicz/Workspace/neovide/target/release/neovide -- $argv
+ end
+end
diff --git a/fish/.config/fish/functions/reademl.fish b/fish/.config/fish/functions/reademl.fish
@@ -0,0 +1,3 @@
+function reademl
+ awk 'BEGIN {var=9999;} {if ($2=="base64") {var=NR+1} else if (NR!=var && $0=="") {var=9999}; if (NR>var) print $0;}' $argv[1] | base64 -d
+end
diff --git a/i3/.i3/config.d/bindsyms b/i3/.i3/config.d/bindsyms
@@ -61,7 +61,7 @@ bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
-bindsym $mod+Shift+c exec cpp ~/.i3/config.in > ~/.i3/config; reload
+bindsym $mod+Shift+c exec cpp ~/.i3/config.in > ~/.i3/config && i3-msg 'reload'
bindsym $mod+Shift+r exec cpp ~/.i3/config.in > ~/.i3/config; restart
@@ -91,3 +91,6 @@ bindsym $mod+p exec --no-startup-id ~/.fehbg -r
// Take screenshot
bindsym $mod+Shift+s exec --no-startup-id flameshot gui
+
+// Toggle touvhpad
+bindsym $mod+F10 exec ~/.i3/toggle_touchpad.sh "Synaptics TM3276-022"
diff --git a/i3/.i3/config.d/execs b/i3/.i3/config.d/execs
@@ -1,7 +1,8 @@
// vim: filetype=i3config
exec ~/.screenlayout/default.sh
-// exec --no-startup-id picom --experimental-backends
+exec --no-startup-id picom --experimental-backends
exec --no-startup-id xss-lock -l -- ~/.i3/lock.sh
+exec --no-startup-id nm-applet
exec --no-startup-id redshift-gtk
exec_always --no-startup-id ~/.config/polybar/launch.sh
exec sleep 1 && ~/.fehbg
diff --git a/i3/.i3/lock.sh b/i3/.i3/lock.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-export XSECURELOCK_FONT="Fira Mono"
-export XSECURELOCK_SAVER=saver_mpv
+export XSECURELOCK_FONT="-misc-liberation mono-medium-r-normal--0-0-0-0-m-0-iso10646-1"
+export XSECURELOCK_SAVER=$HOME/.local/share/xsecurelock/helpers/saver_mpv
export XSECURELOCK_PASSWORD_PROMPT=time_hex
export XSECURELOCK_LIST_VIDEOS_COMMAND="echo ~/.i3/BG.png"
export XSECURELOCK_IMAGE_DURATION_SECONDS=inf
diff --git a/nvim/.config/nvim/ginit.vim b/nvim/.config/nvim/ginit.vim
@@ -11,6 +11,8 @@ elseif exists('g:fvim_loaded')
nnoremap <A-CR> :FVimToggleFullScreen<CR>
endif
-set guifont=Fira\ Code:h14
+set guifont=Fira\ Code:h12
nnoremap <silent> <C-ScrollWheelUp> :set guifont=+<CR>
nnoremap <silent> <C-ScrollWheelDown> :set guifont=-<CR>
+colorscheme onehalfdark
+let g:neovide_transparency=0.9
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim
@@ -31,21 +31,33 @@ function! PackInit() abort
call minpac#add('paretje/deoplete-notmuch', {'type': 'opt'})
+ call minpac#add('rasjani/robotframework-vim', {'type': 'opt', 'subdir': 'after'})
+
+ call minpac#add('stephpy/vim-yaml', {'type': 'opt', 'subdir': 'after'})
+
+ call minpac#add('burnettk/vim-jenkins', {'type': 'opt'})
+
+ call minpac#add('godlygeek/tabular')
+ call minpac#add('plasticboy/vim-markdown', {'type': 'opt'})
+
+ call minpac#add('jackguo380/vim-lsp-cxx-highlight', {'type': 'opt'})
+
call minpac#add('sonph/onehalf', {'subdir': 'vim'})
call minpac#add('itchyny/lightline.vim')
call minpac#add('scrooloose/nerdtree')
call minpac#add('Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' })
- call minpac#add('Shougo/neosnippet.vim')
- call minpac#add('Shougo/neosnippet-snippets')
call minpac#add('tpope/vim-fugitive')
call minpac#add('chaoren/vim-wordmotion')
- call minpac#add('neovim/nvim-lsp')
+ call minpac#add("williamboman/nvim-lsp-installer")
+ call minpac#add('neovim/nvim-lspconfig')
call minpac#add('Shougo/deoplete-lsp')
+
+ call minpac#add('grafi-tt/lunajson', {'name': 'lunajson/lua', 'subdir': 'src'})
endfunction
command! PackUpdate call PackInit() | call minpac#update()
@@ -54,12 +66,6 @@ command! PackStatus call PackInit() | call minpac#status()
packloadall
-" Neosnipet
-" Note: It must be "imap" and "smap". It uses <Plug> mappings.
-imap <C-j> <Plug>(neosnippet_expand_or_jump)
-smap <C-j> <Plug>(neosnippet_expand_or_jump)
-xmap <C-j> <Plug>(neosnippet_expand_target)
-
" lightline
let g:lightline = {
\ 'colorscheme': 'onehalfdark',
@@ -75,14 +81,69 @@ endif
let g:vimtex_view_method = 'zathura'
let g:vimtex_compiler_progname = 'nvr'
let g:vimtex_quickfix_enabled = 0
+let g:vimtex_compiler_latexmk = {
+ \ 'options' : [
+ \ '-pdf',
+ \ '-shell-escape',
+ \ '-verbose',
+ \ '-file-line-error',
+ \ '-synctex=1',
+ \ '-interaction=nonstopmode',
+ \ ],
+ \}
"NERDTree
map <C-k> :NERDTreeToggle<CR>
+"Jenkins
+let g:jenkins_url = 'http://krk-sb13-19.soc-mgt.krk-lab.nsn-rdnet.net:8080'
+let g:jenkins_username = 'admin'
+let g:jenkins_password = 'egenrules'
+
" nvim-lsp
-lua require'nvim_lsp'.rust_analyzer.setup{}
-lua require'nvim_lsp'.pyls_ms.setup{cmd={"mspyls"}}
-lua require'nvim_lsp'.texlab.setup{}
+lua << EOF
+
+function nil2em(str)
+ if str == nil then
+ return ""
+ else
+ return str
+ end
+end
+
+require("nvim-lsp-installer").setup {}
+
+local clang = io.popen('clang -print-resource-dir')
+local lspconfig = require'lspconfig'
+local json = require'lunajson'
+local compc = io.open("compile_commands.json","r")
+local gccp = "gcc"
+
+if compc ~= nil then
+ gccp = json.decode(compc:read("*a"))[1].arguments[1]
+end
+
+local gccs = io.popen(gccp .. " -print-sysroot")
+local gcct = io.popen(gccp .. " -dumpmachine")
+
+lspconfig.ccls.setup {
+ init_options = {
+ clang = {
+ resourceDir = clang:read("*l");
+ extraArgs = {
+ "--sysroot="..nil2em(gccs:read("*l")).."/",
+ "-target="..gcct:read("*l")
+ };
+ };
+ highlight = {
+ lsRanges = true;
+ };
+ };
+ };
+
+gcct:close()
+clang:close()
+EOF
" Deoplete
inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>"
@@ -181,6 +242,18 @@ function SetFishOptions()
packadd vim-fish
endfunction
+autocmd BufNewFile,BufRead Jenkinsfile,*.Jenkinsfile call SetJenkinsfileOptions()
+function SetJenkinsfileOptions()
+ packadd vim-jenkins
+ setf perl
+endfunction
+
+autocmd BufNewFile,BufRead *.robot set filetype=robot
+autocmd Filetype robot call SetRobotOptions()
+function SetRobotOptions()
+ packadd robotframework-vim
+endfunction
+
autocmd Filetype i3config call SetI3Options()
function SetI3Options()
packadd i3config.vim
@@ -188,12 +261,34 @@ endfunction
au BufReadPost APKBUILD set syntax=sh noexpandtab
+autocmd Filetype markdown call SetMDOptions()
+function SetMDOptions()
+ packadd vim-markdown
+endfunction
+
+autocmd FileType yaml call SetYAMLOptions()
+function SetYAMLOptions()
+ packadd vim-yaml
+ setlocal ts=2 sts=2 sw=2 expandtab
+endfunction
+
+autocmd FileType c call SetCOptions()
+autocmd FileType cpp call SetCOptions()
+function SetCOptions()
+ packadd vim-lsp-cxx-highlight
+endfunction
+
+augroup LuaHighlight
+ autocmd!
+ autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank()
+augroup END
+
autocmd CompleteDone * silent! pclose
" vim settings
set hidden
-set lazyredraw
+" set lazyredraw
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
@@ -207,6 +302,7 @@ set shiftwidth=4
set expandtab
set autoindent
set noea
+set inccommand=split
filetype plugin indent on
@@ -215,6 +311,7 @@ syntax on
colorscheme onehalfdark
hi Normal guibg=none
hi LineNr guibg=none
+nmap ,d :b#<bar>bd#<CR>
tnoremap <Esc> <C-\><C-n>
au TermOpen * setlocal nonumber norelativenumber
diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config
@@ -57,8 +57,8 @@ font-0 = "Noto Mono:pixelsize=9;1"
font-1 = "Siji:pixelsize=10;1"
modules-left = i3
-modules-center = cmus
-modules-right = filesystem memory cpu eth xkeyboard date
+modules-center = cmus mpd
+modules-right = filesystem memory cpu ibacklight pipewire-simple eth docketh wlan vpn battery0 xkeyboard date
tray-position = left
tray-padding = 2
@@ -100,7 +100,6 @@ type = internal/fs
interval = 25
mount-0 = /
-mount-1 = /data
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
@@ -182,31 +181,31 @@ icon-play =
icon-pause =
icon-next =
-label-song-maxlen = 25
+label-song-maxlen = 50
label-song-ellipsis = true
-[module/xbacklight]
-type = internal/xbacklight
+[module/ibacklight]
+type = internal/backlight
+
+card = intel_backlight
+
+use-actual-brightness = true
-format = <label> <bar>
-label =
+enable-scroll = true
+
+format = <bar>
bar-width = 10
bar-indicator = |
bar-indicator-foreground = ${colors.foreground}
bar-indicator-font = 2
-bar-fill = ─
+bar-fill = ―
bar-fill-font = 2
bar-fill-foreground = ${colors.magenta}
-bar-empty = ─
+bar-empty = ―
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground}
-[module/backlight-acpi]
-inherit = module/xbacklight
-type = internal/backlight
-card = intel_backlight
-
[module/cpu]
type = internal/cpu
interval = 2
@@ -225,7 +224,7 @@ label = %percentage_used%%
[module/wlan]
type = internal/network
-interface = wlp3s0
+interface = wlp0s20f3
interval = 3.0
format-connected = <ramp-signal> <label-connected>
@@ -247,7 +246,41 @@ ramp-signal-foreground = ${colors.foreground}
[module/eth]
type = internal/network
-interface = enp4s0
+interface = enp0s31f6
+interval = 3.0
+
+format-connected-underline = #55aa55
+format-connected-prefix = " "
+format-connected-prefix-foreground = ${colors.foreground-alt}
+label-connected = %local_ip%
+
+format-disconnected =
+;format-disconnected = <label-disconnected>
+;format-disconnected-underline = ${self.format-connected-underline}
+;label-disconnected = %ifname% disconnected
+;label-disconnected-foreground = ${colors.foreground-alt}
+;
+
+[module/docketh]
+type = internal/network
+interface = enp60s0u1u3u3
+interval = 3.0
+
+format-connected-underline = #55aa55
+format-connected-prefix = " "
+format-connected-prefix-foreground = ${colors.foreground-alt}
+label-connected = %local_ip%
+
+format-disconnected =
+;format-disconnected = <label-disconnected>
+;format-disconnected-underline = ${self.format-connected-underline}
+;label-disconnected = %ifname% disconnected
+;label-disconnected-foreground = ${colors.foreground-alt}
+;
+
+[module/vpn]
+type = internal/network
+interface = vpn0
interval = 3.0
format-connected-underline = ${colors.green}
@@ -305,10 +338,47 @@ bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground}
-[module/battery]
+[module/pulseaudio]
+type = internal/pulseaudio
+
+format-volume = <label-volume> <bar-volume>
+label-volume = VOL
+label-volume-foreground = ${root.foreground}
+
+format-muted-prefix = " "
+format-muted-foreground = ${colors.foreground-alt}
+label-muted = sound muted
+
+bar-volume-width = 10
+bar-volume-foreground-0 = #55aa55
+bar-volume-foreground-1 = #55aa55
+bar-volume-foreground-2 = #55aa55
+bar-volume-foreground-3 = #55aa55
+bar-volume-foreground-4 = #55aa55
+bar-volume-foreground-5 = #f5a70a
+bar-volume-foreground-6 = #ff5555
+bar-volume-gradient = false
+bar-volume-indicator = |
+bar-volume-indicator-font = 2
+bar-volume-fill = ─
+bar-volume-fill-font = 2
+bar-volume-empty = ─
+bar-volume-empty-font = 2
+bar-volume-empty-foreground = ${colors.foreground-alt}
+
+[module/pipewire-simple]
+type = custom/script
+exec = ~/.config/polybar/polybar-scripts/polybar-scripts/pipewire-simple/pipewire-simple.sh
+interval = 3
+click-right = exec pavucontrol &
+click-left = ~/.config/polybar/polybar-scripts/polybar-scripts/pipewire-simple/pipewire-simple.sh --mute &
+scroll-up = ~/.config/polybar/polybar-scripts/polybar-scripts/pipewire-simple/pipewire-simple.sh --up &
+scroll-down = ~/.config/polybar/polybar-scripts/polybar-scripts/pipewire-simple/pipewire-simple.sh --down &
+
+[module/battery0]
type = internal/battery
-battery = BAT1
-adapter = ADP1
+battery = BAT0
+adapter = ADP0
full-at = 98
format-charging = <animation-charging> <label-charging>
diff --git a/polybar/.config/polybar/polybar-scripts b/polybar/.config/polybar/polybar-scripts
@@ -0,0 +1 @@
+Subproject commit 686f211546b77ced32a8487fe8c2a48f3b59c190