blob: bd0be714ed52c5093b6ef0a33ad156fc4b2cb2ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
//
// 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 }
}
}
}
|