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:
@@ -117,4 +117,4 @@ Rectangle {
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,4 +88,4 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,4 +286,4 @@ Item {
|
||||
ColorAnimation { duration: Theme.shortDuration }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,4 +237,4 @@ Row {
|
||||
onClicked: root.clearAll()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,4 +49,4 @@ Rectangle {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onPressed: root.pressed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,4 +49,4 @@ Row {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,4 @@ StyledText {
|
||||
default: return Theme.surfaceText
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,4 +163,4 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,4 +45,4 @@ CompoundPill {
|
||||
onToggled: {
|
||||
expandClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,4 +30,4 @@ CompoundPill {
|
||||
colorPickerModal.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,4 +67,4 @@ Rectangle {
|
||||
onSliderValueChanged: root.sliderValueChanged(newValue / 100.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,4 +26,4 @@ Rectangle {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,4 +75,4 @@ CompoundPill {
|
||||
onToggled: {
|
||||
expandClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,4 +97,4 @@ Rectangle {
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,4 +77,4 @@ Rectangle {
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,4 +118,4 @@ Rectangle {
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,4 @@ function calculateRowsAndWidgets(controlCenterColumn, expandedSection, expandedW
|
||||
}
|
||||
|
||||
return { rows: rows, expandedRowIndex: expandedRow }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ function toggleSection(root, section) {
|
||||
} else {
|
||||
root.expandedSection = section
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,4 +87,4 @@ function resetToDefault() {
|
||||
|
||||
function clearAll() {
|
||||
SettingsData.set("controlCenterWidgets", [])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,4 +54,4 @@ QtObject {
|
||||
axisOrientationChanged()
|
||||
changed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ BasePill {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,4 +60,4 @@ BasePill {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ BasePill {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,4 +444,4 @@ Rectangle {
|
||||
id: systemClock
|
||||
precision: SystemClock.Hours
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,4 +19,4 @@ Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: card.pad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,4 +110,4 @@ Card {
|
||||
id: systemClock
|
||||
precision: SettingsData.showSeconds ? SystemClock.Seconds : SystemClock.Minutes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,4 +215,4 @@ Card {
|
||||
onClicked: root.clicked()
|
||||
visible: activePlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,4 +175,4 @@ Card {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,4 +86,4 @@ Card {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root.clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,4 +73,4 @@ Item {
|
||||
onClicked: root.switchToMediaTab()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -20,4 +20,4 @@ gestures {
|
||||
|
||||
layout {
|
||||
background-color "#000000"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -616,4 +616,4 @@ Column {
|
||||
autoSaveToSession()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user