Created
October 29, 2016 21:48
-
-
Save Bandie/6e3582a14a1f31f7e1674c3704946a46 to your computer and use it in GitHub Desktop.
i3status stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Installation: | |
# Move this script into ~/.i3/ | |
# | |
# In ~/.i3/config: | |
# bar { | |
# status_command ~/.i3/status.sh | |
# } | |
# | |
# | |
# Feel free to add more stuff. | |
# | |
i3status | ( while : | |
do | |
read line | |
## Summer / Wintertime - Set your time to UTC! | |
st=$(TZ=CET date +%Z) | |
if [ $st = "CEST" ] | |
then | |
st=",{\"full_text\": \"+2\"}" | |
else | |
st=",{\"full_text\": \"+1\"}" | |
fi | |
## Order | |
order="${st}" | |
## Scriptstuff | |
if [[ "${line}" =~ .*version.* ]] || [ -z "${line}" ] || [[ "${line}" = "[" ]] | |
then | |
line=${line} | |
else | |
line=$(echo ${line} | sed 's/]//g') | |
line=${line}${order} | |
fi | |
echo "${line}" || exit 1 | |
done) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment