feat: bells and whistles

This commit is contained in:
Nick 2025-01-11 05:03:58 -06:00
parent 66f5917693
commit 569d969ecc
12 changed files with 111 additions and 14 deletions

View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
for i in {1..5}
do
text=$(curl -s "https://wttr.in/$1?format=1")
if [[ $? == 0 ]]
then
text=$(echo "$text" | sed -E "s/\s+/ /g")
tooltip=$(curl -s "https://wttr.in/$1?format=4")
if [[ $? == 0 ]]
then
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
exit
fi
fi
sleep 2
done
echo "{\"text\":\"error\", \"tooltip\":\"error\"}"

View file

@ -1,4 +1,9 @@
{
{flake, ...}: let
inherit
(flake.config.people)
user0
;
in {
mainBar = {
position = "bottom";
layer = "top";
@ -11,10 +16,14 @@
"custom/launcher"
"hyprland/workspaces"
];
modules-center = [
"custom/weather"
];
modules-right = [
"tray"
"privacy"
"cpu"
"memory"
"disk"
@ -22,6 +31,7 @@
# "network"
"clock"
];
clock = {
calendar = {
format = {today = "<span color='#ff6699'><b><u>{}</u></b></span>";};
@ -31,6 +41,7 @@
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = " {:%d/%m}";
};
"hyprland/workspaces" = {
active-only = false;
disable-scroll = true;
@ -52,21 +63,25 @@
"4" = [];
};
};
memory = {
format = "󰟜 {}%";
format-alt = "󰟜 {used} GiB"; # 
interval = 2;
};
cpu = {
format = " {usage}%";
format-alt = " {avg_frequency} GHz";
interval = 2;
};
disk = {
# path = "/";
format = "󰋊 {percentage_used}%";
interval = 60;
};
# network = {
# format-wifi = " {signalStrength}%";
# format-ethernet = "󰀂 ";
@ -74,10 +89,12 @@
# format-linked = "{ifname} (No IP)";
# format-disconnected = "󰖪 ";
# };
tray = {
icon-size = 18;
icon-size = 12;
spacing = 8;
};
pulseaudio = {
format = "{icon} {volume}%";
tooltip = false;
@ -102,6 +119,37 @@
# on-click-right = "pkill tofi || wallpaper-picker";
tooltip = false;
};
privacy = {
icon-spacing = 8;
icon-size = 12;
transition-duration = 250;
modules = {
screenshare = {
type = "screenshare";
tooltip = true;
tooltip-icon-size = 12;
};
audio-out = {
type = "audio-out";
tooltip = true;
tooltip-icon-size = 12;
};
audio-in = {
type = "audio-in";
tooltip = true;
tooltip-icon-size = 12;
};
};
};
"custom/weather" = {
exec = "/home/${user0}/Files/Projects/dotfiles/home/modules/waybar/config/scripts/get_weather.sh Winnipeg";
return-type = "json";
format = "{}";
tooltip = true;
interval = 3600;
};
};
}
# https://unicodes.jessetane.com/

View file

@ -6,7 +6,7 @@
;
custom = {
font = font;
font_size = "14px";
font_size = "12px";
font_weight = "bold";
text_color = colors.mauve;
secondary_accent = colors.lavender;
@ -50,12 +50,15 @@ in ''
color: #${colors.mauve};
}
#tray, #pulseaudio, #cpu, #memory, #disk, #clock {
#tray, #pulseaudio, #privacy, #cpu, #memory, #disk, #clock {
font-size: ${custom.font_size};
color: #${colors.mauve};
padding-right: 10px;
}
#privacy {
}
#cpu {
}
@ -80,4 +83,10 @@ in ''
font-weight: ${custom.font_weight};
padding-left: 10px;
}
#custom-weather {
font-size: 14px;
color: #${colors.mauve};
font-weight: ${custom.font_weight};
}
''