Files
dotfiles/waybar/config.jsonc
2025-07-03 01:37:22 +09:30

238 lines
7.7 KiB
JSON

{
"layer": "top", // Waybar at top layer
"output": ["DP-1", "eDP-1"], // Only display on on monitor
"position": "top", // Waybar position (top|bottom|left|right)
"height": 28, // Waybar height (to be removed for auto height)
// Choose the order of the modules
"modules-left": [
"custom/logo",
"wlr/taskbar",
"custom/pl-taskbar",
"niri/workspaces",
"custom/pl-workspaces",
"niri/window",
"custom/pl-window"
],
"modules-center": [
"custom/pl-swaync-before",
"custom/swaync",
"custom/pl-swaync",
"clock",
"custom/pl-clock"
],
"modules-right": [
"custom/pl-idle-before",
"idle_inhibitor",
"custom/pl-idle",
"cpu",
"memory",
"temperature",
"battery",
"custom/pl-stats",
"pulseaudio",
"custom/pl-pulse",
"tray",
"custom/pl-tray",
"custom/power"
],
// Modules configuration
"custom/logo": {
"format": " ",
"on-click": "cosmic-app-library"
},
"wlr/taskbar": {
"active-first": true,
"icon-size": 20,
"on-click": "activate",
"on-click-middle": "close",
"app_ids-mapping": {
"msedge-_cifhbcnohmdccbgoicgdjpfamggdegmo-Default": "msedge-cifhbcnohmdccbgoicgdjpfamggdegmo-Default",
"msedge-_faolnafnngnfdaknnbpnkhgohbobgegn-Default": "msedge-faolnafnngnfdaknnbpnkhgohbobgegn-Default",
"steam_app_2357570": "Overwatch 2.desktop"
}
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
"icon-size": 20,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"format": " {:%d %b %Y %R}",
"format-alt": "{:%a %d %b w:%V %H:%M}",
"tooltip-format": "<span><tt>{calendar}</tt></span>",
"calendar": {
"mode-mon-col" : 4,
"weeks-pos" : "left",
"on-scroll" : 1,
"on-click-right" : "mode",
"format": {
"months": "<span><b>{}</b></span>",
"weeks": "<span><b>{}</b></span>",
"weekdays": "<span><b>{}</b></span>",
"today": "<span><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right" : "mode",
"on-scroll-up" : "shift_up",
"on-scroll-down" : "shift_down"
},
"interval": 10
},
"cpu": {
"format": "{usage}% ",
"tooltip": false,
"on-click-right": "exec wezterm -e btm"
},
"memory": {
"format": "{percentage}% ",
"on-click-right": "exec wezterm -e btm"
},
"temperature": {
// "thermal-zone": 1,
// "hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input",
"hwmon-path-abs": "/sys/devices/pci0000:00/0000:00:18.3/hwmon/",
"input-filename": "temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% 󱐋",
"format-plugged": "",
"format-alt": "{capacity}% {time}",
"format-icons": ["", "", "", "", ""]
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "",
"format-ethernet": "",
"format-linked": "",
"format-disconnected": "⚠",
"format-alt": "{ifname} {essid} ({signalStrength}%)"
},
"bluetooth": {
"format": "",
"format-disabled": "",
"format-off": "",
"format-connected": " {num_connections}",
// "format-connected": " {device_alias}",
"tooltip-format": "{controller_address} {status}\n\n{num_connections} connected",
"tooltip-format-disabled": "{status}",
"tooltip-format-connected": "{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
"format-connected-battery": " {device_alias} {device_battery_percentage}%",
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
// "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device
"on-click": "bluetooth toggle; pkill -SIGRTMIN+8 waybar",
"on-click-right": "blueman-manager"
},
"pulseaudio": {
"format-muted": "󰝟",
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": "󰝟 {icon} {format_source}",
"format-muted": "󰝟 {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"scroll-step": 10,
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"on-click-right": "pavucontrol",
"tooltip": false
},
"custom/power": {
"format" : "⏻ ",
"tooltip": false,
"menu": "on-click",
"menu-file": "~/.config/waybar/custom_modules/power_menu.xml", // Menu file in resources folder
"menu-actions": {
"shutdown": "systemctl poweroff",
"reboot": "systemctl reboot",
"suspend": "systemctl suspend",
"logout": "niri msg action quit"
}
},
"custom/swaync": {
"tooltip": true,
"tooltip-format": "Left Click: Launch Notification Center\nRight Click: Do not Disturb",
"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": "sleep 0.1 && swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true,
},
"custom/pl-taskbar": {
"format": ""
},
"custom/pl-workspaces": {
"format": ""
},
"custom/pl-window": {
"format": ""
},
"custom/pl-swaync": {
"format": ""
},
"custom/pl-clock": {
"format": ""
},
"custom/pl-idle": {
"format": ""
},
"custom/pl-stats": {
"format": ""
},
"custom/pl-pulse": {
"format": ""
},
"custom/pl-tray": {
"format": ""
},
"custom/pl-swaync-before": {
"format": ""
},
"custom/pl-idle-before": {
"format": ""
},
}