add workspace monitor to bottom bar and remove waybar
This commit is contained in:
parent
089740ffaf
commit
a9525ec467
7 changed files with 144 additions and 22 deletions
|
@ -15,7 +15,7 @@
|
|||
(centerbox
|
||||
(box
|
||||
:halign "start"
|
||||
(label :text "left")
|
||||
(workspaceWidget)
|
||||
)
|
||||
(box
|
||||
:halign "center"
|
||||
|
@ -39,3 +39,19 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget workspaceWidget []
|
||||
(box
|
||||
:class "workspaces"
|
||||
(for workspace in workspaces
|
||||
(button
|
||||
(label :markup "<span foreground=\"${workspace.urgent ? "#ff0000" : "#ffffff"}\" background=\"${workspace.focused ? "#383838" : "#282828"}\">${workspace.name}</span>")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deflisten workspaces
|
||||
:initial "[]"
|
||||
"bar-ws-monitor"
|
||||
)
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
def main [] {
|
||||
mut workspaces = waymsg -rt get_workspaces | from json | select name focused urgent;
|
||||
}
|
|
@ -26,22 +26,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "sway-session.target";
|
||||
};
|
||||
settings = {
|
||||
interactiveBar = {
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
modules-left = ["sway/workspaces" "sway/mode"];
|
||||
modules-right = ["wlr/taskbar"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
|
@ -80,7 +64,7 @@
|
|||
};
|
||||
startup = [
|
||||
{
|
||||
command = "eww open topBar";
|
||||
command = "eww open topBar; eww open bottomBar";
|
||||
}
|
||||
{
|
||||
command = "pkill nm-applet; sleep 1 && nm-applet";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue