chore: updates here and there

This commit is contained in:
Arthur Khachaturov 2024-08-17 18:16:07 +03:00
parent ed190866f5
commit 05708570cb
No known key found for this signature in database
GPG key ID: CAC2B7EB6DF45D55
14 changed files with 58 additions and 67 deletions

View file

@ -1,38 +0,0 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "878ace11983444d865a72e1759dbcc331d1ace4c" },
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
"black-nvim": { "branch": "master", "commit": "8fb3efc562b67269e6f31f8653297f826534fa4b" },
"bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" },
"cmake-tools.nvim": { "branch": "master", "commit": "13ac73e88af371552379cbdbd57fee3550ade691" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
"friendly-snippets": { "branch": "main", "commit": "d0610077b6129cf9f7f78afbe3a1425d60f6e2f1" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
"lazy.nvim": { "branch": "main", "commit": "24fa2a97085ca8a7220b5b078916f81e316036fd" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
"nvim-lspconfig": { "branch": "master", "commit": "7cb90cf656139dc59cf86206946ec85571671b5b" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-tree.lua": { "branch": "master", "commit": "5a87ffe35c4739ffb6b62052572583ad277a20ae" },
"nvim-treesitter": { "branch": "master", "commit": "5c924407cf110e9da4f3ba02ffed127b4198ad89" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" },
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
"onedark.nvim": { "branch": "master", "commit": "8e4b79b0e6495ddf29552178eceba1e147e6cecf" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"trouble.nvim": { "branch": "main", "commit": "cf81aaca820017388fc630c534774c95b58233f2" },
"vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" },
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-tmux": { "branch": "master", "commit": "cfe76281efc29890548cf9eedd42ad51c7a1faf0" },
"vim-wakatime": { "branch": "master", "commit": "3cb40867cb5a3120f9bef76eff88edc7f1dc1a23" }
}

View file

@ -50,7 +50,8 @@ local servers = {
gopls = {},
rust_analyzer = {},
cmake = {},
bashls = {}
bashls = {},
hls = {}
}
local capabilities = vim.lsp.protocol.make_client_capabilities()

View file

@ -12,8 +12,9 @@ vim.o.mouse = 'a'
vim.o.breakindent = true
vim.o.tabstop = 4
vim.o.shiftwidth = 4
vim.o.expandtab = true
vim.o.smartindent = false
vim.o.softtabstop = 0
vim.o.expandtab = false
vim.o.smartindent = true
-- Save undo history
vim.o.undofile = true

View file

@ -14,6 +14,6 @@ return {
{ 'akinsho/bufferline.nvim', config = {} },
{ 'ethanholz/nvim-lastplace', config = {} },
{ 'numToStr/Comment.nvim', opts = {} },
-- { 'wakatime/vim-wakatime', event = 'VeryLazy' },
{ 'wakatime/vim-wakatime', event = 'VeryLazy' },
{ "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, opts = { }, }
}

View file

@ -1,6 +1,9 @@
# Enable mouse
setw -g mouse on
# Don't launch shell as login
set -g default-command "${SHELL}"
# Enable 256 color mode and TrueColor
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"

View file

@ -1,13 +1,13 @@
PID="$$"
process_id="$$"
(
if [ "$(inxi -aG | grep -c 'Monitor')" -eq 1 ]; then
setfont Uni3-Terminus32x16.psf.gz
stty -F /proc/$PID/fd/0 rows 65 cols 195
stty -F /proc/$process_id/fd/0 rows 65 cols 195
else
setfont Uni3-Terminus16.psf.gz
stty -F /proc/$PID/fd/0 rows 90 cols 320
stty -F /proc/$process_id/fd/0 rows 90 cols 320
fi >/dev/null 2>&1 &
)
unset PID
unset process_id
# vim: ft=sh

View file

@ -1,5 +1,6 @@
set -a
PATH="$HOME/.local/share/go/bin:$PATH"
PATH="${$(find -L ~/.local/bin -type d -printf %p:)%%:}:$PATH"
# lc vars

View file

@ -1,5 +1,7 @@
[[ $- != *i* ]] && return
. ~/.cargo/env
# ls colors
eval "$(dircolors -b)"
@ -104,5 +106,12 @@ alias gcl="git clone"
# docker aliases
alias dc="docker compose"
# tmux aliases
alias tn="tmux new-session -s"
alias ta="tmux a -t"
# disable xon controll chars
stty -ixon
# print tasks on startup
cat ~/.taskell.md

1
.gitignore vendored
View file

@ -1 +1,2 @@
.zcompdump
lazy-lock.json

6
.local/bin/scripts/ip.me Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
API_ENDPOINT='http://ip-api.com/json/?fields=7876383'
printf "%s" "$(curl "${API_ENDPOINT}" 2>/dev/null)" | jq -r '[ "IP: \(.query)", "Country: \(.country)", "City: \(.city)", "ISP: \(.isp)", "ASN: \(.as)" ][] | "\(.)"'
# vim: ft=bash

4
.local/bin/scripts/volume Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
SINK="$(pactl list sinks short | grep RUNNING | cut -d ' ' -f 1)"
pactl set-sink-mute "$SINK" false ; pactl set-sink-volume "$SINK" "$1%"

View file

@ -1,6 +1,12 @@
#!/bin/bash
IFNAME="wg_lva"
PIPE="/var/run/vpnd.sock"
vpn_sock() {
echo echoing "$@"
[ -p "$PIPE" ] && echo "$@" > $PIPE
}
while [ "$#" -gt 0 ]; do
case "$1" in
@ -10,7 +16,7 @@ while [ "$#" -gt 0 ]; do
;;
'-v'|'--verbose') VERBOSE=1
;;
'--visual') USE_TERMINAL=1
'--visual')
;;
*) echo "Wrong argument!"; exit 1
;;
@ -26,20 +32,18 @@ fi
UP_NAME="$(ip link show | grep 'wg' | cut -d ' ' -f 2 | sed 's/://')"
sudo_a() {
dmenu -p "$1" <&-
}
if [ -n "${USE_TERMINAL}" ]; then
LAUNCH_CMD=(sudo -A -p "Password:")
fi
# shellcheck disable=SC2068
if [ -z "${UP_NAME}" ]; then
IFNAME="${IFNAME}${DPI}"
${LAUNCH_CMD[@]} wg-quick up "${IFNAME}"
IFNAME="${IFNAME}${DPI}"
if [ -n "${UP_NAME}" ]; then
if [ "${UP_NAME}" != "${IFNAME}" ]; then
vpn_sock replace "${UP_NAME}" "${IFNAME}"
else
vpn_sock down "${UP_NAME}"
fi
else
${LAUNCH_CMD[@]} wg-quick down "${UP_NAME}"
vpn_sock up "${IFNAME}"
fi
read -r < "$PIPE"
pkill -36 dwmblocks
# vim: ft=bash

View file

@ -3,7 +3,6 @@ VENV_FOLDER_NAME="$(basename "${VIRTUAL_ENV:-.venv}")"
[ -z "${VIRTUAL_ENV}" ] && OPERATION=c || OPERATION=d
help() {
echo "USAGE:"
echo " venv [OPTIONS] [<VENV_FOLDER_PATH>]"
@ -55,9 +54,9 @@ VENV_FOLDER="${VENV_FOLDER_PATH}/${VENV_FOLDER_NAME}"
# shellcheck disable=SC2015
case "${OPERATION}" in
c) [ -z "${VIRTUAL_ENV}" ] && create_or_activate || help;;
d) [ -n "${VIRTUAL_ENV}" ] && deactivate || help;;
r) [ -d "${VENV_FOLDER}" ] && remove || help;;
c) [ -z "${VIRTUAL_ENV}" ] && create_or_activate || help >&2;;
d) [ -n "${VIRTUAL_ENV}" ] && deactivate || help >&2;;
r) [ -d "${VENV_FOLDER}" ] && remove || help >&2;;
esac
# vim: set ft=sh

View file

@ -1,8 +1,8 @@
. ${HOME}/.config/X11/xprofile
# [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && eval $(/usr/bin/dbus-launch --exit-with-session --sh-syntax)
# dbus-update-activation-environment --verbose --all
[ -z "$DBUS_SESSION_BUS_ADDRESS" ] && eval $(/usr/bin/dbus-launch --exit-with-session --sh-syntax)
dbus-update-activation-environment --verbose --all
xr
# . ${HOME}/.config/X11/autostart
. ${HOME}/.config/X11/autostart
exec ssh-agent ${HOME}/.local/src/dwm/dwm
# exec ssh-agent /usr/bin/dwm