Таймаут Arch Gnome-Terminal

Не слишком элегантно, но это должно помочь:

#! /bin/bash
export LC_ALL=C # makes sure we're using C locale even in subshells
day_10_minutes_ago=$(date -d '-10min' +%a) # stores which weekday it was 10 minutes ago
day_now=$(date -d +%a) # stores which weekday it is now
if [ $day_10_minutes_ago = "Mon" ]; then # if ten minutes ago it was Monday
    if [ $day_now = "Mon" ] # if it's still Monday
        date -d '-1week 00:00' '+%F +%T' # prints the date and the time it was one week ago at 00:00
    else # it can only be Tuesday before 00:10:00 AM
        date -d '-1week-1day 00:00' '+%F +%T' # prints the date and the time it was one week and one day ago at 00:00
    fi
else # it can only be Tuesday after 00:09:59 AM, Wednesday, Thursday, Friday, Saturday or Sunday
    date -d 'last-monday 00:00' '+%F +%T' # prints the date and the time it was last Monday at 00:00
fi
0
05.03.2019, 18:10
2 ответа

Я не уверен, что именно я сделал, чтобы исправить это, но я думаю, что это была какая-то комбинация:

sudo locale-gen --purge
sudo locale-gen
localectl set-locale LANG="en_US.UTF-8"
sudo fc-cache -f -v
4
28.01.2020, 02:30

У меня тоже была эта проблема, и я был очень расстроен, потому что set-locale LANG="en_US.UTF-8"не привел к изменению локали.

Исправление :Добавьте эти строки в /etc/environment:

LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

Затем перезагрузите компьютер. Обратите внимание, что экспорт этих настроек в.bashrc не работает.

4
28.01.2020, 02:30

Теги

Похожие вопросы