diff --git a/.bashrc b/.bashrc index ebbc92a..2431324 100644 --- a/.bashrc +++ b/.bashrc @@ -1,34 +1,21 @@ -# .bashrc +#### GENERAL 3 ############################################################ +export PS1='\u@\h: \w $ ' -# Source global definitions -if [ -f /etc/bashrc ]; then - . /etc/bashrc -fi +export PATH="$PATH:/usr/sbin:/sbin:/bin:/usr/bin:/etc:/usr/ucb:/usr/local/bin:/usr/local/local_dfs/bin:/usr/bin/X11:/usr/local/sas" +export PATH="$HOME/.local/share/bin:$HOME/.local/bin:$PATH" +export MANPATH="/usr/share/man:/usr/local/man:/usr/local/local_dfs/man" -# User specific environment -if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then - PATH="$HOME/.local/bin:$HOME/bin:$PATH" -fi -export PATH +export PAGER=less +export EDITOR="/usr/local/bin/vim" -# Uncomment the following line if you don't like systemctl's auto-paging feature: -# export SYSTEMD_PAGER= - -# User specific aliases and functions -if [ -d ~/.bashrc.d ]; then - for rc in ~/.bashrc.d/*; do - if [ -f "$rc" ]; then - . "$rc" - fi - done -fi -unset rc +unset MAILCHECK #### USER DEFINED ######################################################### -alias vi="gvim -v" -alias fedora="distrobox-enter fedora" +alias pi="ssh pi@192.168.0.103" +alias pipi="ssh root@192.168.0.103" -. "$HOME/.local/share/../bin/env" +alias vps="ssh main@74.208.174.125" +alias vpsvps="ssh root@74.208.174.125" -export PATH="$HOME/.local/share/bin:$PATH" +alias ls="ls --color" diff --git a/.gitconfig b/.gitconfig index d464973..997344e 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,7 +1,9 @@ [user] - name = igor - email = igor@kolokolnikov.net + name = Igor Kolokolnikov + email = igor@kolokolnikov.dev [alias] lg = log --oneline --decorate --graph --all --parents [pull] rebase = true +[core] + editor = vim diff --git a/.gitignore b/.gitignore index aeae017..e43b0f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ .DS_Store -xournalapp/settings.xml diff --git a/.tmux.conf b/.tmux.conf index f15fc04..3f1e50d 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,29 +1,19 @@ -set -g default-terminal "xterm-256color" -set -ga terminal-overrides ",*256col*:Tc" +#set -g default-terminal "xterm-256color" +#set -ga terminal-overrides ",*256col*:Tc" set -g prefix C-s unbind C-b bind-key C-s send-prefix -# unbind % -# bind | split-window -h -# -# unbind '"' -# bind - split-window -v - unbind r bind r source-file ~/.tmux.conf -# bindkey \^K kill-line -# bind -n C-k clear-history - set -g history-limit 100000 set -s escape-time 0 set -g focus-events on set -g display-time 4000 set -g status-interval 5 #set -g status-keys emacs - setw -g mode-keys vi bind '"' split-window -c "#{pane_current_path}" @@ -33,14 +23,11 @@ bind c new-window -c "#{pane_current_path}" set-option -g renumber-windows on # set -g mouse on -bind-key -T copy-mode-vi 'v' send -X begin-selection -bind-key -T copy-mode-vi 'y' send -X copy-pipe "pbcopy" # pbcopy is MacOS specific -unbind -T copy-mode-vi MouseDragEnd1Pane bind-key K clear-history -bind-key H swap-window -t -1 -bind-key L swap-window -t +1 +bind-key H swap-window -t -1 -d +bind-key L swap-window -t +1 -d bind-key -T prefix C-o select-pane -t :.+ bind-key h select-pane -L @@ -54,4 +41,3 @@ bind-key -r Left resize-pane -L 2 bind-key -r Right resize-pane -R 2 bind -r m resize-pane -Z -set -g message-style 'fg=#D74E42 bg=#0D1117 bold' diff --git a/.vimrc b/.vimrc index 387830b..6dd355e 100644 --- a/.vimrc +++ b/.vimrc @@ -6,9 +6,9 @@ colorscheme habamax set nobackup nowritebackup set noswapfile -set number +"set number -set tabstop=8 +set tabstop=4 set shiftwidth=4 set softtabstop=4 set expandtab @@ -31,7 +31,6 @@ set timeoutlen=1000 set ttimeoutlen=0 set hidden set wildmenu -set clipboard=unnamed,unnamedplus set colorcolumn=75 "set backspace=indent,eol,start @@ -78,31 +77,64 @@ function! CreateOrSelectWindow() endfunction function! PutIntoShade() - let max_width = float2nr(&columns * 0.95) - let min_width = float2nr(&columns * 0.5) + let shade = float2nr(&columns * 0.95) + let default = float2nr(&columns * 0.5) + let min = float2nr(&columns * 0.5) - if winwidth(0) > min_width - execute 'vertical resize ' . min_width - elseif winwidth(0) <= min_width - execute 'vertical resize ' . max_width + if winwidth(0) <= min + execute 'vertical resize ' . shade + else + execute 'vertical resize ' . default endif endfunction " Preserve paste line column function! PasteAbove() + let l = getline('.') let c = col('.') + normal! P - call cursor(0, c) + + if getline('.') == l + call cursor(0, c) + endif endfunction function! PasteBelow() + let l = getline('.') let c = col('.') + normal! p - call cursor(0, c) + + if getline('.') == l + call cursor(0, c) + endif +endfunction + +function! IsPreviewOpen() abort + for l:win in range(1, winnr('$')) + if getwinvar(l:win, '&previewwindow') == 1 + return 1 + endif + endfor + + return 0 +endfunction + +function! TagsTogglePreview(symbol) + if IsPreviewOpen() + execute 'pclose' + else + execute 'ptag ' . a:symbol + endif endfunction " ----- Custom Keymaps ---------------------------------------------------- -nnoremap K +"nnoremap K + +xnoremap p P + +nnoremap ` ngnP vnoremap > >:normal gv vnoremap < <:normal gv @@ -119,6 +151,8 @@ nnoremap < :cp nnoremap g/ :noh +nnoremap gs :w + nnoremap E :Ex nnoremap z :set relativenumber! @@ -137,6 +171,8 @@ nnoremap # :call PutIntoShade() nnoremap P :call PasteAbove() nnoremap p :call PasteBelow() +nnoremap cp :call TagsTogglePreview(expand('')) + " ----- Highlights -------------------------------------------------------- " Todo Comments highlights " Colors: https://vim.fandom.com/wiki/Xterm256_color_names_for_console_Vim @@ -157,3 +193,5 @@ augroup HiglightTODO autocmd WinEnter,VimEnter * :silent! call matchadd('TODOFix', 'FIX:', -1) autocmd WinEnter,VimEnter * :silent! call matchadd('TODOWarning', 'WARNING:', -1) augroup END + +set clipboard=unnamed diff --git a/ghostty/config b/ghostty/config index 2d81b56..c07d326 100644 --- a/ghostty/config +++ b/ghostty/config @@ -1,8 +1,11 @@ auto-update = off app-notifications = no-clipboard-copy -font-family = Courier Prime -font-size = 11 +#font-family = Courier Prime Code +#font-size = 12 + +font-family = Iosevka Term Slab +font-size = 12 theme = "Kanagawa Dragon" @@ -23,3 +26,6 @@ keybind = ctrl+shift+j=goto_split:bottom keybind = cmd+enter=ignore keybind = ctrl+enter=ignore + +keybind = ctrl+page_up=unbind +keybind = ctrl+page_down=unbind diff --git a/link.sh b/link.sh index f443df9..bc9cd09 100755 --- a/link.sh +++ b/link.sh @@ -15,5 +15,5 @@ ln -s "$dotfiles/.tmux.conf" "$HOME/" ln -s "$dotfiles/focus-editor" "$HOME/.config/" ln -s "$dotfiles/ghostty" "$HOME/.config/" ln -s "$dotfiles/xournalpp" "$HOME/.config/" -#ln -s "$dotfiles/nvim" "$HOME/.config/" +ln -s "$dotfiles/nvim" "$HOME/.config/" ln -s "$dotfiles/gf2_config.ini" "$HOME/.config/" diff --git a/nvim/init.lua b/nvim/init.lua index 3452121..74127f9 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -44,6 +44,10 @@ require("lazy").setup({ -- mappings here... end }, + { + "L3MON4D3/LuaSnip", + version = "v2.5", + }, }, install = { colorscheme = { "habamax" } }, @@ -82,27 +86,41 @@ vim.opt.signcolumn = "auto" vim.g.mapleader = " " vim.g.maplocalleader = "\\" +function! ResizeIfTooWide() + let max_width = float2nr(&columns * 0.8) + + if winwidth(0) > max_width + execute 'vertical resize ' . float2nr(&columns * 0.5) + endif +endfunction + ----- Keybinds ------------------------------------------------------------ local map = vim.keymap.set local NS = { noremap = true, silent = true } -map("n", "K", "", NS) -map("v", ">", ">gv", NS) -map("v", "<", "+1gv=gv", NS) -map("v", "K", ":m '<-2gv=gv", NS) -map("n", "H", ":bnextzz", NS) -map("n", "L", ":bprevzz", NS) -map("n", ",", ":copen", NS) -map("n", ">", ":cn", NS) -map("n", "<", ":cp", NS) -map("n", "\\", ":noh", NS) -map("n", "E", ":Ex", NS) -map("n", "z", ":set relativenumber", NS) -map("n", "x", ":set norelativenumber", NS) -map("n", "gb", ":make", NS) -map("n", "gs", ":w", NS) -map("n", "ghp", ":Gitsigns preview_hunk_inline", NS) -map("n", "gs", ":w", NS) -map('n', 'ff', function() require('telescope.builtin').find_files() end, NS) -map('n', 'fg', function() require('telescope.builtin').live_grep() end, NS) -map('x', 'ga', function() require('align').align_to_string({ preview = true, regex = false }) end, NS) +map("n", "gw", ":bdelete", NS) +map("n", "K", "", NS) +map("v", ">", ">gv", NS) +map("v", "<", "+1gv=gv", NS) +map("v", "K", ":m '<-2gv=gv", NS) +map("n", "H", ":bnextzz", NS) +map("n", "L", ":bprevzz", NS) +map("n", ",", ":copen", NS) +map("n", ">", ":cn", NS) +map("n", "<", ":cp", NS) +map("n", "\\", ":noh", NS) +map("n", "E", ":Ex", NS) +map("n", "z", ":set relativenumber", NS) +map("n", "x", ":set norelativenumber", NS) +map("n", "gb", ":make", NS) +map("n", "gs", ":w", NS) +map("n", "ghp", ":Gitsigns preview_hunk_inline", NS) +map("n", "gs", ":w", NS) +map('n', 'ff', function() require('telescope.builtin').find_files() end, NS) +map('n', 'fg', function() require('telescope.builtin').live_grep() end, NS) +map('x', 'ga', function() require('align').align_to_string({ preview = true, regex = false }) end, NS) +map({'i'}, '', function() require('luasnip').expand() end, NS) +map({'i', 's'}, '', function() require('luasnip').jump( 1) end, NS) +map({'i', 's'}, '', function() require('luasnip').jump(-1) end, NS) +map({'i', 's'}, '', function() if require('luasnip').choice_active() then require('luasnip').change_choice(1) end end, NS) +map("n", "#", ":execute 'vertical resize ' . float2nr(&columns * 0.9)", NS) diff --git a/ssh_config b/ssh_config index 14e143e..ad28b66 100644 --- a/ssh_config +++ b/ssh_config @@ -1,16 +1,24 @@ -Host * - ServerAliveInterval 60 +Host 74.208.174.125 + HostName 74.208.174.125 + User root + IdentityFile ~/.ssh/ionos_root -Host github.com - AddKeysToAgent yes - IdentityFile ~/.ssh/id_ed25519 - -Host 143.198.224.192 - User git - AddKeysToAgent yes - IdentityFile ~/.ssh/gitea +Host 74.208.174.125 + HostName 74.208.174.125 + User main + IdentityFile ~/.ssh/ionos_main Host git.kolokolnikov.dev - User git - AddKeysToAgent yes - IdentityFile ~/.ssh/gitea + HostName git.kolokolnikov.dev + User git + IdentityFile ~/.ssh/gitea + +Host 192.168.0.103 + HostName 192.168.0.103 + User pi + IdentityFile ~/.ssh/id_rsa + +Host 192.168.0.103 + HostName 192.168.0.103 + User root + IdentityFile ~/.ssh/id_rsa diff --git a/systemd/user/default.target.wants/fn_lock_server.service b/systemd/user/default.target.wants/fn_lock_server.service deleted file mode 120000 index 694cd68..0000000 --- a/systemd/user/default.target.wants/fn_lock_server.service +++ /dev/null @@ -1 +0,0 @@ -/home/igor/.config/systemd/user/fn_lock_server.service \ No newline at end of file diff --git a/systemd/user/default.target.wants/gpu-screen-recorder-ui.service b/systemd/user/default.target.wants/gpu-screen-recorder-ui.service deleted file mode 120000 index ec61023..0000000 --- a/systemd/user/default.target.wants/gpu-screen-recorder-ui.service +++ /dev/null @@ -1 +0,0 @@ -/home/igor/.local/share/systemd/user/gpu-screen-recorder-ui.service \ No newline at end of file diff --git a/systemd/user/default.target.wants/syncthing.service b/systemd/user/default.target.wants/syncthing.service deleted file mode 120000 index 6530dfb..0000000 --- a/systemd/user/default.target.wants/syncthing.service +++ /dev/null @@ -1 +0,0 @@ -/home/igor/.config/systemd/user/syncthing.service \ No newline at end of file diff --git a/systemd/user/fn_lock_server.service b/systemd/user/fn_lock_server.service deleted file mode 100644 index a714efa..0000000 --- a/systemd/user/fn_lock_server.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Apple Magic Keyboard FN Lock -After=network.target - -[Service] -ExecStart=/home/igor/Developer/linux/fn_lock_server/fn_lock_server -Type=forking - -[Install] -WantedBy=default.target diff --git a/systemd/user/syncthing.service b/systemd/user/syncthing.service deleted file mode 100644 index dde08ff..0000000 --- a/systemd/user/syncthing.service +++ /dev/null @@ -1,27 +0,0 @@ -[Unit] -Description=Syncthing - Open Source Continuous File Synchronization -Documentation=man:syncthing(1) -StartLimitIntervalSec=60 -StartLimitBurst=4 - -[Service] -Environment="STLOGFORMATTIMESTAMP=" -Environment="STLOGFORMATLEVELSTRING=false" -Environment="STLOGFORMATLEVELSYSLOG=true" -ExecStart=/home/igor/.local/bin/syncthing serve --no-browser --no-restart -Restart=on-failure -RestartSec=1 -SuccessExitStatus=3 4 -RestartForceExitStatus=3 4 - -# Hardening -SystemCallArchitectures=native -MemoryDenyWriteExecute=true -NoNewPrivileges=true - -# Elevated permissions to sync ownership (disabled by default), -# see https://docs.syncthing.net/advanced/folder-sync-ownership -#AmbientCapabilities=CAP_CHOWN CAP_FOWNER - -[Install] -WantedBy=default.target diff --git a/xournalapp/palette.gpl b/xournalpp/palette.gpl similarity index 100% rename from xournalapp/palette.gpl rename to xournalpp/palette.gpl diff --git a/xournalpp/palettes/custom.gpl b/xournalpp/palettes/custom.gpl new file mode 100644 index 0000000..d17d394 --- /dev/null +++ b/xournalpp/palettes/custom.gpl @@ -0,0 +1,14 @@ +GIMP Palette +Name: My Custom Pallete +# + 13 17 23 Bunker + 16 133 255 Dodger Blue +152 195 121 Olivine +233 209 108 Rob Roy +215 78 66 Valencia +209 154 102 Whiskey +181 126 220 Lavender + 95 102 114 Shuttle Gray +198 204 215 Ghost +229 192 123 Harvest Ghost + 86 182 194 Fountain Blue diff --git a/xournalapp/plugins/xournal-keys/main.lua b/xournalpp/plugins/xournal-keys/main.lua similarity index 100% rename from xournalapp/plugins/xournal-keys/main.lua rename to xournalpp/plugins/xournal-keys/main.lua diff --git a/xournalapp/plugins/xournal-keys/plugin.ini b/xournalpp/plugins/xournal-keys/plugin.ini similarity index 100% rename from xournalapp/plugins/xournal-keys/plugin.ini rename to xournalpp/plugins/xournal-keys/plugin.ini diff --git a/xournalpp/settings.xml b/xournalpp/settings.xml new file mode 100644 index 0000000..f7e9ca2 --- /dev/null +++ b/xournalpp/settings.xml @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xournalapp/toolbar.ini b/xournalpp/toolbar.ini similarity index 100% rename from xournalapp/toolbar.ini rename to xournalpp/toolbar.ini