Skip to content

Instantly share code, notes, and snippets.

View xaviervalarino's full-sized avatar

Xavier Valarino xaviervalarino

View GitHub Profile
# Modified from https://github.com/alyssais configuration.
#
# The following configuration heavily leverages modal keymaps to minimize the
# pollution of global keybindings. In addition, the modal keymaps facilitate
# the consistent use of the same keybindings across different modes. For
# example, this configuration uses 'h', 'l', 'j', and 'k' to represent west,
# east, south, and north when: changing focus, warping windows, resizing
# windows, swapping windows, and moving floating windows. Those four keys are
# mapped differently depending on the current mode to provide a consistent user
# experience.
@nyergler
nyergler / init.lua
Created May 21, 2018 15:57
My Hammerspoon window management configuration
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "W", function()
hs.alert.show(
"Hello World!",
{
textFont= "Comic Sans MS",
textSize=72,
fadeOutDuration=1
}
)
end)
" deoplete.vim contains vim settings relevant to the deoplete autocompletion
" plugin
" for more details about my neovim setup see:
" http://afnan.io/2018-04-12/my-neovim-development-setup/
" deoplete options
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1
" disable autocomplete by default
@slowkow
slowkow / index.html
Last active December 1, 2021 23:47
Karabiner-Elements mouse4 to back and mouse5 to forward
<html>
<body>
<a href="karabiner://karabiner/assets/complex_modifications/import?url=https%3A%2F%2Fgist.githubusercontent.com%2Fslowkow%2F275e53573e2aeb60c8304add1e54faf5%2Fraw%2Fc63540925dba76f46293834c24700ebf1578ed10%2Fmouse-buttons-back-forward.json">click here to import into Karabiner-Elements</a>
</body>
</html>
@azu
azu / tab.json
Created July 23, 2017 11:47
Change Tab + I/J/K/L to Arrow Keys - Karabiner-Elements.
{
"title": "Tab + HJKL",
"rules": [
{
"description": "Change Tab to fake modified key",
"manipulators": [
{
"from": {
"key_code": "tab"
},
@romainl
romainl / colorscheme-override.md
Last active April 27, 2024 15:36
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.
#!/bin/bash
kwmc=$HOME/bin/kwmc
currentFocus=$($kwmc query focus-follows-mouse)
currentMouse=$($kwmc query mouse-follows-focus)
tag=$($kwmc query space active mode)
if [ "$1" = 'quit' ]; then
killall kwm
@ttscoff
ttscoff / init.lua
Last active January 9, 2024 23:44
Hammerspoon config examples for hyper key
-- A global variable for the Hyper Mode
k = hs.hotkey.modal.new({}, "F17")
-- Trigger existing hyper key shortcuts
k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end)
-- OR build your own
launch = function(appname)
@20015jjw
20015jjw / gist:08db8dbb801c29706e76
Last active May 10, 2016 18:01
Add these lines to .bash_profile to allow iterm2 to switch profiles with the time in the day.
# Define a function that switches iterm profile
iterm2_profile() { echo -e "\033]50;SetProfile=$1\a"; }
# Change profile by $HOUR
# You'll need to change name of profiles to Light and Dark
HOUR=`date +"%H"`
if [ $HOUR -gt 6 ] && [ $HOUR -lt 18 ];
then iterm2_profile Light;
else iterm2_profile Dark;
fi