Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
5.83k stars 657 forks source link

[bug]: Waybar broken #3265

Closed its-19818942118 closed 1 month ago

its-19818942118 commented 1 month ago

so like i was saying, my waybar broke cuz it doesnt reload automatically so for changes i had to switch layouts. after multiple times. it just couldnt parse style.css correctly anymore.

this was the output:

╭╴ |  izumi at |  ~ =-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-= on zsh  _  
╰─ waybar                                                                                                   󱑂 19:18:18  • 100%  
[2024-05-13 19:18:29.062] [info] Using configuration file /home/izumi/.config/waybar/config.jsonc
[2024-05-13 19:18:29.073] [info] Discovered appearance 'dark'
[2024-05-13 19:18:29.078] [info] Using CSS file /home/izumi/.config/waybar/style.css
[2024-05-13 19:18:29.080] [error] style.css:28:11'margin-' is not a valid property name

my template style.css:

* {
    border: none;
    border-radius: 0px;
    font-family: "Noto Sans, Symbols Nerd Font";
    font-weight: bold;
    font-size: ${s_fontpx}px;
    min-height: 13px;
}

@import "theme.css";

window#waybar {
    background: @bar-bg;
}

tooltip {
    background: @main-bg;
    color: @main-fg;
    border-radius: ${t_radius}px;
    border-width: 0px;
}

#workspaces button {
    box-shadow: none;
    text-shadow: none;
    padding: 0px;
    border-radius: ${w_radius}px;
    margin-${x1}: ${w_margin}px;
    margin-${x2}: ${w_margin}px;
    margin-${x3}: 0px;
    padding-${x3}: ${w_paddin}px;
    padding-${x4}: ${w_paddin}px;
    margin-${x4}: 0px;
    color: @main-fg;
    animation: ws_normal 20s ease-in-out 1;
}

#workspaces button.active {
    background: @wb-act-bg;
    color: @wb-act-fg;
    margin-${x3}: ${w_margin}px;
    padding-${x3}: ${w_padact}px;
    padding-${x4}: ${w_padact}px;
    margin-${x4}: ${w_margin}px;
    animation: ws_active 20s ease-in-out 1;
    transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
}

#workspaces button:hover {
    background: @wb-hvr-bg;
    color: @wb-hvr-fg;
    animation: ws_hover 20s ease-in-out 1;
    transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}

#taskbar button {
    box-shadow: none;
    text-shadow: none;
    padding: 0px;
    border-radius: ${w_radius}px;
    margin-${x1}: ${w_margin}px;
    margin-${x2}: ${w_margin}px;
    margin-${x3}: 0px;
    padding-${x3}: ${w_paddin}px;
    padding-${x4}: ${w_paddin}px;
    margin-${x4}: 0px;
    color: @wb-color;
    animation: tb_normal 20s ease-in-out 1;
}

#taskbar button.active {
    background: @wb-act-bg;
    color: @wb-act-color;
    margin-${x3}: ${w_margin}px;
    padding-${x3}: ${w_padact}px;
    padding-${x4}: ${w_padact}px;
    margin-${x4}: ${w_margin}px;
    animation: tb_active 20s ease-in-out 1;
    transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
}

#taskbar button:hover {
    background: @wb-hvr-bg;
    color: @wb-hvr-color;
    animation: tb_hover 20s ease-in-out 1;
    transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}

#tray menu * {
    min-height: 16px
}

#tray menu separator {
    min-height: 10px
}

${modules_ls}
#custom-l_end,
#custom-r_end,
#custom-sl_end,
#custom-sr_end,
#custom-rl_end,
#custom-rr_end {
    color: @main-fg;
    background: @main-bg;
    opacity: 1;
    margin: ${x1g_margin}px ${x2g_margin}px ${x3g_margin}px ${x4g_margin}px;
    padding-${x1}: ${g_paddin}px;
    padding-${x2}: ${g_paddin}px;
    padding-${x3}: ${g_paddin}px;
    padding-${x4}: ${g_paddin}px;
}

#workspaces,
#taskbar {
    padding: 0px;
}

#custom-r_end {
    border-radius: ${x1rb_radius}px ${x2rb_radius}px ${x3rb_radius}px ${x4rb_radius}px;
    margin-${x4}: ${e_margin}px;
    padding-${x4}: ${e_paddin}px;
}

