From ff61e763b12badbf73f4e78b462c626ab206be1c Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Mon, 4 Dec 2023 19:49:07 +0300 Subject: Changed some of lua & i3 seggings * window navigation added to nvim * i3 startup changes * added sakura config * added zerotierone scripts co-authored-by: who-is-this-guy sotov2071@gmail.com --- .bashrc | 23 +++--------- .config/i3/config | 17 +++++---- .config/nvim/lazy-lock.json | 5 +++ .config/nvim/lua/user/plugins.lua | 8 +++- .config/nvim/lua/user/remaps.lua | 48 ++++++++++++++++-------- .config/sakura/sakura.conf | 78 +++++++++++++++++++++++++++++++++++++++ zerotierconnect.sh | 12 ++++++ 7 files changed, 149 insertions(+), 42 deletions(-) create mode 100644 .config/sakura/sakura.conf create mode 100755 zerotierconnect.sh diff --git a/.bashrc b/.bashrc index 0a3e7b3..030cf87 100644 --- a/.bashrc +++ b/.bashrc @@ -10,26 +10,13 @@ alias nv=nvim alias whatsapp=whatsie alias lan="bash zerotierconnect.sh" alias python=/home/main/coding/py/venv/bin/python3 +alias copy="xclip -selection clipboard" export c="/mnt/C" export d="/mnt/D" - -function swap() { mv "$1" "$1._tmp" && mv "$2" "$1" && mv "$1._tmp" "$2"; } - -function kboff() { xinput float `xinput \ - | grep "AT Translated" \ - | sed -r 's/.+id=([0-9]+).+/\1/'`; } -function kbon() { xinput reattach `xinput \ - | grep "AT Translated" \ - | sed -r 's/.+id=([0-9]+).+/\1/'` \ - `xinput \ - | grep "Virtual core keyboard" \ - | sed -r 's/.+id=([0-9]+).+/\1/'` ; } - -function fix-ntfs() { \ - sudo umount /dev/sda1 && \ - sudo ntfsfix /dev/sda1 &&\ - sudo mount /dev/sda1 /mnt/D ; } +export SUDO_EDITOR="/usr/bin/nvim" +export EDITOR="/usr/bin/nvim" +export JAVA_HOME="/usr/lib/jvm/default/" # dotfiles alias config='/usr/bin/git --git-dir=$HOME/.cfg --work-tree=$HOME' @@ -37,5 +24,5 @@ alias config='/usr/bin/git --git-dir=$HOME/.cfg --work-tree=$HOME' GHC_PACKAGE_PATH="/usr/lib/ghc-9.0.2/package.conf.d" # Created by `pipx` on 2023-08-09 18:40:17 export PATH="$PATH:/home/main/.local/bin:/home/main/.cargo/bin" -export VISUAL=vim +export VISUAL=nvim diff --git a/.config/i3/config b/.config/i3/config index 9b11669..ab35539 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -66,9 +66,12 @@ bindsym $mod+semicolon focus right # bindsym $mod+Print exec coreshot -s # bindsym $mod+Shift+Print exec coreshot -w -bindsym Print exec maim ~/Screenshots/screenshot-$(date +"%Y-%m-%dT%H:%M:%S").png -bindsym $mod+Print exec maim -s ~/Screenshots/screenshot-$(date +"%Y-%m-%dT%H:%M:%S").png -bindsym $mod+Shift+Print exec maim -i $(xdotool getactivewindow) ~/screenshot-$(date +"%Y-%m-%dT%H:%M:%S").png +set $maim maim --tolerance=1 --quiet +#--color="56,200,200,69" +set $maim_paste tee ~/Screenshots/screenshot-$(date +"%Y-%m-%dT%H:%M:%S").png | xclip -selection clipboard -t image/png +bindsym Print exec $maim | $maim_paste +bindsym $mod+Print exec $maim -s | $maim_paste +bindsym $mod+Shift+Print exec $maim -i $(xdotool getactivewindow) | $maim_paste # alternatively, you can use the cursor keys: bindsym $mod+Left focus left @@ -257,12 +260,12 @@ default_border pixel 3 # started upon launching # monito settings -exec xrandr --setprovideroutputsource NVIDIA-G0 Intel -exec ~/.screenlayout/doublemonitor.layout.sh +exec --setprovideroutputsource NVIDIA-G0 Intel +exec_always ~/.screenlayout/doublemonitor.layout.sh # disable integrated keyboard input # please, just work (check out that function in bashrc lmao) -exec kboff +exec_always kboff # switch keyboard colors exec openrgb --color "00FFFF" @@ -273,7 +276,7 @@ exec microsoft-edge-dev #exec discord #exec qtcreator #exec doublecmd -exec_always feh --bg-fill ~/wallpaper/nov2023.png +exec_always feh --bg-fill ~/wallpaper/dec2023.png exec_always setxkbmap -layout us,ru -option grp:alt_shift_toggle exec_always ~/.screenlayout/fullscreen.sh # exec_always xset r rate 269 19 diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index c7e83a4..b672205 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,6 +1,11 @@ { "awesome-vim-colorschemes": { "branch": "master", "commit": "4b2787b8894c4a70c42d15c2808d7cf278cb6abb" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, + "nerdtree": { "branch": "master", "commit": "0cb04e9245b000daf32f04aae5f606011a6aa3b5" }, + "nvim-treesitter": { "branch": "master", "commit": "d8a71826a20dfc9ed3d8a43e28a00611a302b456" }, + "plenary.nvim": { "branch": "master", "commit": "366b0837486f60ae0e7550c15de8ff66d057c4cd" }, + "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" }, + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index 2344087..ee7dea7 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -4,9 +4,14 @@ -- plugins to be installed plugins = { "folke/lazy.nvim", -- plugin manager + "nvim-lua/popup.nvim", -- some functions for other plugins + "nvim-lua/plenary.nvim", -- some functions for other plugins "folke/which-key.nvim", -- pretty self-descriptive name "rafi/awesome-vim-colorschemes", -- same here - "tpope/vim-commentary" -- gc & gcc for commenting + "tpope/vim-commentary", -- gc & gcc for commenting + "tpope/vim-surround", -- replace quotes e.t.c + "nvim-treesitter/nvim-treesitter", -- folding code, advanced syntax highlighting & sitting on a tree + "preservim/nerdtree", -- file explorer } -- options for lazy @@ -32,4 +37,5 @@ vim.opt.rtp:prepend(lazypath) -- initialization lazy = require("lazy") lazy.setup(plugins, opts) +-- lazy.load('nerdtree') diff --git a/.config/nvim/lua/user/remaps.lua b/.config/nvim/lua/user/remaps.lua index 742e967..a047392 100644 --- a/.config/nvim/lua/user/remaps.lua +++ b/.config/nvim/lua/user/remaps.lua @@ -7,34 +7,45 @@ local map = vim.api.nvim_set_keymap map("", "\\", "", opt) vim.g.mapleader = "\\" --- some minor commands -map("c", "w!!", "w !sudo tee % > /dev/null", opt) -- remap j and k --- i refuse to elaborate +-- I refuse to elaborate map("n", "j", "", opt) map("n", "k", "", opt) +map("n", "dj", "d", opt) +map("n", "dk", "d", opt) -- window navigation -map("n", "", "l", opt) map("n", "", "k", opt) -- SWITCHED K AND J map("n", "", "j", opt) -- SWITCHED K AND J +map("n", "", "l", opt) map("n", "", "h", opt) +-- buffer navigation +map("n", "gn", ":bn", opt) +map("n", "gp", ":bp", opt) + -- Insert mode navigation map("i", "", "", opt) map("i", "", "", opt) -- SWITCHED K AND J map("i", "", "", opt) -- SWITCHED K AND J map("i", "", "", opt) +map("i", "", "", opt) +map("i", "", "Wi", opt) +map("i", "", "", opt) +map("i", "", "Bi", opt) + +-- Terminal mode +map("t", "", "" , opt) -- lexer options..? -map("n", "e", ":Lex 49", opt) +map("n", "e", ":NERDTreeToggle", opt) -- resizing options -map("n", "", ":vertical resize -5", opt) -map("n", "", ":resize +5", opt) -map("n", "", ":vertical resize +5", opt) -map("n", "", ":resize -5", opt) +map("n", "", ":vertical resize -4", opt) +map("n", "", ":resize +1", opt) +map("n", "", ":vertical resize +4", opt) +map("n", "", ":resize -1", opt) -- better indentation map("v", "<", "", ":m .-2==", opt) -- SWITCHED K AND J map("n", "", ":m .+1==", opt) -- SWITCHED K AND J -- duplicating lines -map("n", "", ":.,.t.-1==", opt) -map("n", "", ":.,.t.==", opt) +map("n", "", ":.,.t.-1==", opt) +map("n", "", ":.,.t.==", opt) -- leader remaps -map("n", "/", ":nohlsearch", opt) -- discard search highlighting -map("n", "T", ":term", opt) -- open terminal fullscreen with \T -map("n", "t", ":vsplit term ", opt) -- split to terminal with \t -map("n", "pl", ":Lazy", opt) -- open plugin manager +map("n", "/", ":nohlsearch", opt) -- discard search highlighting +map("n", "t", ":split:terminal:resize 4", opt) -- open terminal fullscreen with \T +map("n", "T", ":vsplit:terminal", opt) -- split to terminal with \t +map("n", "pl", ":Lazy", opt) -- open plugin manager -- miscellaneous -map("n", "relaod", ":luafile ~/.config/nvim/lua/init.lua", {noremap = false}) +map("c", "w!!", "w !sudo tee % > /dev/null", opt) + +-- better G and gg +map("n", "G", "G$", opt) +map("n", "gg", "gg0", opt) + diff --git a/.config/sakura/sakura.conf b/.config/sakura/sakura.conf new file mode 100644 index 0000000..65dfb05 --- /dev/null +++ b/.config/sakura/sakura.conf @@ -0,0 +1,78 @@ +[sakura] +colorset1_fore=rgb(255,255,255) +colorset1_back=rgb(41,41,41) +colorset1_curs=rgb(143,240,164) +colorset1_scheme=0 +colorset1_key=F1 +colorset2_fore=rgb(192,192,192) +colorset2_back=rgb(0,0,0) +colorset2_curs=rgb(255,255,255) +colorset2_scheme=1 +colorset2_key=F2 +colorset3_fore=rgb(192,192,192) +colorset3_back=rgb(0,0,0) +colorset3_curs=rgb(255,255,255) +colorset3_scheme=1 +colorset3_key=F3 +colorset4_fore=rgb(192,192,192) +colorset4_back=rgb(0,0,0) +colorset4_curs=rgb(255,255,255) +colorset4_scheme=1 +colorset4_key=F4 +colorset5_fore=rgb(192,192,192) +colorset5_back=rgb(0,0,0) +colorset5_curs=rgb(255,255,255) +colorset5_scheme=1 +colorset5_key=F5 +colorset6_fore=rgb(192,192,192) +colorset6_back=rgb(0,0,0) +colorset6_curs=rgb(255,255,255) +colorset6_scheme=1 +colorset6_key=F6 +last_colorset=1 +bold_is_bright=false +scroll_lines=4096 +font=OverpassM Nerd Font 11 +show_tab_bar=multiple +scrollbar=false +closebutton=true +tabs_on_bottom=false +less_questions=false +copy_on_select=false +disable_numbered_tabswitch=false +use_fading=false +scrollable_tabs=true +urgent_bell=Yes +audible_bell=Yes +blinking_cursor=No +cursor_type=VTE_CURSOR_SHAPE_BLOCK +word_chars=-,./?%&#_~: +palette=1 +add_tab_accelerator=5 +del_tab_accelerator=5 +switch_tab_accelerator=8 +move_tab_accelerator=9 +copy_accelerator=5 +scrollbar_accelerator=5 +open_url_accelerator=5 +font_size_accelerator=4 +set_tab_name_accelerator=5 +search_accelerator=5 +add_tab_key=T +del_tab_key=W +prev_tab_key=Left +next_tab_key=Right +copy_key=C +paste_key=V +scrollbar_key=S +set_tab_name_key=N +search_key=F +increase_font_size_key=plus +decrease_font_size_key=minus +fullscreen_key=F11 +set_colorset_accelerator=5 +icon_file=terminal-tango.svg +paste_button=2 +menu_button=3 +window_columns=80 +window_rows=24 diff --git a/zerotierconnect.sh b/zerotierconnect.sh new file mode 100755 index 0000000..5469d62 --- /dev/null +++ b/zerotierconnect.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +sudo zerotier-one -d + +sudo zerotier-one -d +sudo zerotier-cli info + +read + +sudo zerotier-cli join 8056c2e21c2fbaef -- cgit v1.2.3-70-g09d2