// 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.Io import QtQuick import "../.." import "Git.js" as G // The global git config, in the settings window: set once and left alone. // The user page's "More git settings" opens it there. Module { id: gm name: "git" label: "Git config" // nf-dev-git, present in Inconsolata Nerd Font. icon: "" settings: true group: "Account" keywords: ["gitconfig"] // Every value, as the page lists it; key is the row's tag in GitPage. function refresh() { proc.running = false; proc.running = true; } property Process proc: Process { command: [Qt.resolvedUrl("gitcfg").toString().replace(/^file:\/\//, ""), "list"] stdout: StdioCollector { onStreamFinished: gm.searchItems = text.startsWith("error=") ? [] : G.parse(text).map(e => ({ text: e.name + " = " + e.value, key: e.name + "=" + e.value })) } } page: Component { Page { title: "Git config" GitPage { width: parent.width; owner: gm } } } }