#custom-l_end {
    border-radius: ${x1lb_radius}px ${x2lb_radius}px ${x3lb_radius}px ${x4lb_radius}px;
    margin-${x3}: ${e_margin}px;
    padding-${x3}: ${e_paddin}px;
}

#custom-sr_end {
    border-radius: 0px;
    margin-${x4}: ${e_margin}px;
    padding-${x4}: ${e_paddin}px;
}

#custom-sl_end {
    border-radius: 0px;
    margin-${x3}: ${e_margin}px;
    padding-${x3}: ${e_paddin}px;
}

#custom-rr_end {
    border-radius: ${x1rc_radius}px ${x2rc_radius}px ${x3rc_radius}px ${x4rc_radius}px;
    margin-${x4}: ${e_margin}px;
    padding-${x4}: ${e_paddin}px;
}

#custom-rl_end {
    border-radius: ${x1lc_radius}px ${x2lc_radius}px ${x3lc_radius}px ${x4lc_radius}px;
    margin-${x3}: ${e_margin}px;
    padding-${x3}: ${e_paddin}px;
}

this is what the file used to get converted to:

* {
    border: none;
    border-radius: 0px;
    font-family: "Noto Sans, Symbols Nerd Font";
    font-weight: bold;
    font-size: 10px;
    min-height: 10px;
}

@import "theme.css";

window#waybar {
    background: @bar-bg;
}

tooltip {
    background: @main-bg;
    color: @main-fg;
    border-radius: 7px;
    border-width: 0px;
}

#workspaces button {
    box-shadow: none;
    text-shadow: none;
    padding: 0px;
    border-radius: 9px;
    margin-top: 3px;
    margin-bottom: 3px;
    margin-left: 0px;
    padding-left: 3px;
    padding-right: 3px;
    margin-right: 0px;
    color: @main-fg;
    animation: ws_normal 20s ease-in-out 1;
}

#workspaces button.active {
    background: @wb-act-bg;
    color: @wb-act-fg;
    margin-left: 3px;
    padding-left: 12px;
    padding-right: 12px;
    margin-right: 3px;
    animation: ws_active 20s ease-in-out 1;
    transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
}

#workspaces button:hover {
    background: @wb-hvr-bg;
    color: @wb-hvr-fg;
    animation: ws_hover 20s ease-in-out 1;
    transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}

#taskbar button {
    box-shadow: none;
    text-shadow: none;
    padding: 0px;
    border-radius: 9px;
    margin-top: 3px;
    margin-bottom: 3px;
    margin-left: 0px;
    padding-left: 3px;
    padding-right: 3px;
    margin-right: 0px;
    color: @wb-color;
    animation: tb_normal 20s ease-in-out 1;
}

#taskbar button.active {
    background: @wb-act-bg;
    color: @wb-act-color;
    margin-left: 3px;
    padding-left: 12px;
    padding-right: 12px;
    margin-right: 3px;
    animation: tb_active 20s ease-in-out 1;
    transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
}

#taskbar button:hover {
    background: @wb-hvr-bg;
    color: @wb-hvr-color;
    animation: tb_hover 20s ease-in-out 1;
    transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}

#tray menu * {
    min-height: 16px
}

#tray menu separator {
    min-height: 10px
}

#backlight,
#battery,
#bluetooth,
#custom-cliphist,
#clock,
#custom-cpuinfo,
#cpu,
#custom-gpuinfo,
#idle_inhibitor,
#custom-keybindhint,
#language,
#memory,
#mpris,
#network,
#custom-notifications,
#custom-power,
#pulseaudio,
#custom-spotify,
#taskbar,
#custom-theme,
#tray,
#custom-updates,
#custom-wallchange,
#custom-wbar,
#window,
#workspaces,
#custom-l_end,
#custom-r_end,
#custom-sl_end,
#custom-sr_end,
#custom-rl_end,
#custom-rr_end {
    color: @main-fg;
    background: @main-bg;
    opacity: 1;
    margin: 4px 0px 4px 0px;
    padding-left: 4px;
    padding-right: 4px;
}

#workspaces,
#taskbar {
    padding: 0px;
}

#custom-r_end {
    border-radius: 0px 21px 21px 0px;
    margin-right: 9px;
    padding-right: 3px;
}

#custom-l_end {
    border-radius: 21px 0px 0px 21px;
    margin-left: 9px;
    padding-left: 3px;
}

