1
Fork 0

feat: vimsnip and a bazillion other things

This commit is contained in:
Matei Adriel 2022-04-11 00:26:44 +03:00
parent 94c8aa2189
commit de269054c2
9 changed files with 63 additions and 19 deletions

View file

@ -75,13 +75,14 @@
Mth (layer-toggle capital-math)
mov (layer-toggle movement)
mathExtra (layer-toggle math-extra)
sft (tap-macro lsft (layer-toggle shiftedQwerty)) ;; make this work differently based on the next key pressed
)
;; more "special" stuff
(defalias
shr #(@topBar \ \_ \_ \( @shrugFace \) \_ / @topBar) ;; ¯\_(ツ)_/¯
ml (tap-hold-next-release 200 @gl @mathExtra)
ml @gl
)
(defsrc
@ -98,10 +99,19 @@
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
@mth a s d f g h j k l ; ' ret
lsft z x c v b n m , . / rsft
@sft z x c v b n m , . / rsft
@mov lsgt lmet lalt spc ralt rctl
)
(deflayer shiftedQwerty
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ ! @ # $ % ^ & 8 \( \) _ + S-bspc
S-tab Q W E R T Y U I O P { } |
@Mth A S D F G H J K L : " S-ret
XX Z X C V B N M < > ? _
_ _ _ _ S-spc S-ralt S-rctl
)
(deflayer movement
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
@ -111,6 +121,15 @@
_ _ _ _ _ _ _
)
(deflayer math-extra
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ @eq _ _ _ _ _ @or _ _ _ _
_ @and _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _
)
(deflayer math
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ @ex _ _ _ _ _ @alp @arp @neg _ _
@ -120,15 +139,6 @@
_ _ _ _ @mathExtra _ _
)
(deflayer math-extra
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ @eq _ _ _ _ _ @or _ _ _ _
_ @and _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _
)
(deflayer capital-math
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _

View file

@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: conf -*- include "%L"
# -*- coding: utf-8; mode: conf -*- include "%L"
<Multi_key> <a> <h> : "ɑ" U0251 # LATIN SMALL LETTER ALPHA
<Multi_key> <b> <h> : "β" U0252 # LATIN SMALL LETTER BETA

View file

@ -22,6 +22,7 @@ end
function M.setup()
M.map("n", "vv", "<C-w>v") -- Create vertical split
M.map("n", "qq", ":wq<cr>") -- Create vertical split
if arpeggio ~= nil then
-- Create chords

View file

@ -6,10 +6,10 @@ local M = {}
function M.setup()
vim.g.tmux_navigator_no_mappings = 1
map("", "<C-h>", ":TmuxNavigateLeft<cr>")
map("", "<C-j>", ":TmuxNavigateDown<cr>")
map("", "<C-k>", ":TmuxNavigateUp<cr>")
map("", "<C-l>", ":TmuxNavigateRight<cr>")
map("inv", "<C-h>", ":TmuxNavigateLeft<cr>")
map("inv", "<C-j>", ":TmuxNavigateDown<cr>")
map("inv", "<C-k>", ":TmuxNavigateUp<cr>")
map("inv", "<C-l>", ":TmuxNavigateRight<cr>")
end
return M

View file

@ -36,6 +36,7 @@
vscode
# vim
# emacs
vimclip # use neovim anywhere
# chat apps
discord

View file

@ -15,6 +15,7 @@ import XMonad.Hooks.ManageDocks
import XMonad.Layout.Spacing
import XMonad.Layout.ThreeColumns
import XMonad.Util.EZConfig
import XMonad.Operations
kdeOn :: Bool
kdeOn = False
@ -80,9 +81,11 @@ main =
-- TODO: find a way to bind all the program-opening-keybindings to a single sub-map
keymap =
[ ("M-p", spawn "rofi -show run"),
("M-g", spawn myBrowser),
("M-d", spawn "Discord")
[ ("M-p", spawn "rofi -show run")
, ("M-g", spawn myBrowser)
, ("M-d", spawn "Discord")
, ("M-v", spawn "alacritty -e vimclip")
, ("M-c", kill)
]
uniformBorder = join $ join $ join Border

View file

@ -5,6 +5,7 @@
((import ./myPackages.nix) {
inherit lib;
}) # Requires lib access
(import ./vimclip)
# I hope this works (spoiler: it did not)
# (import ./edopro)

View file

@ -0,0 +1 @@
self: super: { vimclip = self.callPackage (import ./vimclip.nix) { }; }

View file

@ -0,0 +1,27 @@
{ pkgs, ... }:
pkgs.stdenv.mkDerivation rec {
name = "vimclip";
rev = "7f53433";
src = pkgs.fetchFromGitHub {
inherit rev;
owner = "hrantzsch";
repo = "vimclip";
sha256 = "cl5y7Lli5frwx823hoN17B2aQLNY7+njmKEDdIbhc4Y=";
};
buildInputs = [
pkgs.makeWrapper
];
installPhase = ''
mkdir -p $out/bin
cp ./vimclip $out/bin/vimclip
chmod +x $out/bin/vimclip
'';
postFixup = ''
wrapProgram $out/bin/vimclip \
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.xsel ]} \
--set EDITOR nvim
'';
}