Add window title and wm info to Bar
This commit adds the focused window title to the left side of the bar and some WM info (primary count/ratio and # of visible/total windows) to the right side. It also adds new vertical_padding and horizontal_padding config options for the bar.
This commit is contained in:
parent
062748967c
commit
efd0222899
9 changed files with 231 additions and 51 deletions
|
|
@ -137,9 +137,15 @@ pub fn manage(seat: *Seat) void {
|
|||
switch (pending_window) {
|
||||
.window => |window| {
|
||||
if (seat.focused_window) |focused| {
|
||||
// Tell the previously focused Window that it's no longer focused
|
||||
if (focused != window) {
|
||||
// Tell the previously focused Window that it's no longer focused
|
||||
focused.pending_render.focused = false;
|
||||
// Update the Bar to have the newly-focused window's title
|
||||
if (focused.output) |output| {
|
||||
if (output.bar) |*bar| {
|
||||
bar.pending_render.draw = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
seat.focused_window = window;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue