{
  "layer": "top",
  "position": "top",

  "modules-left": [
    "niri/workspaces",
    "niri/window",
    "mpris",
  ],

  "modules-center": [
    "clock"
  ],

  "modules-right": [
    "niri/language",
    "backlight",
    "pulseaudio",
    "disk",
    "network",
    "tray",
    "custom/notification",
    "memory",
    "cpu",
    "battery",
    "custom/exit"
  ],
  "niri/workspaces": {
    "format": "{value}",
    "current-only": true,
    "hide-empty": true
  },

  "backlight": {
    "device": "intel_backlight",
    "format": "{percent}% {icon}",
    "format-icons": ["󰃚", "󰃛", "󰃜", "󰃝", "󰃞", "󰃟", "󰃠"]
  },

  "clock": {
    "format": "{:%a %m/%d/%y 󰃭 | %I:%M:%S %p}  ",
    "interval": 1,
    "tooltip": false,
    "actions":  {
      "on-click-right": "mode",
      "on-click": "gnome-calendar"
    }
  },

  "niri/window": {
	  "format": "{title} - {app_id}",
    "separate-outputs": false,
    "rewrite": {
      "(?!.*(brave-browser|codium|vesktop|kitty)).*[Oo]pen.*": " opn",
      "(?!.*(brave-browser|codium|vesktop|kitty)).*[cC]hoose.*": " opn",
      "(.*) - Twitch - Brave - brave-browser": " $1",
      "(.*) - YouTube - Brave - brave-browser": " $1",
      "(?!.* - (Twitch|YouTube) - Brave)(.*) - Brave - brave-browser": " $2",
      "(.*) - (.*) - VSCodium - codium": " $2/$1",
      "(.*) - VSCodium - codium": " $1",
      "VSCodium - codium": " Empty",
      "[• ]*Discord - vesktop": "",
      "[• ]*Discord . ([^@#].*) - vesktop": " $1",
      "[• ]*Discord . @(.*) - vesktop": " DM/$1",
      "[• ]*Discord . #(.*) . (.*) - vesktop": " $2/$1",
      "Steam - steam": "󰓓 stm",
      "(?!Steam)(.*) - steam": "󰓓 $1",
      "Lumafly - Lumafly": "󰠭 lmfl",
      "(.*) - hollow_knight.x86_64": "󰠭󰷟 hk",
      "(.*) - Hollow Knight Silksong": "󰠭󰎑 sk",
      "Bluetooth Devices - .blueman-manager-wrapped": "󰂯 blth",
      "Volume Control - org.pulseaudio.pavucontrol": " vlm",
      "(.*) - kitty": " [$1]",
      "Signal - signal": "󰭹 sign",
      "(.*) - org.gnome.Nautilus": " $1",
      "(.*) - org.gnome.FileRoller": " $1",
      "[Mm]inecraft (.*) - [Mm]inecraft (.*)": "󰍳 $1",
      "Minecraft Dungeons   - steam_app_default": "󰍳 dngs ",
      "[Mm]inecraft Launcher - steam_app_default": "󰍳 lnchr",
      "[Mm]inecraft Updater - steam_app_default": "󰍳 updt",
      "(.*) - org.prismlauncher.PrismLauncher": "󰍳 prsm",
      "(.*) - PandoraLauncher": " pndr",
      "Olympus - love": " olmps",
      "Lönn - (.*) - love": " $1",
      "Celeste - celeste": " clst",
      "Network Connections - nm-connection-editor": "󱫋 ntwk",
      "(.*) . Microsoft Teams - teams-for-linux": "󰊻 $1",
      "(.*) — Mozilla Firefox - firefox": " $1",
      "(.*) - VLC Media Player - vlc": "󰕼 $1",
      "VLC Media Player - vlc": "󰕼 vlc",
      "Starting Everest... - EverestSplash-linux": " evrst boot",
      "Picture in picture - " : "󰹗 pip",
      "The Wireshark Network Analyzer - org.wireshark.Wireshark": "󱙳 wrsk",
      "(?!The Wireshark Network Analyzer)(.*) - org.wireshark.Wireshark": "󱙳 $1",
      "OBS .* - Profile: (.*) - Scenes: (.*) - com.obsproject.Studio": "󰑋 $1/$2",
      "(.*) / .* — Kdenlive - org.kde.kdenlive": "󱄣 $1",
      "NineSols - steam_app.*": "󰄛 nnsls",
      "Balatro - steam_app.*": "󱢮 bltr",
      "DELTARUNE - steam_app.*": "󰧼 dltrn",
      ".* - ArchipelagoLauncher": "󱁏 archp",
      "(.*) — LibreOffice Writer - libreoffice-writer": " $1",
      "(.*) — LibreOffice Draw - libreoffice-draw": " $1",
      "(.*) — LibreOffice Calc - libreoffice-calc": " $1",
      "(.*) — LibreOffice Impress - libreoffice-impress": " $1",
      "(.*) — LibreOffice Math - libreoffice-math": " $1",
      "(.*) — LibreOffice Base - libreoffice-base": " $1",
      "LibreOffice - libreoffice-startcenter": " lbr ofc",
      "LibreOffice - ": " lbr ofc boot",
      "Calendar - org.gnome.Calendar": "󰃭 cldr",
      "Calculator - org.gnome.Calculator": " math",
      "Lutris - net.lutris.Lutris": " ltrs",
      "(?!Lutris)(.*) - net.lutris.Lutris": " $1",
      "Image Viewer - org.gnome.Loupe": " img vwr",
      "(?!Image Viewer)(.*) - org.gnome.Loupe": " $1",
      "\\[(.*)\\]-.* \\(.*\\) (.*) – GIMP - gimp": "󱇣 $1 ($2)",
      "(?!\\[(.*)\\]-.* \\(.*\\) (.*)).* - gimp": "󱇣 gimp",
      "- jetbrains-idea": " intj boot",
      "(.*) – (.*) \\[.*\\] - jetbrains-idea": " $1/$2",
      "(?!\\[.*\\])(.*) – (.*) - jetbrains-idea": " $1/$2",
      "(.*) — .* - org.gnome.Evince": " $1",
      "Recent Documents - org.gnome.Evince": " pdf rdr",
      "Waypaper - waypaper": " wppr",
      "Proton VPN - proton.vpn.app.gtk": "󰒄 prtn vpn",
      "MongoDB Compass - MongoDB Compass": " mngdb",
      ".* - info.mumble.Mumble": " mble",
      "Audacity - Audacity": " audcty",
      "Audacity is starting up... - Audacity": " audcty boot",
      "(?!Audacity)(.*) - Audacity": " $1"
    }
  },

  "niri/language": {
	  "format": "󰌌 {short}",
  },

  "memory": {
    "interval": 5,
    "format": " {}%",
    "format-alt": " {used:0.1f}G/{total:0.1f}G ",
    "tooltip": true
  },

  "cpu": {
    "interval": 5,
    "format": " {usage:2}%",
    "tooltip": true,
    "on-click": "kitty -e btop"
  },

  "disk": {
    "format": " {free}",
    "tooltip": true
  },

  "network": {
    "format-icons": [
      "󰤯",
      "󰤟",
      "󰤢",
      "󰤥",
      "󰤨"
    ],
    "format": "{ifname}",
    "format-wifi": "{essid} ({signalStrength}%) {icon}",
    "format-ethernet": "{ipaddr}/{cidr} 󰊗",
    "format-disconnected": "", //An empty format will hide the module.
    "tooltip-format": "{ifname} {ipaddr}/{cidr} gtw {gwaddr} ",
    "tooltip-format-disconnected": "Disconnected",
    "max-length": 50
  },

  "tray": {
    "icon-size": 12,
    "spacing": 12
  },

  "pulseaudio": {
    "format": "{icon} {volume}% {format_source}",
    "format-bluetooth": "{volume}% {icon} {format_source}",
    "format-bluetooth-muted": "󰝟 {icon} {format_source}",
    "format-muted": "󰝟 0% {format_source}",
    "format-source": " {volume}%",
    "format-source-muted": "",
    "format-icons": {
      "headphone": "",
      "hands-free": "󰋎",
      "headset": "󰋎",
      "phone": "",
      "portable": "",
      "car": "",
      "default": [
        "",
        "",
        ""
      ]
    },
    "on-click": "pavucontrol"
  },

  "custom/exit": {
    "tooltip": false,
    "format": "⏻",
    "on-click": "wlogout"
  },

  "custom/notification": {
    "tooltip": false,
    "format": "{icon}",
    "format-icons": {
      "notification": "<span foreground='red'><sup></sup></span>",
      "none": "",
      "dnd-notification": "<span foreground='red'><sup></sup></span>",
      "dnd-none": "",
      "inhibited-notification": "<span foreground='red'><sup></sup></span>",
      "inhibited-none": "",
      "dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
      "dnd-inhibited-none": ""
    },
    "return-type": "json",
    "exec-if": "which swaync-client",
    "exec": "swaync-client -swb",
    "on-click": "swaync-client -t -sw",
    "on-click-right": "swaync-client -d -sw",
    "escape": true
  },

  "battery": {
    "states": {
      "warning": 30,
      "critical": 15
    },
    "format": "{icon} {capacity}% ({power:0.1f}W)",
    "format-charging": "󰂄 {capacity}% ({power:0.1f}W)",
    "format-plugged": "󱘖 {capacity}% ({power:0.1f}W)",
    "format-icons": [
      "󰁺",
      "󰁻",
      "󰁼",
      "󰁽",
      "󰁾",
      "󰁿",
      "󰂀",
      "󰂁",
      "󰂂",
      "󰁹"
    ],
    "on-click": "",
    "tooltip": false
  },

  "mpris": {
    "format": "{player_icon} {dynamic}",
    "format-paused": "{status_icon} <i>{dynamic}</i>",
    "player-icons": {
      "default": "▶",
      "mpv": "🎵"
    },
    "status-icons": {
      "paused": "⏸"
    },
    "interval": 2,
    "ignored-players": [ "chromium" ],
    "max-length": 30
  }
}