diff options
author | justanothercatgirl <sotov@twistea.su> | 2025-01-17 13:11:40 +0300 |
---|---|---|
committer | justanothercatgirl <sotov@twistea.su> | 2025-01-17 13:11:40 +0300 |
commit | fea38c3c191163ea3f14f2c90236ebbde75fcbe5 (patch) | |
tree | 8a442ee129a787b5b44834e82509fe340182df36 | |
parent | b265c328f04362225a9d001580d0b8f5963ee1d9 (diff) |
merged changes from laptop into pc dotfiles
-rw-r--r-- | .bashrc | 10 | ||||
-rw-r--r-- | .config/i3/config | 17 | ||||
-rw-r--r-- | .config/nvim/init.lua | 2 | ||||
-rw-r--r-- | .config/nvim/lua/user/autocommds.lua | 43 | ||||
-rw-r--r-- | .config/nvim/lua/user/coderunner.lua | 23 | ||||
-rw-r--r-- | .config/nvim/lua/user/options.lua | 8 | ||||
-rw-r--r-- | .config/nvim/lua/user/plugins.lua | 5 | ||||
-rw-r--r-- | .config/nvim/lua/user/remaps.lua | 15 | ||||
-rw-r--r-- | .config/nvim/lua/user/treesitter.lua | 21 | ||||
-rw-r--r-- | .config/picom/picom.conf | 6 | ||||
-rw-r--r-- | .config/sakura/sakura.conf | 2 |
11 files changed, 101 insertions, 51 deletions
@@ -1,6 +1,5 @@ source /etc/profile -source /etc/environment source "$HOME/.cursed_bash.sh" source /usr/share/git/git-prompt.sh source /usr/share/doc/pkgfile/command-not-found.bash @@ -9,18 +8,17 @@ eval "$(zoxide init --cmd cd bash)" # application shortcuts alias ls="ls --color" -alias cat=lolcat alias dl="~/.local/bin/download" alias qmake="/usr/lib/qt6/bin/qmake" alias psiphon="psiphon-console-client" alias cppreference="microsoft-edge-dev /usr/share/doc/cppreference/en/cpp.html" alias lan="/home/main/zerotierconnect.sh" alias python=/home/main/coding/py/venv/bin/python3 +alias pip=/home/main/coding/py/venv/bin/pip3 alias pdf=mupdf -alias config='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' -alias siskictl=systemctl -alias boobs=systemctl -alias tmux="tmux -f ~/.config/tmux.conf" +alias cat=lolcat +alias texclean="rm -i *.aux *.log *latexmk *.xdv *.fls *.toc *.out" +alias cal="cal -m --color=always" # shell options shopt -s autocd diff --git a/.config/i3/config b/.config/i3/config index 27f981a..07ffa92 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -15,14 +15,13 @@ exec --no-startup-id dex --autostart --environment i3 # REMOVED TEMPORARY # exec --no-startup-id xss-lock --transfer-sleep-lock -- $lock_cmd --nofork -# NetworkManager is the most popular way to manage wireless networks on Linux, -# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet +exec --no-startup-id devilspie -a exec --no-startup-id picom exec --no-startup-id xsettnigsd # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status -bindsym alt+shift exec $refresh_i3status bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +1% && $refresh_i3status bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -1% && $refresh_i3status bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status @@ -184,7 +183,7 @@ assign [class="dotnet"] workspace $ws7 assign [class="^Minecraft.*$"] workspace $ws7 assign [class="vlc"] workspace $ws8 assign [class="spotify"] workspace $ws8 -assign [class="Spotyfi"] workspace $ws8 +assign [class="Spotify"] workspace $ws8 #monitors @@ -285,7 +284,7 @@ exec_always ~/.screenlayout/doublemonitor.layout.sh # exec openrgb --color "00FFFF" exec $terminal -exec $terminal -e btop +exec $terminal -e bashtop exec firefox exec telegram-desktop exec discord @@ -295,12 +294,10 @@ exec discord # * source1 (weibo): https://www.weibo.com/6593199887/L3yxyEJ1T # * source2 (gelbooru): https://gelbooru.com/index.php?page=post&s=view&id=7506062 exec_always feh --bg-fill ~/wallpaper/yae_beautiful_1.jpg -# exec_always setxkbmap -layout us,ru,kr -option grp:alt_shift_toggle korean:ralt_hangul exec_always setxkbmap -layout us,ru -option grp:alt_shift_toggle exec_always ~/.screenlayout/fullscreen.sh -exec_always xset r rate 222 45 -exec_always fcitx5 -d -exec_always xinput --set-prop 'pointer:''INSTANT USB GAMING MOUSE ' 'libinput Accel Profile Enabled' 0, 1 -exec_always xinput --set-prop 'pointer:''INSTANT USB GAMING MOUSE ' 'libinput Accel Speed' 0.5 +# exec_always xset r rate 269 19 +exec_always xset r rate 199 44 + # empty lines at the EOF diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 5bc1dd7..c6ee418 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -2,9 +2,11 @@ require "user.beautiful" require "user.options" require "user.plugins" require "user.remaps" +require "user.autocommds" require "user.toggleterm" require "user.lspinit" require "user.treesitter" require "user.coderunner" require "user.debugger" +-- autocmd to load lsp seems to break it diff --git a/.config/nvim/lua/user/autocommds.lua b/.config/nvim/lua/user/autocommds.lua new file mode 100644 index 0000000..934cda8 --- /dev/null +++ b/.config/nvim/lua/user/autocommds.lua @@ -0,0 +1,43 @@ + +local reloadgroup = vim.api.nvim_create_augroup("ReloadGroup", { clear = true }) +require'user.remaps' + +vim.api.nvim_create_autocmd ( + "BufWritePost", + { + group = reloadgroup, + pattern = "*.tex", + callback = function() + vim.system( {'bash', + '-c', + "latexmk -shell-escape -xelatex " .. vim.fn.expand('%:t') .. " && pkill -HUP mupdf"}, + {detach = true}) + end} +) + +vim.api.nvim_create_autocmd ( + {"BufRead", "BufNewFile"}, { + pattern = {"*.tex"}, + callback = function() + if (global_inde == nil) then + global_inde = vim.opt.indentexpr:get() + end + vim.bo.autoindent = false + vim.bo.smartindent = false + vim.bo.cindent = false + vim.bo.indentexpr = nil + end, +}) + +-- vim.api.nvim_create_autocmd ( +-- "InsertEnter", { +-- once = true, +-- group = reloadgroup, +-- pattern = "*.tex", +-- callback = function() +-- vim.system( +-- {'latexmk', '-xelatex', '-pvc', vim.fn.expand('%:t')}, +-- { detach = true }) +-- end +-- } +-- ) diff --git a/.config/nvim/lua/user/coderunner.lua b/.config/nvim/lua/user/coderunner.lua index 843534f..77330ab 100644 --- a/.config/nvim/lua/user/coderunner.lua +++ b/.config/nvim/lua/user/coderunner.lua @@ -1,15 +1,5 @@ local term = require'toggleterm' -cxx = function() - local script = - 'echo $file > /dev/null;' .. - 'OLDPWD_=\\${PWD};' .. - 'while [[ ! -f CMakeLists.txt || ! -f compile_commands.json && \\\"\\$PWD\\\" != / ]]; do cd ..; done;' .. - 'if [[ -f CMakeLists.txt && -f compile_commands.json ]]; then mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make -j24 && ' .. - './\\$(sed -nr \\\"/add_executable/s/.*add_executable\\\\((\\\\S+).+/\\\\1/p\\\" ../CMakeLists.txt); fi;' .. - 'cd ${OLDPWD_}' - vim.cmd(string.format("TermExec cmd='%s'", script)) -end -- Define the code runner configuration require('code_runner').setup({ mode = "toggleterm", @@ -17,9 +7,16 @@ require('code_runner').setup({ startinsert = true, filetype = { rust = 'cargo check; if [ \\$? -ne 0 ]; then echo cargo check failed; else cargo run || cargo test -- --nocapture --test-threads=1; fi; echo $file > /dev/null', - cpp = cxx, - c = cxx, + cpp = function() + local script = + 'echo $file > /dev/null;' .. + 'while [[ ! -f CMakeLists.txt && \\\"\\$PWD\\\" != / ]]; do cd ..; done;' .. + 'if [[ -f CMakeLists.txt ]]; then mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make -j24 && ' .. + './\\$(sed -nr \\\"/add_executable/s/.*add_executable\\\\((\\\\S+).+/\\\\1/p\\\" ../CMakeLists.txt); fi;' .. + 'cd ..' + vim.cmd(string.format("TermExec cmd='%s'", script)) + end, python = 'python3 $file', - tex = "mkdir -p build && if pdflatex -interaction=batchmode -output-directory=build -output-format=pdf $file; then killall -SIGHUP mupdf; else echo -e \\\\\\\\x1b[1\\\\;31mBUILD FAILED\\\\\\\\x1b[0m; fi" + tex = 'mkdir -p build && pdflatex -output-directory=build -output-format=PDF $file' }, }) diff --git a/.config/nvim/lua/user/options.lua b/.config/nvim/lua/user/options.lua index 7a768ab..efa207a 100644 --- a/.config/nvim/lua/user/options.lua +++ b/.config/nvim/lua/user/options.lua @@ -23,7 +23,7 @@ local options = { expandtab = false, -- !!!!!!!!! cursorline = false, number = true, - relativenumber = true, + relativenumber = true, wrap = false, -- splitting splitbelow = true, @@ -32,9 +32,9 @@ local options = { completeopt = { 'menuone', 'noselect', 'noinsert' }, -- treesitter foldlevel = 3, - spell= true, - spelllang="en_gb,ru_yo", - mousemodel="popup", + spell = ture, + spelllang = "en_gb,ru_yo", + mousemodel = "popup", spellsuggest = "best,5", undofile = true, undodir = "/home/main/.vim/undo", diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index 06b52d1..e632cff 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -24,7 +24,6 @@ plugins = { { "windwp/nvim-autopairs", event = { "InsertEnter" }, -- automatically pair brackets and quotes - }, { "tpope/vim-surround", -- replace quotes e.t.c @@ -46,7 +45,7 @@ plugins = { { "simrat39/rust-tools.nvim" }, -- no commments - -- { "hrsh7th/vim-vsnip" }, -- snippet engine + { "hrsh7th/vim-vsnip" }, -- snippet engine { "L3MON4D3/LuaSnip", -- better snippet engine event = { "InsertEnter" }, @@ -111,7 +110,7 @@ plugins = { -- dependencies = 'nvim-tree/nvim-web-devicons' -- for more details on how to configure this plugin in details please see `:h bufferline-configuration` }, - --{ "lvimuser/lsp-inlayhints.nvim" } -- saved for the better times + -- { "lvimuser/lsp-inlayhints.nvim" } -- saved for the better times -- DEBUGGER CONFIGURATION { diff --git a/.config/nvim/lua/user/remaps.lua b/.config/nvim/lua/user/remaps.lua index 8839890..8e9ee26 100644 --- a/.config/nvim/lua/user/remaps.lua +++ b/.config/nvim/lua/user/remaps.lua @@ -99,6 +99,21 @@ lmap("n", "d]", vim.diagnostic.goto_next) map("n", "<F5>", ":RunCode<CR>", opt) map("n", "<F2>", ":echo 'time: ' . strftime('%c')<CR>", opt) +lmap("n", "<F8>", function() + if (global_inde == nil) then + global_inde = vim.opt.indentexpr:get() + end + inde = vim.opt.indentexpr:get() + if inde ~= "" then + vim.opt.indentexpr = "" + print"indentation disabled" + else + vim.opt.indentexpr = global_inde + print"indentation enabled" + end + vim.cmd("set si! cin! ai!") +end) + -- language server remaps -- enable only after attaching language server to buffer vim.api.nvim_create_autocmd('LspAttach', { diff --git a/.config/nvim/lua/user/treesitter.lua b/.config/nvim/lua/user/treesitter.lua index 2f4d6b8..4ba181b 100644 --- a/.config/nvim/lua/user/treesitter.lua +++ b/.config/nvim/lua/user/treesitter.lua @@ -3,26 +3,27 @@ local ts = require 'nvim-treesitter' local tsc = require 'nvim-treesitter.configs' + local tsp = require 'nvim-treesitter.parsers' local tsi = require 'nvim-treesitter.install' - + vim.wo.foldmethod = 'expr' vim.wo.foldexpr = 'nvim_treesitter#foldexpr()' - + tsi.compilers = { 'clang' } vim.filetype.add{ - pattern = {[".*/hypr/.*%.conf"] = "hyprlang"}, + pattern = {[".*/hypr/.*%.conf"] = "hyprlang"}, } tsp.get_parser_configs().hyprland = { - install_info = { - url = "~/src/tree-sitter-hyprlang/", - files = {"src/parser.c"}, - branch = "master", - requires_generate_from_grammar = false, --ligma ballse - }, - filetype = "hyprlang", + install_info = { + url = "~/src/tree-sitter-hyprlang/", + files = {"src/parser.c"}, + branch = "master", + requires_generate_from_grammar = false, --ligma ballse + }, + filetype = "hyprlang", } diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf index 8b8d013..a80e35c 100644 --- a/.config/picom/picom.conf +++ b/.config/picom/picom.conf @@ -7,7 +7,8 @@ no-fading-openclose = false; no-fading-destroyed-args = true; shadow = false; // high CPU load and degraded performance in terminal corner-radius = 13; -backend = "xrender"; +backend = "glx"; + rounded-corners-exclude = [ "window_type = 'dock'", "class_g = 'i3bar'", @@ -17,8 +18,6 @@ opacity-rule = [ "100: name *= 'Pornhub'", // not sus "100: name ~= 'ヰカちゃん♡♡~ – \\\\([0-9]+\\\\)'", // my girlfriend is more important than my rice "100: name ~= 'Вика Цой'", - "100: class_g *= 'mupdf'", - "100: class_g *= 'firefox'", // rules for calls break the media viewing so this is a workaround "99: class_g *= 'Telegram' && name = 'Media viewer' && focused", @@ -46,4 +45,3 @@ wintypes = { dock = { fade = false }; dnd = { fade = false }; }; - diff --git a/.config/sakura/sakura.conf b/.config/sakura/sakura.conf index 2134906..759cc2b 100644 --- a/.config/sakura/sakura.conf +++ b/.config/sakura/sakura.conf @@ -32,7 +32,7 @@ colorset6_key=F6 last_colorset=1 bold_is_bright=false scroll_lines=4096 -font=OverpassM Nerd Font 12 +font=IosevkaTerm Nerd Font Mono Oblique 13 show_tab_bar=multiple scrollbar=false closebutton=false |