all configurations
This commit is contained in:
1 parent
11bb8fabfa
commit
efb61ce158
9 files changed
+65
-4
No files matched your search
+19
-1
@@ -2,7 +2,7 @@
|
||||
"layer": "top",
|
||||
"height": 30,
|
||||
"spacing": 4,
|
||||
"modules-left": ["custom/launcher", "cpu", "memory", "temperature", "disk", "custom/weather", "hyprland/window"],
|
||||
"modules-left": ["custom/launcher", "cpu", "memory", "temperature", "disk", "custom/weather", "custom/updates", "hyprland/window"],
|
||||
"modules-center": ["hyprland/workspaces"],
|
||||
"modules-right": ["custom/spotify", "pulseaudio", "network", "backlight", "keyboard-state", "hyprland/language", "battery", "battery#bat2", "clock", "tray", "custom/power"],
|
||||
"hyprland/workspaces": {
|
||||
@@ -113,5 +113,23 @@
|
||||
"exec": "~/dotfiles/waybar/scripts/waybar-wttr.py",
|
||||
"return-type": "json"
|
||||
},
|
||||
"custom/pacman": {
|
||||
"format": "{} ",
|
||||
"interval": 3600, // every hour
|
||||
"exec": "checkupdates | wc -l", // # of updates
|
||||
"exec-if": "exit 0", // always run; consider advanced run conditions
|
||||
"on-click": "termite -e 'sudo pacman -Syu'; pkill -SIGRTMIN+8 waybar", // update system
|
||||
"signal": 8
|
||||
},
|
||||
"custom/updates": {
|
||||
"format": "{} {icon}",
|
||||
"return-type": "json",
|
||||
"format-icons": {
|
||||
"has-updates": "",
|
||||
"updated": ""
|
||||
},
|
||||
"exec-if": "which waybar-module-pacman-updates",
|
||||
"exec": "waybar-module-pacman-updates --interval-seconds 5 --network-interval-seconds 300"
|
||||
},
|
||||
}
|
||||
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/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\"}"
|
||||
+9
-1
@@ -97,7 +97,10 @@ button {
|
||||
#custom-launcher,
|
||||
#mpd,
|
||||
#language,
|
||||
#keyboard-state {
|
||||
#keyboard-state,
|
||||
#custom-updatees,
|
||||
#custom-weather
|
||||
{
|
||||
padding: 0 10px;
|
||||
color: #ffffff;
|
||||
/*background-color: #64727D;*/
|
||||
@@ -334,3 +337,8 @@ label:focus {
|
||||
margin: 0 1px;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
#custom-updates {
|
||||
padding: 2px 12px;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user