aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/lua/user_overrides.lua
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-07-10 11:21:24 -0700
committerPinapelz <yukais@pinapelz.com>2026-07-10 11:21:24 -0700
commit24de2a31a52d17b6f7214197bdbfeab7428742dd (patch)
treef7736c4712d5a394525a3da2f2b4294e81ba9540 /config/hypr/lua/user_overrides.lua
parent861bf5be200bfcf2440fec4cda911d29ec18493f (diff)
parentbca86bbec4757cec1f6f5bdea2ed210542f10fae (diff)
Merge remote-tracking branch 'upstream'
Diffstat (limited to 'config/hypr/lua/user_overrides.lua')
-rw-r--r--config/hypr/lua/user_overrides.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/config/hypr/lua/user_overrides.lua b/config/hypr/lua/user_overrides.lua
index 42502315..149962d5 100644
--- a/config/hypr/lua/user_overrides.lua
+++ b/config/hypr/lua/user_overrides.lua
@@ -11,6 +11,36 @@ local configHome = os.getenv("XDG_CONFIG_HOME") or ((os.getenv("HOME") or "") ..
local hyprDir = configHome .. "/hypr"
local systemDir = hyprDir .. "/configs"
local userDir = configHome .. "/hypr/UserConfigs"
+local function has_kvantum_qml_module()
+ local cmd = "find /usr/lib /usr/lib64 /usr/share -type d -path '*/qml/*/kvantum' -print -quit 2>/dev/null"
+ local pipe = io.popen(cmd, "r")
+ if not pipe then
+ return false
+ end
+ local output = pipe:read("*a") or ""
+ pipe:close()
+ return output:match("%S") ~= nil
+end
+
+local function apply_qt_style_fallbacks()
+ if not hl or not hl.env then
+ return
+ end
+
+ if has_kvantum_qml_module() then
+ return
+ end
+
+ local style_override = (os.getenv("QT_STYLE_OVERRIDE") or ""):lower()
+ if style_override == "kvantum" or style_override == "kvantum-dark" then
+ hl.env("QT_STYLE_OVERRIDE", "Fusion")
+ end
+
+ local quick_controls = (os.getenv("QT_QUICK_CONTROLS_STYLE") or ""):lower()
+ if quick_controls == "kvantum" then
+ hl.env("QT_QUICK_CONTROLS_STYLE", "Basic")
+ end
+end
local function load_optional(path)
local ok, err = pcall(dofile, path)
@@ -61,6 +91,7 @@ end
if not loaded_user_split then
load_optional(userDir .. "/user_overrides.lua") -- legacy single-file support
end
+apply_qt_style_fallbacks()
-- Legacy compatibility: import UserKeybinds.conf when user_keybinds.lua is missing.
do
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage