aboutsummaryrefslogblamecommitdiffstats
path: root/modules/sunmoon
blob: 4bbc062914bc2008d7a974f7d8d65eedd4f50972 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                               
#!/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