You are not logged in.
1rst i think needs a better font alignment.
2nd, 3rd are better centered.
Overall nice setup unklar. Perhaps you know or not, but have a look on nerd-fonts.
Something may adjust better font.
Tumbleweed (Server) | KDE Plasma (Wayland)
Offline
1rst i think needs a better font alignment.
2nd, 3rd are better centered.
Overall nice setup unklar. Perhaps you know or not, but have a look on nerd-fonts.
Something may adjust better font.
@Nili, thank you very much for your advice and constructive criticism.
For me, polybar is probably the most unruly bar of the three.
It did not accept fonts-symbola. Only when I found these hints and tested a Conky with this font did the system finally display it in the bar.
Last edited by unklar (2024-04-03 09:13:35)
Offline
NICE stuff there unklar.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
@Nili, thank you very much for your advice and constructive criticism.
For me, polybar is probably the most unruly bar of the three.
It did not accept fonts-symbola. Only when I found these hints and tested a Conky with this font did the system finally display it in the bar.
Anytime, from my experience with bars each one has his quirks.
Been long enough around to have used from pypanel, bmpanel, dzen2, conky-cli,tint2 to polybar, lemonbar etc...
A decade ago it was a little more difficult with bars due to the lack possibilities the code offered, or sufficient information.
Currently i see it as a better time, out there are more colors, more variants and more diversity.
Whatever you're achieving, i hope you find yourself and feel good.
Tumbleweed (Server) | KDE Plasma (Wayland)
Offline
NICE stuff there unklar.
Thank you, my friend.
I have now made further attempts. I have installed the nerd-fonts as suggested by @Nili. It just seems to me that I didn't get the right package, because the glyphs are missing.
Anyway, that was openweathermap
with the known error that they are wrong for my location.
wttr.in, from chubin, needs json for the format, as you know. Output is just 'symbola' above, or just a suitable different font. My (your) favorite font 'monofur', without glyphs and I will stick with that.
Here are the essentials of my configuration (if I've forgotten something, go ahead, I'll supply it )
Part of the config.ini of polybar
...
font-0 = "monospace:size=9"
font-1 = "monofur:size=12"
font-2 = "Weather Icons:style=Regular:size=12"
;font-3 = "Noto Color Emoji:style=Regular:size=12"
font-4 = "Symbola:style=Regular:size=12"
modules-left = xworkspaces xwindow
modules-center = weather openweathermap-full
modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth date
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
[module/weather]
type = custom/script
interval = 600
;return-type = json -->format2
exec = curl -s https://wttr.in/Lichtenstein_sachsen?format=+%C+%t+%w+%P+%h
exec-if = ping wttr.in -c1
label-font = 3
;[module/weather]
;type = custom/script
;exec = ~/.config/polybar/polybar-forecast/config.toml
;exec-if = ping openweathermap.org -c 1
;interval = 600
;label-font = 3
;[module/openweathermap-full]
;type = custom/script
;exec = ~/.config/polybar/polybar-scripts/openweathermap-full.sh
;exec-if = ping openweathermap.org -c 1
;interval = 600
;label-font = 3
...
Edit: @Nili, thanks!
Last edited by unklar (2024-04-04 13:05:04)
Offline
Sector11 wrote:NICE stuff there unklar.
Thank you, my friend.
I have now made further attempts. I have installed the nerd-fonts as suggested by @Nili. It just seems to me that I didn't get the right package, because the glyphs are missing.
Anyway, that was openweathermap
https://t94.pixhost.to/thumbs/902/458751334_2024-04-03-openweather.png
with the known error that they are wrong for my location.wttr.in, from chubin, needs json for the format, as you know. Output is just 'symbola' above, or just a suitable different font. My (your) favorite font 'monofur', without glyphs and I will stick with that.
https://t94.pixhost.to/thumbs/902/458752021_2024-04-03-185510_315x40_scrot.pngHere are the essentials of my configuration (if I've forgotten something, go ahead, I'll supply it
)
Part of the config.ini of polybar... font-0 = "monospace:size=9" font-1 = "monofur:size=12" font-2 = "Weather Icons:style=Regular:size=12" ;font-3 = "Noto Color Emoji:style=Regular:size=12" font-4 = "Symbola:style=Regular:size=12" modules-left = xworkspaces xwindow modules-center = weather openweathermap-full modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth date cursor-click = pointer cursor-scroll = ns-resize enable-ipc = true [module/weather] type = custom/script interval = 600 ;return-type = json -->format2 exec = curl -s https://wttr.in/Lichtenstein_sachsen?format=+%C+%t+%w+%P+%h exec-if = ping wttr.in -c1 label-font = 3 ;[module/weather] ;type = custom/script ;exec = ~/.config/polybar/polybar-forecast/config.toml ;exec-if = ping openweathermap.org -c 1 ;interval = 600 ;label-font = 3 ;[module/openweathermap-full] ;type = custom/script ;exec = ~/.config/polybar/polybar-scripts/openweathermap-full.sh ;exec-if = ping openweathermap.org -c 1 ;interval = 600 ;label-font = 3 ...
Edit: @Nili, thanks!
Top work @unklar
My Linux installs are as in my music; it s on Metal
Offline
Top work @unklar
+1
-------------------
Of course, I don't want to withhold the other two bars from those who are interested.
My experience with the swaybar is to configure the weather outside the config of the bar. This makes everything easier.
An 'autostart' in which the weather is started:
exec systemctl --user import-environment DISPLAY XAUTHORITY
exec_always ~/.config/sway/weather.sh &
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
exec /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
exec xrdb -load ~/.Xresources
a 'status.sh' script, which I have adapted to wttr.in and its glyphs:
# The Sway configuration file in ~/.config/sway/config calls this script.
# You should see changes to the status bar after saving this script.
# If not, do "killall swaybar" and $mod+Shift+c to reload the configuration.
# Produces "21 days", for example
uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)
# The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date
# like 2018-10-06 and the time (e.g., 14:01)
date_formatted=$(date "+%a %F %H:%M:%S")
# Get the Linux version but remove the "-1-ARCH" part
linux_version=$(uname -r | cut -d '-' -f1)
# cut -d '-' -f2 cut -c17-27
weather_formatted=$(cat /tmp/weather | cut -c2-44)
# Emojis and characters for the status bar
# ? ? ? ? ⚡ ? \| ????????
echo $uptime_formatted ↑ $linux_version ? $weather_formatted ? $date_formatted
and, the weather script itself:
#!/bin/bash
while true
do
# Get output silently, remove unwanted lines, reformat, output to temp file
curl -s 'wttr.in/lichtenstein_sachsen?format=+%c+%t+%w+%P+%h+%m' > /tmp/weather
sleep 600
done
The config of swaybar must then contain, among other things:
# Autostart
include autostart
include status.sh
include variables
include /etc/sway/config.d/*
# Variables
set $mod Mod4
set $term foot
set $menu fuzzel ~/.config/fuzzel/fuzzel.ini
set $screenshot grim ~/Bilder/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
set $screenclip slurp | grim -g - ~/Bilder/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
set $background ~/wallpapers/glowing_worldmap_blue.jpg
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'BL-Lithium'
gsettings set $gnome-schema icon-theme 'Obsidian-Gray'
gsettings set $gnome-schema cursor-theme 'DMZ-White'
gsettings set $gnome-schema font-name 'monospace'
}
### Input configuration
input * xkb_layout "de"
input * xkb_variant "nodeadkeys"
input "MANUFACTURER1 Keyboard" xkb_model "pc105"
# Output configuration
output HDMI-A-1 resolution 1920x1080 position 1920,0
output * bg $background fill
...
ps: the glyphs of wttr.in (moon phases) are unfortunately not displayed correctly here in the code. Also affects Tux battery etc.)
Offline
altman wrote:Top work @unklar
+1
-------------------
Of course, I don't want to withhold the other two bars from those who are interested.My experience with the swaybar is to configure the weather outside the config of the bar. This makes everything easier.
https://t94.pixhost.to/thumbs/904/458764411_scrn-2024-04-04-15-47-57.pnghttps://t94.pixhost.to/thumbs/904/458764471_scrn-2024-04-04-15-40-51.png
An 'autostart' in which the weather is started:
exec systemctl --user import-environment DISPLAY XAUTHORITY exec_always ~/.config/sway/weather.sh & exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway exec /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 exec xrdb -load ~/.Xresources
a 'status.sh' script, which I have adapted to wttr.in and its glyphs:
# The Sway configuration file in ~/.config/sway/config calls this script. # You should see changes to the status bar after saving this script. # If not, do "killall swaybar" and $mod+Shift+c to reload the configuration. # Produces "21 days", for example uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5) # The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date # like 2018-10-06 and the time (e.g., 14:01) date_formatted=$(date "+%a %F %H:%M:%S") # Get the Linux version but remove the "-1-ARCH" part linux_version=$(uname -r | cut -d '-' -f1) # cut -d '-' -f2 cut -c17-27 weather_formatted=$(cat /tmp/weather | cut -c2-44) # Emojis and characters for the status bar # ? ? ? ? ⚡ ? \| ???????? echo $uptime_formatted ↑ $linux_version ? $weather_formatted ? $date_formatted
and, the weather script itself:
#!/bin/bash while true do # Get output silently, remove unwanted lines, reformat, output to temp file curl -s 'wttr.in/lichtenstein_sachsen?format=+%c+%t+%w+%P+%h+%m' > /tmp/weather sleep 600 done
The config of swaybar must then contain, among other things:
# Autostart include autostart include status.sh include variables include /etc/sway/config.d/* # Variables set $mod Mod4 set $term foot set $menu fuzzel ~/.config/fuzzel/fuzzel.ini set $screenshot grim ~/Bilder/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png set $screenclip slurp | grim -g - ~/Bilder/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png set $background ~/wallpapers/glowing_worldmap_blue.jpg set $gnome-schema org.gnome.desktop.interface exec_always { gsettings set $gnome-schema gtk-theme 'BL-Lithium' gsettings set $gnome-schema icon-theme 'Obsidian-Gray' gsettings set $gnome-schema cursor-theme 'DMZ-White' gsettings set $gnome-schema font-name 'monospace' } ### Input configuration input * xkb_layout "de" input * xkb_variant "nodeadkeys" input "MANUFACTURER1 Keyboard" xkb_model "pc105" # Output configuration output HDMI-A-1 resolution 1920x1080 position 1920,0 output * bg $background fill ...
ps: the glyphs of wttr.in (moon phases) are unfortunately not displayed correctly here in the code. Also affects Tux battery etc.)
Some members might find it usefull ! Thx for sharing, it s beyond my capacities ! lol
Edit1; Remember sway from when we were on AL forums.
Edit2: Typo
Last edited by altman (2024-04-04 19:22:06)
My Linux installs are as in my music; it s on Metal
Offline
You guys are now officially flying light years over my head.
Keep it up!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Since I've been working with sway and the swaybar, there's a configuration that I think is absolutely cool because it uses a simple KeyBind configuration to quickly and efficiently handle the logout dialog for the entire system.
Unfortunately, I can't remember where it came from or who made it.
Super+e is the magic and, the red appears
The code:
set $mode_system System: (l) lock, (e) logout, (s) suspend, (r) reboot, (S) shutdown, (R) UEFI
mode "$mode_system" {
bindsym l exec $lock, mode "default"
bindsym e exit
bindsym s exec --no-startup-id systemctl suspend, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
bindsym Shift+r exec --no-startup-id systemctl reboot --firmware-setup, mode "default"
# return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+e mode "$mode_system"
Offline