Use alerting colors in demu.

This commit is contained in:
dabruh 2022-06-08 10:33:49 +02:00
parent 609d134064
commit 41f9e43441
1 changed files with 5 additions and 2 deletions

View File

@ -1,11 +1,14 @@
#!/bin/bash
# shellcheck disable=SC2086
COLORS="-nb #e74c3c -nf #303030 -sb #c0392b -sf #ecf0f1"
COMMANDS="$(i3exit commands | sed 's/\,/\ /g' | sed 's/.*/\L&/; s/[a-z]*/\u&/g')"
ACTION="$(xargs -n 1 <<<"$COMMANDS" | dmenu -i -p "exitctl")"
ACTION="$(xargs -n 1 <<<"$COMMANDS" | dmenu -i -p "exitctl" $COLORS)"
[ -z "$ACTION" ] && exit 1
echo "INFO: Selected action $ACTION."
CONFIRMATION="$(xargs -n 1 <<<"No Yes" | dmenu -i -p "Are you sure you want to ${ACTION,,}?")"
CONFIRMATION="$(xargs -n 1 <<<"No Yes" | dmenu -i -p "Are you sure you want to ${ACTION,,}?" $COLORS)"
{ [ -z "$CONFIRMATION" ] || [[ "$CONFIRMATION" != "Yes" ]]; } && exit 1
echo "INFO: Action confirmed."