mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-11-21 10:02:53 +00:00
18 lines
311 B
Bash
Executable file
18 lines
311 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Outputs sun if its daytime and moon if its nighttime
|
|
# Requires the redshift package
|
|
|
|
SUN_ICON='盛'
|
|
MOON_ICON=''
|
|
|
|
get_sunmoon()
|
|
{
|
|
if [[ $(redshift -p | grep "Period" | awk '{print $2}') == "Night" ]]; then
|
|
echo "$MOON_ICON"
|
|
else
|
|
echo "$SUN_ICON"
|
|
fi
|
|
}
|
|
|
|
get_sunmoon
|