From 34cda631d21fa4b0a679ed61570dc1eccb088711 Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Wed, 13 Mar 2024 11:48:31 +0100 Subject: [PATCH] Added some alias for eza/ls,vim/nvm and cat/bat Signed-off-by: TuDatTr --- .../.config/rofi/launchers/type-1/launcher.sh | 4 +- config/.conky/Conky_4K/conky.conf | 173 ++++++++++++++++++ config/.conky/Conky_4K/start-conky.sh | 80 ++++++++ config/.local/share/ranger/bookmarks | 2 +- config/.ssh/config | 8 +- vim/.config/nvim/lazy-lock.json | 41 +++-- vim/.config/nvim/lazyvim.json | 9 +- vim/.config/nvim/lua/plugins/rust.lua | 44 +++++ zsh/.zshrc | 3 + 9 files changed, 338 insertions(+), 26 deletions(-) create mode 100644 config/.conky/Conky_4K/conky.conf create mode 100755 config/.conky/Conky_4K/start-conky.sh create mode 100644 vim/.config/nvim/lua/plugins/rust.lua diff --git a/config/.config/rofi/launchers/type-1/launcher.sh b/config/.config/rofi/launchers/type-1/launcher.sh index 0d6ff71..437fcdc 100755 --- a/config/.config/rofi/launchers/type-1/launcher.sh +++ b/config/.config/rofi/launchers/type-1/launcher.sh @@ -16,5 +16,5 @@ theme='style-7' ## Run rofi \ - -show drun \ - -theme ${dir}/${theme}.rasi + -show run \ + -theme ${dir}/${theme}.rasi diff --git a/config/.conky/Conky_4K/conky.conf b/config/.conky/Conky_4K/conky.conf new file mode 100644 index 0000000..559fecc --- /dev/null +++ b/config/.conky/Conky_4K/conky.conf @@ -0,0 +1,173 @@ +--[[ +#===================================================================================== +# Date : package-date +# Author : Nicola Bicocchi +# Version : package-version +# License : Distributed under the terms of GNU GPL version 2 or later +#====================================================================================== +# CONKY +# For commands in conky.config section: +# http://conky.sourceforge.net/config_settings.html +# +# For commands in conky.text section: +# http://conky.sourceforge.net/variables.html +# +# A PDF with all variables is provided +#===================================================================================== +# FONTS +# To avoid copyright infringements you will have to download +# and install the fonts yourself sometimes. +#===================================================================================== +# GENERAL INFO ABOUT FONTS +# Go and look for a nice font on sites like http://www.dafont.com/ +# Download and unzip - double click the font to install it (font-manager must be installed) +# No font-manager then put fonts in ~/.fonts +# Change the font name in the conky +# The name can be known with a command in the terminal: fc-list | grep "part of name" +# Change width and height of the conky according to font +# Reboot your system or fc-cache -fv in terminal +# Enjoy +#===================================================================================== +]] + +conky.config = { + + --Various settings + + background = true, -- forked to background + cpu_avg_samples = 2, -- The number of samples to average for CPU monitoring. + diskio_avg_samples = 10, -- The number of samples to average for disk I/O monitoring. + double_buffer = true, -- Use the Xdbe extension? (eliminates flicker) + if_up_strictness = 'address', -- how strict if testing interface is up - up, link or address + net_avg_samples = 2, -- The number of samples to average for net data + no_buffers = true, -- Subtract (file system) buffers from used memory? + temperature_unit = 'celsius', -- fahrenheit or celsius + text_buffer_size = 2048, -- size of buffer for display of content of large variables - default 256 + update_interval = 2, -- update interval + imlib_cache_size = 0, -- disable image cache to get a new spotify cover per song + + + --Placement + + alignment = 'top_right', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right, + -- middle_left,middle_middle,middle_right,none + --Arch Duoscreen + --gap_x = -1910, + gap_x = 15, -- pixels between right or left border + gap_y = 0, -- pixels between bottom or left border + minimum_height = 1000, -- minimum height of window + minimum_width = 500, -- minimum width of window + maximum_width = 600, -- maximum width of window + + --Graphical + + border_inner_margin = 10, -- margin between border and text + border_outer_margin = 10, -- margin between border and edge of window + border_width = 0, -- border width in pixels + default_bar_width = 0, -- default is 0 - full width + default_bar_height = 25, -- default is 6 + default_gauge_height = 25, -- default is 25 + default_gauge_width = 0, -- default is 40 + default_graph_height = 80, -- default is 25 + default_graph_width = 0, -- default is 0 - full width + default_shade_color = '#000000', -- default shading colour + default_outline_color = '#000000', -- default outline colour + draw_borders = false, -- draw borders around text + draw_graph_borders = true, -- draw borders around graphs + draw_shades = false, -- draw shades + draw_outline = false, -- draw outline + stippled_borders = 0, -- dashing the border + + --Textual + + extra_newline = false, -- extra newline at the end - for asesome's wiboxes + format_human_readable = true, -- KiB, MiB rather then number of bytes + font = 'Roboto Mono:size=15', -- font for complete conky unless in code defined + max_text_width = 0, -- 0 will make sure line does not get broken if width too smal + max_user_text = 16384, -- max text in conky default 16384 + override_utf8_locale = true, -- force UTF8 requires xft + short_units = true, -- shorten units from KiB to k + top_name_width = 21, -- width for $top name value default 15 + top_name_verbose = false, -- If true, top name shows the full command line of each process - Default value is false. + uppercase = false, -- uppercase or not + use_spacer = 'none', -- adds spaces around certain objects to align - default none + use_xft = true, -- xft font - anti-aliased font + xftalpha = 1, -- alpha of the xft font - between 0-1 + + --Windows + + own_window = true, -- create your own window to draw + own_window_argb_value = 100, -- real transparency - composite manager required 0-255 + own_window_argb_visual = true, -- use ARGB - composite manager required + own_window_colour = '#000000', -- set colour if own_window_transparent no + own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', -- if own_window true - just hints - own_window_type sets it + own_window_transparent = false, -- if own_window_argb_visual is true sets background opacity 0% + own_window_title = 'system_conky', -- set the name manually - default conky "hostname" + own_window_type = 'normal', -- if own_window true options are: normal/override/dock/desktop/panel + + + --Colours + default_color = '#D9FFE2', + color1 = '#FF0000', + color2 = '#3E5570', + color3 = '#CCCCCC', + color4 = '#BBBBBB', + color5 = '#C0FF00', + color6 = '#FFFFFF', + + --Signal Colours + color7 = '#C0FF00', --green + color8 = '#FFA726', --orange + color9 = '#F1544B', --firebrick +}; + +conky.text = [[ +${color6}${font Roboto:size=140}${alignc}${time %H}:${time %M}${font} + +${color6}${font Roboto:size=25}${alignc}${time %A} ${time %B} ${time %e}, ${time %Y}${font} + +${color5}${font Roboto:style=Bold:size=17}S Y S T E M ${hr 2}${font} +${color6}Hostname:${color}${alignr}${nodename} +${color6}OS:${color}${alignr}${texeci 3600 lsb_release -d | awk '{$1=""; print $0}'} +${color6}Kernel:${color}${alignr}${kernel} +${color6}Uptime:${color}${alignr}${uptime} +${color6}Processes:${color}${alignr}${processes} + +${color5}${font Roboto:style=Bold:size=17}C P U ${hr 2}${font} +${color6}CPU Frequency:${color}${alignr}${freq}MHz +${color6}CPU Temperature:${color}${alignr}${texeci 30 sensors | grep "Package id 0" | cut -d ':' -f 2 | cut -d '(' -f 1 | tr -d ' '} +${color6}CPU Usage:${color}${alignr}${cpu}% +${cpugraph cpu0} +${color6}Top Processes ${alignr}${offset -40}PID ${alignr}${offset -20}CPU% ${alignr}Mem% +${color}${top name 1} ${alignr}${offset -75}${top pid 1}${alignr}${offset -45}${top cpu 1}${alignr}${top mem 1} +${color}${top name 2} ${alignr}${offset -75}${top pid 2}${alignr}${offset -45}${top cpu 2}${alignr}${top mem 2} +${color}${top name 3} ${alignr}${offset -75}${top pid 3}${alignr}${offset -45}${top cpu 3}${alignr}${top mem 3} + +${color5}${font Roboto:style=Bold:size=17}M E M O R Y ${hr 2}${font} +${color6}Swap Usage:${color}${alignr}${swap}/${swapmax} +${color6}Memory Usage:${color}${alignr}${mem}/${memmax} +${memgraph} +${color6}Top Processes ${alignr}${offset -40}PID ${alignr}${offset -20}CPU% ${alignr}Mem% +${color}${top_mem name 1} ${alignr}${offset -75}${top_mem pid 1}${alignr}${offset -45}${top_mem cpu 1}${alignr}${top_mem mem 1} +${color}${top_mem name 2} ${alignr}${offset -75}${top_mem pid 2}${alignr}${offset -45}${top_mem cpu 2}${alignr}${top_mem mem 2} +${color}${top_mem name 3} ${alignr}${offset -75}${top_mem pid 3}${alignr}${offset -45}${top_mem cpu 3}${alignr}${top_mem mem 3} + +${color5}${font Roboto:style=Bold:size=17}D I S K ${hr 2}${font} +${color6}Disk Usage:${color}${alignr}${fs_used /}/${fs_size /} +${color6}IO Read / Write:${color}${alignr}${diskio_read /dev/nvme0n1p2} / ${diskio_write /dev/nvme0n1p2} +${diskiograph_read nvme0n1p2} +${diskiograph_write nvme0n1p2} +${color6}Top Processes ${alignr}${offset -40}PID ${alignr}${offset -20}CPU% ${alignr}Mem% +${color}${top_io name 1} ${alignr}${offset -75}${top_io pid 1}${alignr}${offset -45}${top_io cpu 1}${alignr}${top_io mem 1} +${color}${top_io name 2} ${alignr}${offset -75}${top_io pid 2}${alignr}${offset -45}${top_io cpu 2}${alignr}${top_io mem 2} +${color}${top_io name 3} ${alignr}${offset -75}${top_io pid 3}${alignr}${offset -45}${top_io cpu 3}${alignr}${top_io mem 3} + +${color5}${font Roboto:style=Bold:size=17}N E T W O R K ${hr 2}${font} +${color6}Default Gateway:${color}${alignr}${gw_ip} +${color6}Internal IP Address:${color}${alignr}${addrs enp6s0} +${color6}External IP Address:${color}${alignr}${texeci 3600 wget -q -O- https://ipecho.net/plain} +${color6}Upload / Download Total:${color}${alignr}${totalup enp6s0} / ${totaldown enp6s0} +${color6}Upload / Download Speed:${color}${alignr}${upspeed enp6s0} / ${downspeed enp6s0} +${upspeedgraph enp6s0} +${downspeedgraph enp6s0} +]]; diff --git a/config/.conky/Conky_4K/start-conky.sh b/config/.conky/Conky_4K/start-conky.sh new file mode 100755 index 0000000..f58318b --- /dev/null +++ b/config/.conky/Conky_4K/start-conky.sh @@ -0,0 +1,80 @@ +#!/bin/sh +# vim: ft=sh:ts=4:sw=4:et:ai:cin + +conky_bin="conky" +config_file=$(dirname $0)/"conky.conf" +magic_id=$(md5sum "$config_file" | cut -c -12) +toggle_mode="N" + +usage() { + echo "USAGE: $(basename $0) [-t] [-p]" +} + +start_conky() { + "$conky_bin" --daemonize --quiet --config="$config_file" -- "$magic_id" + return $? +} + +stop_conky() { + pkill --signal kill --full "conky.*\s-- $magic_id" + return $? +} + +toggle_conky() { + if stop_conky; then + true + else + start_conky + fi +} + +restart_conky() { + stop_conky + sleep 1 + start_conky +} + +while getopts "tp:h" opt; do + case $opt in + t) # toggle mode on + toggle_mode="Y" + ;; + p) # path to conky binary + conky_bin=$(realpath -- "$OPTARG") + if [ -x "$conky_bin" ]; then + echo "Conky binary path: ${conky_bin}" + else + echo "ERROR: ${conky_bin} is not executable, path to Conky binary needed\n" >&2 + usage + exit 1 + fi + ;; + h) # help + usage + exit 1 + ;; + \?) + usage + exit 1 + ;; + esac +done +shift "$((OPTIND - 1))" + +if [ "$toggle_mode" == "Y" ]; then + toggle_conky +else + restart_conky +fi + +exit 0 + + + + + + + + + + diff --git a/config/.local/share/ranger/bookmarks b/config/.local/share/ranger/bookmarks index 29988b9..aa6638a 100644 --- a/config/.local/share/ranger/bookmarks +++ b/config/.local/share/ranger/bookmarks @@ -9,7 +9,7 @@ t:/home/tuan/Templates w:/home/tuan/workspace_l/home_lab/wiki k:/home/tuan/.syncthing/Documents/Uni/Studium/2022_Sommersemester/Bachelorprojekt/Implement EFCF based on libAFL/git/foundry/evm/src/executor q:/home/tuan/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/04-5G_IANA/02-gps -':/home/tuan +':/home/tuan/.syncthing/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/04-5G_IANA/03-demonstration_23-10-31/state 24-01-22/5g-uulm-network-monitoring e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon s:/home/tuan/Pictures/Screenshots v:/home/tuan/.aya01/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/06-Server_Setup/ansible diff --git a/config/.ssh/config b/config/.ssh/config index 52821c1..f352fae 100644 --- a/config/.ssh/config +++ b/config/.ssh/config @@ -38,13 +38,17 @@ Host pi pi.mii Host aya01 aya01.mii HostName 192.168.20.12 +Host behemoth behemoth.mii + User tuan + HostName 192.168.30.174 + Host mii HostName tudattr.dev -Host inko.mii pi.mii aya01.mii naruto.mii +Host inko.mii pi.mii aya01.mii naruto.mii behemoth.mii ProxyJump mii -Host mii pi aya01 inko naruto inko.mii pi.mii aya01.mii naruto.mii +Host mii pi aya01 inko naruto inko.mii pi.mii aya01.mii naruto.mii behemoth behemoth.mii Port 22 User tudattr IdentityFile /mnt/veracrypt1/genesis diff --git a/vim/.config/nvim/lazy-lock.json b/vim/.config/nvim/lazy-lock.json index 2ef522c..16de196 100644 --- a/vim/.config/nvim/lazy-lock.json +++ b/vim/.config/nvim/lazy-lock.json @@ -1,24 +1,24 @@ { - "LazyVim": { "branch": "main", "commit": "fe72424e77cb9c953084bbcaaa0eb7fe8056dc70" }, + "LazyVim": { "branch": "main", "commit": "c0ad2209b67f125a1f1a1ae3ccd6e89b7ffc8946" }, "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, - "SchemaStore.nvim": { "branch": "main", "commit": "88355559bb42cc8e4f6ca7b624dc4c3b654c5c08" }, - "bufferline.nvim": { "branch": "main", "commit": "b15c6daf5a64426c69732b31a951f4e438cb6590" }, - "catppuccin": { "branch": "main", "commit": "c0de3b46811fe1ce3912e2245a9dfbea6b41c300" }, + "SchemaStore.nvim": { "branch": "main", "commit": "6eb5d8d9ec9f81b75aaa6d15d0f6dc12a066fd3f" }, + "bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" }, + "catppuccin": { "branch": "main", "commit": "045e3499d9ec8d84635fb08877ae44fd33f6a38d" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "34b81e70da83e26c048290204de44268eb59814e" }, - "crates.nvim": { "branch": "main", "commit": "ec2b04a380c9f3a8e6ca38c230e4990d71978143" }, + "conform.nvim": { "branch": "master", "commit": "5a15cc46e75cad804fd51ec5af9227aeb1d1bdaa" }, + "crates.nvim": { "branch": "main", "commit": "535773ed3b321d68ddd6ef8cd5a1e07b345026a6" }, "dashboard-nvim": { "branch": "master", "commit": "413442b12d85315fc626c44a0ce4929b213ef604" }, "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, - "edgy.nvim": { "branch": "main", "commit": "0b35dc6da4cae6cc2f724bc610eadf955cd2319b" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" }, "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, - "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, + "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" }, "lualine.nvim": { "branch": "master", "commit": "8b56462bfb746760465264de41b4907310f113ec" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, @@ -30,31 +30,34 @@ "mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" }, "mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "459c60317cc1d251f6eb3b6f010d015d5d24b806" }, - "neoconf.nvim": { "branch": "main", "commit": "8d7150e9d6113f01421c34c5aeb0f586afa232e0" }, + "neoconf.nvim": { "branch": "main", "commit": "db1d1bd45f4e91da6abc898281711fa47eda0ece" }, "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" }, "noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" }, - "nui.nvim": { "branch": "main", "commit": "fbb139c6f14896b434d0229099e1acd863ae6bec" }, + "nui.nvim": { "branch": "main", "commit": "756c59f46057cd2d43619cd3a6d4e01b2aa60295" }, + "nvim-ansible": { "branch": "main", "commit": "d115cb9bb3680c990e2684f58cf333663fff03b8" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-lint": { "branch": "master", "commit": "e824adb9bc01647f71e55457353a68f0f37f9931" }, - "nvim-lspconfig": { "branch": "master", "commit": "7f5cf1121f772850a30bdaf83fb448e88846aa58" }, + "nvim-lspconfig": { "branch": "master", "commit": "e172dd599cff2ae5267871b5e33fb42934c4df43" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" }, - "nvim-treesitter": { "branch": "master", "commit": "212b7a504cf56f85d1acc5be237261b42d7560c5" }, - "nvim-treesitter-context": { "branch": "master", "commit": "53cdd58446521575d8f1052152099e08b15ca53c" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "3532f6095efd4723f7c066a5ac3fe632506cc09e" }, + "nvim-treesitter": { "branch": "master", "commit": "9775d5d7c724f81acdd441e7e9edefc4514e990b" }, + "nvim-treesitter-context": { "branch": "master", "commit": "b8b7e52c1517d401d7c519787d5dc4528c41291a" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "b7a0bfa3e93697ca5b61b15df633404bf8f45883" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, "nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" }, "onedark.vim": { "branch": "main", "commit": "57b77747694ea5676c3ca0eeaf9567dc499730c0" }, - "orgmode": { "branch": "master", "commit": "779a56823857a2e0baacadc7f3042fa0bfbaf6aa" }, + "orgmode": { "branch": "master", "commit": "18734589e5807074f57a5228ce06b52ea898b802" }, "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, - "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, - "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, - "telescope.nvim": { "branch": "master", "commit": "dc1ea28cc2a02cd1cebb9d80e967807d668f78f8" }, + "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, + "rustaceanvim": { "branch": "master", "commit": "387ca846d632f8c90631536341ca1778b4c2c497" }, + "semshi": { "branch": "master", "commit": "0182447e2ff4dfa04cd2dfe5f189e012c581ca45" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, + "telescope.nvim": { "branch": "master", "commit": "7472420f8734c710bd7009081cef9b97f08a3821" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, "tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, + "venv-selector.nvim": { "branch": "main", "commit": "2ad34f36d498ff5193ea10f79c87688bd5284172" }, "vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" }, "vim-ledger": { "branch": "master", "commit": "281346a221434574dd7f8767a352b2bf0b218b74" }, "vim-startuptime": { "branch": "master", "commit": "308b0088a864c4711a96e45b6734cf9294074f65" }, diff --git a/vim/.config/nvim/lazyvim.json b/vim/.config/nvim/lazyvim.json index a943afc..89916fe 100644 --- a/vim/.config/nvim/lazyvim.json +++ b/vim/.config/nvim/lazyvim.json @@ -1,11 +1,16 @@ { "extras": [ + "lazyvim.plugins.extras.lang.ansible", + "lazyvim.plugins.extras.lang.clangd", "lazyvim.plugins.extras.lang.docker", + "lazyvim.plugins.extras.lang.elixir", + "lazyvim.plugins.extras.lang.json", "lazyvim.plugins.extras.lang.markdown", + "lazyvim.plugins.extras.lang.python", + "lazyvim.plugins.extras.lang.python-semshi", "lazyvim.plugins.extras.lang.rust", "lazyvim.plugins.extras.lang.tex", - "lazyvim.plugins.extras.lang.yaml", - "lazyvim.plugins.extras.ui.edgy" + "lazyvim.plugins.extras.lang.yaml" ], "news": { "NEWS.md": "2123" diff --git a/vim/.config/nvim/lua/plugins/rust.lua b/vim/.config/nvim/lua/plugins/rust.lua new file mode 100644 index 0000000..a038ef7 --- /dev/null +++ b/vim/.config/nvim/lua/plugins/rust.lua @@ -0,0 +1,44 @@ +return { + "mrcjkb/rustaceanvim", + version = "^4", -- Recommended + ft = { "rust" }, + opts = { + server = { + on_attach = function(_, bufnr) + vim.keymap.set("n", "cR", function() + vim.cmd.RustLsp("codeAction") + end, { desc = "Code Action", buffer = bufnr }) + vim.keymap.set("n", "dr", function() + vim.cmd.RustLsp("debuggables") + end, { desc = "Rust debuggables", buffer = bufnr }) + end, + default_settings = { + -- rust-analyzer language server configuration + ["rust-analyzer"] = { + cargo = { + allFeatures = true, + loadOutDirsFromCheck = true, + runBuildScripts = true, + }, + -- Add clippy lints for Rust. + checkOnSave = { + allFeatures = true, + command = "clippy", + extraArgs = { "--no-deps" }, + }, + procMacro = { + enable = true, + ignored = { + ["async-trait"] = { "async_trait" }, + ["napi-derive"] = { "napi" }, + ["async-recursion"] = { "async_recursion" }, + }, + }, + }, + }, + }, + }, + config = function(_, opts) + vim.g.rustaceanvim = vim.tbl_deep_extend("force", {}, opts or {}) + end, +} diff --git a/zsh/.zshrc b/zsh/.zshrc index 70c7502..30e435a 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -20,6 +20,8 @@ setopt HIST_FIND_NO_DUPS # Alias alias q="exit" alias b="byobu" +alias vim="nvim" +alias cat="bat --pager=never" alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"' alias xsel='xsel -ib' alias msfconsole="msfconsole -x \"db_connect metasploit@msf\"" @@ -39,6 +41,7 @@ alias notify="dunstify \"ping~\"" alias ekill="pkill emacs; pkill emacsclient; ed" alias latexmk="latexmk -f -pdf -interaction=nonstopmode" alias picotik="picocom --b 115200 /dev/ttyUSB0" +alias ls="eza" ## git alias gps="git push soft --all" alias gras="add_soft_git"