#custom-sr_end {
    border-radius: 0px;
    margin-right: 9px;
    padding-right: 3px;
}

#custom-sl_end {
    border-radius: 0px;
    margin-left: 9px;
    padding-left: 3px;
}

#custom-rr_end {
    border-radius: 0px 7px 7px 0px;
    margin-right: 9px;
    padding-right: 3px;
}

#custom-rl_end {
    border-radius: 7px 0px 0px 7px;
    margin-left: 9px;
    padding-left: 3px;
}

Now it outputs this:

* {
    border: none;
    border-radius: 0px;
    font-family: "Noto Sans, Symbols Nerd Font";
    font-weight: bold;
    font-size: 10px;
    min-height: 13px;
}

@import "theme.css";

window#waybar {
    background: @bar-bg;
}

tooltip {
    background: @main-bg;
    color: @main-fg;
    border-radius: 5px;
    border-width: 0px;
}

#workspaces button {
    box-shadow: none;
    text-shadow: none;
    padding: 0px;
    border-radius: 6px;
    margin-: 2px;
    margin-: 2px;
    margin-: 0px;
    padding-: 2px;
    padding-: 2px;
    margin-: 0px;
    color: @main-fg;
    animation: ws_normal 20s ease-in-out 1;
}

#workspaces button.active {
    background: @wb-act-bg;
    color: @wb-act-fg;
    margin-: 2px;
    padding-: 9px;
    padding-: 9px;
    margin-: 2px;
    animation: ws_active 20s ease-in-out 1;
    transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
}

#workspaces button:hover {
    background: @wb-hvr-bg;
    color: @wb-hvr-fg;
    animation: ws_hover 20s ease-in-out 1;
    transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}

#taskbar button {
    box-shadow: none;
    text-shadow: none;
    padding: 0px;
    border-radius: 6px;
    margin-: 2px;
    margin-: 2px;
    margin-: 0px;
    padding-: 2px;
    padding-: 2px;
    margin-: 0px;
    color: @wb-color;
    animation: tb_normal 20s ease-in-out 1;
}

#taskbar button.active {
    background: @wb-act-bg;
    color: @wb-act-color;
    margin-: 2px;
    padding-: 9px;
    padding-: 9px;
    margin-: 2px;
    animation: tb_active 20s ease-in-out 1;
    transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
}

#taskbar button:hover {
    background: @wb-hvr-bg;
    color: @wb-hvr-color;
    animation: tb_hover 20s ease-in-out 1;
    transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}

#tray menu * {
    min-height: 16px
}

#tray menu separator {
    min-height: 10px
}

#backlight,
#battery,
#bluetooth,
#custom-cliphist,
#clock,
#custom-cpuinfo,
#cpu,
#custom-gpuinfo,
#idle_inhibitor,
#custom-keybindhint,
#language,
#memory,
#mpris,
#network,
#custom-notifications,
#custom-power,
#pulseaudio,
#custom-spotify,
#taskbar,
#custom-theme,
#tray,
#custom-updates,
#custom-wallchange,
#custom-wbar,
#window,
#workspaces,
#custom-l_end,
#custom-r_end,
#custom-sl_end,
#custom-sr_end,
#custom-rl_end,
#custom-rr_end {
    color: @main-fg;
    background: @main-bg;
    opacity: 1;
    margin: px px px px;
    padding-: 3px;
    padding-: 3px;
    padding-: 3px;
    padding-: 3px;
}

#workspaces,
#taskbar {
    padding: 0px;
}

#custom-r_end {
    border-radius: px px px px;
    margin-: 6px;
    padding-: 0px;
}

#custom-l_end {
    border-radius: px px px px;
    margin-: 6px;
    padding-: 0px;
}

#custom-sr_end {
    border-radius: 0px;
    margin-: 6px;
    padding-: 0px;
}

#custom-sl_end {
    border-radius: 0px;
    margin-: 6px;
    padding-: 0px;
}

#custom-rr_end {
    border-radius: px px px px;
    margin-: 6px;
    padding-: 0px;
}

#custom-rl_end {
    border-radius: px px px px;
    margin-: 6px;
    padding-: 0px;
}

what do i do now pls help me it keeps removing stuff and says it doesnt recognize it

haug1 commented 1 month ago

Pretty sure this is not related to waybar. AFAIK, waybar does not implement templating on the CSS file.

its-19818942118 commented 1 month ago

ok then so i will be closing it.