update
This commit is contained in:
parent
84c233094f
commit
04d22b2261
3 changed files with 38 additions and 22 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
|
|
||||||
|
function MAP(mode, l, r, desc)
|
||||||
|
vim.keymap.set(mode, l, r, { desc = desc, silent = true })
|
||||||
|
end
|
||||||
|
|
||||||
local function default(desc)
|
local function default(desc)
|
||||||
return {
|
return {
|
||||||
silent = true,
|
silent = true,
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,16 @@
|
||||||
return {
|
return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
-- dependencies = { "kyazdani42/nvim-web-devicons" },
|
cmd = { "TroubleToggle", "Trouble" },
|
||||||
config = function()
|
config = function()
|
||||||
require("trouble").setup({
|
require("trouble").setup({
|
||||||
mode = "document_diagnostics",
|
mode = "document_diagnostics",
|
||||||
action_keys = { -- key mappings for actions in the trouble list
|
action_keys = {
|
||||||
-- map to {} to remove a mapping, for example:
|
open_split = "s",
|
||||||
-- close = {},
|
open_vsplit = "v",
|
||||||
close = "q", -- close the list
|
open_tab = "t",
|
||||||
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
|
|
||||||
refresh = "r", -- manually refresh
|
|
||||||
jump = { "<cr>", "<tab>" }, -- 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
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>fd", "<cmd>TroubleToggle<cr>", { silent = true, desc = "Search diagnostics" })
|
MAP("n", "<leader>fd", "<cmd>TroubleToggle<cr>", { silent = true, desc = "Search diagnostics" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
28
scripts/sort-wallpapers
Executable file
28
scripts/sort-wallpapers
Executable file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue