From 305bef81fa9c74fa5cf2e7708b8ccf97401656fe Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Wed, 22 Feb 2023 03:29:03 -0800 Subject: [PATCH] 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. --- .config/sway/config | 40 +++++++++++++------------ .config/waybar/config | 64 ++++++++++++++++++++++++++++++++++++++++ .config/waybar/style.css | 61 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 19 deletions(-) create mode 100644 .config/waybar/config create mode 100644 .config/waybar/style.css diff --git a/.config/sway/config b/.config/sway/config index 9824db6..ef83adc 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -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 diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..0a13be5 --- /dev/null +++ b/.config/waybar/config @@ -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": "{:%Y %B}\n{calendar}", + "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 + } +} + diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..bf7782d --- /dev/null +++ b/.config/waybar/style.css @@ -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; +}