X-Git-Url: https://gitweb.ps.run/flake_thinkpad/blobdiff_plain/6d5e77492bd3b0032686f2351498726da5d98cd8..ac72bd3ed5bd39a5c77b43469a5274dad9a7ef95:/home.nix diff --git a/home.nix b/home.nix index fcf744d..3f34dd3 100644 --- a/home.nix +++ b/home.nix @@ -107,9 +107,7 @@ in bars = []; modifier = "Mod4"; terminal = "${pkgs.kitty}/bin/kitty"; - gaps = { - inner = 5; - }; + gaps = { inner = 0; outer = 0; }; keybindings = let mod = config.xsession.windowManager.i3.config.modifier; @@ -221,22 +219,24 @@ in "${mod}+y" = "exec --no-startup-id mirror-phone"; "${mod}+n" = "exec ${pkgs.kitty}/bin/kitty -d ~/sync/txt $EDITOR ."; "${mod}+m" = "exec --no-startup-id i3-msg $(${i3-max})"; + "${mod}+b" = "split toggle; layout tabbed"; "${mod}+Shift+m" = "exec --no-startup-id i3-msg $(${i3-move-max})"; "${mod}+Shift+p" = "exec --no-startup-id ${pkgs.autorandr}/bin/autorandr --match-edid -c -f"; }; }; extraConfig = '' - exec ${pkgs.xfce.xfce4-panel}/bin/xfce4-panel + # exec ${pkgs.xfce.xfce4-panel}/bin/xfce4-panel for_window [window_role="pop-up"] floating enable for_window [window_role="task_dialog"] floating enable # for_window [workspace="0"] floating enable for_window [class="kitty-popup"] floating enable for_window [class="Xfce4-appfinder"] floating enable - for_window [class=".blueman-manager-wrapped"] floating enable for_window [class="yakuake"] floating enable for_window [class="systemsettings"] floating enable for_window [title="win7"] floating enable; border none + for_window [title="Desktop — Plasma"] kill, floating enable, border none + for_window [title="Arbeitsfläche — Plasma"] kill, floating enable, border none # class border backgr. text indicator child_border client.focused #000000bf #000000bf #e6ebef #000000bf #000000bf @@ -386,32 +386,52 @@ in tnoremap map nnoremap :noh + nnoremap gr :Telescope lsp_references + nnoremap gd :Telescope lsp_definitions nnoremap u :UndotreeToggle :UndotreeFocus nnoremap f :Telescope find_files nnoremap b :Telescope buffers nnoremap e :Telescope diagnostics nnoremap g :Telescope live_grep nnoremap s :Telescope lsp_document_symbols - nnoremap r :Telescope lsp_references - nnoremap :Telescope lsp_references - nnoremap d :Telescope lsp_definitions - noremap y "+y" - noremap p "+p" - + nnoremap r :lua vim.lsp.buf.rename() + nnoremap n :bnext + nnoremap m :bprevious + noremap y "+y + noremap p "+p + noremap "+ + noremap "+ + + " Format on save " augroup FormatAutogroup " autocmd! " autocmd BufWritePost * FormatWrite " augroup END + " enter insert mode when opening terminal + autocmd TermOpen * startinsert + + " autocmd BufReadPost * \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit' \ | exe "normal! g`\"" \ | endif + + " Use persistent history. + if !isdirectory("/tmp/.vim-undo-dir") + call mkdir("/tmp/.vim-undo-dir", "", 0700) + endif + set undodir=/tmp/.vim-undo-dir + set undofile ''; extraLuaConfig = '' - require('lspconfig').zls.setup{} - require('lspconfig').clangd.setup{} + vim.lsp.enable('zls') + vim.lsp.enable('clangd') + vim.lsp.config('zuban', {}) + vim.lsp.enable('zuban') + require('guess-indent').setup {} local util = require('formatter.util') + local telescope = require('telescope') require('formatter').setup { logging = true, log_level = vim.log.levels.WARN, @@ -439,7 +459,12 @@ in }, completion = { list = { selection = { preselect = false, } }, + documentation = { + auto_show = true, + -- treesitter_highlighting = false, + }, }, + signature = { enabled = true }, } ''; }; @@ -734,6 +759,7 @@ in clang-tools bear linuxPackages_latest.perf texliveFull + asciidoctor-with-extensions emscripten caddy python3 @@ -758,7 +784,7 @@ in wireshark nil bc - ffmpeg + ffmpeg-full sc-im visidata localsend vis @@ -806,9 +832,8 @@ in (pkgs.writeShellScriptBin "fzfdir" '' find "$1" -name "$2" | ${pkgs.fzf}/bin/fzf --layout=reverse '') - (pkgs.writeShellScriptBin "md-app" '' - #popup bash -c 'file=$(fzfdir "md" "*.md") && run md $file' - firefox -p appmode --new-window localhost:8123/home/ps/sync/txt/hsrm + (pkgs.writeShellScriptBin "file-app" '' + app localhost:8123 '') (pkgs.writeShellScriptBin "run-popup" '' popup bash -c 'file=$(compgen -c | grep -v fzf | sort -u | fzf --layout=reverse --print-query | tail -n 1) && run $file'