forked from Shinonome/dots-hyprland
bar: fix screen filtering
This commit is contained in:
@@ -26,21 +26,14 @@ Scope {
|
|||||||
implicitWidth: 1
|
implicitWidth: 1
|
||||||
color: Appearance.colors.colOutlineVariant
|
color: Appearance.colors.colOutlineVariant
|
||||||
|
|
||||||
|
Variants { // For each monitor
|
||||||
// Check screensList from config, If no screens are specified, show on all screens
|
model: {
|
||||||
ScriptModel {
|
|
||||||
id: screensModel
|
|
||||||
values: {
|
|
||||||
const screens = Quickshell.screens;
|
const screens = Quickshell.screens;
|
||||||
const list = ConfigOptions.bar.screensList;
|
const list = ConfigOptions.bar.screensList;
|
||||||
if (!list || list.length === 0)
|
if (!list || list.length === 0)
|
||||||
return screens;
|
return screens;
|
||||||
return screens.filter(screen => list.includes(screen.name));
|
return screens.filter(screen => list.includes(screen.name));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Variants { // For each monitor
|
|
||||||
model: screensModel.values
|
|
||||||
|
|
||||||
PanelWindow { // Bar window
|
PanelWindow { // Bar window
|
||||||
id: barRoot
|
id: barRoot
|
||||||
|
|||||||
Reference in New Issue
Block a user