{
    "layer": "top",
    "position": "top",
    "modules-left": [
        "sway/workspaces",
        "sway/mode",
        // "custom/autolayout",
        //"custom/bluetooth",
        "custom/right-arrow-dark"
    ],
    "modules-center": [
        "custom/left-arrow-dark",
        "clock#1",
        "custom/left-arrow-light",
        "custom/left-arrow-dark",
        "clock#2",
        "custom/right-arrow-dark",
        "custom/right-arrow-light",
        "clock#3",
        "custom/right-arrow-dark"
    ],
    "modules-right": [
        "custom/left-arrow-dark",
        "pulseaudio",
        "custom/mpd",
        // "custom/mail",
        "battery",
        "custom/screencast",
        // "custom/pacman",
        "tray",
        "custom/layout"
    ],

    "custom/left-arrow-dark": {
        "format": ""
    },
    "custom/left-arrow-light": {
        "format": ""
    },
    "custom/right-arrow-dark": {
        "format": ""
    },
    "custom/right-arrow-light": {
        "format": ""
    },
    "sway/workspaces": {
        "disable-scroll": true,
        "format": "{name}"
    },
    "clock#1": {
        "format": "{:%a}"
    },
    "clock#2": {
        "format": "{:%H:%M}"
    },
    "clock#3": {
        "format": "{:%m-%d}"
    },
    "custom/autolayout": {
        "format": "{}",
        "exec": "~/.config/sway/scripts/auto_layout.py",
        "interval": 1
    },
    "backlight": {
        "device": "intel_backlight",
        "format": "{percent}% {icon}",
        "format-icons": ["", ""]
    },
    "custom/bluetooth": {
        "format": "{}",
        "exec": "~/.config/sway/blocks/bluetooth.sh",
        "interval": 300
    },
    "custom/volume": {
        "format": "{icon}  {}",
        "format-bluetooth": "{icon}  {} ",
        "format-muted": "",
        "format-icons": {
            "default": [
                "",
                ""
            ]
        },
        "command": "/usr/lib/i3blocks/volume",
        "scroll-step": 5,
        "on-click": "pavucontrol"
    },
    "custom/mpd": {
        "format": "{}",
        "exec": "~/.config/sway/blocks/current_play.sh",
        "interval": 1,
        "on-click": "playerctl play-pause",
        "on-click-right": "playerctl next",
        // "on-scroll-up": "playerctl ",
        // "on-scroll-down": "~/.config/sway/blocks/current_play.sh 2",
        "tooltip": false
    },
    "mpd": {
	    "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon} <span color=\"#d33682\">{artist} - {title}</span>",
	    "format-disconnected": "[Disconnected]",
	    "format-stopped": "[{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped]",
	    "interval": 2,
	    "consume-icons": {
		    "on": " " // Icon shows only when "consume" is on
	    },
	    "random-icons": {
		    "off": " ",
		    "on": "<span color=\"#f53c3c\"></span> " // Icon grayed out when "random" is off
	    },
	    "repeat-icons": {
		    "on": " "
	    },
	    "single-icons": {
		    "on": "1 "
	    },
	    "state-icons": {
		    "paused": "",
		    "playing": "<span color=\"#2aa198\"></span>"
	    },
	    "tooltip-format": "MPD (connected)",
	    "tooltip-format-disconnected": "MPD (disconnected)",
        "on-scroll-down": "mpc next",
        "on-scroll-up": "mpc prev"
    },
    "custom/mail": {
        "format": "{icon}  {}",
        "format-icons": {
            "default": [
                ""
            ]
        },
        "exec": "~/.config/sway/blocks/mail.sh",
        "interval": 30
    },
    "custom/pacman": {
        "format": "{icon}  {}",
        "format-icons": {
            "default": [
                ""
            ]
        },
        "exec": "~/.config/sway/blocks/arch-update.py -b '#268bd2' -u '#d33682' -w '^linux.*' '^pacman.*'",
        "interval": 360
    },
    "custom/layout": {
        "format": "{icon} {}",
        "format-icons": {
            "default": [
                ""
            ]
        },
        "exec": "~/.local/bin/key-layout"
        // "interval": 1
    },
    "custom/screencast": {
        "exec": "~/.config/sway/blocks/screencast.sh",
        "format": "{}",
        "interval": 1
    },
    "pulseaudio": {
        "format": "{icon} {volume}%",
        "interval": 5,
        "format-icons": {
            "default": [
                "",
                ""
            ]
        },
        "tooltip": false,
        "scroll-step": 5,
        "on-click": "pavucontrol"
    },
    "memory": {
        "interval": 5,
        "format": "Mem {}%"
    },
    "cpu": {
        "interval": 5,
        "format": "CPU {usage:2}%"
    },
    "battery": {
        "states": {
            "good": 95,
            "warning": 30,
            "critical": 15
        },
        "format": "{icon} {capacity}%",
        "format-icons": [
            "",
            "",
            "",
            "",
            ""
        ],
        "interval": 60
    },
    "tray": {
        "icon-size": 20
    }
}
