1
0
mirror of https://github.com/kmein/niveum synced 2026-03-20 20:01:08 +01:00

add passmenu, vim shortcuts

This commit is contained in:
Kierán Meinhardt
2019-04-02 23:24:31 +02:00
parent d31b3b6867
commit 9413ddffe0
6 changed files with 113 additions and 82 deletions

View File

@@ -42,7 +42,6 @@ in {
]; ];
opt = [ opt = [
csv csv
deoplete-jedi
deoplete-rust deoplete-rust
dhall-vim dhall-vim
elm-vim elm-vim
@@ -53,15 +52,7 @@ in {
vim-javascript vim-javascript
vim-nix vim-nix
vimtex vimtex
(pkgs.vimUtils.buildVimPluginFrom2Nix { vim-ledger
name = "vim-ledger";
src = pkgs.fetchFromGitHub {
owner = "ledger";
repo = "vim-ledger";
rev = "6eb3bb21aa979cc295d0480b2179938c12b33d0d";
sha256 = "0rbwyaanvl2bqk8xm4kq8fkv8y92lpf9xx5n8gw54iij7xxhnj01";
};
})
(pkgs.vimUtils.buildVimPluginFrom2Nix { (pkgs.vimUtils.buildVimPluginFrom2Nix {
name = "vim-fsharp"; name = "vim-fsharp";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@@ -80,16 +71,6 @@ in {
sha256 = "0vl4267hh8g1vkvc3awlqyypgz4m1r43d47sldl80yamiafiviaj"; sha256 = "0vl4267hh8g1vkvc3awlqyypgz4m1r43d47sldl80yamiafiviaj";
}; };
}) })
(pkgs.vimUtils.buildVimPluginFrom2Nix {
name = "ghcid";
src = "${(pkgs.fetchFromGitHub {
owner = "ndmitchell";
repo = "ghcid";
rev = "5288801e7f046c42972527cd94171ce893ba91cf";
sha256 = "0dgxsl1dci6w3x662c7z1zw8yvfnch4ymhsvx29n7jkgqmcy1lki";
}).out}/plugins/nvim";
})
]; ];
}; };
}; };

View File

@@ -9,7 +9,31 @@ let
url = "https://cgit.krebsco.de/stockholm/plain/krebs/5pkgs/simple/dic/default.nix?id=8371e21c10bdb5d5353cc581efba7e09e4ce7a91"; url = "https://cgit.krebsco.de/stockholm/plain/krebs/5pkgs/simple/dic/default.nix?id=8371e21c10bdb5d5353cc581efba7e09e4ce7a91";
sha256 = "1vd8mg1ac7wzrcs5bl20srkxcs65zr7rd7y3wxzrxspij5wrb23i"; sha256 = "1vd8mg1ac7wzrcs5bl20srkxcs65zr7rd7y3wxzrxspij5wrb23i";
}; };
yt-next-pkg = pkgs.fetchurl {
url = http://cgit.lassul.us/stockholm/plain/lass/5pkgs/yt-next/default.nix;
sha256 = "0j9r9xy34sl9ci5lz38060b3nakf0vd7gw46pykdiriwz6znbxn3";
};
urlencode-pkg = pkgs.fetchurl {
url = http://cgit.lassul.us/stockholm/plain/krebs/5pkgs/simple/urlencode/default.nix;
sha256 = "0cxf0fcaq02krkn33qipv878drqnjr035a564m66wp9x8n2zjgim";
};
acronym-pkg = pkgs.fetchurl {
url = http://cgit.lassul.us/stockholm/plain/lass/5pkgs/acronym/default.nix;
sha256 = "1rpr1rniz74vmkl4r3hgrg8q7ncxrvbf7zp0lq9b7lva85i12zx9";
};
urban-pkg = pkgs.fetchurl {
url = http://cgit.lassul.us/stockholm/plain/lass/5pkgs/urban/default.nix;
sha256 = "128v0znnapcqbyvc0nf112ddfyipr8sc1z4kcnggnbjf99i763ji";
};
mpv-poll-pkg = pkgs.fetchurl {
url = http://cgit.lassul.us/stockholm/plain/lass/5pkgs/mpv-poll/default.nix;
sha256 = "0ccmm7spxll98j8gy58fc3p8331arznshsj5wn4kkcypcs16n6ci";
};
dic = pkgs.callPackage dic-pkg {}; dic = pkgs.callPackage dic-pkg {};
yt-next = pkgs.callPackage yt-next-pkg {};
acronym = pkgs.callPackage acronym-pkg {};
urban = pkgs.callPackage urban-pkg {};
mpv-poll = pkgs.callPackage mpv-poll-pkg {};
haskells = import ../dot/haskells.nix; haskells = import ../dot/haskells.nix;
unstable = import <nixos-unstable> {}; unstable = import <nixos-unstable> {};
executables = pkgs.haskell.lib.justStaticExecutables; executables = pkgs.haskell.lib.justStaticExecutables;
@@ -143,7 +167,7 @@ in with pkgs;
(executables haskellPackages.cabal-install) (executables haskellPackages.cabal-install)
(executables haskellPackages.ghcid) (executables haskellPackages.ghcid)
(executables haskellPackages.hakyll) (executables haskellPackages.hakyll)
(executables haskellPackages.brittany) (haskellPackages.brittany)
(executables haskellPackages.hfmt) (executables haskellPackages.hfmt)
(executables haskellPackages.hasktags) (executables haskellPackages.hasktags)
# (executables haskellPackages.hindent) # (executables haskellPackages.hindent)
@@ -157,15 +181,16 @@ in with pkgs;
mypy mypy
nix-prefetch-git nix-prefetch-git
nodejs nodejs
nodePackages.eslint
nodePackages.csslint nodePackages.csslint
nodePackages.prettier nodePackages.prettier
nodePackages.jsonlint
ocaml ocaml
python3 python3
python3Packages.black python3Packages.black
# python3Packages.yapf python3Packages.python-language-server
python3Packages.pyls-mypy
python3Packages.flake8 python3Packages.flake8
python3Packages.jedi # python3Packages.jedi
ruby ruby
rubocop rubocop
rustup rustup
@@ -202,13 +227,17 @@ in with pkgs;
memo memo
par par
fzf fzf
pass (pass.withExtensions (ext: [ext.pass-otp]))
qrencode qrencode
sncli sncli
dic
tmuxp tmuxp
unstable.hledger unstable.hledger
wordnet wordnet
xsv xsv
dic
yt-next
mpv-poll
acronym
urban
] ++ (if config.networking.hostName == "homeros" then [ unstable.zeroad ] else []); ] ++ (if config.networking.hostName == "homeros" then [ unstable.zeroad ] else []);
} }

View File

@@ -54,20 +54,20 @@ rec {
childBorder = colorScheme.green.light; childBorder = colorScheme.green.light;
}; };
}; };
bars = [{ bars = [{
workspaceButtons = false; workspaceButtons = false;
fonts = [ "${terminalFont.name} ${toString terminalFont.size}" ]; fonts = [ "${terminalFont.name} ${toString terminalFont.size}" ];
mode = "hide"; mode = "hide";
colors = { colors = {
background = colorScheme.background; background = colorScheme.background;
separator = colorScheme.background; separator = colorScheme.background;
statusline = colorScheme.foreground; statusline = colorScheme.foreground;
bindingMode = { bindingMode = {
background = colorScheme.red.light; background = colorScheme.red.light;
border = colorScheme.background; border = colorScheme.background;
text = colorScheme.foreground; text = colorScheme.foreground;
};
}; };
};
# position = "top"; # position = "top";
statusCommand = statusCommand =
let let
@@ -136,41 +136,42 @@ rec {
in '' in ''
${pkgs.i3status}/bin/i3status -c ${i3status-config} ${pkgs.i3status}/bin/i3status -c ${i3status-config}
''; '';
}]; }];
keybindings = { keybindings = {
"${modifier}+Down" = "focus down"; "${modifier}+Down" = "focus down";
"${modifier}+Left" = "focus left"; "${modifier}+Left" = "focus left";
"${modifier}+Return" = "exec ${config.defaultApplications.terminal}"; "${modifier}+Return" = "exec ${config.defaultApplications.terminal}";
"${modifier}+Right" = "focus right"; "${modifier}+Right" = "focus right";
"${modifier}+Shift+Down" = "move down"; "${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Left" = "move left"; "${modifier}+Shift+Left" = "move left";
"${modifier}+Shift+Right" = "move right"; "${modifier}+Shift+Right" = "move right";
"${modifier}+Shift+Up" = "move up"; "${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+c" = "reload"; "${modifier}+Shift+c" = "reload";
"${modifier}+Shift+n" = "move window to workspace next"; "${modifier}+Shift+n" = "move window to workspace next";
"${modifier}+Shift+b" = "move window to workspace prev"; "${modifier}+Shift+b" = "move window to workspace prev";
"${modifier}+Shift+q" = "kill"; "${modifier}+Shift+q" = "kill";
"${modifier}+Shift+r" = "restart"; "${modifier}+Shift+r" = "restart";
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow"; "${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
"${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}"; "${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}";
"${modifier}+Shift+z" = "floating toggle"; "${modifier}+Shift+z" = "floating toggle";
"${modifier}+Up" = "focus up"; "${modifier}+Up" = "focus up";
"${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window -show window"; "${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window -show window";
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run -show run"; "${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run -show run";
"${modifier}+e" = "layout toggle split"; "${modifier}+e" = "layout toggle split";
"${modifier}+f" = "fullscreen toggle"; "${modifier}+f" = "fullscreen toggle";
"${modifier}+h" = "split h"; "${modifier}+h" = "split h";
"${modifier}+n" = "workspace next"; "${modifier}+n" = "workspace next";
"${modifier}+b" = "workspace prev"; "${modifier}+b" = "workspace prev";
"${modifier}+r" = "mode resize"; "${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass";
"${modifier}+s" = "layout stacking"; "${modifier}+r" = "mode resize";
"${modifier}+t" = "exec ${config.defaultApplications.fileManager}"; "${modifier}+s" = "layout stacking";
"${modifier}+v" = "split v"; "${modifier}+t" = "exec ${config.defaultApplications.fileManager}";
"${modifier}+w" = "layout tabbed"; "${modifier}+v" = "split v";
"${modifier}+x" = "exec --no-startup-id ${new-workspace}"; "${modifier}+w" = "layout tabbed";
"${modifier}+y" = "exec ${config.defaultApplications.browser}"; "${modifier}+x" = "exec --no-startup-id ${new-workspace}";
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks"; "${modifier}+y" = "exec ${config.defaultApplications.browser}";
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t && pkill -RTMIN+3 i3blocks"; "XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks";
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks"; "XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t && pkill -RTMIN+3 i3blocks";
}; "XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks";
} };
}

View File

@@ -11,6 +11,21 @@ colorscheme delek
let mapleader = "," let mapleader = ","
" let maplocalleader="\\" " let maplocalleader="\\"
noremap <Leader>h :<C-u>split<CR>
noremap <Leader>v :<C-u>vsplit<CR>
noremap <Leader>gs :Gstatus<CR>
noremap <Leader>gc :Gcommit<CR>
noremap <leader>n :bn<CR>
noremap <leader>p :bp<CR>
noremap <leader>c :bd<CR>
" reindent whole file
noremap <leader>i mzgg=G`z
nnoremap <Leader>a <Plug>(ale_hover)
nnoremap <Leader>d <Plug>(ale_go_to_definition_in_tab)
nnoremap <Leader>rf <Plug>(ale_find_references)
filetype plugin indent on filetype plugin indent on
set title set title
set nocompatible set nocompatible
@@ -93,7 +108,7 @@ if has("autocmd")
autocmd bufnewfile,bufread *.h set keywordprg=man\ 3 autocmd bufnewfile,bufread *.h set keywordprg=man\ 3
autocmd bufnewfile,bufread *.nix packadd vim-nix | set filetype=nix autocmd bufnewfile,bufread *.nix packadd vim-nix | set filetype=nix
autocmd bufnewfile,bufread *.rust packadd rust-vim | packadd deoplete-rust autocmd bufnewfile,bufread *.rust packadd rust-vim | packadd deoplete-rust
autocmd bufnewfile,bufread *.csv packadd csv-vim autocmd bufnewfile,bufread *.csv packadd csv-vim | set filetype=csv
autocmd bufnewfile,bufread *.tex packadd vimtex | set filetype=tex autocmd bufnewfile,bufread *.tex packadd vimtex | set filetype=tex
autocmd bufnewfile,bufread *.ts packadd vim-typescript autocmd bufnewfile,bufread *.ts packadd vim-typescript
autocmd bufnewfile,bufread *.journal packadd vim-ledger | set filetype=ledger shiftwidth=4 autocmd bufnewfile,bufread *.journal packadd vim-ledger | set filetype=ledger shiftwidth=4
@@ -102,7 +117,6 @@ if has("autocmd")
autocmd bufnewfile,bufread *.dhall packadd dhall-vim | set filetype=dhall autocmd bufnewfile,bufread *.dhall packadd dhall-vim | set filetype=dhall
autocmd filetype haskell packadd haskell-vim autocmd filetype haskell packadd haskell-vim
autocmd filetype javascript packadd vim-javascript autocmd filetype javascript packadd vim-javascript
autocmd filetype python packadd deoplete-jedi
autocmd filetype make setlocal noexpandtab autocmd filetype make setlocal noexpandtab
autocmd filetype html packadd emmet-vim autocmd filetype html packadd emmet-vim
autocmd bufreadpost * autocmd bufreadpost *
@@ -137,11 +151,14 @@ let g:haskell_enable_pattern_synonyms = 1
" if exists("g:loaded_ale") " if exists("g:loaded_ale")
let g:ale_linters = { let g:ale_linters = {
\ 'rust': ['cargo'], \ 'rust': ['cargo'],
\ 'css': ['csslint'],
\ 'haskell': ['ghc', 'cabal-ghc', 'hlint'], \ 'haskell': ['ghc', 'cabal-ghc', 'hlint'],
\ 'html': ['tidy', 'proselint'], \ 'html': ['tidy', 'proselint'],
\ 'latex': ['lacheck', 'chktex', 'proselint'], \ 'latex': ['lacheck', 'chktex', 'proselint'],
\ 'pandoc': ['proselint'], \ 'pandoc': ['proselint'],
\ 'ruby': ['rubocop'], \ 'ruby': ['rubocop'],
\ 'json': ['jsonlint'],
\ 'python': ['pyls'],
\} \}
let g:ale_fixers = { let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'], \ '*': ['remove_trailing_lines', 'trim_whitespace'],
@@ -151,7 +168,6 @@ let g:ale_fixers = {
\ 'css': ['prettier'], \ 'css': ['prettier'],
\ 'html': ['prettier'], \ 'html': ['prettier'],
\ 'markdown': ['prettier'], \ 'markdown': ['prettier'],
\ 'pandoc': ['prettier'],
\ 'json': ['jq'], \ 'json': ['jq'],
\ 'python': ['black'], \ 'python': ['black'],
\ 'rust': ['rustfmt'] \ 'rust': ['rustfmt']

View File

@@ -104,6 +104,10 @@ in {
"mpv/input.conf".text = import dot/mpv.nix; "mpv/input.conf".text = import dot/mpv.nix;
"htop/htoprc".text = builtins.readFile dot/htoprc; "htop/htoprc".text = builtins.readFile dot/htoprc;
"zathura/zathurarc".text = "set selection-clipboard clipboard"; "zathura/zathurarc".text = "set selection-clipboard clipboard";
"pycodestyle".text = ''
[pycodestyle]
max-line-length = 110
'';
}; };
home.file = { home.file = {

View File

@@ -66,8 +66,8 @@ in rec {
black = "#000000"; black = "#000000";
gray = "#888888"; gray = "#888888";
colorScheme = solarizedDark; colorScheme = macOS;
invertedColorScheme = solarizedLight; invertedColorScheme = flip macOS;
colorPalette = [ colorPalette = [
colorScheme.black.dark colorScheme.red.dark colorScheme.green.dark colorScheme.yellow.dark colorScheme.blue.dark colorScheme.magenta.dark colorScheme.cyan.dark colorScheme.white.dark colorScheme.black.dark colorScheme.red.dark colorScheme.green.dark colorScheme.yellow.dark colorScheme.blue.dark colorScheme.magenta.dark colorScheme.cyan.dark colorScheme.white.dark