i3lock, вызываемый i3-nagbar, запускается в фоновом режиме

Если вы сделаете aws s3 lsдля фактического имени файла. Если имя файла существует,код выхода будет 0 и будет отображаться имя файла, в противном случае код выхода не будет 0:

aws s3 ls s3://bucket/filname
if [[ $? -ne 0 ]]; then
  echo "File does not exist"
fi
0
19.06.2019, 16:00
1 ответ

Я не совсем уверен, почему, но если вы используете -Bвместо -b, то это работает правильно. Со страницы руководства:

       -b, --button button action
           Create a button with text button. The action are the shell commands that will be executed by this button. Multiple buttons can be defined. Will launch the shell commands inside a terminal emulator, using i3-sensible-terminal.

       -B, --button-no-terminal button action
           Same as above, but will execute the shell commands directly, without launching a terminal emulator.

Работает моя команда:

bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit' -B 'Lock Screen' 'i3lock -c 000000'"
0
28.01.2020, 03:33

Теги

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