From 04d22b226156de74ecc3c2bd5208b49679cecae6 Mon Sep 17 00:00:00 2001 From: Alexander Navarro Date: Thu, 8 Jun 2023 09:40:52 -0400 Subject: [PATCH] update --- config/nvim/lua/aleidk/keymaps.lua | 4 ++++ config/nvim/lua/aleidk/plugins/trouble.lua | 28 +++++----------------- scripts/sort-wallpapers | 28 ++++++++++++++++++++++ 3 files changed, 38 insertions(+), 22 deletions(-) create mode 100755 scripts/sort-wallpapers diff --git a/config/nvim/lua/aleidk/keymaps.lua b/config/nvim/lua/aleidk/keymaps.lua index 20f4ac0..6f6e0f0 100644 --- a/config/nvim/lua/aleidk/keymaps.lua +++ b/config/nvim/lua/aleidk/keymaps.lua @@ -1,5 +1,9 @@ -- [[ Basic Keymaps ]] +function MAP(mode, l, r, desc) + vim.keymap.set(mode, l, r, { desc = desc, silent = true }) +end + local function default(desc) return { silent = true, diff --git a/config/nvim/lua/aleidk/plugins/trouble.lua b/config/nvim/lua/aleidk/plugins/trouble.lua index 57271e1..505f611 100644 --- a/config/nvim/lua/aleidk/plugins/trouble.lua +++ b/config/nvim/lua/aleidk/plugins/trouble.lua @@ -1,32 +1,16 @@ return { "folke/trouble.nvim", - -- dependencies = { "kyazdani42/nvim-web-devicons" }, + cmd = { "TroubleToggle", "Trouble" }, config = function() require("trouble").setup({ mode = "document_diagnostics", - action_keys = { -- key mappings for actions in the trouble list - -- map to {} to remove a mapping, for example: - -- close = {}, - close = "q", -- close the list - cancel = "", -- cancel the preview and get back to your last window / buffer / cursor - refresh = "r", -- manually refresh - jump = { "", "" }, -- jump to the diagnostic or open / close folds - open_split = { "s" }, -- open buffer in new split - open_vsplit = { "v" }, -- open buffer in new vsplit - open_tab = { "t" }, -- open buffer in new tab - jump_close = { "o" }, -- jump to the diagnostic and close the list - toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode - toggle_preview = "P", -- toggle auto_preview - hover = "K", -- opens a small popup with the full multiline message - preview = "p", -- preview the diagnostic location - close_folds = { "zM", "zm" }, -- close all folds - open_folds = { "zR", "zr" }, -- open all folds - toggle_fold = { "zA", "za" }, -- toggle fold of current file - previous = "k", -- previous item - next = "j", -- next item + action_keys = { + open_split = "s", + open_vsplit = "v", + open_tab = "t", }, }) - vim.keymap.set("n", "fd", "TroubleToggle", { silent = true, desc = "Search diagnostics" }) + MAP("n", "fd", "TroubleToggle", { silent = true, desc = "Search diagnostics" }) end, } diff --git a/scripts/sort-wallpapers b/scripts/sort-wallpapers new file mode 100755 index 0000000..ada6ea2 --- /dev/null +++ b/scripts/sort-wallpapers @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +path="$1" +imgs=($PWD/$path/*) + +imv "${imgs[@]}" & +imv_pid=$! + +echo $imv_pid +imv-msg $imv_pid close all + +for file in "${imgs[@]}"; do + echo $file + imv-msg $imv_pid open "$file" + read "test" +done + +imv-msg $imv_pid close all + +# while true; do +# # Some custom logic +# # ... +# +# # Close all open files +# imv-msg $imv_pid close all +# # Open some new files +# imv-msg $imv_pid open ~/new_path +# done