From 4a1d182894b94004abe9c6e527a01196a315b3dc Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 3 Feb 2022 16:58:34 -0600 Subject: [PATCH] many changes --- home/dot_xinitrc | 5 +++ home/dot_xprofile | 1 + .../alacritty/alacritty.yml | 10 +++--- home/private_dot_config/git/config | 1 + home/private_dot_config/leftwm/config.toml | 17 +++++++--- home/private_dot_config/lvim/config.lua | 12 ++++--- .../lvim/lua/keybindings.lua | 34 +++++++++++++++++-- home/private_dot_config/lvim/lua/plugins.lua | 29 +++++++++++++--- .../nvim/lua/keybindings.lua | 1 + home/private_dot_config/nvim/lua/plugins.lua | 19 ++++++++--- 10 files changed, 104 insertions(+), 25 deletions(-) create mode 100644 home/dot_xinitrc diff --git a/home/dot_xinitrc b/home/dot_xinitrc new file mode 100644 index 0000000..2e2fcf2 --- /dev/null +++ b/home/dot_xinitrc @@ -0,0 +1,5 @@ +#exec dbus-launch + +xinput --map-to-output 'ELAN901C:00 04F3:2C29' eDP1 + +exec dbus-launch leftwm diff --git a/home/dot_xprofile b/home/dot_xprofile index af60f84..543f746 100644 --- a/home/dot_xprofile +++ b/home/dot_xprofile @@ -1 +1,2 @@ xinput --map-to-output 'ELAN901C:00 04F3:2C29' eDP1 + diff --git a/home/private_dot_config/alacritty/alacritty.yml b/home/private_dot_config/alacritty/alacritty.yml index 4507fac..90468bf 100644 --- a/home/private_dot_config/alacritty/alacritty.yml +++ b/home/private_dot_config/alacritty/alacritty.yml @@ -41,7 +41,7 @@ window: #position: # x: 0 # y: 0 - + opacity: .80 # Window padding (changes require restart) # # Blank space added around the window in pixels. This padding is scaled @@ -369,16 +369,16 @@ font: # When set to `true`, selected text will be copied to the primary clipboard. #save_to_clipboard: false -#cursor: +cursor: # Cursor style - #style: + style: # Cursor shape # # Values for `shape`: # - ▇ Block # - _ Underline # - | Beam - #shape: Block + shape: Underline # Cursor blinking state # @@ -387,7 +387,7 @@ font: # - Off: Disable blinking by default # - On: Enable blinking by default # - Always: Force the cursor to always blink - #blinking: Off + blinking: on # Vi mode cursor style # diff --git a/home/private_dot_config/git/config b/home/private_dot_config/git/config index b1ca7d5..16ab6b6 100644 --- a/home/private_dot_config/git/config +++ b/home/private_dot_config/git/config @@ -2,6 +2,7 @@ helper = cache [core] editor = vim + excludesfile = /home/daylin/.config/git/ignore [user] name = Daylin Morgan email = daylinmorgan@gmail.com diff --git a/home/private_dot_config/leftwm/config.toml b/home/private_dot_config/leftwm/config.toml index e2d61da..b722a40 100644 --- a/home/private_dot_config/leftwm/config.toml +++ b/home/private_dot_config/leftwm/config.toml @@ -1,7 +1,7 @@ modkey = "Mod4" mousekey = "Mod4" workspaces = [] -tags = ["1", "2", "3", "4", "5", "6", "7", "8", "9"] +tags = ["1", "2", "3", "4", "5", "6", "7", "8"] # tags = ["", "", "", "", "", ""] layouts = ["MainAndVertStack", "Monocle", "EvenVertical", "CenterMainBalanced"] layout_mode = "Workspace" @@ -15,19 +15,19 @@ focus_new_windows = true ## Rofi [[keybind]] command = "Execute" -value = "~/.config/leftwm/themes/current/rofi/launcher.sh" +value = "~/.config/leftwm/themes/current/rofi/bin/launcher.sh" modifier = ["modkey"] key = "p" [[keybind]] command = "Execute" -value = "~/.config/leftwm/themes/current/rofi/powermenu.sh" +value = "~/.config/leftwm/themes/current/rofi/bin/powermenu.sh" modifier = ["modkey", "Shift"] key = "p" [[keybind]] command = "Execute" -value = "~/.config/leftwm/themes/current/rofi/keymap.sh" +value = "~/.config/leftwm/themes/current/rofi/bin/keymap.sh" modifier = ["modkey", "Shift"] key = "k" @@ -57,10 +57,17 @@ key = "Return" [[keybind]] command = "Execute" -value = "light-locker-command -l" +value = "~/bin/lock" modifier = ["modkey", "Control"] key = "l" +[[keybind]] +command = "Execute" +value = "flameshot gui" +modifier = ["modkey"] +key = "y" + + [[scratchpad]] name = "Alacritty" # This is the name which is referenced when calling (case-sensitive) value = "alacritty" # The command to load the application if it isn't started diff --git a/home/private_dot_config/lvim/config.lua b/home/private_dot_config/lvim/config.lua index 9b9c7fd..ec4a5c5 100644 --- a/home/private_dot_config/lvim/config.lua +++ b/home/private_dot_config/lvim/config.lua @@ -1,5 +1,5 @@ -require("keybindings") require("plugins") +require("keybindings") -- general lvim.log.level = "warn" @@ -29,11 +29,15 @@ lvim.builtin.treesitter.ensure_installed = { lvim.builtin.treesitter.ignore_install = { "haskell" } lvim.builtin.treesitter.highlight.enabled = true --- settings -local opt = vim.opt -opt.timeoutlen = 500 -- colorscheme lvim.builtin.lualine.options.theme = "dracula" lvim.colorscheme = "dracula" +-- settings +local opt = vim.opt +opt.timeoutlen = 500 +lvim.autocommands.custom_groups = { + -- On entering insert mode in any file, scroll the window so the cursor line is centered + {"InsertEnter", "*", ":normal zz"}, +} diff --git a/home/private_dot_config/lvim/lua/keybindings.lua b/home/private_dot_config/lvim/lua/keybindings.lua index b329cf0..0205a54 100644 --- a/home/private_dot_config/lvim/lua/keybindings.lua +++ b/home/private_dot_config/lvim/lua/keybindings.lua @@ -1,14 +1,44 @@ -- Map a key with optional options -function map(mode, keys, action, options) +local function map(mode, keys, action, options) if options == nil then - options = {} + options = {noremap=true} end vim.api.nvim_set_keymap(mode,keys,action,options) end +vim.g.mapleader = " " + map('i','jk','',{noremap=true}) map('v','jk','',{noremap=true}) +map('n', "H", "^",{noremap=true}) +map('n', "L", "$",{noremap=true}) + +-- zettelkasten keybindings + + +-- Create a new note after asking for its title. +-- map("n", "zn", "ZkNew { title = vim.fn.input('Title: ') }") + +-- -- Open notes. +-- map("n", "zo", "ZkNotes { sort = { 'modified' } }") +-- -- Open notes associated with the selected tags. +-- map("n", "zt", "ZkTags") + +-- -- Search for the notes matching a given query. +-- map("n", "zf", "ZkNotes { sort = { 'modified' }, match = vim.fn.input('Search: ') }") +-- -- Search for the notes matching the current visual selection. +map("v", "zf", ":'<,'>ZkMatch") + +lvim.builtin.which_key.mappings["z"] = { + name = "zk", + n = { "ZkNew { title = vim.fn.input('Title: ') }", "New"}, + o = { "ZkNotes { sort = { 'modified' } }", "Open" }, + t = { "ZkTags", "Tags"}, + f = { "ZkNotes { sort = { 'modified' }, match = vim.fn.input('Search: ') }", "Fuzzy Search" }, +} + + -- keymappings [view all the defaults by pressing Lk] -- lvim.leader = "space" -- add your own keymapping diff --git a/home/private_dot_config/lvim/lua/plugins.lua b/home/private_dot_config/lvim/lua/plugins.lua index ca60316..c33bbff 100644 --- a/home/private_dot_config/lvim/lua/plugins.lua +++ b/home/private_dot_config/lvim/lua/plugins.lua @@ -2,10 +2,31 @@ lvim.plugins = { { 'Mofiqul/dracula.nvim' }, { 'ggandor/lightspeed.nvim' }, - { 'snakemake/snakemake', - rtp='misc/vim', - ft={"Snakefile,snk"} - } + { + 'mickael-menu/zk-nvim', + config = function () + require("zk").setup({ + -- can be "telescope", "fzf" or "select" (`vim.ui.select`) + -- it's recommended to use "telescope" or "fzf" + picker = "telescope", + lsp = { + -- `config` is passed to `vim.lsp.start_client(config)` + config = { + cmd = { "zk", "lsp" }, + name = "zk", + -- on_attach = ... + -- etc, see `:h vim.lsp.start_client()` + }, + + -- automatically attach buffers in a zk notebook that match the given filetypes + auto_attach = { + enabled = true, + filetypes = { "markdown" }, + }, + }, + }) + end, + } } -- default plugins settings diff --git a/home/private_dot_config/nvim/lua/keybindings.lua b/home/private_dot_config/nvim/lua/keybindings.lua index a8eb128..3081aeb 100644 --- a/home/private_dot_config/nvim/lua/keybindings.lua +++ b/home/private_dot_config/nvim/lua/keybindings.lua @@ -6,6 +6,7 @@ function map(mode, keys, action, options) vim.api.nvim_set_keymap(mode,keys,action,options) end + map('i','jk','',{noremap=true}) map('v','jk','',{noremap=true}) diff --git a/home/private_dot_config/nvim/lua/plugins.lua b/home/private_dot_config/nvim/lua/plugins.lua index b710d8a..0d6256b 100644 --- a/home/private_dot_config/nvim/lua/plugins.lua +++ b/home/private_dot_config/nvim/lua/plugins.lua @@ -22,6 +22,14 @@ return require('packer').startup(function(use) end } + -- use { + -- 'airblade/vim-gitgutter', + -- config = function() + -- local cmd = vim.cmd + -- cmd [[highlight! link SignColumn LineNr]] + -- end + -- } + -- use { 'norcalli/nvim-colorizer.lua', conifg = function() @@ -33,7 +41,8 @@ return require('packer').startup(function(use) 'numToStr/Comment.nvim', config = function() require('Comment').setup() - end } + end +} use { "folke/which-key.nvim", @@ -74,11 +83,11 @@ use { ft={"Snakefile","snk"} } --- toml + -- toml use 'cespare/vim-toml' vim.g.strip_whitespace_on_save = 1 - -- if packer_bootstrap then - -- require('packer').sync() - -- end + if packer_bootstrap then + require('packer').sync() + end end)