[GH-ISSUE #464] Favorite Workspaces disappearing in Hyprland #1557

Closed
opened 2026-05-22 22:52:58 +01:00 by JakeStanger · 2 comments
Owner

Originally created by @sabisho on GitHub (Feb 20, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/464

Describe the bug
On startup all my favorite workspaces appear even when I am not at that workspace but once I open any program at any one of my favorite workspace and close it and change the workspace it disappears from my bar.
Also I have some issues with system tray. Icons are not visible most of the times but sometimes are visible all of the sudden.

To Reproduce
Steps to reproduce the behavior:

https://github.com/JakeStanger/ironbar/assets/110732140/4c5fc841-d12d-4253-9d2c-f6517c059b8f

Expected behavior
My favorite worskpaces should be visible all the time as I understand it.

System information:

  • Distro: Arch Linux
  • Compositor: Hyprland
  • Ironbar version: 0.15.0-pre

Configuration

Share your bar configuration and stylesheet as applicable:

config.corn
let {
	$workspaces = {
		type = "workspaces"
		favorites = [ "1" "2" "3" "4" "5" ]
		name_map = {
			1 = "一"
      			2 = "二"
      			3 = "三"
      			4 = "四"
      			5 = "五"
      			6 = "六"
      			7 = "七"
      			8 = "八"
      			9 = "九"
			10 = "十"
		}
	}

	$focused = {
		type = "focused"
    		show_icon = true
    		show_title = true
    		icon_size = 16
    		truncate.mode = "end"
    		truncate.max_length = 50
	}

	$separator = {
    		type = "label"
    		label = "󰇘"
    		class = "separator"
  	}

	$clock = {
    		type = "clock"
    		format = "%a, %H:%M"
  	}

	$info = {
		type = "sys_info"
		interval.cpu = 3
		interval.networks = 3
		format = [
			"  {cpu_percent}%"
			"󰤨  {net_up:wlp1s0}   {net_down:wlp1s0} "
		]
	}

	$upower = {
		type = "upower"
		format = "{percentage}%"
	}

	$tray = {
		type = "tray"
	}

	$power_button = {
		type = "button"
		lable = ""
		name = "power-button"
		on_click = "!pkill rofi || /home/ayush/.config/rofi/scripts/PowerMenu-blurred"
	}

	$power_menu = {
		type = "custom"
		class = "power-menu"
		bar = [ $power_button ]
	}
}

in {
	position = "top"
	height = 18
	margin.top = 5
	margin.bottom = 0
	margin.left = 5
	margin.right = 5
	icon_theme = "Papirus-Dark"
	start = [ $workspaces ]
	center = [ $focused ]
	end = [ $tray $info $upower $clock ]
}

style.css
@import "mocha.css";
*{
	all: unset;
	font-family: "Noto Sans, Symbols Nerd Font";
	font-size: 16px;
	font-weight: bold;
	border-radius: 8px;
}

.background {
    background-color: @base;
}

/*.container, .container * {
    background-color: transparent;
}*/

/*button {
    color: @red;
    box-shadow: transparent;
}*/

#bar {
    border: 2px solid @green;
}

.popup {
    border: 2px solid @sky;
}
/* -- sys_info -- */

.sysinfo {
    color: @text;
}

.sysinfo .item {
    padding-right: 15px;
}


/* -- tray -- */

.tray {
    padding-right: 15px;
}

.workspaces {
    padding-left: 15px;
}

.workspaces .item{
    padding-right: 15px;
    color: @pink;
}

.workspaces .item.focused {
    color: @sky;
}

.upower {
    padding-right: 15px;
    color: @text;
}

.focused {
    color: @white;
}

.clock {
    color: @text;
    padding-right: 15px;
}

.popup-clock .calendar-clock {
    color: @yellow;
    font-size: 32px;
}

.popup-clock .calendar {
    color: @pink;
    border: none;
    padding: 10px;
}

.separator {
    padding-left: 10px;
    color: @white;
}

#power-button {
    padding-left: 15px;
    color: @yellow;
}

