Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // =============================================================================
- //
- // Waybar configuration
- //
- // Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
- //
- // =============================================================================
- {
- // -------------------------------------------------------------------------
- // Global configuration
- // -------------------------------------------------------------------------
- "layer": "top",
- // If height property would be not present, it'd be calculated dynamically
- "height": 30,
- "position": "bottom",
- "modules-left": ["sway/workspaces"],
- "modules-center": ["custom/wf-recorder", "sway/mode", "custom/weather"],
- "modules-right": [
- // informational
- "custom/clipboard",
- "cpu",
- "memory",
- "battery",
- // connecting
- "network",
- // media
- "custom/playerctl",
- "idle_inhibitor",
- "pulseaudio",
- "backlight",
- // system
- "custom/pacman",
- "bluetooth",
- "tray",
- "clock"
- ],
- // -------------------------------------------------------------------------
- // Modules
- // -------------------------------------------------------------------------
- "battery": {
- "interval": 30,
- "states": {
- "warning": 30,
- "critical": 15
- },
- "format-charging": " {capacity}%",
- "format": "{icon} {capacity}%",
- "format-icons": ["", "", "", "", "", ""],
- "tooltip": true
- },
- "clock": {
- "interval": 5,
- "format": "Week: {:%V %Y-%m-%d %H:%M:%S}",
- "tooltip": true,
- "tooltip-format": "<big>{:%B %Y}</big>\n<tt>{calendar}</tt>",
- "on-click": "swaymsg exec \\$calendar"
- },
- "cpu": {
- "interval": 5,
- "format": " {usage}%",
- "states": {
- "warning": 70,
- "critical": 90
- },
- "on-click": "swaymsg exec \\$term_float htop"
- },
- "memory": {
- "interval": 5,
- "format": " {}%",
- "states": {
- "warning": 70,
- "critical": 90
- },
- "on-click": "swaymsg exec \\$term_float htop"
- },
- "network": {
- "interval": 5,
- "format-wifi": " ",
- "format-ethernet": "",
- "format-disconnected": "睊",
- "tooltip-format": "{ifname} ({essid}): {ipaddr}",
- "on-click": "swaymsg exec \\$term_float nmtui"
- },
- "sway/mode": {
- "format": "<span style=\"italic\">{}</span>",
- "tooltip": false
- },
- "idle_inhibitor": {
- "format": "idle: {icon}",
- "format-icons": {
- "activated": "零",
- "deactivated": "鈴"
- }
- },
- "backlight": {
- "format": "{icon} {percent}%",
- "format-icons": ["", "", ""],
- "on-scroll-up": "swaymsg exec \\$brightness_up",
- "on-scroll-down": "swaymsg exec \\$brightness_down"
- },
- "pulseaudio": {
- "scroll-step": 5,
- "format": "{icon} {volume}%{format_source}",
- "format-muted": "婢 {format_source}",
- "format-source": "",
- "format-source-muted": " ",
- "format-icons": {
- "headphone": "",
- "headset": "",
- "default": ["奄", "奔", "墳"]
- },
- "tooltip-format": "{icon} {volume}% {format_source}",
- "on-click": "swaymsg exec \\$pulseaudio",
- "on-scroll-up": "swaymsg exec \\$volume_up",
- "on-scroll-down": "swaymsg exec \\$volume_down"
- },
- "temperature": {
- "critical-threshold": 90,
- "interval": 5,
- "format": "{icon} {temperatureC}°C",
- "format-icons": ["", "", ""],
- "tooltip": false,
- "on-click": "swaymsg exec \"\\$term_float watch sensors\""
- },
- "tray": {
- "icon-size": 21,
- "spacing": 5
- },
- "custom/pacman": {
- "format": " {}",
- "interval": 3600,
- "exec-if": "[ $(pamac checkupdates -q | wc -l) -gt 0 ]",
- "exec": "pamac checkupdates -q | wc -l",
- "on-click": "pamac-manager --updates; pkill -RTMIN+4 waybar",
- "signal": 4
- },
- "bluetooth": {
- "format": "",
- "format-disabled": "",
- "on-click": "blueberry",
- "on-click-right": "rfkill toggle bluetooth",
- "tooltip-format": "{}"
- },
- "custom/playerctl": {
- "interval": "once",
- "tooltip": true,
- "return-type": "json",
- "format": "{icon}",
- "format-icons": {
- "Playing": "",
- "Paused": "奈"
- },
- "exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"tooltip\": \"{{playerName}}: {{markup_escape(title)}} - {{markup_escape(artist)}}\" }'",
- "on-click": "playerctl play-pause; pkill -RTMIN+5 waybar",
- "on-click-right": "playerctl next; pkill -RTMIN+5 waybar",
- "on-scroll-up": "playerctl position 10+; pkill -RTMIN+5 waybar",
- "on-scroll-down": "playerctl position 10-; pkill -RTMIN+5 waybar",
- "signal": 5
- },
- "custom/clipboard": {
- "format": "",
- "interval": "once",
- "return-type": "json",
- "on-click": "swaymsg -q exec '$clipboard'; pkill -RTMIN+9 waybar",
- "on-click-right": "swaymsg -q exec '$clipboard-del'; pkill -RTMIN+9 waybar",
- "on-click-middle": "rm -f ~/.cache/cliphist/db; pkill -RTMIN+9 waybar",
- "exec": "printf '{\"tooltip\":\"%s\"}' $(cliphist list | wc -l)' item(s) in the clipboard\r(Mid click to clear)'",
- "exec-if": "[ -x \"$(command -v cliphist)\" ] && [ $(cliphist list | wc -l) -gt 0 ]",
- "signal": 9
- },
- "custom/wf-recorder": {
- "format": "",
- "return-type": "json",
- "interval": 1,
- "exec": "echo '{\"class\": \"recording\"}'",
- "exec-if": "pgrep wf-recorder",
- "on-click": "pkill wf-recorder"
- },
- "custom/playerctl": {
- "interval": "once",
- "tooltip": true,
- "return-type": "json",
- "format": "{icon}",
- "format-icons": {
- "Playing": "",
- "Paused": "奈"
- },
- "exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"tooltip\": \"{{playerName}}: {{markup_escape(title)}} - {{markup_escape(artist)}}\" }'",
- "on-click": "playerctl play-pause; pkill -RTMIN+5 waybar",
- "on-click-right": "playerctl next; pkill -RTMIN+5 waybar",
- "on-scroll-up": "playerctl position 10+; pkill -RTMIN+5 waybar",
- "on-scroll-down": "playerctl position 10-; pkill -RTMIN+5 waybar",
- "signal": 5
- },
- "custom/clipboard": {
- "format": "",
- "interval": "once",
- "return-type": "json",
- "on-click": "swaymsg -q exec '$clipboard'; pkill -RTMIN+9 waybar",
- "on-click-right": "swaymsg -q exec '$clipboard-del'; pkill -RTMIN+9 waybar",
- "on-click-middle": "rm -f ~/.cache/cliphist/db; pkill -RTMIN+9 waybar",
- "exec": "printf '{\"tooltip\":\"%s\"}' $(cliphist list | wc -l)' item(s) in the clipboard\r(Mid click to clear)'",
- "exec-if": "[ -x \"$(command -v cliphist)\" ] && [ $(cliphist list | wc -l) -gt 0 ]",
- "signal": 9
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment