Waybar: Difference between revisions
Add Waybar |
mNo edit summary |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 11: | Line 11: | ||
== Configuration == | == Configuration == | ||
Waybar can be configured using [[Home Manager]]: | Waybar can be configured using options found on the [[Home Manager|Home Manager Appendix]]. You can also find configuration options under [https://mynixos.com/home-manager/options/programs.waybar home-manager/options/programs/waybar] on [https://mynixos.com/ mynixos]. | ||
{{file|~/.config/home-manager/home.nix|nix|3= | {{file|~/.config/home-manager/home.nix|nix|3= | ||
| Line 17: | Line 17: | ||
modules-right = ["clock"]; | modules-right = ["clock"]; | ||
}; | }; | ||
programs.waybar.style = ""; | # programs.waybar.style = ""; | ||
}} | }} | ||
| Line 24: | Line 24: | ||
{{file|~/.config/home-manager/home.nix|nix|3= | {{file|~/.config/home-manager/home.nix|nix|3= | ||
xdg.configFile."waybar/config.jsonc".source = ./waybar/config.jsonc; | xdg.configFile."waybar/config.jsonc".source = ./waybar/config.jsonc; | ||
xdg.configFile."waybar/style.css".source = ./waybar/style.css; | # xdg.configFile."waybar/style.css".source = ./waybar/style.css; | ||
}} | }} | ||
Please refer to [https://github.com/Alexays/Waybar/tree/master/resources the default configuration (config.jsonc and style.css)] and [https://github.com/Alexays/Waybar/wiki/Configuration wiki] for further information on configuration. | Please refer to [https://github.com/Alexays/Waybar/tree/master/resources the default configuration (config.jsonc and style.css)] and [https://github.com/Alexays/Waybar/wiki/Configuration wiki] for further information on configuration. | ||
== Troubleshooting == | |||
=== Icon Fonts Missing === | |||
The default configuration uses <code>FontAwesome</code> font, which is only available in {{nixos:package|font-awesome_4}}, not in {{nixos:package|font-awesome}}, {{nixos:package|font-awesome_6}}, {{nixos:package|font-awesome_5}}, etc. | |||
You may simply install {{nixos:package|font-awesome_4}} | |||
{{file|/etc/nixos/configuration.nix|nix|3= | |||
fonts.packages = with pkgs; [ | |||
font-awesome_4 | |||
]; | |||
}} | |||
or edit <code>style.css</code> to use your prefered font (e.g. {{nixos:package|font-awesome}}): | |||
{{file|/etc/nixos/configuration.nix|nix|3= | |||
fonts.packages = with pkgs; [ | |||
font-awesome | |||
]; | |||
}} | |||
{{file|style.css|diff|3= | |||
* { | |||
/* `otf-font-awesome` is required to be installed for icons */ | |||
- font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; | |||
+ font-family: Roboto, Helvetica, Arial, sans-serif, "Font Awesome 7 Free"; | |||
font-size: 13px; | |||
} | |||
}} | |||
[[Category:Applications]] | |||