отображать время в минуту, используя дату начала и время окончания

На wayland/libinputвики есть специальный раздел о Lenovo *40-й серии . Неработающая программная кнопка может быть признаком выхода -из -диапазона координат (, как это происходит с серией E540); см. здесь для настройки .

Как только диапазоны координат будут исправлены, -вся конфигурация Xorg должна работать из коробки, т.е.:

$ cat /etc/X11/xorg.conf.d/40-libinput.conf
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "XkbModel" "thinkpad"
        Option "xkb_layout" "ch"
        Option "xkb_variant" "fr"
        Option "XkbOptions" "ctrl:nocaps,terminate:ctrl_alt_shift_bksp,compose:caps"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

На моем E540 это дает по 3 кнопки сверху и снизу.

0
21.01.2020, 16:16
1 ответ

С GNU date, который может обрабатывать такие выражения, как +1 minute, это довольно просто:

#!/bin/bash
start='2019-12-31 23:57:00'
end='2020-01-01 00:03:00'

date=$start
while [[ $date < $end || $date == $end ]] ; do
    echo "$date"
    date=$(date -d "+1 minute $date" '+%Y-%m-%d %H:%M:%S')
done
0
28.01.2020, 02:57

Теги

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