master waybar.jsonc
  1// -*- mode: jsonc -*-
  2{
  3    // "layer": "top", // Waybar at top layer
  4    // "position": "bottom", // Waybar position (top|bottom|left|right)
  5    "height": 30, // Waybar height (to be removed for auto height)
  6    // "width": 1280, // Waybar width
  7    "spacing": 4, // Gaps between modules (4px)
  8    // Choose the order of the modules
  9    "modules-left": [
 10        //"sway/workspaces",
 11        "sway/mode",
 12        "sway/scratchpad",
 13        "custom/media"
 14    ],
 15    "modules-center": [
 16        "sway/window"
 17    ],
 18    "modules-right": [
 19//        "mpd",
 20//        "idle_inhibitor",
 21//        "pulseaudio",
 22//        "network",
 23//        "power-profiles-daemon",
 24        "cpu",
 25        "memory",
 26//        "temperature",
 27//        "backlight",
 28//        "keyboard-state",
 29//        "sway/language",
 30        "battery",
 31//        "battery#bat2",
 32        "clock",
 33        "tray",
 34        "custom/power"
 35    ],
 36    // Modules configuration
 37    // "sway/workspaces": {
 38    //     "disable-scroll": true,
 39    //     "all-outputs": true,
 40    //     "warp-on-scroll": false,
 41    //     "format": "{name}: {icon}",
 42    //     "format-icons": {
 43    //         "1": "",
 44    //         "2": "",
 45    //         "3": "",
 46    //         "4": "",
 47    //         "5": "",
 48    //         "urgent": "",
 49    //         "focused": "",
 50    //         "default": ""
 51    //     }
 52    // },
 53    "keyboard-state": {
 54        "numlock": true,
 55        "capslock": true,
 56        "format": "{name} {icon}",
 57        "format-icons": {
 58            "locked": "",
 59            "unlocked": ""
 60        }
 61    },
 62    "sway/mode": {
 63        "format": "<span style=\"italic\">{}</span>"
 64    },
 65    "sway/scratchpad": {
 66        "format": "{icon} {count}",
 67        "show-empty": false,
 68        "format-icons": ["", ""],
 69        "tooltip": true,
 70        "tooltip-format": "{app}: {title}"
 71    },
 72    "mpd": {
 73        "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}%",
 74        "format-disconnected": "Disconnected ",
 75        "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
 76        "unknown-tag": "N/A",
 77        "interval": 5,
 78        "consume-icons": {
 79            "on": ""
 80        },
 81        "random-icons": {
 82            "off": "<span color=\"#f53c3c\"></span> ",
 83            "on": ""
 84        },
 85        "repeat-icons": {
 86            "on": ""
 87        },
 88        "single-icons": {
 89            "on": "1 "
 90        },
 91        "state-icons": {
 92            "paused": "",
 93            "playing": ""
 94        },
 95        "tooltip-format": "MPD (connected)",
 96        "tooltip-format-disconnected": "MPD (disconnected)"
 97    },
 98    "idle_inhibitor": {
 99        "format": "{icon}",
100        "format-icons": {
101            "activated": "",
102            "deactivated": ""
103        }
104    },
105    "tray": {
106        // "icon-size": 21,
107        "spacing": 10
108    },
109    "clock": {
110        // "timezone": "America/New_York",
111        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
112        "format-alt": "{:%Y-%m-%d}"
113    },
114    "cpu": {
115        "format": "{usage}%",
116        "tooltip": false
117    },
118    "memory": {
119        "format": "{}%"
120    },
121    "temperature": {
122        // "thermal-zone": 2,
123        // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
124        "critical-threshold": 80,
125        // "format-critical": "{temperatureC}°C {icon}",
126        "format": "{temperatureC}°C {icon}",
127        "format-icons": ["", "", ""]
128    },
129    "backlight": {
130        // "device": "acpi_video1",
131        "format": "{percent}% {icon}",
132        "format-icons": ["", "", "", "", "", "", "", "", ""]
133    },
134    "battery": {
135        "states": {
136            // "good": 95,
137            "warning": 30,
138            "critical": 15
139        },
140        "format": "{capacity}% {icon}",
141        "format-full": "{capacity}% {icon}",
142        "format-charging": "{capacity}%",
143        "format-plugged": "{capacity}%",
144        "format-alt": "{time} {icon}",
145        // "format-good": "", // An empty format will hide the module
146        // "format-full": "",
147        "format-icons": ["", "", "", "", ""]
148    },
149    "battery#bat2": {
150        "bat": "BAT2"
151    },
152    "power-profiles-daemon": {
153      "format": "{icon}",
154      "tooltip-format": "Power profile: {profile}\nDriver: {driver}",
155      "tooltip": true,
156      "format-icons": {
157        "default": "",
158        "performance": "",
159        "balanced": "",
160        "power-saver": ""
161      }
162    },
163    "network": {
164        // "interface": "wlp2*", // (Optional) To force the use of this interface
165        "format-wifi": "{essid} ({signalStrength}%) ",
166        "format-ethernet": "{ipaddr}/{cidr} ",
167        "tooltip-format": "{ifname} via {gwaddr} ",
168        "format-linked": "{ifname} (No IP) ",
169        "format-disconnected": "Disconnected ⚠",
170        "format-alt": "{ifname}: {ipaddr}/{cidr}"
171    },
172    "pulseaudio": {
173        // "scroll-step": 1, // %, can be a float
174        "format": "{volume}% {icon} {format_source}",
175        "format-bluetooth": "{volume}% {icon} {format_source}",
176        "format-bluetooth-muted": " {icon} {format_source}",
177        "format-muted": " {format_source}",
178        "format-source": "{volume}%",
179        "format-source-muted": "",
180        "format-icons": {
181            "headphone": "",
182            "hands-free": "",
183            "headset": "",
184            "phone": "",
185            "portable": "",
186            "car": "",
187            "default": ["", "", ""]
188        },
189        "on-click": "pavucontrol"
190    },
191    "custom/media": {
192        "format": "{icon} {text}",
193        "return-type": "json",
194        "max-length": 40,
195        "format-icons": {
196            "spotify": "",
197            "default": "🎜"
198        },
199        "escape": true,
200        "exec": "/usr/share/waybar/custom_modules/mediaplayer.py 2> /dev/null" // Script in resources folder
201        // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
202    },
203    "custom/power": {
204        "format" : "⏻ ",
205		"tooltip": false,
206		"menu": "on-click",
207		"menu-file": "/usr/share/waybar/custom_modules/power_menu.xml", // Menu file in resources folder
208		"menu-actions": {
209			"shutdown": "shutdown",
210			"reboot": "reboot",
211			"suspend": "systemctl suspend",
212			"hibernate": "systemctl hibernate"
213		}
214    }
215}