forked from Shinonome/dots-hyprland
waffles: map media controls bind to action center
This commit is contained in:
@@ -228,11 +228,6 @@ Rectangle {
|
||||
component TabSwitchAnim: SequentialAnimation {
|
||||
id: switchAnim
|
||||
property bool down: false
|
||||
// ScriptAction {
|
||||
// script: {
|
||||
// switchAnim.down = root.selectedTab > root.previousIndex;
|
||||
// }
|
||||
// }
|
||||
ParallelAnimation {
|
||||
PropertyAnimation {
|
||||
target: tabStack
|
||||
|
||||
@@ -74,7 +74,7 @@ function getCalendarLayout(dateObject, highlight) {
|
||||
// Fill
|
||||
var monthDiff = (weekdayOfMonthFirst == 0 ? 0 : -1);
|
||||
var toFill, dim;
|
||||
if(weekdayOfMonthFirst == 0) {
|
||||
if (weekdayOfMonthFirst == 0) {
|
||||
toFill = 1;
|
||||
dim = daysInMonth;
|
||||
}
|
||||
@@ -88,8 +88,7 @@ function getCalendarLayout(dateObject, highlight) {
|
||||
calendar[i][j] = {
|
||||
"day": toFill,
|
||||
"today": ((toFill == day && monthDiff == 0 && highlight) ? 1 : (
|
||||
monthDiff == 0 ? 0 :
|
||||
-1
|
||||
monthDiff == 0 ? 0 : -1
|
||||
))
|
||||
};
|
||||
// Increment
|
||||
@@ -112,4 +111,3 @@ function getCalendarLayout(dateObject, highlight) {
|
||||
}
|
||||
return calendar;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ Scope {
|
||||
target: GlobalStates
|
||||
|
||||
function onSidebarLeftOpenChanged() {
|
||||
if (GlobalStates.sidebarLeftOpen) panelLoader.active = true;
|
||||
if (GlobalStates.sidebarLeftOpen)
|
||||
panelLoader.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,13 +43,14 @@ Scope {
|
||||
id: focusGrab
|
||||
active: true
|
||||
windows: [panelWindow]
|
||||
onCleared: content.close();
|
||||
onCleared: content.close()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: GlobalStates
|
||||
function onSidebarLeftOpenChanged() {
|
||||
if (!GlobalStates.sidebarLeftOpen) content.close();
|
||||
if (!GlobalStates.sidebarLeftOpen)
|
||||
content.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +82,23 @@ Scope {
|
||||
name: "sidebarLeftToggle"
|
||||
description: "Toggles left sidebar on press"
|
||||
|
||||
onPressed: root.toggleOpen();
|
||||
onPressed: root.toggleOpen()
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "mediaControls"
|
||||
|
||||
function toggle(): void {
|
||||
GlobalStates.sidebarLeftOpen = !GlobalStates.sidebarLeftOpen;
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "mediaControlsToggle"
|
||||
description: "Toggles media controls on press"
|
||||
|
||||
onPressed: {
|
||||
GlobalStates.sidebarLeftOpen = !GlobalStates.sidebarLeftOpen;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user