appointments only in statusbar if notifs allowed
This commit is contained in:
		@@ -12,8 +12,11 @@ if [ -n "$diff" ]; then
 | 
				
			|||||||
	else
 | 
						else
 | 
				
			||||||
		midnight=$(( $(date --date "$(date | sed 's/..:..:../23:59:59/; s/ PM//; s/ AM//')" +%s) + 1 ))
 | 
							midnight=$(( $(date --date "$(date | sed 's/..:..:../23:59:59/; s/ PM//; s/ AM//')" +%s) + 1 ))
 | 
				
			||||||
		if [ $midnight -gt "$time_appointment" ]; then
 | 
							if [ $midnight -gt "$time_appointment" ]; then
 | 
				
			||||||
 | 
								if [ ! -f /tmp/nodunst ]; then
 | 
				
			||||||
				printf '%s %s' "$(date --date "@$time_appointment" +'%H:%M')" "$appointment"
 | 
									printf '%s %s' "$(date --date "@$time_appointment" +'%H:%M')" "$appointment"
 | 
				
			||||||
			fi
 | 
								fi
 | 
				
			||||||
 | 
								printf '\n'
 | 
				
			||||||
 | 
							fi
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	printf '\n'
 | 
						printf '\n'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,12 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					APPOINTMENTS_SIGNAL=8
 | 
				
			||||||
if [ "$( dunstctl is-paused )" = "true" ]; then
 | 
					if [ "$( dunstctl is-paused )" = "true" ]; then
 | 
				
			||||||
	printf '🔕'
 | 
						printf '🔕\n'
 | 
				
			||||||
 | 
						if [ ! -f /tmp/nodunst ]; then
 | 
				
			||||||
 | 
							touch /tmp/nodunst
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
	printf '\n'
 | 
						printf '\n'
 | 
				
			||||||
 | 
						rm -f /tmp/nodunst
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					pkill -RTMIN+$APPOINTMENTS_SIGNAL dwmblocks #update appointments after file has been created/deleted
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user