a
This commit is contained in:
parent
c9b61be4fc
commit
186a6f0a91
@ -29,7 +29,14 @@ exec-once = wl-paste --type text --watch cliphist store
|
||||
exec-once = wl-paste --type image --watch cliphist store
|
||||
exec-once = /usr/lib/polkit-kde-authentication-agent-1
|
||||
exec-once = gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
|
||||
exec-once = swayidle -w
|
||||
# exec-once = swayidle -w
|
||||
exec-once = swayidle -w \
|
||||
timeout 300 'swaylock -f' \
|
||||
timeout 600 'hyprctl dispatch dpms off' \
|
||||
resume 'hyprctl dispatch dpms on' \
|
||||
before-sleep 'swaylock -f' \
|
||||
lock 'swaylock -f' \
|
||||
event lid:on 'bash ~/.config/hypr/scripts/lid_suspend.sh'
|
||||
|
||||
#############################
|
||||
### ENVIRONMENT VARIABLES ###
|
||||
|
||||
17
hypr/scripts/lid_close.sh
Executable file
17
hypr/scripts/lid_close.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# ~/.config/hypr/scripts/lid_suspend.sh
|
||||
# Script per sospendere il sistema alla chiusura del coperchio,
|
||||
# mettendo prima in pausa la riproduzione multimediale.
|
||||
|
||||
# Controlla se è collegato un solo monitor (quello del laptop).
|
||||
if [[ $(hyprctl monitors | grep -c 'Monitor') -eq 1 ]]; then
|
||||
# Controlla se playerctl è installato e se c'è qualcosa in riproduzione.
|
||||
# Se sì, mette in pausa tutti i lettori multimediali compatibili
|
||||
# (es. Spotify, browser, VLC, etc.).
|
||||
if command -v playerctl &> /dev/null && playerctl status &> /dev/null; then
|
||||
playerctl --all pause
|
||||
fi
|
||||
|
||||
# Sospende il sistema.
|
||||
systemctl suspend
|
||||
fi
|
||||
25
mpv/mpv.conf
Normal file
25
mpv/mpv.conf
Normal file
@ -0,0 +1,25 @@
|
||||
# -----------------
|
||||
# GENERAL PLAYBACK
|
||||
# -----------------
|
||||
# Save playback position on quit
|
||||
save-position-on-quit=yes
|
||||
|
||||
# Don't close the window when playback finishes
|
||||
keep-open=yes
|
||||
|
||||
# Set default volume to 70%
|
||||
volume=70
|
||||
|
||||
|
||||
# -----------------
|
||||
# VIDEO & PERFORMANCE
|
||||
# -----------------
|
||||
# Enable hardware video decoding. 'auto-safe' is a good default.
|
||||
# It tries to find a working hardware decoder but avoids problematic ones.
|
||||
hwdec=auto-safe
|
||||
|
||||
# High-quality upscaling for when video resolution is lower than your screen.
|
||||
profile=high-quality
|
||||
scale=ewa_lanczossharp
|
||||
cscale=ewa_lanczossharp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
-- options.lua
|
||||
vim.opt.cmdheight = 0
|
||||
|
||||
-- Leader key for all the keymaps
|
||||
vim.g.mapleader = " "
|
||||
@ -59,7 +60,7 @@ local ft_augroup = vim.api.nvim_create_augroup("FileTypeSettings", { clear = tru
|
||||
-- C, C++, etc: 4-space indentation
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = ft_augroup,
|
||||
pattern = { "c", "cpp", "objc", "objcpp" },
|
||||
pattern = { "c", "cpp", "objc", "objcpp", "js", "ts", "tsx", "jsx" },
|
||||
callback = function()
|
||||
-- Use vim.bo for buffer-local options
|
||||
vim.bo.tabstop = 2
|
||||
|
||||
@ -13,6 +13,7 @@ return {
|
||||
},
|
||||
},
|
||||
"onsails/lspkind-nvim",
|
||||
"js-everts/cmp-tailwind-colors"
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
@ -81,14 +82,15 @@ return {
|
||||
}),
|
||||
}),
|
||||
formatting = {
|
||||
expandable_indicator = true,
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol",
|
||||
maxwidth = 50,
|
||||
ellipsis = "...",
|
||||
show_labelDetails = true,
|
||||
}),
|
||||
format = require("cmp-tailwind-colors").format
|
||||
-- expandable_indicator = true,
|
||||
-- fields = { "kind", "abbr", "menu" },
|
||||
-- format = lspkind.cmp_format({
|
||||
-- mode = "symbol",
|
||||
-- maxwidth = 50,
|
||||
-- ellipsis = "...",
|
||||
-- show_labelDetails = true,
|
||||
-- }),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
|
||||
@ -8,13 +8,13 @@ local lsp_servers = {
|
||||
"tailwindcss",
|
||||
"cssls",
|
||||
"clangd",
|
||||
"rust_analyzer"
|
||||
"rust_analyzer",
|
||||
}
|
||||
|
||||
local tools = {
|
||||
"luacheck",
|
||||
"latexindent",
|
||||
"prettierd"
|
||||
"prettierd",
|
||||
}
|
||||
|
||||
local on_attach = function(_, bufnr)
|
||||
@ -24,7 +24,6 @@ local on_attach = function(_, bufnr)
|
||||
|
||||
local telescope = require("telescope.builtin")
|
||||
|
||||
-- LSP actions
|
||||
map("<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", "[R]ename Symbol")
|
||||
map("<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", "[C]ode [A]ction")
|
||||
map("K", "<cmd>lua vim.lsp.buf.hover()<CR>", "[K] Hover")
|
||||
@ -32,7 +31,6 @@ local on_attach = function(_, bufnr)
|
||||
map("gd", telescope.lsp_definitions, "[G]o [D]efinition")
|
||||
map("gr", telescope.lsp_references, "[G]o [R]eferences")
|
||||
map("gI", telescope.lsp_implementations, "[G]o [I]mplementations")
|
||||
-- map("gD", telescope.diagnostics, "Diagnostics")
|
||||
end
|
||||
|
||||
return {
|
||||
@ -41,10 +39,12 @@ return {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
'nvim-telescope/telescope.nvim',
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
"mfussenegger/nvim-dap",
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
-- Aggiunto none-ls per gestire formattatori e linter esterni
|
||||
"nvimtools/none-ls.nvim",
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua",
|
||||
@ -59,16 +59,29 @@ return {
|
||||
require("mason").setup()
|
||||
require("mason-tool-installer").setup({
|
||||
ensure_installed = tools,
|
||||
automatic_installation = true
|
||||
automatic_installation = true,
|
||||
})
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = lsp_servers,
|
||||
automatic_installation = true
|
||||
automatic_installation = true,
|
||||
automatic_enable = true,
|
||||
})
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
-- [[ NUOVA SEZIONE: Configurazione Formatter e Linter con none-ls ]]
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
-- Formatter
|
||||
null_ls.builtins.formatting.prettierd,
|
||||
null_ls.builtins.formatting.latexindent,
|
||||
|
||||
-- -- Linter (diagnostics)
|
||||
-- null_ls.builtins.diagnostics.luacheck,
|
||||
},
|
||||
})
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
-- Loop through all servers to set them up
|
||||
for _, lsp_server in pairs(lsp_servers) do
|
||||
local server_config = {
|
||||
on_attach = on_attach,
|
||||
@ -78,38 +91,12 @@ return {
|
||||
if lsp_server == "texlab" then
|
||||
server_config.settings = {
|
||||
texlab = {
|
||||
bibtexFormatter = "texlab",
|
||||
build = {
|
||||
args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" },
|
||||
executable = "latexmk",
|
||||
forwardSearchAfter = false,
|
||||
onSave = false,
|
||||
},
|
||||
chktex = {
|
||||
onEdit = false,
|
||||
onOpenAndSave = false,
|
||||
},
|
||||
diagnosticsDelay = 300,
|
||||
formatterLineLength = 80,
|
||||
forwardSearch = {
|
||||
args = {},
|
||||
},
|
||||
latexFormatter = "latexindent",
|
||||
latexindent = {
|
||||
modifyLineBreaks = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
-- Puoi aggiungere altri server con configurazioni specifiche qui
|
||||
-- elseif lsp_server == "another_lsp_server" then
|
||||
-- server_config.settings = {
|
||||
-- another_lsp_server = {
|
||||
-- -- le tue impostazioni per questo server
|
||||
-- }
|
||||
-- }
|
||||
end
|
||||
|
||||
require("lspconfig")[lsp_server].setup(server_config)
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
30
nvim/lua/kanopo/plugins/precognition.lua
Normal file
30
nvim/lua/kanopo/plugins/precognition.lua
Normal file
@ -0,0 +1,30 @@
|
||||
return {
|
||||
"tris203/precognition.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- startVisible = true,
|
||||
-- showBlankVirtLine = true,
|
||||
-- highlightColor = { link = "Comment" },
|
||||
-- hints = {
|
||||
-- Caret = { text = "^", prio = 2 },
|
||||
-- Dollar = { text = "$", prio = 1 },
|
||||
-- MatchingPair = { text = "%", prio = 5 },
|
||||
-- Zero = { text = "0", prio = 1 },
|
||||
-- w = { text = "w", prio = 10 },
|
||||
-- b = { text = "b", prio = 9 },
|
||||
-- e = { text = "e", prio = 8 },
|
||||
-- W = { text = "W", prio = 7 },
|
||||
-- B = { text = "B", prio = 6 },
|
||||
-- E = { text = "E", prio = 5 },
|
||||
-- },
|
||||
-- gutterHints = {
|
||||
-- G = { text = "G", prio = 10 },
|
||||
-- gg = { text = "gg", prio = 9 },
|
||||
-- PrevParagraph = { text = "{", prio = 8 },
|
||||
-- NextParagraph = { text = "}", prio = 8 },
|
||||
-- },
|
||||
-- disabled_fts = {
|
||||
-- "startify",
|
||||
-- },
|
||||
},
|
||||
}
|
||||
37
nvim/lua/kanopo/plugins/trouble.lua
Normal file
37
nvim/lua/kanopo/plugins/trouble.lua
Normal file
@ -0,0 +1,37 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{
|
||||
"<leader>xx",
|
||||
"<cmd>Trouble diagnostics toggle<cr>",
|
||||
desc = "Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xX",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
desc = "Buffer Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cs",
|
||||
"<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)",
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -2,7 +2,8 @@
|
||||
# set-option -g status-style bg=colour235,fg=colour136,default # bg=base02, fg=yellow
|
||||
|
||||
set-option -g focus-events on
|
||||
set-option -g default-terminal "screen-256color"
|
||||
# set-option -g default-terminal "screen-256color"
|
||||
set-option -a terminal-features 'alacritty:RGB'
|
||||
|
||||
# easy reload config
|
||||
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "reloaded."
|
||||
|
||||
@ -1 +1,38 @@
|
||||
# -f ytdl-format=bestvideo[height>=?1440][vcodec^=vp9]+bestaudio/bestvideo[height<=?1440][vcodec^=av0]+bestaudio/bestvideo+bestaudio/best
|
||||
#
|
||||
#
|
||||
# # Prioritize 60fps at 1080p.
|
||||
# -f "bestvideo[height=1080][fps>30]+bestaudio/bestvideo[height<=1080]+bestaudio/best"
|
||||
#
|
||||
#
|
||||
# # Prefer AV1 codec, best video, best audio. Fallback to best overall.
|
||||
# -f "bestvideo[vcodec^=av01]+bestaudio/bestvideo+bestaudio/best"
|
||||
|
||||
|
||||
# This is a comment. Lines starting with # are ignored.
|
||||
|
||||
# -----------------
|
||||
# QUALITY SELECTION
|
||||
# -----------------
|
||||
# Use the -f or --format option to select quality.
|
||||
# The format is: <video_filter>+<audio_filter>/<fallback>
|
||||
# This example tries to get the best video up to 1080p with the best audio.
|
||||
# If a combined stream is not available, it merges the best separate streams.
|
||||
# 'best' is a fallback if nothing else matches.
|
||||
-f "bestvideo[height<=1080]+bestaudio/best"
|
||||
|
||||
|
||||
# -----------------
|
||||
# OTHER USEFUL OPTIONS
|
||||
# -----------------
|
||||
|
||||
# Download subtitles if available (e.g., for saving files)
|
||||
# --write-subs
|
||||
# --sub-lang "en.*,en"
|
||||
|
||||
# Prefer free formats when available
|
||||
# --prefer-free-formats
|
||||
|
||||
# Use a sponsorblock remover to skip ad segments in the video data
|
||||
# This is useful for both streaming and downloading.
|
||||
--sponsorblock-mark all
|
||||
--sponsorblock-remove sponsor,selfpromo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user