ironbar
ironbar copied to clipboard
CSS hot reload misbehaves with tray module
Describe the bug When changing the css of a tray, the hot reload doesn't exactly work right and requires restart of an ironbar for the correct css style.
To Reproduce Steps to reproduce the behavior:
- Launch ironbar
- Change tray css, e.g: background-color
- See that background-color is misplaced
- See error
Expected behavior Background color is set properly
System information:
- Distro: Arch Linux
- Compositor: Hyprland
- Ironbar version: 0.14.1-pre
Configuration
Config
{
"monitors": {
"eDP-1": {
"position": "bottom",
"height": 30,
"start" : [
{
"type" : "sys_info",
"format" : [
"CPU: {cpu_percent}%",
"{disk_used:/} / {disk_total:/} GB ({disk_percent:/}%)",
"Uptime: {uptime}"
]
}
],
"center": [
{
"type" : "workspaces"
}
],
"end": [
{
"type" : "tray"
},
{
"type": "upower",
"format": "{percentage}%"
},
{
"type": "clock",
"format": "%d %b %H:%M:%S",
"format_popup": "%d.%m.%Y"
}
]
}
}
}
Styles
@define-color color_bg #41623d;
@define-color color_bg_dark #1c1c1c;
@define-color color_border #83A596;
@define-color color_border_active #83A596;
@define-color color_text #ffffff;
@define-color color_urgent #8f0a0a;
/* -- base styles -- */
* {
font-family: Noto Sans Nerd Font, sans-serif;
font-size: 14px;
border: none;
border-radius: 0;
font-weight: normal;
}
box, menubar, button {
background-color: @color_bg;
background-image: none;
box-shadow: none;
}
button, label {
color: @color_text;
}
button:hover {
background-color: @color_bg_dark;
}
scale trough {
min-width: 1px;
min-height: 2px;
}
#bar {
border-top: 1px solid @color_border;
background-color: rgba(65, 98, 61, 0.3);
background-image: none;
}
.popup {
border: 1px solid @color_border;
padding: 1em;
}
window {
background-color: rgba(65, 98, 61, 0.2);
}
/* -- clipboard -- */
.clipboard {
margin-left: 5px;
font-size: 1.1em;
}
.popup-clipboard .item {
padding-bottom: 0.3em;
border-bottom: 1px solid @color_border;
}
/* -- clock -- */
.clock {
font-weight: bold;
margin-left: 5px;
}
.popup-clock .calendar-clock {
color: @color_text;
font-size: 2.5em;
padding-bottom: 0.1em;
}
.popup-clock .calendar {
background-color: @color_bg;
color: @color_text;
}
.popup-clock .calendar .header {
padding-top: 1em;
border-top: 1px solid @color_border;
font-size: 1.5em;
}
.popup-clock .calendar:selected {
background-color: @color_border_active;
}
/* -- launcher -- */
.launcher .item {
margin-right: 4px;
}
.launcher .ifix examtem:not(.focused):hover {
background-color: @color_bg_dark;
}
.launcher .open {
border-bottom: 1px solid @color_text;
}
.launcher .focused {
border-bottom: 1px solid @color_border_active;
}
.launcher .urgent {
border-bottom-color: @color_urgent;
}
.popup-launcher {
padding: 0;
}
.popup-launcher .popup-item:not(:first-child) {
border-top: 1px solid @color_border;
}
/* -- music -- */
.music:hover * {
background-color: @color_bg_dark;
}
.popup-music .album-art {
margin-right: 1em;
}
.popup-music .icon-box {
margin-right: 0.4em;
}
.popup-music .title .icon, .popup-music .title .label {
font-size: 1.7em;
}
.popup-music .controls *:disabled {
color: @color_border;
}
.popup-music .volume .slider slider {
border-radius: 100%;
}
.popup-music .volume .icon {
margin-left: 4px;
}
.popup-music .progress .slider slider {
border-radius: 100%;
}
/* -- script -- */
.script {
padding-left: 10px;
}
/* -- sys_info -- */
.sysinfo {
margin-left: 10px;
margin-right: 15px;
}
.sysinfo .item {
margin-left: 5px;
}
/* -- tray -- */
.tray {
margin-left: 10px;
background-color: black;
}
/* -- workspaces -- */
.workspaces .item {
padding-left: 2px;
padding-right: 2px;
}
.workspaces .item.focused {
box-shadow: inset 0 +3px;
background-color: @color_bg_dark;
}
.workspaces .item:hover {
box-shadow: inset 0 +3px;
}
/* upower */
.upower {
margin-left: 5px;
}
/* -- custom: power menu -- */
.popup-power-menu #header {
font-size: 1.4em;
padding-bottom: 0.4em;
margin-bottom: 0.6em;
border-bottom: 1px solid @color_border;
}
.popup-power-menu .power-btn {
border: 1px solid @color_border;
padding: 0.6em 1em;
}
.popup-power-menu #buttons > *:nth-child(1) .power-btn {
margin-right: 1em;
}
Additional context
Screenshots
Reloading ironbar seems to fix the issue