From d187956777cdf58158b61f025d34bfa4d5ccedd5 Mon Sep 17 00:00:00 2001 From: Thraix Date: Sun, 13 Sep 2026 14:08:02 +0200 Subject: [PATCH] Update DotFiles - Add monitor refresh script to hyprland - Add python auto complete to nvim - Disable AllowShortLoopsOnASingleLine in clang_format --- clang_format | 2 +- hyprland/hyprland.conf | 1 + nvim/lua/plugins/autoformatting.lua | 2 +- nvim/lua/plugins/bufferline.lua | 10 +++++----- nvim/lua/plugins/lspconfig.lua | 2 +- nvim/lua/plugins/treesitter.lua | 1 + scripts/refresh_monitors.sh | 14 ++++++++++++++ 7 files changed, 24 insertions(+), 8 deletions(-) create mode 100755 scripts/refresh_monitors.sh diff --git a/clang_format b/clang_format index 0dd9657..de03ecf 100644 --- a/clang_format +++ b/clang_format @@ -81,7 +81,7 @@ AllowShortEnumsOnASingleLine: true AllowShortFunctionsOnASingleLine: false AllowShortIfStatementsOnASingleLine: Never AllowShortLambdasOnASingleLine: All -AllowShortLoopsOnASingleLine: true +AllowShortLoopsOnASingleLine: false AllowShortNamespacesOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakBeforeMultilineStrings: true diff --git a/hyprland/hyprland.conf b/hyprland/hyprland.conf index 1081014..8406419 100644 --- a/hyprland/hyprland.conf +++ b/hyprland/hyprland.conf @@ -252,6 +252,7 @@ bind = $mainMod, RETURN, exec, $terminal bind = $mainMod SHIFT, Q, killactive, bind = $mainMod, M, exec, ~/Scripts/toggle_mic.sh bind = $mainMod, P, exec, ./Scripts/toggle_speaker.sh +bind = $mainMod, O, exec, ./Scripts/refresh_monitors.sh bind = $mainMod, E, exec, $fileManager bind = $mainMod, Space, togglefloating, bind = $mainMod, F, fullscreen, diff --git a/nvim/lua/plugins/autoformatting.lua b/nvim/lua/plugins/autoformatting.lua index a5690da..6332ab5 100644 --- a/nvim/lua/plugins/autoformatting.lua +++ b/nvim/lua/plugins/autoformatting.lua @@ -15,7 +15,7 @@ return { "shfmt", -- Shell formatter "checkmake", -- linter for Makefiles "stylua", -- lua formatter; Already installed via Mason - -- 'ruff', -- Python linter and formatter; Already installed via Mason + "ruff", -- Python linter and formatter; Already installed via Mason }, automatic_installation = true, }) diff --git a/nvim/lua/plugins/bufferline.lua b/nvim/lua/plugins/bufferline.lua index 2dcf372..56561f5 100644 --- a/nvim/lua/plugins/bufferline.lua +++ b/nvim/lua/plugins/bufferline.lua @@ -27,9 +27,9 @@ return { diagnostics = false, diagnostics_update_in_insert = false, color_icons = true, - show_buffer_icons = true, - show_buffer_close_icons = true, - show_close_icon = true, + show_buffer_icons = false, + show_buffer_close_icons = false, + show_close_icon = false, persist_buffer_sort = true, -- whether or not custom sorted buffers should persist separator_style = { "│", "│" }, -- | "thick" | "thin" | { 'any', 'any' }, enforce_regular_tabs = true, @@ -40,8 +40,8 @@ return { style = "none", -- Options: 'icon', 'underline', 'none' }, icon_pinned = "󰐃", - minimum_padding = 1, - maximum_padding = 5, + minimum_padding = 0, + maximum_padding = 0, maximum_length = 15, sort_by = "insert_at_end", }, diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua index 0045b6f..c9b65df 100644 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/lua/plugins/lspconfig.lua @@ -267,7 +267,7 @@ return { vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { update_in_insert = false }) require("mason-lspconfig").setup({ - ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) + ensure_installed = { "pyright" }, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) automatic_installation = false, handlers = { function(server_name) diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua index 67e08dd..89c5e9a 100644 --- a/nvim/lua/plugins/treesitter.lua +++ b/nvim/lua/plugins/treesitter.lua @@ -18,6 +18,7 @@ return { "vimdoc", "json", "yaml", + "python", }, auto_install = true, highlight = { diff --git a/scripts/refresh_monitors.sh b/scripts/refresh_monitors.sh new file mode 100755 index 0000000..0dca3c1 --- /dev/null +++ b/scripts/refresh_monitors.sh @@ -0,0 +1,14 @@ +result=$(grep "^monitor" ~/.config/hyprland/hyprland.conf) +for item in $result; do + monitor=$(echo $item | cut -d '=' -f2 | cut -d ',' -f1) + old_config=$(echo $item | cut -d '=' -f2) + hyprctl keyword monitor "$monitor,disable" +done + +sleep 1 + +for item in $result; do + monitor=$(echo $item | cut -d '=' -f2 | cut -d ',' -f1) + old_config=$(echo $item | cut -d '=' -f2) + hyprctl keyword monitor "$old_config" +done