Update .config/DankMaterialShell/plugin_settings.json
Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankActions/DankActionsSettings.qml Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankActions/plugin.json Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankBatteryAlerts/plugin.json Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankHooks/DankHooks.qml Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankHooks/DankHooksSettings.qml Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankHooks/README.md Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankHooks/plugin.json Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankPomodoroTimer/DankPomodoroSettings.qml Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankPomodoroTimer/DankPomodoroWidget.qml Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankPomodoroTimer/plugin.json Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/LICENSE Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/index Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/refs/heads/master Update .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/refs/remotes/origin/master Update .config/DankMaterialShell/settings.json Update .config/fish/fish_variables Update .config/niri/binds.kdl Update .config/nvim/lazy-lock.json
This commit is contained in:
parent
b5afd19ffd
commit
1b2ee95d10
19 changed files with 532 additions and 989 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
|
|
@ -7,12 +6,13 @@ import qs.Modules.Plugins
|
|||
|
||||
PluginComponent {
|
||||
id: root
|
||||
|
||||
|
||||
property bool preparingForSleep: false
|
||||
|
||||
property string hookWallpaperPath: pluginData.wallpaperPath || ""
|
||||
property string hookLightMode: pluginData.lightMode || ""
|
||||
property string hookTheme: pluginData.theme || ""
|
||||
property string hookMatugenCompleted: pluginData.matugenCompleted || ""
|
||||
property string hookBatteryLevel: pluginData.batteryLevel || ""
|
||||
property string hookBatteryCharging: pluginData.batteryCharging || ""
|
||||
property string hookBatteryPluggedIn: pluginData.batteryPluggedIn || ""
|
||||
|
|
@ -38,42 +38,49 @@ PluginComponent {
|
|||
target: SessionData
|
||||
function onWallpaperPathChanged() {
|
||||
if (hookWallpaperPath) {
|
||||
executeHook(hookWallpaperPath, "onWallpaperChanged", SessionData.wallpaperPath)
|
||||
executeHook(hookWallpaperPath, "onWallpaperChanged", SessionData.wallpaperPath);
|
||||
}
|
||||
}
|
||||
|
||||
function onMonitorWallpapersChanged() {
|
||||
if (hookMonitorWallpaper) {
|
||||
const wallpapersJson = JSON.stringify(SessionData.monitorWallpapers)
|
||||
executeHook(hookMonitorWallpaper, "onMonitorWallpapersChanged", wallpapersJson)
|
||||
const wallpapersJson = JSON.stringify(SessionData.monitorWallpapers);
|
||||
executeHook(hookMonitorWallpaper, "onMonitorWallpapersChanged", wallpapersJson);
|
||||
}
|
||||
}
|
||||
|
||||
function onIsLightModeChanged() {
|
||||
if (hookLightMode) {
|
||||
executeHook(hookLightMode, "onLightModeChanged", SessionData.isLightMode ? "light" : "dark")
|
||||
executeHook(hookLightMode, "onLightModeChanged", SessionData.isLightMode ? "light" : "dark");
|
||||
}
|
||||
}
|
||||
|
||||
function onNightModeEnabledChanged() {
|
||||
if (hookNightMode) {
|
||||
executeHook(hookNightMode, "onNightModeChanged", SessionData.nightModeEnabled ? "enabled" : "disabled")
|
||||
executeHook(hookNightMode, "onNightModeChanged", SessionData.nightModeEnabled ? "enabled" : "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
function onDoNotDisturbChanged() {
|
||||
if (hookDoNotDisturb) {
|
||||
executeHook(hookDoNotDisturb, "onDoNotDisturbChanged", SessionData.doNotDisturb ? "enabled" : "disabled")
|
||||
executeHook(hookDoNotDisturb, "onDoNotDisturbChanged", SessionData.doNotDisturb ? "enabled" : "disabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: typeof Theme !== "undefined" ? Theme : null
|
||||
|
||||
function onCurrentThemeChanged() {
|
||||
if (hookTheme) {
|
||||
executeHook(hookTheme, "onThemeChanged", Theme.currentTheme)
|
||||
}
|
||||
if (!hookTheme)
|
||||
return;
|
||||
executeHook(hookTheme, "onThemeChanged", Theme.currentTheme);
|
||||
}
|
||||
|
||||
function onMatugenCompleted(mode, result) {
|
||||
if (!hookMatugenCompleted)
|
||||
return;
|
||||
executeHook(hookMatugenCompleted, "onMatugenCompleted", mode + ":" + result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -81,59 +88,59 @@ PluginComponent {
|
|||
target: BatteryService.batteryAvailable ? BatteryService : null
|
||||
function onBatteryLevelChanged() {
|
||||
if (hookBatteryLevel) {
|
||||
executeHook(hookBatteryLevel, "onBatteryLevelChanged", String(BatteryService.batteryLevel))
|
||||
executeHook(hookBatteryLevel, "onBatteryLevelChanged", String(BatteryService.batteryLevel));
|
||||
}
|
||||
}
|
||||
|
||||
function onIsChargingChanged() {
|
||||
if (hookBatteryCharging) {
|
||||
executeHook(hookBatteryCharging, "onBatteryChargingChanged", BatteryService.isCharging ? "charging" : "not-charging")
|
||||
executeHook(hookBatteryCharging, "onBatteryChargingChanged", BatteryService.isCharging ? "charging" : "not-charging");
|
||||
}
|
||||
}
|
||||
|
||||
function onIsPluggedInChanged() {
|
||||
if (hookBatteryPluggedIn) {
|
||||
executeHook(hookBatteryPluggedIn, "onBatteryPluggedInChanged", BatteryService.isPluggedIn ? "plugged-in" : "on-battery")
|
||||
executeHook(hookBatteryPluggedIn, "onBatteryPluggedInChanged", BatteryService.isPluggedIn ? "plugged-in" : "on-battery");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Connections {
|
||||
target: IdleService
|
||||
|
||||
|
||||
function onLockRequested() {
|
||||
if (hookPowerRequestLock) {
|
||||
executeHook(hookPowerRequestLock, "onLockRequested", "")
|
||||
executeHook(hookPowerRequestLock, "onLockRequested", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function onRequestMonitorOff() {
|
||||
if (hookPowerMonitorOff) {
|
||||
executeHook(hookPowerMonitorOff, "onRequestMonitorOff", "")
|
||||
executeHook(hookPowerMonitorOff, "onRequestMonitorOff", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function onRequestMonitorOn() {
|
||||
if (hookPowerMonitorOn) {
|
||||
executeHook(hookPowerMonitorOn, "onRequestMonitorOn", "")
|
||||
executeHook(hookPowerMonitorOn, "onRequestMonitorOn", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function onRequestSuspend() {
|
||||
if (hookPowerSuspend) {
|
||||
executeHook(hookPowerSuspend, "onRequestSuspend", "")
|
||||
executeHook(hookPowerSuspend, "onRequestSuspend", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Connections {
|
||||
target: DMSService
|
||||
|
||||
|
||||
function onLoginctlStateUpdate(data) {
|
||||
var lastState = root.preparingForSleep
|
||||
root.preparingForSleep = data.preparingForSleep
|
||||
var lastState = root.preparingForSleep;
|
||||
root.preparingForSleep = data.preparingForSleep;
|
||||
if (lastState && !root.preparingForSleep) {
|
||||
executeHook(hookResumeFromSleep, "onResumeFromSleep", "")
|
||||
executeHook(hookResumeFromSleep, "onResumeFromSleep", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -142,19 +149,19 @@ PluginComponent {
|
|||
target: NetworkService
|
||||
function onWifiConnectedChanged() {
|
||||
if (hookWifiConnected) {
|
||||
executeHook(hookWifiConnected, "onWifiConnectedChanged", NetworkService.wifiConnected ? "connected" : "disconnected")
|
||||
executeHook(hookWifiConnected, "onWifiConnectedChanged", NetworkService.wifiConnected ? "connected" : "disconnected");
|
||||
}
|
||||
}
|
||||
|
||||
function onCurrentWifiSSIDChanged() {
|
||||
if (hookWifiSSID) {
|
||||
executeHook(hookWifiSSID, "onWifiSSIDChanged", NetworkService.currentWifiSSID || "none")
|
||||
executeHook(hookWifiSSID, "onWifiSSIDChanged", NetworkService.currentWifiSSID || "none");
|
||||
}
|
||||
}
|
||||
|
||||
function onEthernetConnectedChanged() {
|
||||
if (hookEthernetConnected) {
|
||||
executeHook(hookEthernetConnected, "onEthernetConnectedChanged", NetworkService.ethernetConnected ? "connected" : "disconnected")
|
||||
executeHook(hookEthernetConnected, "onEthernetConnectedChanged", NetworkService.ethernetConnected ? "connected" : "disconnected");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -164,13 +171,13 @@ PluginComponent {
|
|||
|
||||
function onVolumeChanged() {
|
||||
if (hookAudioVolume && AudioService.sink && AudioService.sink.audio) {
|
||||
executeHook(hookAudioVolume, "onAudioVolumeChanged", String(Math.round(AudioService.sink.audio.volume * 100)))
|
||||
executeHook(hookAudioVolume, "onAudioVolumeChanged", String(Math.round(AudioService.sink.audio.volume * 100)));
|
||||
}
|
||||
}
|
||||
|
||||
function onMutedChanged() {
|
||||
if (hookAudioMute && AudioService.sink && AudioService.sink.audio) {
|
||||
executeHook(hookAudioMute, "onAudioMuteChanged", AudioService.sink.audio.muted ? "muted" : "unmuted")
|
||||
executeHook(hookAudioMute, "onAudioMuteChanged", AudioService.sink.audio.muted ? "muted" : "unmuted");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -180,7 +187,7 @@ PluginComponent {
|
|||
|
||||
function onMutedChanged() {
|
||||
if (hookMicMute && AudioService.source && AudioService.source.audio) {
|
||||
executeHook(hookMicMute, "onMicMuteChanged", AudioService.source.audio.muted ? "muted" : "unmuted")
|
||||
executeHook(hookMicMute, "onMicMuteChanged", AudioService.source.audio.muted ? "muted" : "unmuted");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -190,7 +197,7 @@ PluginComponent {
|
|||
|
||||
function onBrightnessLevelChanged() {
|
||||
if (hookBrightness && DisplayService.brightnessAvailable) {
|
||||
executeHook(hookBrightness, "onBrightnessChanged", String(DisplayService.brightnessLevel))
|
||||
executeHook(hookBrightness, "onBrightnessChanged", String(DisplayService.brightnessLevel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -200,28 +207,28 @@ PluginComponent {
|
|||
|
||||
function onIsPlayingChanged() {
|
||||
if (hookMediaPlaying && MprisController.activePlayer) {
|
||||
executeHook(hookMediaPlaying, "onMediaPlayingChanged", MprisController.activePlayer.isPlaying ? "playing" : "paused")
|
||||
executeHook(hookMediaPlaying, "onMediaPlayingChanged", MprisController.activePlayer.isPlaying ? "playing" : "paused");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function executeHook(scriptPath, hookName, hookValue) {
|
||||
if (!scriptPath || scriptPath.trim() === "") {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
const process = hookProcessComponent.createObject(root, {
|
||||
hookScript: scriptPath,
|
||||
hookName: hookName,
|
||||
hookValue: hookValue
|
||||
})
|
||||
});
|
||||
|
||||
if (!process) {
|
||||
console.error("DankHooks: Failed to create process object")
|
||||
return
|
||||
console.error("DankHooks: Failed to create process object");
|
||||
return;
|
||||
}
|
||||
|
||||
process.running = true
|
||||
process.running = true;
|
||||
}
|
||||
|
||||
Component {
|
||||
|
|
@ -242,7 +249,7 @@ PluginComponent {
|
|||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (text.trim()) {
|
||||
console.log("DankHooks output:", text.trim())
|
||||
console.log("DankHooks output:", text.trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -250,21 +257,21 @@ PluginComponent {
|
|||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (text.trim()) {
|
||||
ToastService.showError("Hook Script Error", text.trim())
|
||||
ToastService.showError("Hook Script Error", text.trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onExited: (exitCode) => {
|
||||
onExited: exitCode => {
|
||||
if (exitCode !== 0) {
|
||||
ToastService.showError("Hook Script Error", `Script '${hookScript}' exited with code: ${exitCode}`)
|
||||
ToastService.showError("Hook Script Error", `Script '${hookScript}' exited with code: ${exitCode}`);
|
||||
}
|
||||
destroy()
|
||||
destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
console.log("DankHooks: Stopped monitoring system events")
|
||||
console.log("DankHooks: Stopped monitoring system events");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,252 +35,260 @@ PluginSettings {
|
|||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "wallpaperPath"
|
||||
label: "Wallpaper Changed"
|
||||
description: "Hook: onWallpaperChanged | Value: wallpaper file path"
|
||||
placeholder: "/path/to/wallpaper-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "wallpaperPath"
|
||||
label: "Wallpaper Changed"
|
||||
description: "Hook: onWallpaperChanged | Value: wallpaper file path"
|
||||
placeholder: "/path/to/wallpaper-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "monitorWallpaper"
|
||||
label: "Per-Monitor Wallpapers Changed"
|
||||
description: "Hook: onMonitorWallpapersChanged | Value: JSON object with all monitors (e.g., '{\"eDP-1\":\"/path1.jpg\",\"DP-2\":\"/path2.jpg\"}')"
|
||||
placeholder: "/path/to/monitor-wallpaper-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "monitorWallpaper"
|
||||
label: "Per-Monitor Wallpapers Changed"
|
||||
description: "Hook: onMonitorWallpapersChanged | Value: JSON object with all monitors (e.g., '{\"eDP-1\":\"/path1.jpg\",\"DP-2\":\"/path2.jpg\"}')"
|
||||
placeholder: "/path/to/monitor-wallpaper-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "lightMode"
|
||||
label: "Light/Dark Mode Changed"
|
||||
description: "Hook: onLightModeChanged | Value: 'light' or 'dark'"
|
||||
placeholder: "/path/to/mode-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "lightMode"
|
||||
label: "Light/Dark Mode Changed"
|
||||
description: "Hook: onLightModeChanged | Value: 'light' or 'dark'"
|
||||
placeholder: "/path/to/mode-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "theme"
|
||||
label: "Theme Changed"
|
||||
description: "Hook: onThemeChanged | Value: theme name (e.g., 'blue', 'red', 'dynamic')"
|
||||
placeholder: "/path/to/theme-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "theme"
|
||||
label: "Theme Changed"
|
||||
description: "Hook: onThemeChanged | Value: theme name (e.g., 'blue', 'red', 'dynamic')"
|
||||
placeholder: "/path/to/theme-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "nightMode"
|
||||
label: "Night Mode Changed"
|
||||
description: "Hook: onNightModeChanged | Value: 'enabled' or 'disabled'"
|
||||
placeholder: "/path/to/nightmode-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "matugenCompleted"
|
||||
label: "Matugen Generation Completed"
|
||||
description: "Hook: onMatugenCompleted | Value: '<mode>:<result>' (e.g., 'dark:success', 'light:no-changes')"
|
||||
placeholder: "/path/to/matugen-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "nightMode"
|
||||
label: "Night Mode Changed"
|
||||
description: "Hook: onNightModeChanged | Value: 'enabled' or 'disabled'"
|
||||
placeholder: "/path/to/nightmode-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: "Power & Battery"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "batteryLevel"
|
||||
label: "Battery Level Changed"
|
||||
description: "Hook: onBatteryLevelChanged | Value: percentage (0-100)"
|
||||
placeholder: "/path/to/battery-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StyledText {
|
||||
text: "Power & Battery"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "batteryCharging"
|
||||
label: "Battery Charging State Changed"
|
||||
description: "Hook: onBatteryChargingChanged | Value: 'charging' or 'not-charging'"
|
||||
placeholder: "/path/to/charging-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "batteryLevel"
|
||||
label: "Battery Level Changed"
|
||||
description: "Hook: onBatteryLevelChanged | Value: percentage (0-100)"
|
||||
placeholder: "/path/to/battery-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "batteryPluggedIn"
|
||||
label: "Power Adapter Changed"
|
||||
description: "Hook: onBatteryPluggedInChanged | Value: 'plugged-in' or 'on-battery'"
|
||||
placeholder: "/path/to/power-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "batteryCharging"
|
||||
label: "Battery Charging State Changed"
|
||||
description: "Hook: onBatteryChargingChanged | Value: 'charging' or 'not-charging'"
|
||||
placeholder: "/path/to/charging-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "hookPowerRequestLock"
|
||||
label: "Lock Screen Event Triggered"
|
||||
description: "Hook: onLockRequested | Value: empty"
|
||||
placeholder: "/path/to/sessionlock-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "batteryPluggedIn"
|
||||
label: "Power Adapter Changed"
|
||||
description: "Hook: onBatteryPluggedInChanged | Value: 'plugged-in' or 'on-battery'"
|
||||
placeholder: "/path/to/power-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "hookPowerMonitorOff"
|
||||
label: "Monitor Off Event Triggered"
|
||||
description: "Hook: onRequestMonitorOff | Value: empty"
|
||||
placeholder: "/path/to/monitoroff-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "hookPowerRequestLock"
|
||||
label: "Lock Screen Event Triggered"
|
||||
description: "Hook: onLockRequested | Value: empty"
|
||||
placeholder: "/path/to/sessionlock-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "hookPowerMonitorOn"
|
||||
label: "Monitor On Event Triggered"
|
||||
description: "Hook: onRequestMonitorOn | Value: empty"
|
||||
placeholder: "/path/to/monitoron-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "hookPowerMonitorOff"
|
||||
label: "Monitor Off Event Triggered"
|
||||
description: "Hook: onRequestMonitorOff | Value: empty"
|
||||
placeholder: "/path/to/monitoroff-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "hookPowerSuspend"
|
||||
label: "Suspend Event Triggered"
|
||||
description: "Hook: onRequestSuspend | Value: empty"
|
||||
placeholder: "/path/to/suspend-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "hookPowerMonitorOn"
|
||||
label: "Monitor On Event Triggered"
|
||||
description: "Hook: onRequestMonitorOn | Value: empty"
|
||||
placeholder: "/path/to/monitoron-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "hookResumeFromSleep"
|
||||
label: "Resume From Sleep Event Triggered"
|
||||
description: "Hook: onResumeFromSleep | Value: empty"
|
||||
placeholder: "/path/to/resumeFromSleep-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "hookPowerSuspend"
|
||||
label: "Suspend Event Triggered"
|
||||
description: "Hook: onRequestSuspend | Value: empty"
|
||||
placeholder: "/path/to/suspend-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "hookResumeFromSleep"
|
||||
label: "Resume From Sleep Event Triggered"
|
||||
description: "Hook: onResumeFromSleep | Value: empty"
|
||||
placeholder: "/path/to/resumeFromSleep-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: "Network"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "wifiConnected"
|
||||
label: "WiFi Connection Changed"
|
||||
description: "Hook: onWifiConnectedChanged | Value: 'connected' or 'disconnected'"
|
||||
placeholder: "/path/to/wifi-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StyledText {
|
||||
text: "Network"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "wifiSSID"
|
||||
label: "WiFi Network Changed"
|
||||
description: "Hook: onWifiSSIDChanged | Value: SSID name or 'none'"
|
||||
placeholder: "/path/to/ssid-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "wifiConnected"
|
||||
label: "WiFi Connection Changed"
|
||||
description: "Hook: onWifiConnectedChanged | Value: 'connected' or 'disconnected'"
|
||||
placeholder: "/path/to/wifi-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "ethernetConnected"
|
||||
label: "Ethernet Connection Changed"
|
||||
description: "Hook: onEthernetConnectedChanged | Value: 'connected' or 'disconnected'"
|
||||
placeholder: "/path/to/ethernet-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "wifiSSID"
|
||||
label: "WiFi Network Changed"
|
||||
description: "Hook: onWifiSSIDChanged | Value: SSID name or 'none'"
|
||||
placeholder: "/path/to/ssid-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "ethernetConnected"
|
||||
label: "Ethernet Connection Changed"
|
||||
description: "Hook: onEthernetConnectedChanged | Value: 'connected' or 'disconnected'"
|
||||
placeholder: "/path/to/ethernet-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: "Audio"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "audioVolume"
|
||||
label: "Audio Volume Changed"
|
||||
description: "Hook: onAudioVolumeChanged | Value: percentage (0-100)"
|
||||
placeholder: "/path/to/volume-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StyledText {
|
||||
text: "Audio"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "audioMute"
|
||||
label: "Audio Mute Changed"
|
||||
description: "Hook: onAudioMuteChanged | Value: 'muted' or 'unmuted'"
|
||||
placeholder: "/path/to/mute-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "audioVolume"
|
||||
label: "Audio Volume Changed"
|
||||
description: "Hook: onAudioVolumeChanged | Value: percentage (0-100)"
|
||||
placeholder: "/path/to/volume-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "micMute"
|
||||
label: "Microphone Mute Changed"
|
||||
description: "Hook: onMicMuteChanged | Value: 'muted' or 'unmuted'"
|
||||
placeholder: "/path/to/mic-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "audioMute"
|
||||
label: "Audio Mute Changed"
|
||||
description: "Hook: onAudioMuteChanged | Value: 'muted' or 'unmuted'"
|
||||
placeholder: "/path/to/mute-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "micMute"
|
||||
label: "Microphone Mute Changed"
|
||||
description: "Hook: onMicMuteChanged | Value: 'muted' or 'unmuted'"
|
||||
placeholder: "/path/to/mic-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: "Display & Media"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "brightness"
|
||||
label: "Brightness Changed"
|
||||
description: "Hook: onBrightnessChanged | Value: percentage (0-100)"
|
||||
placeholder: "/path/to/brightness-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StyledText {
|
||||
text: "Display & Media"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "mediaPlaying"
|
||||
label: "Media Playback Changed"
|
||||
description: "Hook: onMediaPlayingChanged | Value: 'playing' or 'paused'"
|
||||
placeholder: "/path/to/media-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "brightness"
|
||||
label: "Brightness Changed"
|
||||
description: "Hook: onBrightnessChanged | Value: percentage (0-100)"
|
||||
placeholder: "/path/to/brightness-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "mediaPlaying"
|
||||
label: "Media Playback Changed"
|
||||
description: "Hook: onMediaPlayingChanged | Value: 'playing' or 'paused'"
|
||||
placeholder: "/path/to/media-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: "System"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "doNotDisturb"
|
||||
label: "Do Not Disturb Changed"
|
||||
description: "Hook: onDoNotDisturbChanged | Value: 'enabled' or 'disabled'"
|
||||
placeholder: "/path/to/dnd-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
StyledText {
|
||||
text: "System"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.DemiBold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
StringSetting {
|
||||
settingKey: "doNotDisturb"
|
||||
label: "Do Not Disturb Changed"
|
||||
description: "Hook: onDoNotDisturbChanged | Value: 'enabled' or 'disabled'"
|
||||
placeholder: "/path/to/dnd-hook.sh"
|
||||
defaultValue: ""
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.surfaceVariant
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: "Hook Script Examples"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
| **Wallpaper Changed** | When wallpaper changes | `onWallpaperChanged` | Wallpaper file path |
|
||||
| **Light/Dark Mode Changed** | When switching between modes | `onLightModeChanged` | `light` or `dark` |
|
||||
| **Theme Changed** | When color theme changes | `onThemeChanged` | Theme name (e.g., `blue`, `red`, `dynamic`) |
|
||||
| **Matugen Completed** | When matugen finishes generating colors | `onMatugenCompleted` | `<mode>:<result>` (e.g., `dark:success`, `light:no-changes`, `dark:error`) |
|
||||
| **Night Mode Changed** | When night mode toggles | `onNightModeChanged` | `enabled` or `disabled` |
|
||||
|
||||
### Power & Battery
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
"id": "dankHooks",
|
||||
"name": "Dank Hooks",
|
||||
"description": "Execute custom scripts on system events like wallpaper changes, theme updates, battery level changes, and more",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.7",
|
||||
"license": "MIT",
|
||||
"author": "Avenge Media",
|
||||
"icon": "webhook",
|
||||
"type": "daemon",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue