1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

Refactor pre-commit hooks to use prek (#976)

* ci: change to prek for pre-commit

* refactor: fix shellcheck warnings for the scripts

* chore: unify whitespace formatting

* nix: add prek to dev shell
This commit is contained in:
Marcus Ramberg
2025-12-11 15:11:12 +01:00
committed by GitHub
parent c8cfe0cb5a
commit 7c88865d67
147 changed files with 805 additions and 860 deletions

View File

@@ -117,4 +117,4 @@ Rectangle {
easing.type: Theme.standardEasing
}
}
}
}

View File

@@ -88,4 +88,4 @@ Item {
}
}
}
}
}

View File

@@ -286,4 +286,4 @@ Item {
ColorAnimation { duration: Theme.shortDuration }
}
}
}
}

View File

@@ -237,4 +237,4 @@ Row {
onClicked: root.clearAll()
}
}
}
}

View File

@@ -49,4 +49,4 @@ Rectangle {
cursorShape: Qt.PointingHandCursor
onPressed: root.pressed()
}
}
}

View File

@@ -49,4 +49,4 @@ Row {
}
}
}
}
}

View File

@@ -43,4 +43,4 @@ StyledText {
default: return Theme.surfaceText
}
}
}
}

View File

@@ -161,7 +161,7 @@ Rectangle {
const pins = SettingsData.bluetoothDevicePins || {}
const pinnedAddr = pins["preferredDevice"]
let devices = [...BluetoothService.adapter.devices.values.filter(dev => dev && (dev.paired || dev.trusted))]
devices.sort((a, b) => {
// Pinned device first
@@ -337,13 +337,13 @@ Rectangle {
onClicked: {
const pins = JSON.parse(JSON.stringify(SettingsData.bluetoothDevicePins || {}))
const isCurrentlyPinned = pins["preferredDevice"] === modelData.address
if (isCurrentlyPinned) {
delete pins["preferredDevice"]
} else {
pins["preferredDevice"] = modelData.address
}
SettingsData.set("bluetoothDevicePins", pins)
}
}
@@ -642,4 +642,4 @@ Rectangle {
}
}
}
}
}

View File

@@ -163,4 +163,4 @@ Rectangle {
}
}
}
}
}

View File

@@ -45,4 +45,4 @@ CompoundPill {
onToggled: {
expandClicked()
}
}
}

View File

@@ -30,4 +30,4 @@ CompoundPill {
colorPickerModal.show()
}
}
}
}

View File

@@ -67,4 +67,4 @@ Rectangle {
onSliderValueChanged: root.sliderValueChanged(newValue / 100.0)
}
}
}
}

View File

@@ -167,4 +167,4 @@ Rectangle {
if (ev.key === Qt.Key_Space || ev.key === Qt.Key_Return) { root.toggled(); ev.accepted = true }
else if (ev.key === Qt.Key_Right) { root.expandClicked(); ev.accepted = true }
}
}
}

View File

@@ -26,4 +26,4 @@ Rectangle {
}
}
}

View File

@@ -75,4 +75,4 @@ CompoundPill {
onToggled: {
expandClicked()
}
}
}

View File

@@ -97,4 +97,4 @@ Rectangle {
easing.type: Theme.standardEasing
}
}
}
}

View File

@@ -77,4 +77,4 @@ Rectangle {
easing.type: Theme.standardEasing
}
}
}
}

View File

@@ -118,4 +118,4 @@ Rectangle {
easing.type: Theme.standardEasing
}
}
}
}

View File

@@ -42,4 +42,4 @@ function calculateRowsAndWidgets(controlCenterColumn, expandedSection, expandedW
}
return { rows: rows, expandedRowIndex: expandedRow }
}
}

View File

@@ -22,4 +22,4 @@ function toggleSection(root, section) {
} else {
root.expandedSection = section
}
}
}

View File

@@ -87,4 +87,4 @@ function resetToDefault() {
function clearAll() {
SettingsData.set("controlCenterWidgets", [])
}
}

View File

@@ -54,4 +54,4 @@ QtObject {
axisOrientationChanged()
changed()
}
}
}

View File

@@ -22,4 +22,4 @@ BasePill {
}
}
}
}
}

View File

@@ -60,4 +60,4 @@ BasePill {
}
}
}
}
}

View File

@@ -21,4 +21,4 @@ BasePill {
}
}
}
}
}

View File

@@ -444,4 +444,4 @@ Rectangle {
id: systemClock
precision: SystemClock.Hours
}
}
}

View File

@@ -19,4 +19,4 @@ Rectangle {
anchors.fill: parent
anchors.margins: card.pad
}
}
}

View File

@@ -110,4 +110,4 @@ Card {
id: systemClock
precision: SettingsData.showSeconds ? SystemClock.Seconds : SystemClock.Minutes
}
}
}

View File

@@ -215,4 +215,4 @@ Card {
onClicked: root.clicked()
visible: activePlayer
}
}
}

View File

@@ -175,4 +175,4 @@ Card {
}
}
}
}
}

View File

@@ -86,4 +86,4 @@ Card {
cursorShape: Qt.PointingHandCursor
onClicked: root.clicked()
}
}
}

View File

@@ -73,4 +73,4 @@ Item {
onClicked: root.switchToMediaTab()
}
}
}
}

View File

@@ -1093,7 +1093,7 @@ Item {
command: {
var paths = [
"/usr/share/wayland-sessions",
"/usr/share/xsessions",
"/usr/share/xsessions",
"/usr/local/share/wayland-sessions",
"/usr/local/share/xsessions"
]
@@ -1110,7 +1110,7 @@ Item {
}
})
}
// 1. Explicit system/user paths
// 1. Explicit system/user paths
var explicitFind = "find " + paths.join(" ") + " -maxdepth 1 -name '*.desktop' -type f -follow 2>/dev/null"
// 2. Scan all /home user directories for local session files
var homeScan = "find /home -maxdepth 5 \\( -path '*/wayland-sessions/*.desktop' -o -path '*/xsessions/*.desktop' \\) -type f -follow 2>/dev/null"

View File

@@ -45,7 +45,7 @@ setfacl -m u:greeter:x ~ ~/.config ~/.local ~/.cache ~/.local/state
# Set group ownership on config directories
sudo chgrp -R greeter ~/.config/DankMaterialShell
sudo chgrp -R greeter ~/.local/state/DankMaterialShell
sudo chgrp -R greeter ~/.local/state/DankMaterialShell
sudo chgrp -R greeter ~/.cache/DankMaterialShell
sudo chmod -R g+rX ~/.config/DankMaterialShell ~/.cache/DankMaterialShell ~/.cache/quickshell

View File

@@ -20,4 +20,4 @@ gestures {
layout {
background-color "#000000"
}
}

View File

@@ -5,4 +5,4 @@ export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export EGL_PLATFORM=gbm
exec niri -c /etc/greetd/dms-niri.kdl
exec niri -c /etc/greetd/dms-niri.kdl

View File

@@ -616,4 +616,4 @@ Column {
autoSaveToSession()
}
}
}
}