Add waybar configs

I apparently forgot to do this ever. I've been using this for about two
months now.

I just reused the modules I built for my swaybar, which already output
close to the proper format; now I just call the modules directly with `if
__name__` hooks to output Waybar format instead of Swaybar format.
This commit is contained in:
Trysdyn Black 2023-02-22 03:29:03 -08:00
parent ec44c4d29b
commit 305bef81fa
3 changed files with 146 additions and 19 deletions
.config

View file

@ -33,26 +33,28 @@ client.background $base07
set $mod Mod4
# status bar declarations
bar {
output "Ancor Communications Inc VE247 G6LMQS117385"
status_command "~/bin/statusbar"
position bottom
bar swaybar_command waybar
font monospace 11
colors {
background $base00
separator $base01
statusline $base04
# State Border BG Text
focused_workspace $base00 $base02 $base05
active_workspace $base05 $base03 $base00
inactive_workspace $base03 $base01 $base05
urgent_workspace $base08 $base08 $base00
binding_mode $base00 $base0A $base00
}
}
#bar {
# output "Ancor Communications Inc VE247 G6LMQS117385"
# status_command "~/bin/statusbar"
# position bottom
#
# font monospace 11
#
# colors {
# background $base00
# separator $base01
# statusline $base04
#
# # State Border BG Text
# focused_workspace $base00 $base02 $base05
# active_workspace $base05 $base03 $base00
# inactive_workspace $base03 $base01 $base05
# urgent_workspace $base08 $base08 $base00
# binding_mode $base00 $base0A $base00
# }
#}
# start a terminal
bindsym $mod+Return exec x-terminal-emulator

64
.config/waybar/config Normal file
View file

@ -0,0 +1,64 @@
{
"layer": "top",
"position": "bottom",
"spacing": 8,
"height": 22,
"output": "HDMI-A-2",
"fixed-center": false,
"modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"],
"modules-center": [],
"modules-right": ["custom/timer", "custom/nagios", "custom/task", "custom/weather", "custom/aqi", "memory", "cpu", "clock", "tray"],
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
"tray": {
"spacing": 4
},
"clock": {
"interval": 5,
"format": "{:%a %b %d %H:%M:%S}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": " {usage:02d}%",
"tooltip": true
},
"memory": {
"format": " {}%",
"states": {
"warning": 75,
"critical": 85
}
},
"custom/aqi": {
"exec": "$HOME/workspace/foxstatus/modules/airnow.py",
"max-length": 20,
"interval": 600
},
"custom/weather": {
"exec": "$HOME/workspace/foxstatus/modules/weather.py",
"max-length": 20,
"interval": 600
},
"custom/task": {
"exec": "$HOME/workspace/foxstatus/modules/taskwarrior.py",
"max-length": 20,
"interval": 300
},
"custom/nagios": {
"exec": "$HOME/workspace/foxstatus/modules/nagios.py",
"max-length": 20,
"interval": 600
},
"custom/timer": {
"exec": "$HOME/workspace/foxstatus/modules/timer.py",
"max-length": 20,
"interval": 60
}
}

61
.config/waybar/style.css Normal file
View file

@ -0,0 +1,61 @@
* {
font-family: monospace;
font-size: 14px;
min-height: 0;
}
window#waybar {
background-color: #000;
color: #f0f0f0;
}
window#waybar.hidden {
opacity: 0.2;
}
widget {
background-color: #111;
}
widget label {
padding: 0 5px;
}
#workspaces button {
background-color: transparent;
color: #f0f0f0;
padding: 0;
border: 1px solid #666;
border-radius: 0px;
}
#workspaces button.focused {
background-color: #311647;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#window {
background-color: #000;
}
.warning {
background-color: #ff0;
color: #000;
}
.critical {
background-color: #f00;
color: #000;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}