Skip to content

Instantly share code, notes, and snippets.

View EgZvor's full-sized avatar

Egor Zvorykin EgZvor

  • Санкт-Петербург
View GitHub Profile
#!/usr/bin/env 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`` ::

Keybase proof

I hereby claim:

  • I am egzvor on github.
  • I am egzvor (https://keybase.io/egzvor) on keybase.
  • I have a public key ASCQzubYGyRq4R_viV2lVtIe--fiaa3sFAU_gkvmhUK11Qo

To claim this, I am signing this object:

@EgZvor
EgZvor / config.rasi
Created February 9, 2018 10:23
Dracula theme for rofi (put in ~/.config/rasi)
// Dracula colors
* {
background: rgba ( 40, 42, 54, 100 % );
current-line: rgba ( 68, 71, 90, 100 % );
selection: rgba ( 68, 71, 90, 100 % );
foreground: rgba ( 248, 248, 242, 100 % );
comment: rgba ( 98, 114, 164, 100 % );
cyan: rgba ( 139, 233, 253, 100 % );
green: rgba ( 80, 250, 123, 100 % );
orange: rgba ( 255, 184, 108, 100 % );
/* Dracula colors */
* {
black: rgba ( 40, 42, 54, 100 % );
gray: rgba ( 68, 71, 90, 100 % );
white: rgba ( 248, 248, 242, 100 % );
light-gray: rgba ( 98, 114, 164, 100 % );
cyan: rgba ( 139, 233, 253, 100 % );
green: rgba ( 80, 250, 123, 100 % );
orange: rgba ( 255, 184, 108, 100 % );
pink: rgba ( 255, 121, 198, 100 % );
@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
@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 / 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 / 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 / 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 / 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`` ::