mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -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)
|
||||
return false;
|
||||
if (direction > 0)
|
||||
NiriService.moveColumnRight();
|
||||
NiriService.moveColumnRight(barWindow.screenName);
|
||||
else
|
||||
NiriService.moveColumnLeft();
|
||||
NiriService.moveColumnLeft(barWindow.screenName);
|
||||
return true;
|
||||
default:
|
||||
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({
|
||||
"Action": {
|
||||
"FocusColumnLeft": {}
|
||||
@@ -749,7 +761,9 @@ Singleton {
|
||||
});
|
||||
}
|
||||
|
||||
function moveColumnRight() {
|
||||
function moveColumnRight(outputName) {
|
||||
if (outputName && outputName !== currentOutput)
|
||||
focusMonitor(outputName);
|
||||
return send({
|
||||
"Action": {
|
||||
"FocusColumnRight": {}
|
||||
|
||||
Reference in New Issue
Block a user