diff --git a/dotfiles/kmonad/keymap.kbd b/dotfiles/kmonad/keymap.kbd index 289251e..2a5cbc1 100644 --- a/dotfiles/kmonad/keymap.kbd +++ b/dotfiles/kmonad/keymap.kbd @@ -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 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ diff --git a/dotfiles/kmonad/xcompose b/dotfiles/kmonad/xcompose index e2b5c84..db20780 100644 --- a/dotfiles/kmonad/xcompose +++ b/dotfiles/kmonad/xcompose @@ -1,4 +1,4 @@ -# -*- coding: utf-8; mode: conf -*- include "%L" +# -*- coding: utf-8; mode: conf -*- include "%L" : "ɑ" U0251 # LATIN SMALL LETTER ALPHA : "β" U0252 # LATIN SMALL LETTER BETA diff --git a/dotfiles/neovim/lua/my/keymaps.lua b/dotfiles/neovim/lua/my/keymaps.lua index 11b0322..b866c5c 100644 --- a/dotfiles/neovim/lua/my/keymaps.lua +++ b/dotfiles/neovim/lua/my/keymaps.lua @@ -22,6 +22,7 @@ end function M.setup() M.map("n", "vv", "v") -- Create vertical split + M.map("n", "qq", ":wq") -- Create vertical split if arpeggio ~= nil then -- Create chords diff --git a/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua b/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua index 70c896a..8cf9332 100644 --- a/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua +++ b/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua @@ -6,10 +6,10 @@ local M = {} function M.setup() vim.g.tmux_navigator_no_mappings = 1 - map("", "", ":TmuxNavigateLeft") - map("", "", ":TmuxNavigateDown") - map("", "", ":TmuxNavigateUp") - map("", "", ":TmuxNavigateRight") + map("inv", "", ":TmuxNavigateLeft") + map("inv", "", ":TmuxNavigateDown") + map("inv", "", ":TmuxNavigateUp") + map("inv", "", ":TmuxNavigateRight") end return M diff --git a/modules/applications/misc.nix b/modules/applications/misc.nix index bb9f2bc..7eb659e 100644 --- a/modules/applications/misc.nix +++ b/modules/applications/misc.nix @@ -36,6 +36,7 @@ vscode # vim # emacs + vimclip # use neovim anywhere # chat apps discord diff --git a/modules/applications/xmonad/Main.hs b/modules/applications/xmonad/Main.hs index 9b0144a..1b73123 100644 --- a/modules/applications/xmonad/Main.hs +++ b/modules/applications/xmonad/Main.hs @@ -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 diff --git a/modules/overlays/default.nix b/modules/overlays/default.nix index e6ef153..0042485 100644 --- a/modules/overlays/default.nix +++ b/modules/overlays/default.nix @@ -5,6 +5,7 @@ ((import ./myPackages.nix) { inherit lib; }) # Requires lib access + (import ./vimclip) # I hope this works (spoiler: it did not) # (import ./edopro) diff --git a/modules/overlays/vimclip/default.nix b/modules/overlays/vimclip/default.nix new file mode 100644 index 0000000..479c7b4 --- /dev/null +++ b/modules/overlays/vimclip/default.nix @@ -0,0 +1 @@ +self: super: { vimclip = self.callPackage (import ./vimclip.nix) { }; } diff --git a/modules/overlays/vimclip/vimclip.nix b/modules/overlays/vimclip/vimclip.nix new file mode 100644 index 0000000..0e6fc55 --- /dev/null +++ b/modules/overlays/vimclip/vimclip.nix @@ -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 + ''; +}