eww: Only show workspaces on same monitor
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
:stacking "fg"
|
:stacking "fg"
|
||||||
:exclusive true
|
:exclusive true
|
||||||
(centerbox :orientation "v" :active true :class "sidebar"
|
(centerbox :orientation "v" :active true :class "sidebar"
|
||||||
(workspaces)
|
(workspaces :monitor 0)
|
||||||
(middle)
|
(middle)
|
||||||
(bottom)
|
(bottom)
|
||||||
))
|
))
|
||||||
@ -19,7 +19,7 @@
|
|||||||
:stacking "fg"
|
:stacking "fg"
|
||||||
:exclusive true
|
:exclusive true
|
||||||
(centerbox :orientation "v" :active true :class "sidebar"
|
(centerbox :orientation "v" :active true :class "sidebar"
|
||||||
(workspaces)
|
(workspaces :monitor 1)
|
||||||
(middle)
|
(middle)
|
||||||
(bottom)
|
(bottom)
|
||||||
))
|
))
|
||||||
@ -45,13 +45,14 @@
|
|||||||
(pwr)
|
(pwr)
|
||||||
))
|
))
|
||||||
|
|
||||||
(defwidget workspaces []
|
(defwidget workspaces [monitor]
|
||||||
(box :orientation "v"
|
(box :orientation "v"
|
||||||
:valign "start"
|
:valign "start"
|
||||||
:class "workspaces"
|
:class "workspaces"
|
||||||
:space-evenly: false
|
:space-evenly: false
|
||||||
(for workspace in workspaces_json
|
(for workspace in workspaces_json
|
||||||
(button :class 'workspace ${workspace.class}' (label :text '${workspace.id}'))
|
(button :visible {workspace.monitor == monitor} :class 'workspace ${workspace.class}'
|
||||||
|
(label :text '${workspace.id}'))
|
||||||
)))
|
)))
|
||||||
|
|
||||||
(defwidget speaker []
|
(defwidget speaker []
|
||||||
|
|||||||
@ -5,6 +5,5 @@ let active = (hyprctl activeworkspace -j | from json | get id)
|
|||||||
hyprctl workspaces -j |
|
hyprctl workspaces -j |
|
||||||
from json |
|
from json |
|
||||||
sort-by id |
|
sort-by id |
|
||||||
get id |
|
each {|w| {id: $w.id monitor: $w.monitorID class: (if ($w.id == $active) {"active"} else {""}) }} |
|
||||||
each {|id| {id: $id class: (if ($id == $active) {"active"} else {""}) }} |
|
|
||||||
to json
|
to json
|
||||||
|
|||||||
Reference in New Issue
Block a user