mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-10 15:38:31 -04:00
fix(NiriService): enhance column movement functions to focus on specified monitor
- Fixes #2498
This commit is contained in:
@@ -1158,9 +1158,9 @@ PanelWindow {
|
|||||||
if (!CompositorService.isNiri)
|
if (!CompositorService.isNiri)
|
||||||
return false;
|
return false;
|
||||||
if (direction > 0)
|
if (direction > 0)
|
||||||
NiriService.moveColumnRight();
|
NiriService.moveColumnRight(barWindow.screenName);
|
||||||
else
|
else
|
||||||
NiriService.moveColumnLeft();
|
NiriService.moveColumnLeft(barWindow.screenName);
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -741,7 +741,19 @@ Singleton {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveColumnLeft() {
|
function focusMonitor(outputName) {
|
||||||
|
return send({
|
||||||
|
"Action": {
|
||||||
|
"FocusMonitor": {
|
||||||
|
"output": outputName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function moveColumnLeft(outputName) {
|
||||||
|
if (outputName && outputName !== currentOutput)
|
||||||
|
focusMonitor(outputName);
|
||||||
return send({
|
return send({
|
||||||
"Action": {
|
"Action": {
|
||||||
"FocusColumnLeft": {}
|
"FocusColumnLeft": {}
|
||||||
@@ -749,7 +761,9 @@ Singleton {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveColumnRight() {
|
function moveColumnRight(outputName) {
|
||||||
|
if (outputName && outputName !== currentOutput)
|
||||||
|
focusMonitor(outputName);
|
||||||
return send({
|
return send({
|
||||||
"Action": {
|
"Action": {
|
||||||
"FocusColumnRight": {}
|
"FocusColumnRight": {}
|
||||||
|
|||||||
Reference in New Issue
Block a user