From f852d55971fe1994f2a0eadf1a96ab5ddc2b26d9 Mon Sep 17 00:00:00 2001 From: Christopher Crockett Date: Wed, 13 Jul 2022 14:32:57 -0400 Subject: [PATCH 1/2] Use beautiful.font for default spotify-widget font Switch to the configured beautiful default font instead of arbitrarily choosing Play 9 --- spotify-widget/spotify.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spotify-widget/spotify.lua b/spotify-widget/spotify.lua index f8df1eac..31ad5c7a 100644 --- a/spotify-widget/spotify.lua +++ b/spotify-widget/spotify.lua @@ -9,6 +9,7 @@ ------------------------------------------------- local awful = require("awful") +local beautiful = require("beautiful") local wibox = require("wibox") local watch = require("awful.widget.watch") @@ -33,7 +34,7 @@ local function worker(user_args) local play_icon = args.play_icon or '/usr/share/icons/Arc/actions/24/player_play.png' local pause_icon = args.pause_icon or '/usr/share/icons/Arc/actions/24/player_pause.png' - local font = args.font or 'Play 9' + local font = args.font or beautiful.font local dim_when_paused = args.dim_when_paused == nil and false or args.dim_when_paused local dim_opacity = args.dim_opacity or 0.2 local max_length = args.max_length or 15 From a066f7285ee19cefbc408e9eece10b835de04659 Mon Sep 17 00:00:00 2001 From: Christopher Crockett Date: Wed, 13 Jul 2022 14:40:53 -0400 Subject: [PATCH 2/2] Document new spotify-widget default font strategy --- spotify-widget/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotify-widget/README.md b/spotify-widget/README.md index 3d185597..9fe4837c 100644 --- a/spotify-widget/README.md +++ b/spotify-widget/README.md @@ -28,7 +28,7 @@ It is possible to customize widget by providing a table with all or some of the |---|---|---| | `play_icon` | `/usr/share/icons/Arc/actions/24/player_play.png` | Play icon | | `pause_icon` | `/usr/share/icons/Arc/actions/24/player_pause.png` | Pause icon | -| `font` | `Play 9`| Font | +| `font` | `beautiful.font` | Font | | `dim_when_paused` | `false` | Decrease the widget opacity if spotify is paused | | `dim_opacity` | `0.2` | Widget's opacity when dimmed, `dim_when_paused` should be set to `true` | | `max_length` | `15` | Maximum lentgh of artist and title names. Text will be ellipsized if longer. |