// Copyright (C) 2026 Danilo M. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. import Quickshell import Quickshell.Io import QtQuick import "../.." import "Autostart.js" as A // What Hyprland launches at login, from hypr-theme's autostart.lua. Set once // and left alone, so it lives in the settings window, not on a tile. Module { id: am name: "autostart" label: "Autostart" // nf-fa-rocket, present in Inconsolata Nerd Font. icon: "" settings: true group: "Desktop" keywords: ["login", "startup", "launch", "exec", "daemon", "session", "workspace", "silent", "scratchpad", "autostart.lua", "hyprland"] readonly property string file: (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/hypr/sections/autostart.lua" // Every entry, as the page lists it; key is the row's objectName there. function refresh() { fv.reload(); } property FileView fv: FileView { path: am.file printErrors: false watchChanges: true onFileChanged: reload() onLoaded: am.searchItems = A.parse(text()).map(e => ({ text: e.cmd, key: e.cmd })) } page: Component { Page { title: "Autostart" AutostartPage { width: parent.width; file: am.file } } } }