Compare commits
No commits in common. "949e930a5629eed3c4404d1854a3caee598f3863" and "1d299f2e43227485a03fd359ddbfb11118b284e0" have entirely different histories.
949e930a56
...
1d299f2e43
@ -4,7 +4,7 @@
|
|||||||
local function clamp(x, min, max) return math.max(math.min(x, max), min) end
|
local function clamp(x, min, max) return math.max(math.min(x, max), min) end
|
||||||
|
|
||||||
local function get_random_image()
|
local function get_random_image()
|
||||||
local images = {
|
images = {
|
||||||
{
|
{
|
||||||
[[██╗ █████╗ ██████╗██╗ ██╗███████╗]],
|
[[██╗ █████╗ ██████╗██╗ ██╗███████╗]],
|
||||||
[[██║ ██╔══██╗██╔════╝██║ ██║██╔════╝]],
|
[[██║ ██╔══██╗██╔════╝██║ ██║██╔════╝]],
|
||||||
@ -29,53 +29,21 @@ local function get_random_image()
|
|||||||
[[██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║]],
|
[[██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║]],
|
||||||
[[██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║]],
|
[[██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║]],
|
||||||
[[╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝]]
|
[[╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝]]
|
||||||
},
|
|
||||||
{
|
|
||||||
[[ ▄ ]],
|
|
||||||
[[ ▟█▙ ]],
|
|
||||||
[[ ▟███▙ ]],
|
|
||||||
[[ ▟█████▙ ]],
|
|
||||||
[[ ▟███████▙ ]],
|
|
||||||
[[ ▂▔▀▜██████▙ ]],
|
|
||||||
[[ ▟██▅▂▝▜█████▙ ]],
|
|
||||||
[[ ▟█████████████▙ ]],
|
|
||||||
[[ ▟███████████████▙ ]],
|
|
||||||
[[ ▟█████████████████▙ ]],
|
|
||||||
[[ ▟███████████████████▙ ]],
|
|
||||||
[[ ▟█████████▛▀▀▜████████▙ ]],
|
|
||||||
[[ ▟████████▛ ▜███████▙ ]],
|
|
||||||
[[ ▟█████████ ████████▙ ]],
|
|
||||||
[[ ▟██████████ █████▆▅▄▃▂ ]],
|
|
||||||
[[ ▟██████████▛ ▜█████████▙ ]],
|
|
||||||
[[ ▟██████▀▀▀ ▀▀██████▙ ]],
|
|
||||||
[[ ▟███▀▘ ▝▀███▙ ]],
|
|
||||||
[[▟▛▀ ▀▜▙]],
|
|
||||||
[[ btw ]]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local pmf = {0.25, 0.25, 0.25, 0.25}
|
local i = 3
|
||||||
local cdf = {}
|
|
||||||
|
|
||||||
cdf[1] = 0
|
|
||||||
for j = 2, #pmf+1 do
|
|
||||||
cdf[j] = cdf[j - 1] + pmf[j - 1]
|
|
||||||
end
|
|
||||||
|
|
||||||
if math.abs(cdf[#cdf] - 1) > 0.01 then
|
|
||||||
error("Probabilities do not add up to 1")
|
|
||||||
elseif #images ~= #pmf then
|
|
||||||
error("Number of images and probabilities do not match")
|
|
||||||
end
|
|
||||||
|
|
||||||
math.randomseed(os.time())
|
math.randomseed(os.time())
|
||||||
local r = math.random(100)
|
if math.fmod(math.random(100), 5) == 0 then
|
||||||
|
if math.random(0, 1) == 0 then
|
||||||
for j = 2, #cdf do
|
i = 1
|
||||||
if r <= cdf[j] * 100 then
|
else
|
||||||
return images[j-1]
|
i = 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return images[i]
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
tag="v3.4.1",
|
tag="v3.3.0",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
"nvim-tree/nvim-web-devicons"
|
"nvim-tree/nvim-web-devicons"
|
||||||
@ -13,39 +13,45 @@ return {
|
|||||||
'nvim-telescope/telescope.nvim'
|
'nvim-telescope/telescope.nvim'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
opts = {},
|
cmd = {
|
||||||
cmd = "Trouble",
|
"Trouble",
|
||||||
keys = {
|
"TroubleClose",
|
||||||
{
|
"TroubleToggle",
|
||||||
"<leader>xw",
|
"TroubleRefresh"
|
||||||
"<cmd>Trouble diagnostics toggle<cr>",
|
|
||||||
desc = "Diagnostics (Trouble)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xd",
|
|
||||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
|
||||||
desc = "Buffer Diagnostics (Trouble)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xs",
|
|
||||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
|
||||||
desc = "Symbols (Trouble)",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- "<leader>cl",
|
|
||||||
-- "<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
|
||||||
-- desc = "LSP Definitions / references / ... (Trouble)",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- "<leader>xl",
|
|
||||||
-- "<cmd>Trouble loclist toggle<cr>",
|
|
||||||
-- desc = "Location List (Trouble)",
|
|
||||||
-- },
|
|
||||||
{
|
|
||||||
"<leader>xq",
|
|
||||||
"<cmd>Trouble qflist toggle<cr>",
|
|
||||||
desc = "Quickfix List (Trouble)",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
init = function()
|
||||||
|
vim.keymap.set("n", "<leader>xx", function() require("trouble").toggle() end, {
|
||||||
|
desc = "Toggle"
|
||||||
|
})
|
||||||
|
vim.keymap.set("n", "<leader>xd", function() require("trouble").toggle("diagnostics") end, {
|
||||||
|
desc = "Diagnostics"
|
||||||
|
})
|
||||||
|
vim.keymap.set("n", "<leader>xq", function() require("trouble").toggle("quickfix") end, {
|
||||||
|
desc = "Quickfix"
|
||||||
|
})
|
||||||
|
vim.keymap.set("n", "<leader>xl", function() require("trouble").toggle("loclist") end, {
|
||||||
|
desc = "Loclist"
|
||||||
|
})
|
||||||
|
-- vim.keymap.set("n", "<leader>xr", function() require("trouble").toggle("lsp_references") end, {
|
||||||
|
-- desc = "LSP references"
|
||||||
|
-- })
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
local trouble_provider = require("trouble.sources.telescope")
|
||||||
|
local telescope = require("telescope")
|
||||||
|
|
||||||
|
telescope.setup {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<c-t>"] = trouble_provider.open
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["<c-t>"] = trouble_provider.open
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,10 +40,10 @@ exec i3-msg 'workspace $ws2; exec firefox'
|
|||||||
## Multiple monitors
|
## Multiple monitors
|
||||||
#
|
#
|
||||||
|
|
||||||
workspace $ws1 output DP-11 eDP-1
|
workspace $ws1 output DP-3 eDP-1
|
||||||
workspace $ws2 output eDP-1 DP-11
|
workspace $ws2 output eDP-1 DP-3
|
||||||
workspace $ws3 output eDP-1 DP-11
|
workspace $ws3 output eDP-1 DP-3
|
||||||
workspace $ws4 output DP-11 eDP-1
|
workspace $ws4 output DP-3 eDP-1
|
||||||
workspace $ws5 output eDP-1
|
workspace $ws5 output eDP-1
|
||||||
workspace $ws6 output eDP-1
|
workspace $ws6 output eDP-1
|
||||||
workspace $ws7 output eDP-1
|
workspace $ws7 output eDP-1
|
||||||
|
|||||||
@ -39,7 +39,6 @@ export EDITOR=nvim
|
|||||||
|
|
||||||
alias get-idf='. $HOME/ext_sw/esp-idf/export.sh'
|
alias get-idf='. $HOME/ext_sw/esp-idf/export.sh'
|
||||||
|
|
||||||
alias c='z ~/.dotfiles'
|
|
||||||
alias sc='z ~/.config/sway'
|
alias sc='z ~/.config/sway'
|
||||||
alias nc='z ~/.config/nvim'
|
alias nc='z ~/.config/nvim'
|
||||||
alias ezc='nvim ~/.zshrc'
|
alias ezc='nvim ~/.zshrc'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user