Compare commits

...

4 Commits

Author SHA1 Message Date
Lalle
ad77bbeab2
Merge b90c31bb54a05a1307b12f45540380477dcf78da into b8cd0ab4953d053fef09c48ba04f2fbb2df57aa4 2023-09-09 20:18:06 +06:00
sban
b8cd0ab495
Timeout added to forecast module, ncmpcpp now tracks player state (#1359)
* Added timeout to getforecast to prevent status bar breakage.

A 2 second timeout is used in the case that wttr.in is inaccessible when dwm is started; as otherwise it tries to curl wttr.in indefinitely, not allowing other status bar modules to be loaded.

* Update music status bar module on player state change
2023-09-05 07:51:05 +00:00
Lalle
b90c31bb54
Add ssh-agent 2023-06-21 18:09:52 +02:00
Lalle
47d0d37673
Launch dwm in a dbus session 2023-06-21 17:54:42 +02:00
4 changed files with 4 additions and 2 deletions

View File

@ -31,3 +31,4 @@ progressbar_elapsed_color = blue:b
statusbar_color = red
statusbar_time_color = cyan:b
execute_on_song_change="pkill -RTMIN+11 dwmblocks"
execute_on_player_state_change="pkill -RTMIN+11 dwmblocks"

View File

@ -14,4 +14,4 @@ else
. "$HOME/.xprofile"
fi
ssh-agent dwm
exec dbus-launch --exit-with-session dwm

View File

@ -8,6 +8,7 @@ setbg & # set the background with the `setbg` script
#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
autostart="mpd xcompmgr dunst unclutter pipewire remapd"
eval $(ssh-agent)
for program in $autostart; do
pidof -sx "$program" || "$program" &

View File

@ -7,7 +7,7 @@ url="${WTTRURL:-wttr.in}"
weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
# Get a weather report from 'wttr.in' and save it locally.
getforecast() { curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; }
getforecast() { timeout --signal=1 2s curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; }
# Forecast should be updated only once a day.
checkforecast() {