{
  "hyprland/workspaces": {
    "on-scroll-up": "hyprctl dispatch workspace r-1",
    "on-scroll-down": "hyprctl dispatch workspace r+1",
    "on-click": "activate",
    "active-only": true,
    "all-outputs": true,
    "format": "{icon}",
    "format-icons": {
      "2": "",
      "1": "",
      "3": "",
      "4": "𝄞",
      "urgent": "",
      "focused": "",
      "default": ""
    },
    "persistent-workspaces": {
      "*": 5
    }
  },
  "custom/pomodoro": {
    "format-icons": ["🕛", "🕐", "🕑", "🕒", "🕓", "🕔", "🕕", "🕖", "🕗", "🕘", "🕙", "🕚"],
    "return-type": "json",
    "tooltip": true,
    "format": "{icon} {}",
    "on-click": "pomodoro",
    "on-click-right": "pomodoro -s",
    "on-click-middle": "pomodoro -k",
    "exec": "~/.config/waybar/custom/pomodoro.sh",
    "interval": 1
  },
  "group/playerctl": {
    "orientation": "inherit",
    "children-class": "playerctl",
    "modules": [
      "custom/playerctl-prev",
      "custom/playerctl-pause-play",
      "custom/playerctl-next",
      "custom/playerctl-title"
    ]
  },
  "custom/playerctl-title": {
    "interval": 2,
    "format": "{}",
    "hide-empty-text": true,
    "return-type": "json",
    "exec": "~/.config/waybar/custom/playerctl.sh",
    "on-click": "playerctl play-pause",
    "on-scroll-up": "playerctl position 1+",
    "on-scroll-down": "playerctl position 1-",
  },
  "custom/playerctl-prev": {
    "interval": 1,
    "format": "",
    "tooltip-format": "previous track",
    "return-type": "json",
    "exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"class\": \"{{status}}\"}}'",
    "on-click": "playerctl previous",
    "on-scroll-up": "playerctl position 1+",
    "on-scroll-down": "playerctl position 1-",
  },
  "custom/playerctl-pause-play": {
    "interval": 1,
    "format": "{icon}",
    "tooltip-format": "pause/play",
    "format-icons": {
      "Playing": "",
      "Paused": ""
    },
    "return-type": "json",
    "exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"class\": \"{{status}}\"}}'",
    "on-click": "playerctl play-pause",
    "on-scroll-up": "playerctl position 1+",
    "on-scroll-down": "playerctl position 1-",
  },
  "custom/playerctl-next": {
    "interval": 1,
    "format": "",
    "tooltip-format": "next track",
    "return-type": "json",
    "exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"class\": \"{{status}}\"}}'",
    "on-click": "playerctl next",
    "on-scroll-up": "playerctl position 1+",
    "on-scroll-down": "playerctl position 1-",
  },
  // Taskbar
  "wlr/taskbar": {
    "format": "{icon}",
    "icon-size": 18,
    "tooltip-format": "{title}",
    "on-click": "activate",
    "on-click-middle": "close",
    "ignore-list": ["Alacritty", "kitty"],
    "app_ids-mapping": {
      "firefoxdeveloperedition": "firefox-developer-edition"
    },
    "rewrite": {
      "Firefox Web Browser": "Firefox",
      "Foot Server": "Terminal"
    }
  },
  // Hyprland Window
  "hyprland/window": {
    "rewrite": {
      "(.*) - Brave": "$1",
      "(.*) - Chromium": "$1",
      "(.*) - Brave Search": "$1",
      "(.*) - Outlook": "$1",
      "(.*) Microsoft Teams": "$1"
    },
    "separate-outputs": true
  },
  "custom/layout": {
    "exec": "~/.config/waybar/get_layout.sh",
    "on-click": "hyprctl switchxkblayout at-translated-set-2-keyboard next",
    "on-click-right": "hyprctl switchxkblayout at-translated-set-2-keyboard prev",
    "interval": 1
  },

  // Wofi Application Launcher
  "custom/appmenuicon": {
    "format": "",
    "on-click": "wofi --show drun",
    "on-click-right": "~/dotfiles/hypr/scripts/keybindings.sh",
    "tooltip-format": "Left: Open the application launcher\nRight: Show all keybindings"
  },

  // Power Menu
  "custom/exit": {
    "format": "",
    "on-click": "wlogout",
    "tooltip-format": "Power Menu"
  },

  // System tray
  "tray": {
    "icon-size": 21,
    "spacing": 10
  },

  // Clock
  "clock": {
    "format": "{:%H:%M:%S\r<small>%d.%m.%Y</small>}",
    "interval": 1,
  },

  // CPU
  "cpu": {
    "format": "/ C {usage}% ",
    "on-click": "~/dotfiles/.settings/systeminfo.sh"
  },

  // Memory
  "memory": {
    "format": "/ M {}% ",
    "on-click": "~/dotfiles/.settings/systeminfo.sh"
  },

  // Harddisc space used
  "disk": {
    "interval": 30,
    "format": "D {percentage_used}% ",
    "path": "/",
    "on-click": "~/dotfiles/.settings/systeminfo.sh"
  },

  // Group Hardware
  "group/hardware": {
    "orientation": "inherit",
    "drawer": {
      "transition-duration": 300,
      "children-class": "not-memory",
      "transition-left-to-right": false
    },
    "modules": ["custom/system", "disk", "cpu", "memory", "hyprland/language"]
  },

  // Group Tools
  "group/tools": {
    "orientation": "inherit",
    "drawer": {
      "transition-duration": 300,
      "children-class": "not-memory",
      "transition-left-to-right": false
    },
    "modules": [
      "custom/tools",
      "custom/cliphist",
      "custom/hypridle",
      "custom/hyprshade"
    ]
  },

  // Battery
  "battery": {
    "states": {
      // "good": 95,
      "warning": 30,
      "critical": 15
    },
    "format": "{icon}  {capacity}%",
    "format-charging": "🗲  {capacity}%",
    "format-plugged": "  {capacity}%",
    "format-alt": "{icon}  {time}",
    // "format-good": "", // An empty format will hide the module
    // "format-full": "",
    "format-icons": [" ", " ", " ", " ", " "]
  },

  // Pulseaudio
  "pulseaudio": {
    // "scroll-step": 1, // %, can be a float
    "format": "{icon}   {volume}%",
    "format-bluetooth": "{volume}% {icon}  {format_source}",
    "format-bluetooth-muted": " {icon} {format_source}",
    "format-muted": "(M) {format_source}",
    "format-source": "{volume}% ",
    "format-source-muted": "",
    "format-icons": {
      "headphone": " ",
      "hands-free": " ",
      "headset": " ",
      "phone": " ",
      "portable": " ",
      "car": " ",
      "default": ["", "", ""]
    },
    "on-click": "pavucontrol"
  },

  // Bluetooth
  "bluetooth": {
    "format": " {status}",
    "format-disabled": "",
    "format-off": "",
    "interval": 30,
    "on-click": "blueman-manager",
    "format-no-controller": ""
  },
  // backlight:
  "backlight": {
    "format": "{icon} {percent}%",
    "format-icons": [
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      ""
    ],
    "scroll-step": 1
  }
}