mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 09:36:46 +00:00
quickshell and hyprland additions
This commit is contained in:
34
.config/quickshell/nucleus-shell/services/ConfigResolver.qml
Normal file
34
.config/quickshell/nucleus-shell/services/ConfigResolver.qml
Normal file
@@ -0,0 +1,34 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.config
|
||||
pragma Singleton
|
||||
|
||||
|
||||
/*
|
||||
|
||||
This service primarily resolves configs for widgets that are customizable per monitor.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
Singleton {
|
||||
|
||||
function bar(displayName) {
|
||||
const displays = Config.runtime.monitors;
|
||||
const fallback = Config.runtime.bar;
|
||||
if (!displays || !displays[displayName] || !displays[displayName].bar || displayName === "")
|
||||
return fallback;
|
||||
|
||||
return displays[displayName].bar;
|
||||
}
|
||||
|
||||
function getBarConfigurableHandle(displayName) { // returns prefField string
|
||||
const displays = Config.runtime.monitors;
|
||||
|
||||
if (!displays || !displays[displayName] || !displays[displayName].bar || displayName === "")
|
||||
return "bar";
|
||||
|
||||
return "monitors." + displayName + ".bar";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user