-------------------------------
---- ENVIRONMENT VARIABLES ----
-------------------------------
-- Version 1
-- Last change: Sun 2026-06-14 using Hyprland v0.55.3-1
-- Git repo: https://git.fennek.xyz/fennek182/dotfiles

-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/

---@module 'hl'

-- Default hyprland env vars:
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
hl.env("XDG_SESSION_TYPE", "wayland")
hl.env("XDG_SESSION_DESKTOP", "Hyprland")

-- Default XDG env vars:
hl.env("XDG_CONFIG_HOME", os.getenv("HOME").."/.config")
hl.env("XDG_DATA_HOME", os.getenv("HOME").."/.local/share")
hl.env("XDG_CACHE_HOME", os.getenv("HOME").."/.cache")
hl.env("XDG_STATE_HOME", os.getenv("HOME").."/.local/state")

-- Hi-DPI:
hl.env("STEAM_FORCE_DESKTOPUI_SCALING", "2.0")

-- GTK / GDK / electron wayland
hl.env("GDK_BACKEND", "wayland,x11")
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "wayland")

-- Default apps:
hl.env("TERMINAL", "alacritty")
hl.env("EDITOR", "zed")
hl.env("DIFFPROG", "nvim -d local_var_1")
hl.env("BROWSER", os.getenv("HOME").."/.local/bin/firefox")

-- Themes / visual stuff:
hl.env("ADW_COLOR_SCHEME_FORCE_DARK", "1")
hl.env("XCURSOR_PATH", "/usr/share/icons:"..os.getenv("XDG_CONFIG_HOME").."/icons")
hl.env("XCURSOR_SIZE","30")
hl.env("XCURSOR_THEME", "Bibata-Modern-Ice")
hl.env("HYPRCURSOR_SIZE", "30")
-- env = QT_QPA_PLATFORMTHEME, qt5ct
hl.env("QT_STYLE_OVERRIDE", "kvantum")
hl.env("LS_COLORS", "$(vivid generate catppuccin-mocha)")

-- App settings (home clean-up):
-- hl.env("ANDROID_SDK_HOME", "${XDG_CONFIG_HOME:-$HOME/.config}/android")
-- hl.env("ADB_VENDOR_KEY", "${XDG_CONFIG_HOME:-$HOME/.config}/android")
hl.env("ANDROID_HOME", os.getenv("XDG_DATA_HOME").."/android")
hl.env("GNUPGHOME", os.getenv("XDG_DATA_HOME").."/gnupg")
hl.env("CARGO_HOME", os.getenv("XDG_DATA_HOME").."/cargo")
hl.env("GOPATH", os.getenv("XDG_DATA_HOME").."/go")
hl.env("GOPATH", os.getenv("XDG_CACHE_HOME").."/NuGetPackages")
hl.env("_JAVA_OPTIONS", "-Djava.util.prefs.userRoot="..os.getenv("XDG_CONFIG_HOME").."/java")
hl.env("MOZ_ENABLE_WAYLAND", "1")
hl.env("NPM_CONFIG_USERCONFIG", os.getenv("XDG_CONFIG_HOME").."/npm/npmrc")
hl.env("HISTFILE", os.getenv("XDG_STATE_HOME").."/bash/history")

-- fix for failing to set vapoursynth path ($ vapoursynth check-env)
hl.env("VSSCRIPT_PATH", "/home/tobias/.local/lib/python3.14/site-packages/vapoursynth/libvsscript.so")
-- env = VSSCRIPT_PATH, /usr/lib/python3.14/site-packages/vapoursynth/libvsscript.so

-- env = GNUPGHOME, $XDG_DATA_HOME/gnupg

-- fix Nautilus GTK4 (version 43 and above) slow navigation/file browsing
-- see https://gitlab.gnome.org/GNOME/gtk/-/issues/4831#note_1426699
-- and https://gitlab.gnome.org/GNOME/nautilus/-/issues/2666
-- Matthias Clasen (@mathiasc), Maintainer GNOME/gtk:
-- "We expect the a11y infrastructure to be present.
--   You can set GTK_A11Y=none in the environment to run without accessibility."
hl.env("GTK_A11Y", "none")
