Skip to content

Instantly share code, notes, and snippets.

View Mr-Jack82's full-sized avatar
💭
Learning to code

Виталий Шевченко Mr-Jack82

💭
Learning to code
  • Russia
View GitHub Profile
@Mr-Jack82
Mr-Jack82 / Mouse-scroll.md
Last active June 3, 2020 13:08
Fixing mouse scroll on Linux

On Linux there is a problem with mouse scroll and in a way to fix it you need to install imwheel program and create ~/.imwheelrc file with the following contents:

".*"
None, Up, Button4, 3
None, Down, Button5, 3
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
@Mr-Jack82
Mr-Jack82 / remaps
Last active February 21, 2024 01:38
Some useful key map setups for (Neo)Vim
#!/bin/sh
# This script is called on startup to remap keys.
# Increase key speed via a rate change
xset r rate 300 50
# Map the caps lock key to super...
setxkbmap -option ctrl:swapcaps
# But when it is pressed only once, treat it as escape.
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
# Map the menu button to right super as well.
@Mr-Jack82
Mr-Jack82 / moc-on-osx.md
Created April 12, 2021 15:33 — forked from RobertAudi/moc-on-osx.md
This is a walkthrough on how to install the MOC command-line music player on OS X. The procedure was tested in Mountain Lion.

MOC on OS X

I waited for years for a Homebrew formula for MOC. I finally found one today, but it didn't work for me. So I decided to try to compile it from source.

Requirements

Here is a list of requirements, taken directly from the MOC README:

@Mr-Jack82
Mr-Jack82 / keyrepeat.shell
Created July 14, 2021 07:55 — forked from kconragan/keyrepeat.shell
Enable key repeat in Apple Lion for Sublime Text in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@Mr-Jack82
Mr-Jack82 / trial.md
Created August 1, 2022 15:44 — forked from satish-setty/trial.md
Beyond Compare 4 license for Linux

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare
if not as then return end
local api, fn = vim.api, vim.fn
as.augroup("TextYankHighlight", {
{
event = "TextYankPost",
pattern = "*",
desc = "highlight text on yank",
command = function()
@Mr-Jack82
Mr-Jack82 / space.vim
Last active January 12, 2023 07:33
Color theme for vim-airline
" source of this config is https://github.com/ctaylo21/jarvis
" also read his article "A guide to modern Web Development with (Neo)vim"
" https://www.freecodecamp.org/news/a-guide-to-modern-web-development-with-neo-vim-333f7efbf8e2/
" vim-airline template by chartoin (http://github.com/chartoin)
" Base 16 Oceanic Next Scheme by Chris Kempson (http://chriskempson.com)
" Base 16 Oceanic Next Vim Airline Scheme
" (https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/base16_oceanicnext.vim)
let g:airline#themes#space#palette = {}
let s:gui00 = "#1b2b34"
local feline = require('feline')
local vi_mode = require('feline.providers.vi_mode')
--
-- 1. define some constants
--
-- left and right constants (first and second items of the components array)
local LEFT = 1
local RIGHT = 2
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
end
return {
" ====================================================================
" Make sure to:
" 1. source this file somewhere at the bottom of your config.
" 2. disable any statusline plugins, as they will override this.
" ====================================================================
" Do not show mode under the statusline since the statusline itself changes
" color depending on mode
set noshowmode