wthrr-the-weathercrab
wthrr-the-weathercrab copied to clipboard
Can the graphs in Hourly forecasts be disabled?
Hi,
I would like to disable the graphs for the current day in the Hourly forecasts.
I'm clearly missing some characters in FantasqueSansMono Nerd Font
or, on alacritty
,
I don't want to change font or terminal, so the alternative would be to disable the graph.
Thanks.
Thanks for opening the issue and info for reproduction!
Currently, it can not be disabled, unfortunately.
I've scheduled some time in the next days to work on the app. I'll do my best to implement something like this and to fix the graph, so it works with more terminal/font combinations.
Hey again @0323pin,
FantasqueSans
is a font I'm also using in some of my dot files. So a reproduction was a super quick thing to do - hoping to also provide a quick fix for the problem.
Due to the "oversized" nerd icons and the missing symbols, I guess the issue comes down to a not fully up-to-date version of the font that you are using. What's also visible on the screenshot is that the superscripted precipitation units are also not patched into that version. So disabling the graph would still result in missing icons.
I've experienced similar problems with patched fonts when installing them via the package manager. If you have installed it via the package manager, downloading it directly from the nerd-fonts repo and using that version is something you could try. nerd-fonts/.../FantasqueSansMono
This is how it looks reproducing the issue with latest FantasqueSansMono Nerd Font Mono
version.
left kitty ; right alacritty:
There are still some small missplacements in the graph symbols which is down to alacritty not the font. I will check on the possibilites to fix this, but it's already usable I would say.
For now, would this be another alternative you are willing to use?
This looks good enough 😄
I did fetch the font from the nerdfonts site.
I'll refetch them as it was probably over a year ago since I've installed them.
Would you mind sharing your alacritty.yml
?
Here's mine, https://codeberg.org/pin/leftwm-netbsd/raw/branch/master/.config/alacritty/alacritty.yml
Let me know how it goes. I think if it works, it's fair enough to have the latest nerd fonts as a requirement for the app to work.
Sure, I'll post it below. In the same breath, I have to admit that - as much as I am a Rust fanboy - alacritty never qualified to become one of my favorite tools. So the configuration file never went beyond a few minutes of messy basic setup with mainly just fonts and theme. Please forgive for posting it without cleaning it up.
alacritty.yml
window:
padding:
x: 0
y: 0
opacity: 0.95
# Font configuration
font:
normal:
# Font family
#
# Default:
# - (macOS) Monaco
# - (Linux/BSD) monospace
# - (Windows) Consolas
# family: JetBrainsMono Nerd Font Mono
family: FantasqueSansMono Nerd Font Mono
# The `style` can be specified to pick a specific face.
style: Regular
bold:
# Font family
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
# family: Roboto Mono for Powerline
# The `style` can be specified to pick a specific face.
style: SemiBold
italic:
# Font family
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
# family: Roboto Mono for Powerline
family: JetBrainsMono
# The `style` can be specified to pick a specific face.
style: Italic
bold_italic:
# Font family
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
# family: Roboto Mono for Powerline
# The `style` can be specified to pick a specific face.
style: SemiBold Italic
# Point size
size: 10
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
offset:
x: 0
y: 2
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the right,
# increasing `y` moves the glyph upwards.
glyph_offset:
x: 0
y: 0
# Thin stroke font rendering (macOS only)
#
# Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`
#
# macOS >= 10.14.x:
#
# If the font quality on non-retina display looks bad then set
# `use_thin_strokes` to `true` and enable font smoothing by running the
# following command:
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
#
# This is a global setting and will require a log out or restart to take
# effect.
use_thin_strokes: true
# If `true`, bold text is drawn using the bright color variants.
# draw_bold_text_with_bright_colors: true
key_bindings:
# (Windows, Linux, and BSD only)
# - { key: Return, action: None }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Control, action: ResetFontSize }
- { key: Plus, mods: Control|Shift, action: IncreaseFontSize }
- { key: Minus, mods: Control, action: DecreaseFontSize }
schemes:
# Tokyo Night theme, based on both:
# https://github.com/ghifarit53/tokyonight-vim
# https://github.com/enkia/tokyo-night-vscode-theme
tokyo-night: &tokyo-night # Default colors
primary:
# background: "0x1a1b26"
# background: "0x222638"
background: "0x282A36"
foreground: "0xa9b1d6"
# Normal colors
normal:
black: "0x32344a"
red: "0xf7768e"
green: "0x9ece6a"
yellow: "0xe0af68"
blue: "0x7aa2f7"
magenta: "0xad8ee6"
cyan: "0x449dab"
white: "0x787c99"
# Bright colors
bright:
black: "0x444b6a"
red: "0xff7a93"
green: "0xb9f27c"
yellow: "0xff9e64"
blue: "0x7da6ff"
magenta: "0xbb9af7"
cyan: "0x0db9d7"
white: "0xacb0d0"
tokyo-night-storm: &tokyo-night-storm # Default colors
primary:
background: "0x24283b"
foreground: "0xa9b1d6"
# Normal colors
normal:
black: "0x32344a"
red: "0xf7768e"
green: "0x9ece6a"
yellow: "0xe0af68"
blue: "0x7aa2f7"
magenta: "0xad8ee6"
cyan: "0x449dab"
white: "0x9699a8"
# Bright colors
bright:
black: "0x444b6a"
red: "0xff7a93"
green: "0xb9f27c"
yellow: "0xff9e64"
blue: "0x7da6ff"
magenta: "0xbb9af7"
cyan: "0x0db9d7"
white: "0xacb0d0"
# Dracula theme for Alacritty
# https://draculatheme.com/alacritty
#
# Color palette
# https://spec.draculatheme.com
#
# Template
# https://github.com/alacritty/alacritty/blob/master/alacritty.yml
dracula: &dracula
primary:
background: "#282a36"
foreground: "#f8f8f2"
bright_foreground: "#ffffff"
cursor:
text: CellBackground
cursor: CellForeground
vi_mode_cursor:
text: CellBackground
cursor: CellForeground
search:
matches:
foreground: "#44475a"
background: "#50fa7b"
focused_match:
foreground: "#44475a"
background: "#ffb86c"
bar:
background: "#282a36"
foreground: "#f8f8f2"
hints:
start:
foreground: "#282a36"
background: "#f1fa8c"
end:
foreground: "#f1fa8c"
background: "#282a36"
line_indicator:
foreground: None
background: None
selection:
text: CellForeground
background: "#44475a"
normal:
black: "#21222c"
red: "#ff5555"
green: "#50fa7b"
yellow: "#f1fa8c"
blue: "#bd93f9"
magenta: "#ff79c6"
cyan: "#8be9fd"
white: "#f8f8f2"
bright:
black: "#6272a4"
red: "#ff6e6e"
green: "#69ff94"
yellow: "#ffffa5"
blue: "#d6acff"
magenta: "#ff92df"
cyan: "#a4ffff"
white: "#ffffff"
colors: *tokyo-night
@tobealive Using family: FantasqueSansMono Nerd Font Mono
instead of family: FantasqueSansMono Nerd Font
made a difference. I've re-fetched the font as well, still, I have to dig deeper.
Here's how it looks now
As you can see, there are still issues. Also, I don't know why colors are missing but, as said, I'll dig further.
Okay, seems we are coming closer.
Running kitty in font debug mode I found out that the terminal uses NotoSansMono-Regular
for the superscripted precipitation unit icons. But I could not get info on the graph icons yet - might also be NotoSans.
Alacritty will most certainly have a debug mode too. Does it tell you which font is missing then?
alacritty -v
outputs nothing useful, increasing the verbose level, I get the following
> alacritty -vv
...
[5.831237229s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Regular, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[5.835325552s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Roman, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
> alacritty -vvv
...
[7.730173262s] [TRACE] [crossfont] Got font path="/usr/X11R7/lib/X11/fonts/TTF/Vera.ttf", index=0
[7.730653494s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Roman, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
Wonder why it's looking for other fonts. Apparently, looking for a Roman variant.
font:
normal:
family: FantasqueSansMono Nerd Font Mono
style: Regular
bold:
family: FantasqueSansMono Nerd Font Mono
style: Bold
italic:
family: FantasqueSansMono Nerd Font Mono
style: Italic
bold_italic:
family: FantasqueSansMono Nerd Font Mono
style: Bold Italic
size: 8.5
Yep, I'm a bit stumped here too and would have to dig further as well. I will also try my luck reproducing it later this week. @0323pin it's NetBSD you are using right?
Then I'd have something to debug, and trying to implement working variants wouldn't just be blind shots.
And if extending the list of requirements is the only thing necessary to allow unimpaired usage of the app while users can use their preferred terminal and font, it's the solution I prefer for now.
@tobealive Yes, I'm using NetBSD but, before anything else, I'd like to give it a try on another laptop where I have Void Linux on top of musl
libc. I'm using alacritty
on Void also, so it would be a direct comparisson.
Will give it a shot tonight and report back here.
@tobealive :disappointed:
@tobealive The good news is, ...
Same fantasqueSansMono on kitty
on NetBSD looks like this,
So, something is wrong with alacritty
.
And with sakura
, also on NetBSD (I didn't configure the fonts here)
Had to use a mint live boot and did a test here. Could reproduce the kitty / alacritty situation.
But no problems with colors being applied. It will be another thing to find out why you are running short on those when using netbsd, looks good on void.
I'll dig further after work and report back.
Thanks!
I have basically the same alacritty.yml
on Void, just slightly different colors.
Also, I have no issues with colors on other applications on NetBSD,
All the apps displayed on the screenshot are written in Rust. Clockwise: lsd
, spotify_player
and tuifeed
EDIT: Void alacritty, NetBSD alacritty
EDIT 2: As for the precipitation_unit
symbol, that one is missing from the selected font, I don't see it when opening hourly.rs
in vim or in firefox.
Some of the discoveries:
- Installing
fonts-noto
is sufficient to get the graph for alacritty working on ubuntu based distros.
![](https://user-images.githubusercontent.com/34311583/197794178-79b87c09-cfe5-47f5-8b72-6e1a27116cbd.png)
- I found that there were more problems with installing the app on distros with ubuntu base. While checking on these problems using Ubuntu 22.10 I was able to recreate this "fix".
![](https://user-images.githubusercontent.com/34311583/197798006-24c99f53-005d-433f-b08b-d8687d3c67ca.png)
-
Then with nerd fonts installed, also all other symbols are displayed properly.
-
Oddly enough, it works when uninstalling
fonts-noto
packages afterwards, clearing the font cache, etc. There doesn't seem to be a sub-dependency installed during the font package installation that keeps it running. So this carries a bit of new confusion :D -
If you haven't already tried installing noto after https://github.com/tobealive/wthrr-the-weathercrab/issues/25#issuecomment-1288055691, let me know how it works when you install noto-font related packages of your distros / add the noto font files to your system.
-
The slightly misaligned symbols in the graph when using alacritty should also be fixable. I'll be looking into this shortly.
-
Regarding colors, I might need to move the app to a crate with wider coverage then
term-painter
. At first, I was down to usetermcolor
- which has it all - but went with the former because of its simplicity. This, I will tackle in the coming weeks.
Let me know if you can make use of something of it. If it still doesn't want to work, I just have loaded netbsd 🤞
I'll look at this tonight.
If it still doesn't want to work, I just have loaded netbsd
Installing NetBSD for the first time can be a slight wtf. But, if we need to go there, I'm here to help 😄
Yep, if necessary, let's go all the way 🕵🏽
And if installing noto is enough, I'll just add it to the list of requirements. I would mention you as a co-author then if I may.
I couldn't get it to display properly in alacritty
but, other terminals work. So, I wouldn't say this is a wthrr
issue. It's more likely something I'm missing.
Man, now I was reminded as of why I usually avoid noto-fonts
, 3Gb of diskspace 😮
@tobealive forgot to ask. Do you think it's possible to have the hourly forecasts as a config parameter which, can be on or off?
@0323pin
@tobealive forgot to ask. Do you think it's possible to have the hourly forecasts as a config parameter which, can be on or off?
If you mean something like saving a forecast option to have it displayed by default, then I have that on my list 👍
Currently, only it's possible via creating an alias in your shell.
I mean have the whole graph for hourly forecast switched-off, so it does not display.
Man, now I was reminded as of why I usually avoid noto-fonts, 3Gb of diskspace open_mouth
Yep, full noto is quite a chunk. In the tests on Ubuntu, it was sufficient to install the noto-core
package, which is only a few MB in size, and omit the lang-specific noto packages.
Sharing the results from testing on BSD:
- I've come to the conclusion that the glyphs used for the graph just don't work in alacritty under BSD.
- I won't dig further to find out what is missing on BSD. But to work around this, I tested other Unicode symbols. These don't have as many levels, but work with alacritty. So I will add some simple configurable variants for the graph.
Journal:
- Running NetBSD in a virtual machine was a bit tedious, but worked well enough to do a basic setup.
- I can confirm that wthrr worked well in other terminal emulators here.
- However, compiling alacritty was not possible under NetBSD for me. The creation of the binary file as the last step of the compilation always failed.
- After some time, the VM broke to the point where I couldn't boot it up again, so I had to do a re-setup. When this happened a second time, I switched to another BSD operating system to continue the test 😅.
- Being able to do more extensive testing here I can confirm your results regarding the graphic icons.
- No problems with colors and bold fonts though.
![](https://user-images.githubusercontent.com/34311583/198259806-bd9dad56-7e36-402c-8ad5-61f460075fab.png)
Full font section of my alacritty.yml
alacritty.yml
font: normal: family: FantasqueSansMono Nerd Font Monosize: 12
offset: y: 3
I mean have the whole graph for hourly forecast switched-off, so it does not display.
Ok that's the question stated in the issue title, isn't it? Saying you forgot to ask sounded like you mean some additional parameter.
Two points that should help me fully getting what you mean:
-
Do I understand correctly that you want to keep the numbers for hourly weather, just without the graph?
-
Would having the graph problem solved when using other glyphs like done in my reply above solve to problem. Would you still want to disable a graph?
That should help me to see your desired end result more clearly.
Edit: let me transform this issue into a discussion as I feel we have more than one topic here, and I'll reference all points of work in separate issues when having some clear steps to take.