Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
eb5c48ee1cff970c37d64ae3084607b21f9ffa5f
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: eec45f4d28f9 · Showing diff
- Parent 2: 30546269b652 · Diff against parent 2
bugabingas dorkfiles
eb5c48ee1cff970c37d64ae3084607b21f9ffa5f
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+42 / −35 text lines · 1 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately
+3 / −3 text lines
"in-and-out.nvim": { "branch": "master", "commit": "ab24cafadc3418dffb0c7e9b0621cff60b9ac551" }, "indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" }, "indent-blankline.nvim": { "branch": "master", "commit": "2e57e1bbda970317dce4b7878ccf9a831dc7067d" }, "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, "lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" }, "markdown-table-mode.nvim": { "branch": "main", "commit": "f830cd15a97deb3acc53d9f6607bc609f7f32e49" }, "no-neck-pain.nvim": { "branch": "main", "commit": "c0d8061f18bccceff0991e096c8f864a720e1ebf" }, "no-neck-pain.nvim": { "branch": "main", "commit": "c7efdbd0b739646c58d22fa44f6fffa2973f303e" },+1 / −1 text lines
+35 / −31 text lines
return { win32 = vim.loop.os_uname().sysname:match 'Win', wsl2 = vim.loop.os_uname().release:match 'WSL2', os_background = (function () -- Default value local background = 'light' local uname = vim.uv.os_uname() -- First check whether we are on WSL or Windows if vim.loop.os_uname().release:match 'WSL2' then -- Check if 'reg.exe' is executable if vim.fn.executable 'reg.exe' ~= 0 then -- Execute command to check if the win32 appearance is set to Dark local appsUseLightTheme = vim.fn.system { 'reg.exe', 'Query', 'HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize', '/v', 'AppsUseLightTheme' } if not appsUseLightTheme:find '0x1' then background = 'dark' end end -- Check if 'busctl' is executable (part of systemd) elseif vim.fn.executable 'busctl' ~= 0 then -- Get the current color scheme from xdg-desktop-portal using busctl local result = vim.fn.system { 'busctl', '--user', 'call', 'org.freedesktop.portal.Desktop', '/org/freedesktop/portal/desktop', 'org.freedesktop.portal.Settings', 'ReadOne', 'ss', 'org.freedesktop.appearance', 'color-scheme', } -- The result is in the form of "v u 0" for light and "v u 1" for dark local color_scheme = result:match 'u%s+(%d+)' if color_scheme == '1' thenlocal os_background = function () -- Default value local background = 'light' -- First check whether we are on WSL or Windows if win32 or wsl then -- Check if 'reg.exe' is executable if vim.fn.executable 'reg.exe' ~= 0 then -- Execute command to check if the win32 appearance is set to Dark local appsUseLightTheme = vim.fn.system { 'reg.exe', 'Query', 'HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize', '/v', 'AppsUseLightTheme' } if not appsUseLightTheme:find '0x1' then else -- Check if 'busctl' is executable (part of systemd) elseif vim.fn.executable 'busctl' ~= 0 then -- Get the current color scheme from xdg-desktop-portal using busctl local result = vim.fn.system { 'busctl', '--user', 'call', 'org.freedesktop.portal.Desktop', '/org/freedesktop/portal/desktop', 'org.freedesktop.portal.Settings', 'ReadOne', 'ss', 'org.freedesktop.appearance', 'color-scheme', } -- The result is in the form of "v u 0" for light and "v u 1" for dark local color_scheme = result:match 'u%s+(%d+)'+3 / −0 text lines
Binary size (old → new): 1470 → 1471 bytes.