From 21089596448d7c1e6a75ad97b33916272f6019b3 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sun, 25 Feb 2024 11:21:58 -0800 Subject: [PATCH 1/2] chore(config): add modeline for Emacs json-mode json-mode supports jsonc format since 1.8.0, but does not register .jsonc as a file extension. --- resources/config | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/config b/resources/config index 420262db6..f225e4fcf 100644 --- a/resources/config +++ b/resources/config @@ -1,3 +1,4 @@ +// -*- mode: jsonc -*- { // "layer": "top", // Waybar at top layer // "position": "bottom", // Waybar position (top|bottom|left|right) From 43aabf046c7b520f2447a1e3c8c601a511e88c75 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sun, 25 Feb 2024 11:33:04 -0800 Subject: [PATCH 2/2] chore: rename config to config.jsonc Only changes the name of the default config we install and does not affect the lookup logic in any way. Man pages were already fixed in #2744 --- man/waybar.5.scd.in | 2 +- meson.build | 4 ++-- resources/{config => config.jsonc} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename resources/{config => config.jsonc} (100%) diff --git a/man/waybar.5.scd.in b/man/waybar.5.scd.in index 628bbf610..2d4de0c90 100644 --- a/man/waybar.5.scd.in +++ b/man/waybar.5.scd.in @@ -16,7 +16,7 @@ Valid locations for this file are: - */etc/xdg/waybar/* - *@sysconfdir@/xdg/waybar/* -A good starting point is the default configuration found at https://github.com/Alexays/Waybar/blob/master/resources/config +A good starting point is the default configuration found at https://github.com/Alexays/Waybar/blob/master/resources/config.jsonc Also, a minimal example configuration can be found at the bottom of this man page. # BAR CONFIGURATION diff --git a/meson.build b/meson.build index 46ff9926e..b995d5690 100644 --- a/meson.build +++ b/meson.build @@ -518,8 +518,8 @@ executable( ) install_data( - './resources/config', - './resources/style.css', + 'resources/config.jsonc', + 'resources/style.css', install_dir: sysconfdir / 'xdg/waybar' ) diff --git a/resources/config b/resources/config.jsonc similarity index 100% rename from resources/config rename to resources/config.jsonc