Skip to content

Instantly share code, notes, and snippets.

View EgZvor's full-sized avatar

Egor Zvorykin EgZvor

  • Санкт-Петербург
View GitHub Profile
#----------------------------------------------------
# file: ~/.ncmpcpp/config
# based on: t60r/dots
# vim:nu:ai:si:et:ts=4:sw=4:fdm=indent:fdn=1:ft=conf:
#----------------------------------------------------
playlist_disable_highlight_delay = "3"
message_delay_time = "1"
header_visibility = "no"
statusbar_visibility = "yes"
@EgZvor
EgZvor / keymap.c
Created May 27, 2023 07:32
[QMK] feature/streak
#include <string.h>
#include QMK_KEYBOARD_H
#include "streak.h"
enum keycodes {
STREAK = SAFE_RANGE,
};
@EgZvor
EgZvor / jumpfile.vim
Created November 8, 2021 18:22
Vim mappings to jump through jumplist by files
if exists('g:loaded_jumpfile')
finish
endif
let g:loaded_jumpfile = 1
function! JumpFileComputePrevious()
let [jump_list, pos] = getjumplist()
let previous_list = jump_list
\ ->map({idx, val -> [idx, val]})[:pos]
@EgZvor
EgZvor / process-vim-log.py
Last active July 4, 2022 12:40
A script to convert specially constructed Vim log into a lines with raw key presses.
"""See
https://hub.netzgemeinde.eu/channel/vim_sensei?mid=b64.aHR0cHM6Ly9odWIuaG90ZWxkYWFuLm5sL2l0ZW0vZGU2MjI1MDgtZjc1Ni00MGUzLWI1MTgtYjE1YTkwYTg2MWJi
for details on how to set up Vim to produce the log that this script parses.
"""
import fileinput
import os
import re
import signal
import sys
@EgZvor
EgZvor / focus_vim.py
Created February 17, 2022 19:38
Find Vim window in i3 by its server name
#!/usr/bin/python3
"""
The script accepts either an argument or stdin line as a Vim server name
and focuses on i3 window contaning that Vim instance.
Read `:help client-server
<http://vimdoc.sourceforge.net/htmldoc/remote.html#client-server>`_.
Requires ``psutil`` ::
@EgZvor
EgZvor / ash.vim
Last active January 25, 2022 11:22
Automatic search highlighting clearing for Vim
if exists('g:loaded_auto_search_highlighting')
finish
endif
let g:loaded_auto_search_highlighting = 1
if ! exists('g:auto_search_highlighting')
let g:auto_search_highlighting = 1
endif
@EgZvor
EgZvor / smooth_split.vim
Created December 9, 2021 14:36
Smooth window splitting animation for Vim
function SmoothSplit(vertical = 0) abort
syntax off
if a:vertical
let new_size = winwidth(0) / 2
vertical 1 split
else
let new_size = winheight(0) / 2
1 split
endif
if a:vertical
@EgZvor
EgZvor / rxvt_dracula.Xresources
Last active December 11, 2021 00:00
Dracula theme for rxvt terminal
! Dracula color scheme
URxvt.foreground: #F8F8F2
URxvt.background: #282A36
URxvt.color0: #000000
URxvt.color8: #44475A
URxvt.color1: #FF5555
URxvt.color9: #FFB86C
URxvt.color2: #50FA7B
URxvt.color10: #50FA7B
URxvt.color3: #E6DB74
@EgZvor
EgZvor / dunstrc.cfg
Last active November 11, 2021 07:26
Dunst config
[global]
monitor = 0
follow = mouse
width = 300
height = 300
origin = top-right
offset = 20x50
scale = 0
notification_limit = 0
progress_bar = true
@EgZvor
EgZvor / vims.sh
Last active August 17, 2021 17:45
#!/bin/bash
if [ "$1" == "--servername" ]; then
servername="$2"
shift 2
else
servername=$(vim --serverlist | rofi -dmenu -i -p "Enter the vim server name" 2>/dev/null)
fi
if [ "${servername}" == "" ]; then