idk, something has changed
This commit is contained in:
parent
ffe452fe24
commit
ed190866f5
28 changed files with 94 additions and 2179 deletions
|
@ -1,7 +1,6 @@
|
|||
set -x
|
||||
|
||||
# setxkbmap -layout us,ru -option grp:win_space_toggle
|
||||
xset r rate 300 40
|
||||
xwallpaper --zoom ${HOME}/.local/share/wallpaper/wallpaper.png
|
||||
|
||||
launch() {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
return {}
|
|
@ -1 +0,0 @@
|
|||
return {}
|
|
@ -1 +0,0 @@
|
|||
return {}
|
|
@ -43,13 +43,14 @@ local on_attach = function(_, bufnr)
|
|||
end
|
||||
|
||||
local servers = {
|
||||
ansiblels = require("config.lsp.ansiblels"),
|
||||
ansiblels = {},
|
||||
clangd = require("config.lsp.clangd"),
|
||||
pyright = require("config.lsp.pyright"),
|
||||
pyright = {},
|
||||
lua_ls = require("config.lsp.lua_ls"),
|
||||
gopls = require("config.lsp.gopls"),
|
||||
rust_analyzer = require("config.lsp.rust_analyzer"),
|
||||
cmake = require("config.lsp.cmake"),
|
||||
gopls = {},
|
||||
rust_analyzer = {},
|
||||
cmake = {},
|
||||
bashls = {}
|
||||
}
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
return {}
|
|
@ -1 +0,0 @@
|
|||
return {}
|
|
@ -1 +0,0 @@
|
|||
return {}
|
|
@ -4,6 +4,7 @@ local map = vim.keymap.set
|
|||
map('n', '<C-q>', '<NOP>')
|
||||
map({ 'n', 'v' }, 'H', '<NOP>')
|
||||
map({ 'n', 'v' }, 'L', '<NOP>')
|
||||
map({ 'n', 'v' }, '<C-Space>', '<NOP>')
|
||||
|
||||
-- Movement between buffers
|
||||
map({ 'n', 'v' }, '<A-u>', ':bp<CR>', { silent = true })
|
||||
|
@ -19,7 +20,7 @@ map('n', '<leader>1', function() require('utils.close_buffer').close_buffer(true
|
|||
map('n', '<leader>Q', ':%bd | quit<CR>')
|
||||
map('n', '<leader>!', ':%bd! | quit!<CR>')
|
||||
map('n', '<leader>w', ':write<CR>')
|
||||
map('n', '<leader>W', function() vim.cmd.write(vim.fn.input("File: ")) end)
|
||||
-- map('n', '<leader>W', function() vim.cmd.write(vim.fn.input("File: ")) end)
|
||||
map('n', '<leader>e', ':e<CR>')
|
||||
|
||||
-- Duplicate leader feats to gradually move to
|
||||
|
|
|
@ -10,12 +10,6 @@ vim.defer_fn(function()
|
|||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = '<c-space>',
|
||||
node_incremental = '<c-space>',
|
||||
scope_incremental = '<c-s>',
|
||||
node_decremental = '<M-space>',
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
backend = "glx";
|
||||
backend = "xrender";
|
||||
vsync = true;
|
||||
|
|
File diff suppressed because it is too large
Load diff
13
.config/zsh/.zlogin
Normal file
13
.config/zsh/.zlogin
Normal file
|
@ -0,0 +1,13 @@
|
|||
PID="$$"
|
||||
(
|
||||
if [ "$(inxi -aG | grep -c 'Monitor')" -eq 1 ]; then
|
||||
setfont Uni3-Terminus32x16.psf.gz
|
||||
stty -F /proc/$PID/fd/0 rows 65 cols 195
|
||||
else
|
||||
setfont Uni3-Terminus16.psf.gz
|
||||
stty -F /proc/$PID/fd/0 rows 90 cols 320
|
||||
fi >/dev/null 2>&1 &
|
||||
)
|
||||
unset PID
|
||||
|
||||
# vim: ft=sh
|
|
@ -84,7 +84,7 @@ bl () { brightnessctl set $1% &> /dev/null }
|
|||
clines() { find $@ \( -name '*.cpp' -o -name '*.[ch]' \) -a ! -path '*cmake-build*' | xargs wc -l }
|
||||
nosw() { alacritty --class 'noswallow' -e "$@" }; compdef _command nosw
|
||||
t() { [ -z "$1" ] && taskell ~/.taskell.md || taskell "$1" }
|
||||
vims() { vim "$(whereis $1 | cut -d ' ' -f 2)" }; compdef _command vims
|
||||
vims() { vim "$(whereis $1 | rev | cut -d ' ' -f 1 | rev)" }; compdef _command vims
|
||||
bc() { unbuffer "$@" | bat }; compdef _command bc
|
||||
|
||||
|
||||
|
@ -99,6 +99,7 @@ alias gck="git checkout"
|
|||
alias gb="git branch"
|
||||
alias gd="git diff"
|
||||
alias gr="git restore"
|
||||
alias gcl="git clone"
|
||||
|
||||
# docker aliases
|
||||
alias dc="docker compose"
|
||||
|
|
|
@ -3,3 +3,5 @@
|
|||
name = Arthur Khachaturov
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.zcompdump
|
|
@ -5,29 +5,21 @@ PIDFILE="${XDG_RUNTIME_DIR}/mkchromecast.pid"
|
|||
WIDTH=1440
|
||||
HEIGHT=1080
|
||||
ASPECT_OFFSET=240
|
||||
OUTPUT_NAME='DVI-I-2-2'
|
||||
|
||||
inhibit_pid=''
|
||||
OUTPUT_NAME='DVI-I-1-1'
|
||||
|
||||
command() {
|
||||
echo "ffmpeg -ac 2 -ar 44100 -frame_size 2048 -fragment_size 2048 -f pulse -ac 2 -i Mkchromecast.monitor -f x11grab -r 30 -s ${WIDTH}x${HEIGHT} -i :0.0+$1,0 -vcodec libx264 -preset veryfast -tune zerolatency -maxrate 10000k -bufsize 20000k -pix_fmt yuv420p -g 60 -f mp4 -vf scale=1280:720 -movflags frag_keyframe+empty_moov -ar 44100 -acodec libvorbis pipe:1"
|
||||
echo "ffmpeg -ac 2 -ar 44100 -frame_size 2048 -fragment_size 2048 -f pulse -ac 2 -i Mkchromecast.monitor -f x11grab -r 30 -s ${WIDTH}x${HEIGHT} -i :0.0+$1,$2 -vcodec libx264 -preset veryfast -tune zerolatency -maxrate 10000k -bufsize 20000k -pix_fmt yuv420p -g 60 -f mp4 -vf scale=1280:720 -movflags frag_keyframe+empty_moov -ar 44100 -acodec libvorbis pipe:1"
|
||||
}
|
||||
|
||||
set -x
|
||||
|
||||
sigint() {
|
||||
kill -9 ${inhibit_pid}
|
||||
}
|
||||
|
||||
trap 'sigint' SIGINT
|
||||
|
||||
cleanup() {
|
||||
close() {
|
||||
xrandr --output ${OUTPUT_NAME} --off
|
||||
xrandr --delmode ${OUTPUT_NAME} "1920x1080"
|
||||
pid="$(cat ${PIDFILE})"
|
||||
pid="$(cat "${PIDFILE}")"
|
||||
rm "${PIDFILE}"
|
||||
pkill -35 dwmblocks
|
||||
kill -INT "${pid}"
|
||||
pkill -P "${pid}"
|
||||
}
|
||||
|
||||
run() {
|
||||
|
@ -37,18 +29,19 @@ run() {
|
|||
|
||||
echo $$ > "${PIDFILE}"
|
||||
pkill -35 dwmblocks
|
||||
offset=$(( "$(xrandr | grep ${OUTPUT_NAME} | cut -d ' ' -f 3 | cut -d '+' -f 2)" + ${ASPECT_OFFSET} ))
|
||||
systemd-inhibit --what=handle-lid-switch sleep 2592000 & inhibit_pid="$!"
|
||||
mkchromecast --video --command "$(command ${offset})"
|
||||
h_offset=$(( "$(xrandr | grep ${OUTPUT_NAME} | cut -d ' ' -f 3 | cut -d '+' -f 2)" + "${ASPECT_OFFSET}" ))
|
||||
v_offset="$(xrandr | grep ${OUTPUT_NAME} | cut -d ' ' -f 3 | cut -d '+' -f 3)"
|
||||
systemd-inhibit --what=handle-lid-switch sleep 2592000 &
|
||||
mkchromecast --video --command "$(command ${h_offset} "${v_offset}")"
|
||||
}
|
||||
|
||||
if [ "$1" = "-k" ]; then
|
||||
cleanup
|
||||
close
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "${PIDFILE}" ]; then
|
||||
cleanup || run
|
||||
close || run
|
||||
else
|
||||
run
|
||||
fi
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo $(dmenu -p "$1" -nf '#3a3a3a' <&-)
|
||||
dmenu -p "$1" -nf '#3a3a3a' <&-
|
||||
|
|
|
@ -19,7 +19,7 @@ remove() {
|
|||
}
|
||||
|
||||
create_or_remove() {
|
||||
if [ ! -z "$(xrandr | grep ${RES} | grep '*')" ]; then
|
||||
if xrandr --listactivemonitors | grep -q "${OUTPUT}"; then
|
||||
remove
|
||||
else
|
||||
create
|
||||
|
|
|
@ -6,7 +6,7 @@ if [ ! -d .git ]; then
|
|||
fi
|
||||
|
||||
echo "Last commit: $(git log | grep 'Date' | cut -d ' ' -f 4- | head -1)"
|
||||
read -p "Date: " date
|
||||
read -r -p "Date: " date
|
||||
|
||||
export GIT_AUTHOR_DATE="${date}"
|
||||
export GIT_COMMITTER_DATE="${date}"
|
||||
|
|
6
.local/bin/scripts/pentablet
Executable file
6
.local/bin/scripts/pentablet
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
OUTPUT="${1:-"DP-1"}"
|
||||
xinput --map-to-output "UGTABLET 6 inch PenTablet Mouse" "${OUTPUT}"
|
||||
xinput --map-to-output "UGTABLET 6 inch PenTablet Pen (0)" "${OUTPUT}"
|
||||
xinput --map-to-output "UGTABLET 6 inch PenTablet Eraser (0)" "${OUTPUT}"
|
|
@ -30,15 +30,16 @@ sudo_a() {
|
|||
dmenu -p "$1" <&-
|
||||
}
|
||||
|
||||
if [ ! -z "${USE_TERMINAL}" ]; then
|
||||
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}
|
||||
${LAUNCH_CMD[@]} wg-quick up "${IFNAME}"
|
||||
else
|
||||
${LAUNCH_CMD[@]} wg-quick down ${UP_NAME}
|
||||
${LAUNCH_CMD[@]} wg-quick down "${UP_NAME}"
|
||||
fi
|
||||
|
||||
pkill -36 dwmblocks
|
||||
|
|
|
@ -6,12 +6,10 @@ exec 2> /dev/null
|
|||
change_dpi() {
|
||||
sed -i -E --follow-symlinks "s/Xft\.dpi: .*?/Xft\.dpi: $1/g" ~/.Xresources
|
||||
sed -i -E --follow-symlinks "s/Xcursor\.size: .*?/Xcursor\.size: $2/g" ~/.Xresources
|
||||
|
||||
sed -i -E --follow-symlinks "s/gtk-cursor-theme-size=.*?/gtk-cursor-theme-size=$2/g" ~/.config/gtk-3.0/settings.ini
|
||||
|
||||
sed -i -E --follow-symlinks "s/gtk-cursor-theme-size=.*?/gtk-cursor-theme-size=$2/g" ~/.gtkrc-2.0
|
||||
|
||||
echo "Xft/DPI $(expr $1 \* 1024)" > ~/.xsettingsd
|
||||
echo "Xft/DPI $(($1 * 1024))" > ~/.xsettingsd
|
||||
echo "Gtk/CursorThemeSize $2" >> ~/.xsettingsd
|
||||
|
||||
xrdb -merge ~/.Xresources
|
||||
|
@ -30,10 +28,14 @@ if [[ -z "${EXT_MON}" ]]; then
|
|||
change_dpi 192 48
|
||||
else
|
||||
xrandr --rmmode "${INT_RES}"
|
||||
xrandr --newmode $(echo $INT_MODELINE)
|
||||
# shellcheck disable=all
|
||||
xrandr --newmode $(echo $INT_MODELINE) # this is a hack to make xrandr recognize the resolution
|
||||
xrandr --addmode eDP-1 "${INT_RES}"
|
||||
xrandr --output eDP-1 --pos 2560x400 --mode "${INT_RES}" --output ${EXT_MON} --pos 0x0 --mode "2560x1440" --rate 144 --primary
|
||||
xrandr --output eDP-1 --pos 2560x400 --mode "${INT_RES}" --output "${EXT_MON}" --pos 0x0 --mode "2560x1440" --rate 144 --primary
|
||||
change_dpi 96 24
|
||||
xinput --map-to-output "UGTABLET 6 inch PenTablet Mouse" "${EXT_MON}"
|
||||
xinput --map-to-output "UGTABLET 6 inch PenTablet Pen (0)" "${EXT_MON}"
|
||||
xinput --map-to-output "UGTABLET 6 inch PenTablet Eraser (0)" "${EXT_MON}"
|
||||
fi
|
||||
|
||||
${HOME}/.config/X11/autostart
|
||||
"${HOME}/.config/X11/autostart"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
clear
|
||||
echo "$ $@"
|
||||
echo "\$ $*"
|
||||
echo
|
||||
eval $@
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
SCRIPT_PATH="$0"
|
||||
VENV_FOLDER_PATH="$(dirname ${VIRTUAL_ENV:-./})"
|
||||
VENV_FOLDER_NAME="$(basename ${VIRTUAL_ENV:-.venv})"
|
||||
VENV_FOLDER_PATH="$(dirname "${VIRTUAL_ENV:-./}")"
|
||||
VENV_FOLDER_NAME="$(basename "${VIRTUAL_ENV:-.venv}")"
|
||||
|
||||
[ -z "${VIRTUAL_ENV}" ] && OPERATION=c || OPERATION=d
|
||||
|
||||
|
@ -22,17 +21,18 @@ help() {
|
|||
|
||||
|
||||
remove() {
|
||||
[ ! -z "${VIRTUAL_ENV}" ] && deactivate
|
||||
[ -n "${VIRTUAL_ENV}" ] && deactivate
|
||||
rm -rf "${VENV_FOLDER}"
|
||||
}
|
||||
|
||||
|
||||
create_or_activate() {
|
||||
# shellcheck disable=SC1091
|
||||
if [ -d "${VENV_FOLDER}" ]; then
|
||||
source ${VENV_FOLDER}/bin/activate
|
||||
source "${VENV_FOLDER}/bin/activate"
|
||||
else
|
||||
python3 -m venv "${VENV_FOLDER}"
|
||||
source ${VENV_FOLDER}/bin/activate
|
||||
source "${VENV_FOLDER}/bin/activate"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -53,9 +53,10 @@ done
|
|||
VENV_FOLDER="${VENV_FOLDER_PATH}/${VENV_FOLDER_NAME}"
|
||||
|
||||
|
||||
# shellcheck disable=SC2015
|
||||
case "${OPERATION}" in
|
||||
c) [ -z "${VIRTUAL_ENV}" ] && create_or_activate || help;;
|
||||
d) [ ! -z "${VIRTUAL_ENV}" ] && deactivate || help;;
|
||||
d) [ -n "${VIRTUAL_ENV}" ] && deactivate || help;;
|
||||
r) [ -d "${VENV_FOLDER}" ] && remove || help;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -1,18 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
BATTERY_PATH="/sys/class/power_supply/BAT0"
|
||||
status="$(cat ${BATTERY_PATH}/status)"
|
||||
shopt -s extglob
|
||||
|
||||
case "${status}" in
|
||||
declare -a batteries
|
||||
|
||||
for battery_path in /sys/class/power_supply/!(AC*); do
|
||||
status="$(cat "${battery_path}/status")"
|
||||
|
||||
case "${status}" in
|
||||
"Full") status_string="⚡" ;;
|
||||
"Discharging") status_string="🔋" ;;
|
||||
"Charging") status_string="🔌" ;;
|
||||
"Not charging") status_string="🛑" ;;
|
||||
"Unknown") status_string="♻️" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
*) status_string="??" ;;
|
||||
esac
|
||||
|
||||
capacity="$(cat ${BATTERY_PATH}/capacity)"
|
||||
[ "$status" = "Discharging" ] && [ "$capacity" -le 25 ] && status_string="❗"
|
||||
capacity="$(cat "${battery_path}/capacity")"
|
||||
[ "$status" = "Discharging" ] && [ "$capacity" -le 25 ] && status_string="❗"
|
||||
|
||||
echo "${status_string} ${capacity}%"
|
||||
batteries+=("${status_string} ${capacity}%")
|
||||
done
|
||||
|
||||
echo "${batteries[@]}"
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
IFNAME="$(ip link show | grep 'wg_' | cut -d ' ' -f 2 | sed 's/://' | sed 's/wg_//' | tr '[:lower:]' '[:upper:]' | sed 's/_D/ (dpi)/')"
|
||||
|
||||
if [ ! -z "${IFNAME}" ]; then
|
||||
if [ -n "${IFNAME}" ]; then
|
||||
echo "🛡️ ${IFNAME}"
|
||||
fi
|
||||
|
|
4
.xinitrc
4
.xinitrc
|
@ -1,6 +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
|
||||
xr
|
||||
# . ${HOME}/.config/X11/autostart
|
||||
|
||||
exec ssh-agent ${HOME}/.local/src/dwm/dwm
|
||||
# ssh-agent /usr/bin/dwm
|
||||
# exec ssh-agent /usr/bin/dwm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue