| 1 | terminal = "foot" |
| 2 | menu = "aurora-run" -- aurora's runner |
| 3 | browser = "librewolf" |
| 4 | mainMod = "SUPER" |
| 5 | |
| 6 | -- ----------------------------------------------------- |
| 7 | -- Path to home |
| 8 | -- ----------------------------------------------------- |
| 9 | HOME = os.getenv("HOME") |
| 10 | |
| 11 | |
| 12 | -- Theme (matugen, run by aurora on every wallpaper change; fallback until it has run once) |
| 13 | local ok, c = pcall(dofile, HOME .. "/.cache/matugen/hyprland-colors.lua") |
| 14 | colors = ok and c or { primary = "rgba(80d5cbff)", surface = "rgba(0e1514ff)", surface_highest = "rgba(2f3635ff)", |
| 15 | on_surface = "rgba(dde4e2ff)", outline_variant = "rgba(3f4947ff)" } |
| 16 | |
| 17 | -- ----------------------------------------------------- |
| 18 | -- Autostart |
| 19 | -- ----------------------------------------------------- |
| 20 | hl.on("hyprland.start", function() |
| 21 | -- tty1 autologs in, so hyprlock is the login screen: its password unlocks the GNOME keyring |
| 22 | -- (/etc/pam.d/login has pam_gnome_keyring, hyprlock includes it; system/etc/pam.d) |
| 23 | hl.exec_cmd("pidof hyprlock || hyprlock") |
| 24 | -- GTK3 on Wayland reads its theme + icons from gsettings, not settings.ini (colours: gtk-3.0/gtk.css, matugen) |
| 25 | hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme adw-gtk3-dark") |
| 26 | hl.exec_cmd("gsettings set org.gnome.desktop.interface icon-theme Papirus-Dark") |
| 27 | hl.exec_cmd("gsettings set org.gnome.desktop.interface font-name 'JetBrainsMonoNL Nerd Font Mono 11'") -- Space fonts are aurora's only |
| 28 | hl.exec_cmd("wl-paste --type text --watch cliphist store") |
| 29 | hl.exec_cmd("wl-paste --type image --watch cliphist store") |
| 30 | -- aurora is a systemd unit: hand it the login env (.zprofile: SUDO_ASKPASS, EDITOR, XDG dirs, ...) |
| 31 | hl.exec_cmd("dbus-update-activation-environment --systemd --all && systemctl --user start aurora-shell") |
| 32 | -- hl.exec_cmd("waybar") |
| 33 | -- hl.exec_cmd("swaync") |
| 34 | hl.exec_cmd("gammastep") |
| 35 | hl.exec_cmd("hypridle") |
| 36 | -- hl.exec_cmd("blueman-applet") |
| 37 | -- no hyprpaper: aurora draws the wallpaper itself (Back.qml / WallView.qml) |
| 38 | -- polkit agent: aurora (Agents.qml); it starts hyprpolkitagent itself if it can't register |
| 39 | end) |
| 40 | |
| 41 | -------------------------------------------------- |
| 42 | -- Plugins |
| 43 | -------------------------------------------------- |
| 44 | package.path = package.path .. ";./?.lua;./?/init.lua" |
| 45 | -- split-monitor-workspaces is a git checkout in ~/.config/hypr/plugins, not in this repo (hypr_update_plugins.sh). |
| 46 | -- Missing (fresh install) = plain workspaces 1-10 with the same API for keybinds.lua, and fetch it + reload, |
| 47 | -- instead of a require error that leaves Hyprland in emergency mode with no binds. |
| 48 | local smw_ok, smw_mod = pcall(require, "plugins.split-monitor-workspaces") |
| 49 | if smw_ok then |
| 50 | smw = smw_mod |
| 51 | smw.setup({ |
| 52 | workspace_count = 10, |
| 53 | }) |
| 54 | else |
| 55 | local function ws(n) return n == "0" and "10" or n end -- keybinds.lua binds workspace 10 to SUPER+0 |
| 56 | smw = { |
| 57 | get_amount_of_workspaces = function() return 10 end, |
| 58 | workspace = function(n) return hl.dsp.focus({ workspace = ws(n) }) end, |
| 59 | move_to_workspace_silent = function(n) return hl.dsp.window.move({ workspace = ws(n), follow = false }) end, |
| 60 | } |
| 61 | hl.exec_cmd(HOME .. "/.local/bin/hypr/hypr_update_plugins.sh && hyprctl reload") |
| 62 | end |
| 63 | |
| 64 | -- ----------------------------------------------------- |
| 65 | -- SOURCE FILES |
| 66 | -- ----------------------------------------------------- |
| 67 | require("source.monitors") |
| 68 | require("source.environment_variables") |
| 69 | require("source.permissions") |
| 70 | require("source.appearance") |
| 71 | require("source.input") |
| 72 | require("source.keybinds") |
| 73 | require("source.window_rules") |
| 74 | |
| 75 | -- aurora's settings app: overrides on top of everything above (~/.config/aurora/hypr.lua, generated, not in the repo). |
| 76 | -- Missing or broken file = the defaults from the files above. |
| 77 | local ok, overrides = pcall(dofile, HOME .. "/.config/aurora/hypr.lua") |
| 78 | if ok and type(overrides) == "table" then hl.config(overrides) end |