mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: misc
This commit is contained in:
parent
d1d1f96a7c
commit
4ee59b9448
5 changed files with 105 additions and 48 deletions
8
home/environments/i3/cursor.nix
Normal file
8
home/environments/i3/cursor.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }: {
|
||||
home.pointerCursor = {
|
||||
enable = true;
|
||||
package = pkgs.graphite-cursors;
|
||||
size = 16;
|
||||
name = "graphite-dark";
|
||||
};
|
||||
}
|
||||
|
|
@ -45,30 +45,19 @@ in {
|
|||
gapsInnerMode = "Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)";
|
||||
in {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
workspace 1 output DP-2 gaps inner 10
|
||||
workspace 2 output DP-2
|
||||
workspace 3 output DP-2
|
||||
workspace 4 output DP-2
|
||||
workspace 5 output DP-2
|
||||
workspace 5 output DP-2
|
||||
workspace 6 output DP-2
|
||||
workspace 7 output DP-2
|
||||
workspace 8 output DP-2
|
||||
workspace 9 output DP-2
|
||||
workspace 0 output DP-2
|
||||
workspace 11 output HDMI-0
|
||||
workspace 12 output HDMI-0
|
||||
workspace 13 output HDMI-0
|
||||
workspace 14 output HDMI-0
|
||||
workspace 15 output HDMI-0
|
||||
workspace 16 output HDMI-0
|
||||
workspace 17 output HDMI-0
|
||||
workspace 18 output HDMI-0
|
||||
workspace 19 output HDMI-0
|
||||
workspace 20 output HDMI-0
|
||||
extraConfig = let
|
||||
displayWorkspace = display: workspace: ''
|
||||
workspace "${workspaceNamer (builtins.toString workspace)}" output ${display}
|
||||
'';
|
||||
displayBindings = list.map (v: displayWorkspace "DP-2" v) (list.range 1 9)
|
||||
++ [ (displayWorkspace "DP-2" 10) ]
|
||||
++ list.map (v: displayWorkspace "HDMI-0" (11+v)) (list.range 1 12);
|
||||
displayBindingsStr = lib.concatLines displayBindings;
|
||||
in ''
|
||||
${displayBindingsStr}
|
||||
for_window [class="^steam_app_default$"] floating enable
|
||||
'';
|
||||
|
||||
config = {
|
||||
inherit modifier;
|
||||
fonts = {
|
||||
|
|
@ -81,8 +70,8 @@ in {
|
|||
};
|
||||
|
||||
startup = [
|
||||
{ command = "~/.screenlayout/main.sh"; }
|
||||
{ command = "blueman-applet"; }
|
||||
{ command = "~/.screenlayout/main.sh"; notification = false; }
|
||||
{ command = "blueman-applet"; notification = false; }
|
||||
];
|
||||
|
||||
keybindings = let
|
||||
|
|
@ -108,13 +97,13 @@ in {
|
|||
"Ctrl+${mod2}+Print" = "exec --no-startup-id maim --window $(xdotool getactivewindow) | xclip -selection clipboard -t image/png";
|
||||
"Ctrl+Shift+Print" = "exec --no-startup-id maim --select | xclip -selection clipboard -t image/png";
|
||||
|
||||
"${mod}+r" = "exec ${runCommand}";
|
||||
"${mod}+r" = "exec --no-startup-id ${runCommand}";
|
||||
"${mod}+p" = "mode resize";
|
||||
"${mod}+x" = "exec sh -c '${pkgs.maim}/bin/maim -s | xclip -selection clipboard -t image/png'";
|
||||
"${mod}+x" = "exec --no-startup-id sh -c '${pkgs.maim}/bin/maim -s | xclip -selection clipboard -t image/png'";
|
||||
"${mod}+Shift+x" = "exec ${lockCommand}";
|
||||
"${mod}+Return" = "exec ${config.programs.wezterm.package}/bin/wezterm";
|
||||
"${mod}+Return" = "exec --no-startup-id ${config.programs.wezterm.package}/bin/wezterm";
|
||||
"${mod}+Tab" = "workspace back_and_forth";
|
||||
"${mod}+Shift+Tab" = "exec ${config.services.i3gopher.focus-last}";
|
||||
"${mod}+Shift+Tab" = "exec --no-startup-id ${config.services.i3gopher.focus-last}";
|
||||
"${mod}+Shift+g" = ''mode "${gapsMode}"'';
|
||||
"${mod}+Delete" = ''mode "${actionMode}"'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ in {
|
|||
nvim-web-devicons
|
||||
# Completion
|
||||
nvim-cmp
|
||||
cmp-git
|
||||
cmp-nvim-lsp
|
||||
# Fuzzy Finder
|
||||
telescope-nvim
|
||||
# Buffers
|
||||
bufferline-nvim
|
||||
# Language Server
|
||||
nvim-lspconfig
|
||||
rustaceanvim
|
||||
# tree
|
||||
nui-nvim
|
||||
|
|
@ -86,8 +86,6 @@ in {
|
|||
twilight-nvim
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
# For nvim-lspconfig, Terraform Language Server
|
||||
terraform-ls
|
||||
# For tree-sitter
|
||||
tree-sitter
|
||||
nodejs
|
||||
|
|
|
|||
|
|
@ -162,30 +162,88 @@ end
|
|||
require('lualine').setup{}
|
||||
|
||||
-- nvim-cmp
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
virtual_lines = true,
|
||||
underlines = true
|
||||
})
|
||||
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||
},
|
||||
sources = {
|
||||
-- { name = 'neorg' },
|
||||
}
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
--vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+)
|
||||
|
||||
-- For `mini.snippets` users:
|
||||
-- local insert = MiniSnippets.config.expand.insert or MiniSnippets.default_insert
|
||||
-- insert({ body = args.body }) -- Insert at cursor
|
||||
-- cmp.resubscribe({ "TextChangedI", "TextChangedP" })
|
||||
-- require("cmp.config").set_onetime({ sources = {} })
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
-- { name = 'vsnip' }, -- For vsnip users.
|
||||
-- { name = 'luasnip' }, -- For luasnip users.
|
||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||
-- { name = 'snippy' }, -- For snippy users.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- lspconfig
|
||||
require('lspconfig').terraformls.setup{}
|
||||
-- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'git' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
require("cmp_git").setup()
|
||||
|
||||
api.nvim_create_autocmd('BufWritePre', {
|
||||
pattern = '*.tf',
|
||||
command = 'lua vim.lsp.buf.formatting_sync()'
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
matching = { disallow_symbol_nonprefix_matching = false }
|
||||
})
|
||||
|
||||
-- Set up lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
vim.lsp.inlay_hint.enable();
|
||||
|
||||
-- neorg
|
||||
require('neorg').setup {
|
||||
-- Tell Neorg what modules to load
|
||||
|
|
|
|||
|
|
@ -10,10 +10,14 @@
|
|||
plexamp
|
||||
super-slicer-beta
|
||||
nvidia-vaapi-driver
|
||||
nv-codec-headers-12
|
||||
];
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
enableVirtualCamera = true;
|
||||
package = pkgs.obs-studio.override {
|
||||
cudaSupport = true;
|
||||
};
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-vaapi
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue