###############################################################################
# WM Bar
###############################################################################

# Toggle bar visibility
## Modify // Toggle Bar // <> i ##
set_from_resource $wm.binding.bar_toggle wm.binding.bar_toggle i
bindsym $mod+$wm.binding.bar_toggle bar mode toggle

set_from_resource $wm.bar.position wm.bar.position bottom
set_from_resource $wm.bar.font wm.bar.font monospace
set_from_resource $wm.bar.separatorchar wm.bar.separatorchar " "
set_from_resource $wm.bar.trayoutput wm.bar.trayoutput primary
set_from_resource $wm.bar.stripworkspacenumbers wm.bar.stripworkspacenumbers yes
set_from_resource $wm.bar.mode wm.bar.mode dock
set_from_resource $wm.bar.workspace_min_width wm.bar.workspace_min_width 36

# i3xrocks config file. Override this for a custom status bar generator.
set_from_resource $wm.bar.status_command wm.bar.status_command i3xrocks -u ~/.config/regolith3/i3xrocks/conf.d -d /usr/share/i3xrocks/conf.d

# The bar configuration
bar {
  position $wm.bar.position
  mode $wm.bar.mode
  font pango:$wm.bar.font
  separator_symbol $wm.bar.separatorchar
  status_command $wm.bar.status_command
  tray_output $wm.bar.trayoutput
  strip_workspace_numbers $wm.bar.stripworkspacenumbers
  workspace_min_width $wm.bar.workspace_min_width

  colors {
      background $wm.bar.background.color
      statusline $wm.bar.statusline.color
      separator  $wm.bar.separator.color

#                        BORDER  BACKGROUND TEXT
      focused_workspace  $wm.bar.workspace.focused.border.color      $wm.bar.workspace.focused.background.color   $wm.bar.workspace.focused.text.color
      active_workspace   $wm.bar.workspace.active.border.color       $wm.bar.workspace.active.background.color    $wm.bar.workspace.active.text.color
      inactive_workspace $wm.bar.workspace.inactive.border.color     $wm.bar.workspace.inactive.background.color  $wm.bar.workspace.inactive.text.color
      urgent_workspace   $wm.bar.workspace.urgent.border.color       $wm.bar.workspace.urgent.background.color    $wm.bar.workspace.urgent.text.color
  }
}