Originally created by @sabisho on GitHub (Feb 20, 2024). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/464 **Describe the bug** On startup all my favorite workspaces appear even when I am not at that workspace but once I open any program at any one of my favorite workspace and close it and change the workspace it disappears from my bar. Also I have some issues with system tray. Icons are not visible most of the times but sometimes are visible all of the sudden. **To Reproduce** Steps to reproduce the behavior: https://github.com/JakeStanger/ironbar/assets/110732140/4c5fc841-d12d-4253-9d2c-f6517c059b8f **Expected behavior** My favorite worskpaces should be visible all the time as I understand it. **System information:** - Distro: Arch Linux - Compositor: Hyprland - Ironbar version: 0.15.0-pre **Configuration** > Share your bar configuration and stylesheet as applicable: <details><summary>config.corn</summary> ``` let { $workspaces = { type = "workspaces" favorites = [ "1" "2" "3" "4" "5" ] name_map = { 1 = "一" 2 = "二" 3 = "三" 4 = "四" 5 = "五" 6 = "六" 7 = "七" 8 = "八" 9 = "九" 10 = "十" } } $focused = { type = "focused" show_icon = true show_title = true icon_size = 16 truncate.mode = "end" truncate.max_length = 50 } $separator = { type = "label" label = "󰇘" class = "separator" } $clock = { type = "clock" format = "%a, %H:%M" } $info = { type = "sys_info" interval.cpu = 3 interval.networks = 3 format = [ " {cpu_percent}%" "󰤨 {net_up:wlp1s0}  {net_down:wlp1s0} " ] } $upower = { type = "upower" format = "{percentage}%" } $tray = { type = "tray" } $power_button = { type = "button" lable = "" name = "power-button" on_click = "!pkill rofi || /home/ayush/.config/rofi/scripts/PowerMenu-blurred" } $power_menu = { type = "custom" class = "power-menu" bar = [ $power_button ] } } in { position = "top" height = 18 margin.top = 5 margin.bottom = 0 margin.left = 5 margin.right = 5 icon_theme = "Papirus-Dark" start = [ $workspaces ] center = [ $focused ] end = [ $tray $info $upower $clock ] } ``` </details> <details><summary>style.css</summary> ``` @import "mocha.css"; *{ all: unset; font-family: "Noto Sans, Symbols Nerd Font"; font-size: 16px; font-weight: bold; border-radius: 8px; } .background { background-color: @base; } /*.container, .container * { background-color: transparent; }*/ /*button { color: @red; box-shadow: transparent; }*/ #bar { border: 2px solid @green; } .popup { border: 2px solid @sky; } /* -- sys_info -- */ .sysinfo { color: @text; } .sysinfo .item { padding-right: 15px; } /* -- tray -- */ .tray { padding-right: 15px; } .workspaces { padding-left: 15px; } .workspaces .item{ padding-right: 15px; color: @pink; } .workspaces .item.focused { color: @sky; } .upower { padding-right: 15px; color: @text; } .focused { color: @white; } .clock { color: @text; padding-right: 15px; } .popup-clock .calendar-clock { color: @yellow; font-size: 32px; } .popup-clock .calendar { color: @pink; border: none; padding: 10px; } .separator { padding-left: 10px; color: @white; } #power-button { padding-left: 15px; color: @yellow; } ``` </details>
Author
Owner

@yavko commented on GitHub (Feb 20, 2024):

This is probably a regression with github.com/JakeStanger/ironbar@18e8244580/src/modules/workspaces.rs (L346-L350)
I assume the name ur setting in name map might be screwing something up after looking at the code again, I don't think so anymore

<!-- gh-comment-id:1953650105 --> @yavko commented on GitHub (Feb 20, 2024): This is probably a regression with https://github.com/JakeStanger/ironbar/blob/18e8244580ccffc3eee086becb62800fc6854c61/src/modules/workspaces.rs#L346-L350 ~~I assume the name ur setting in name map might be screwing something up~~ after looking at the code again, I don't think so anymore
Author
Owner

@JakeStanger commented on GitHub (Mar 10, 2024):

Hey, thanks for reporting and apologies for the delay in getting back to you on this one. I've just merged a fix in.

The issue was that favourite workspaces that are already open on bar startup were not correctly tracked as favourites, so would get removed when the workspace closed.

<!-- gh-comment-id:1987239704 --> @JakeStanger commented on GitHub (Mar 10, 2024): Hey, thanks for reporting and apologies for the delay in getting back to you on this one. I've just merged a fix in. The issue was that favourite workspaces that are already open on bar startup were not correctly tracked as favourites, so would get removed when the workspace closed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#1557
No description provided.