forked from Shinonome/dots-hyprland
Merge branch 'main' into hefty-hype
This commit is contained in:
@@ -410,6 +410,10 @@ Singleton {
|
||||
|
||||
property JsonObject notifications: JsonObject {
|
||||
property int timeout: 7000
|
||||
property JsonObject monitor: JsonObject {
|
||||
property bool enable: false
|
||||
property string name: "" // Name of the monitor to show notifications on, like "eDP-1". Find out with 'hyprctl monitors' command
|
||||
}
|
||||
}
|
||||
|
||||
property JsonObject osd: JsonObject {
|
||||
|
||||
@@ -14,7 +14,7 @@ Scope {
|
||||
PanelWindow {
|
||||
id: root
|
||||
visible: (Notifications.popupList.length > 0) && !GlobalStates.screenLocked
|
||||
screen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name) ?? null
|
||||
screen: Quickshell.screens.find(s => Config.options.notifications.forceMonitor.enable ? s.name === Config.options.notifications.forceMonitor.name : s.name === Hyprland.focusedMonitor?.name) ?? null
|
||||
|
||||
WlrLayershell.namespace: "quickshell:notificationPopup"
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
|
||||
@@ -265,6 +265,31 @@ ContentPage {
|
||||
Config.options.notifications.timeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
ConfigSwitch {
|
||||
buttonIcon: "monitor"
|
||||
text: Translation.tr("Force specific monitor")
|
||||
checked: Config.options.notifications.forceMonitor.enable
|
||||
onCheckedChanged: {
|
||||
Config.options.notifications.forceMonitor.enable = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
text: Translation.tr("If you have multiple monitors and want notifications to only show on one of them, enable this and enter the monitor name below (e.g., eDP-1)")
|
||||
}
|
||||
}
|
||||
|
||||
ConfigRow {
|
||||
enabled: Config.options.notifications.forceMonitor.enable
|
||||
MaterialTextArea {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: Translation.tr("Monitor name to show notifications on (e.g., eDP-1)")
|
||||
text: Config.options.notifications.forceMonitor.name
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
Config.options.notifications.forceMonitor.name = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
|
||||
@@ -42,7 +42,8 @@ color236 #$onTertiary #
|
||||
color237 #$onTertiaryContainer #
|
||||
color238 #$onError #
|
||||
color239 #$onErrorContainer #
|
||||
color240 #$onPrimary # // Somehow 232 doesn't work so i gotta use another number
|
||||
color240 #$onPrimary #
|
||||
# Somehow 232 doesn't work so i gotta use another number
|
||||
|
||||
# Some stuff should specifically use the colors in the middle so they look acceptable in both unthemed light/dark
|
||||
color243 #$primary #
|
||||
|
||||
@@ -21,6 +21,7 @@ Singleton {
|
||||
property string to: Config.options?.light?.night?.to ?? "06:30"
|
||||
property bool automatic: Config.options?.light?.night?.automatic && (Config?.ready ?? true)
|
||||
property int colorTemperature: Config.options?.light?.night?.colorTemperature ?? 5000
|
||||
property int defaultColorTemperature: 6000
|
||||
property int gamma: 100
|
||||
property bool shouldBeOn
|
||||
property bool firstEvaluation: true
|
||||
@@ -112,7 +113,7 @@ Singleton {
|
||||
function disableTemperature() {
|
||||
root.temperatureActive = false;
|
||||
// console.log("[Hyprsunset] Disabling");
|
||||
Quickshell.execDetached(["hyprctl", "hyprsunset", "identity"]);
|
||||
Quickshell.execDetached(["bash", "-c", `hyprctl hyprsunset temperature ${root.defaultColorTemperature}`]);
|
||||
}
|
||||
|
||||
function setGamma(gamma) {
|
||||
@@ -139,7 +140,7 @@ Singleton {
|
||||
if (output.length == 0 || output.startsWith("Couldn't"))
|
||||
root.temperatureActive = false;
|
||||
else
|
||||
root.temperatureActive = (output != "6500"); // 6500 is the default when off
|
||||
root.temperatureActive = (output != root.defaultColorTemperature); // 6000 is the default when off
|
||||
// console.log("[Hyprsunset] Fetched state:", output, "->", root.temperatureActive);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user