From 2ffae99b513711bc580709498787c41f31577687 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sat, 14 Sep 2024 17:15:13 +0200 Subject: [PATCH] fix: waybar icons --- home/dotfiles/waybar/style.css | 2 +- home/home-configuration.scm | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/home/dotfiles/waybar/style.css b/home/dotfiles/waybar/style.css index 0623796..33d110a 100644 --- a/home/dotfiles/waybar/style.css +++ b/home/dotfiles/waybar/style.css @@ -1,6 +1,6 @@ * { /* `otf-font-awesome` is required to be installed for icons */ - font-family: FontAwesome, Ubuntu; + font-family: Ubuntu, "Font Awesome 6 Free"; font-size: 13px; } diff --git a/home/home-configuration.scm b/home/home-configuration.scm index 70c66bb..1a05707 100644 --- a/home/home-configuration.scm +++ b/home/home-configuration.scm @@ -14,6 +14,8 @@ (gnu packages shellutils) (gnu packages wm) (gnu packages freedesktop) + (guix git-download) + (gnu packages fonts) (gnu services) (gnu home services fontutils) (gnu home services desktop) @@ -30,13 +32,41 @@ (ruther home services wayland) (ruther home services kanshi)) +(define-public font-awesome-6 + (package/inherit font-awesome + (version "6.5.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/FortAwesome/Font-Awesome") + (commit version))) + (sha256 + (base32 "1v1acl833ifg9bw3lffklkg8i80bj8h01b99y5pvxidby8pvyili")))) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (source (getcwd)) + (fonts (string-append out "/share/fonts"))) + (for-each (lambda (file) + (install-file file (string-append fonts "/truetype"))) + (find-files source "\\.(ttf|ttc)$")) + (for-each (lambda (file) + (install-file file (string-append fonts "/opentype"))) + (find-files source "\\.(otf|otc)$")) + #t)))))))) + (home-environment ;; Below is the list of packages that will show up in your ;; Home profile, under ~/.guix-home/profile. (packages (append (list - dwl-mine) + dwl-mine + font-awesome-6) (specifications->packages (list "slurp" @@ -54,7 +84,7 @@ ;; Fonts "font-hack" "font-dejavu" "font-ubuntu" - "font-awesome" "font-google-noto-emoji" + "font-google-noto-emoji" ;; Browsing "librewolf" -- 2.48.1