# Yaml is white-space sensitive (use 2 spaces to indent). ### # Define a new window with an id of 'bar'. This window can then be opened # via the Zebar cli by running 'zebar open bar --args '. # # Docs regarding window: https://some-future-docs-link.com window/bar: providers: ['self'] # Width of the window in physical pixels. width: '{{ self.args.MONITOR_WIDTH }}' # Height of the window in physical pixels. height: '32' # X-position of the window in physical pixels. position_x: '{{ self.args.MONITOR_X }}' # Y-position of the window in physical pixels. position_y: '{{ self.args.MONITOR_Y }}' # Whether to show the window above/below all others. # Allowed values: 'always_on_top', 'always_on_bottom', 'normal'. z_order: 'always_on_top' # Whether the window should be shown in the taskbar. shown_in_taskbar: false # Whether the window should have resize handles. resizable: false # Styles to apply globally within the window. For example, we can use # this to import the Nerdfonts icon font. Ref https://www.nerdfonts.com/cheat-sheet # for a cheatsheet of available Nerdfonts icons. global_styles: | @import "https://www.nerdfonts.com/assets/css/webfont.css"; # CSS styles to apply to the root element within the window. Using CSS # nesting, we can also target nested elements (e.g. below we set the # color and margin-right of icons). styles: | display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; height: 100%; color: rgb(255 255 255 / 90%); # font-family: ui-monospace, monospace; font-family: "VictorMono Nerd Font"; font-weight: 800; font-size: 0.85rem; padding: 4px 24px; border-bottom: 1px solid rgb(255 255 255 / 5%);; background: linear-gradient(rgb(0 0 0 / 90%), rgb(5 2 20 / 85%)); i { color: rgb(115 130 175 / 95%); margin-right: 7px; } group/left: styles: | display: flex; align-items: center; template/logo: styles: | margin-right: 20px; template: | template/glazewm_workspaces: styles: | display: flex; align-items: center; .workspace { background: rgb(255 255 255 / 5%); margin-right: 4px; padding: 4px 8px; color: rgb(255 255 255 / 90%); border: none; border-radius: 2px; cursor: pointer; &.displayed { background: rgb(255 255 255 / 15%); } &.focused, &:hover { background: rgb(75 115 255 / 50%); } } providers: ['glazewm'] events: - type: 'click' fn_path: 'script.js#focusWorkspace' selector: '.workspace' template: | @for (workspace of glazewm.currentWorkspaces) { } group/center: styles: | justify-self: center; template/clock: providers: ['date'] # Available date tokens: https://moment.github.io/luxon/#/formatting?id=table-of-tokens template: | {{ date.toFormat(date.now, 'EEE d MMM t:ss') }} group/right: styles: | justify-self: end; display: flex; .template { margin-left: 20px; } template/glazewm_other: providers: ['glazewm'] styles: | .binding-mode, .tiling-direction { background: rgb(255 255 255 / 15%); color: rgb(255 255 255 / 90%); border-radius: 2px; padding: 4px 6px; margin: 0; } template: | @for (bindingMode of glazewm.bindingModes) { {{ bindingMode.displayName ?? bindingMode.name }} } @if (glazewm.tilingDirection === 'horizontal') { } @else { } template/network: providers: ['network'] template: | @if (network.defaultInterface?.type === 'ethernet') { } @else if (network.defaultInterface?.type === 'wifi') { @if (network.defaultGateway?.signalStrength >= 80) {} @else if (network.defaultGateway?.signalStrength >= 65) {} @else if (network.defaultGateway?.signalStrength >= 40) {} @else if (network.defaultGateway?.signalStrength >= 25) {} @else {} {{ network.defaultGateway?.ssid }} } @else { } # template/ip: # providers: ['ip'] # template: | # # {{address}} template/memory: providers: ['memory'] template: | {{ Math.round(memory.usage) }}% template/cpu: providers: ['cpu'] styles: | .high-usage { color: #900029; } template: | @if (cpu.usage > 85) { {{ Math.round(cpu.usage) }}% } @else { {{ Math.round(cpu.usage) }}% } template/battery: providers: ['battery'] styles: | position: relative; color: #13a243; font-weight: 600; .charging-icon { color: #13a243; font-weight: 600; position: absolute; font-size: 0.8rem; left: 7px; top: 2px; } template: | @if (battery.isCharging) {} @if (battery.chargePercent > 90) {} @else if (battery.chargePercent > 70) {} @else if (battery.chargePercent > 40) {} @else if (battery.chargePercent > 20) {} @else {} {{ Math.round(battery.chargePercent) }}% template/weather: providers: ['weather'] template: | @switch (weather.status) { @case ('clear_day') {} @case ('clear_night') {} @case ('cloudy_day') {} @case ('cloudy_night') {} @case ('light_rain_day') {} @case ('light_rain_night') {} @case ('heavy_rain_day') {} @case ('heavy_rain_night') {} @case ('snow_day') {} @case ('snow_night') {} @case ('thunder_day') {} @case ('thunder_night') {} } {{ weather.celsiusTemp }}°