nix-system/dotfiles/waybar.jsonc
2024-03-31 08:00:46 +02:00

234 lines
5.9 KiB
JSON

{
"layer": "top",
"position": "bottom",
"exclusive": true,
"passtrough": false,
"gtk-layer-shell": true,
"height": 0,
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
"modules-left": [
"hyprland/workspaces",
"pulseaudio#speaker",
"pulseaudio#microphone",
"idle_inhibitor",
"bluetooth",
"backlight",
"mpris",
"hyprland/submap",
"hyprland/window"
],
"modules-center": [],
"modules-right": [
// "custom/updates",
// "custom/nvidia-load",
// "custom/nvidia-mem",
"disk#2",
"network",
"disk",
"cpu",
"temperature",
"memory",
"battery",
// "custom/weather",
"tray",
"clock",
],
"backlight": {
"device": "intel_backlight",
"format": "{icon}",
"on-click": "light -S 100",
"on-click-right": "light -S 1",
"tooltip-format": "{percent}%",
"format-icons": ["󰛩", "󱩎", "󱩏", "󱩐", "󱩑", "󱩒", "󱩓", "󱩔", "󱩕", "󱩖", "󰛨"]
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "󰈈",
"deactivated": "󰈉"
}
},
"bluetooth": {
"format": "󰂯",
"format-disabled": "󰂲",
"on-click": "rfkill toggle bluetooth",
"on-click-right": "alacritty --class floating -e bluetuith",
"tooltip-format": "{}"
},
"mpris": {
"format": "{player_icon} {title}",
"format-paused": "{status_icon} <i>{title}</i>",
"player-icons": {
"default": "󰐊",
"mpv": "󰐍",
"spotify": "󰓇"
},
"status-icons": {
"paused": "󰏤"
},
// "ignored-players": ["mpv"]
},
"disk": {
"interval": 1,
"format": "󰋊 {free}",
"path": "/",
"on-click": "alacritty --class floating -e ncdu -x /"
},
"disk#2": {
"interval": 30,
"format": "{path} {free}",
"path": "/home/ant/storage",
"on-click": "alacritty --class floating -e ncdu -x /home/ant/storage"
},
"memory": {
"interval": 1,
"format": "󰧑 {percentage:2}%",
"tooltip-format": "{used:0.1f}G/{total:0.1f}G",
"states": { "low": 70 },
"on-click": "notify-send \"$(printf \"%-20s %10s\\n\" \"COMMAND\" \"MEMORY USAGE\"; ps axo comm,rss | awk '{mem[$1]+=$2} END {for (cmd in mem) printf \"%-20s %5.2f MiB\\n\", cmd, mem[cmd]/1024}' | sort -k2nr | head -n10)\""
},
"network": {
"interval": 1,
"format": "󰌙",
"format-disconnected": "󰌙",
"format-linked": "󰛵",
"format-ethernet": "󰓢 {bandwidthDownBytes:>} {bandwidthUpBytes:>}",
"format-wifi": "󰖩 {bandwidthDownBytes:>} {bandwidthUpBytes:>}",
"on-click": "wifi-toggle",
"on-right-click": "$TERMINAL --class floating -e nmtui",
"tooltip-format-ethernet": "{ipaddr}",
"tooltip-format-wifi": "{ipaddr}\n{essid}\n{signalStrength}"
},
"hyprland/window": {
"format": "{}",
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
},
"hyprland/workspaces": {
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
"all-outputs": true,
"on-click": "activate",
"format": "{icon}",
"format-icons": {
"1": "0",
"2": "1",
"3": "2",
"4": "3",
"5": "4",
"6": "5",
"7": "6",
"8": "7",
"9": "8",
"10": "9",
// "urgent": "",
// "active": "",
// "default": ""
}
},
"cpu": {
"interval": 1,
"format": "󰘚 {usage:2}%",
"max-length": 10,
"on-click": "alacritty --class floating -e htop"
},
"custom/updates": {
"exec": "pacman -Quq | wc -l | sed 's/^0$//'",
"interval": 60,
"format": "󰮯 {}"
},
"battery": {
"interval": 30,
"states": {
"warning": 30,
"critical": 15
},
"format-charging": "󰂅 {capacity:2}%",
"format": "{icon} {capacity:2}%",
"format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
"tooltip": true
},
"custom/weather" : {
"tooltip" : true,
"format" : "{}",
"restart-interval" : 300,
"exec" : "~/.config/waybar/scripts/waybar-wttr.py",
"return-type" : "json"
},
"tray": {
"icon-size": 13,
// "tooltip": false,
"spacing": 10
},
"clock": {
"min-length": 10,
"interval": 1,
"format": "{:%d/%m %H:%M:%S}",
"timezones": ["Europe/Paris"],
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"actions": {
"on-scroll-up": "tz_up",
"on-scroll-down": "tz_down"
}
},
"pulseaudio#speaker": {
"format": "{icon} {volume}%",
"tooltip": false,
"format-muted": "󰖁",
"on-click": "pamixer -t",
// "on-click-right": "pamixer -t",
"on-scroll-up": "pamixer -i 5",
"on-scroll-down": "pamixer -d 5",
"scroll-step": 5,
"format-icons": {
"headphone": "󰋋",
"hands-free": "󰋋",
"headset": "󰋋",
"phone": "󰏲",
"portable": "󰏲",
"car": "󰄋",
"default": ["󰕿", "󰖀", "󰕾"]
}
},
"pulseaudio#microphone": {
"format": "{format_source}",
"tooltip": false,
"format-source": "󰍬 {volume}%",
"format-source-muted": "󰍭",
"on-click": "pamixer --default-source -t",
"on-scroll-up": "pamixer --default-source -i 5",
"on-scroll-down": "pamixer --default-source -d 5",
"scroll-step": 5
},
"hyprland/submap": {
"format": "(l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown"
},
"custom/nvidia-load": {
"exec": ".config/waybar/scripts/nvidia-load.py",
"interval": 5,
"return-type": "json",
"format": "{}",
"tooltip": "{tooltip}",
"on-click": "alacritty --class floating -e nvtop"
},
"custom/nvidia-mem": {
"exec": ".config/waybar/scripts/nvidia-mem.py",
"interval": 5,
"return-type": "json",
"format": "{}",
"tooltip": "{tooltip}",
"on-click": "alacritty --class floating -e nvtop"
}
}