From 0ea7c9210869e3cbfcd3ac2aca8cbb4e18a8f832 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Wed, 11 Feb 2026 05:44:52 +0300 Subject: add wm --- dot_config/waybar/config | 210 ++++++++++++++++++++++++++++++++++++++++++++ dot_config/waybar/style.css | 140 +++++++++++++++++++++++++++++ 2 files changed, 350 insertions(+) create mode 100644 dot_config/waybar/config create mode 100644 dot_config/waybar/style.css (limited to 'dot_config/waybar') diff --git a/dot_config/waybar/config b/dot_config/waybar/config new file mode 100644 index 0000000..a1c11d5 --- /dev/null +++ b/dot_config/waybar/config @@ -0,0 +1,210 @@ +[ + { + "position": "top", + "name": "main", + "layer": "top", + + "modules-left": [ + "temperature", + "cpu", + "memory", + "disk#root", + "battery", + "sway/workspaces" + ], + "modules-center": [ + "sway/window" + ], + "modules-right": [ + "tray", + "custom/recorder", + "custom/inbox", + "custom/sunset", + "custom/vpn", + // "custom/notification", + "idle_inhibitor", + "pulseaudio#source", + "pulseaudio#sink", + "sway/language", + "network", + "clock" + ], + + "temperature": { + "format": "🌡{temperatureC}°C" + }, + + "cpu": { + "interval": 2, + "format": "\uf2db {usage:2}%" + }, + + "memory": { + "interval": 30, + "format": "\uf1c0 {percentage:2}%" + }, + + "disk#root": { + "interval": 30, + "format": "\uf0c7 {percentage_used:2}%", + "path": "/" + }, + + "network": { + "format-ethernet": "🔌", + "format-wifi": "📡", + "format-disconnected": "🚫", + "format-disabled": "⚠", + "on-click": "iwgtk" + }, + + "sway/workspaces": { + "disable-scroll": true, + "format": "{icon}", + "format-icons": { + "default": "", + "focused": "", + "urgent": "" + } + }, + + "sway/window": {}, + + "tray": {}, + + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "\uf06e", + "deactivated": "\uf070" + }, + "tooltip-format-activated": "Idle inhibitor {status}. It prevents automatic screen locking and hibernation.", + "tooltip-format-deactivated": "Idle inhibitor {status}." + }, + + "sway/language": { + "format": "{flag}" + }, + + "pulseaudio#source": { + "format": "{format_source}", + "format-source": "\uf130", + "format-source-muted": "\uf131", + "tooltip-format": "{source_desc} is on {source_volume}%", + "on-click": "pavucontrol --tab=4", + "on-click-middle": "pactl set-source-mute @DEFAULT_SOURCE@ toggle", + "scroll-step": 0 + }, + + "pulseaudio#sink": { + "format": "{icon}", + "format-muted": "🔇", + "format-bluetooth": "{icon} \uf294", + "tooltip-format": "{desc} is on {volume}%", + "format-icons": { + "default": [ + "🔈", + "🔉", + "🔊", + "📢" + ] + }, + "on-click": "pavucontrol --tab=3", + "on-click-middle": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "scroll-step": 5 + }, + + "battery": { + "format": "{icon} {capacity}%", + "format-charging": "{icon} {capacity}⚡", + "tooltip-format": "Current capacity: {capacity}%\n\n{timeTo}", + "states": { + "empty": 10, + "low": 20, + "half-low": 40, + "half": 60, + "high": 90, + "full": 100 + }, + "format-icons": { + "empty": "\uf244", + "low": "\uf243", + "half-low": "\uf243", + "half": "\uf242", + "high": "\uf241", + "full": "\uf240" + } + }, + + "clock": { + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": "{:%Y-%m-%d %H:%M}", + "on-click": "emacsclient --eval \"(world-clock)\"", + "on-click-right": "emacsclient --eval \"(calendar)\"", + "interval": 60 + }, + + "custom/recorder": { + "format": "{}", + "return-type": "json", + "exec-on-event": true, + "interval": "once", + "signal": 8, + "exec": "waybar-screen-recorder", + "on-click": "toggle-screen-capture" + }, + + "custom/inbox": { + "format": "{} 📥", + "interval": 60, + "exec": "notmuch count tag:inbox", + "on-click": "sync-mail" + }, + + "custom/sunset": { + "format": "{icon}", + "format-icons": { + "off": "🌞", + "on": "🌛" + }, + "return-type": "json", + "interval": "once", + "signal": 10, + "exec": "waybar-sunset", + "on-click": "waybar-sunset toggle", + "on-click-right": "waybar-sunset rotate", + "exec-if": "waybar-sunset check" + }, + + "custom/vpn": { + "format": "{}", + "return-type": "json", + "exec-on-event": true, + "interval": "once", + "signal": 9, + "exec": "waybar-vpn", + "on-click": "toggle-vpn" + }, + + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "none": "🔔", + "notification": "🔔", + "inhibited-none": "🔔", + "inhibited-notification": "🔔", + "dnd-none": "🔕", + "dnd-notification": "🔕", + "dnd-inhibited-none": "🔕", + "dnd-inhibited-notification": "🔕" + }, + "return-type": "json", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "on-click-middle": "swaync-client -C -sw", + "escape": true + } + } +] diff --git a/dot_config/waybar/style.css b/dot_config/waybar/style.css new file mode 100644 index 0000000..fc35942 --- /dev/null +++ b/dot_config/waybar/style.css @@ -0,0 +1,140 @@ +@define-color base00 #181818; +@define-color base01 #282828; +@define-color base02 #383838; +@define-color base03 #585858; +@define-color base04 #b8b8b8; +@define-color base05 #d8d8d8; +@define-color base06 #e8e8e8; +@define-color base07 #f8f8f8; +@define-color base08 #ab4642; +@define-color base09 #dc9656; +@define-color base0A #f7ca88; +@define-color base0B #a1b56c; +@define-color base0C #86c1b9; +@define-color base0D #7cafc2; +@define-color base0E #ba8baf; +@define-color base0F #a16946; + +* { + font-family: Aporetic Serif Mono, Noto Emoji, Symbols Nerd Font Mono; + transition: none; + box-shadow: none; + text-shadow: none; + min-height: 0; +} + +tooltip { + border: solid @base02; + background: @base01; + opacity: 0.9; +} + +tooltip label { + color: @base05; + padding: 0; +} + +#waybar { + color: @base04; + background: @base01; +} + +.modules-right label, +.modules-right image { + margin: 0.4em 0.2em; + padding: 0 0.4em; + background: @base02; + border-radius: 0.2em; +} + +.modules-left { + margin-left: 0.2em; +} + +.modules-right { + margin-right: 0.2em; +} + +#custom-recorder { + color: @base08; +} + +#custom-notification.notification, +#custom-notification.dnd-notification, +#custom-notification.dnd-inhibited-notification { + color: @base07; + background: @base02; +} + +#temperature, +#cpu, +#memory, +#disk, +#battery { + margin: 0.4em 0.2em; + padding: 0 0.4em; + background: @base02; + border-radius: 0.2em; +} + +#workspaces button { + background: none; + border-radius: 0.2em; + margin: 0.4em 0.2em; + padding: 0.2em 0.2em; + color: @base05; +} + +#workspaces button:hover { + background: none; + border-color: @base07; +} + +#workspaces button.focused { + background: none; + color: @base07; +} + +#workspaces button.urgent { + color: @base08; +} + +#window { + margin-left: 1em; + margin-right: 1em; +} + +#tray menu { + color: @base05; + background: @base01; + border: solid 1px; + border-color: @base02; +} + +#tray menu menuitem { + padding-top: 0px; + padding-bottom: 0px; + margin-top: 0.1em; + margin-bottom: 0em; +} + +#tray menu menuitem:hover { + background: none; +} + +#tray menu separator { + background: @base03; + padding-top: 1px; + margin-top: 0.2em; + margin-bottom: 0.2em; +} + +#battery.discharging.empty { + color: @base02; + background: @base08; +} + +#battery.discharging.low { + color: @base02; + background: @base09; +} -- cgit v1.3