Manual fixups for nerd fonts 3.0

* Make icon_prn a nerd-font icons. It was using a font awesome code
  point, which we don't install with sxmo.
* Fix phone locked and laptop icons that weren't automatically updated
* Fix brightness icon in legacy nerd-fonts range and move it to
  sxmo_hook_icons from sxmo_brightness
* Use standard Unicode arrows instead of nerd-fonts ones
* Use icon variables for arrows in sxmo_wmmenu.sh
* Add variable for audio icon & use in sxmo_audio.sh
* Remove no stray break space from sxmo_contactmenu
* Remove up arrow character from reddit script
* use only icon variables in modemtext
* Update icons breakpoints

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This commit is contained in:
ArenM
2023-05-07 13:37:33 -04:00
committed by Willow Barraco
parent 567331ab0b
commit 7ea019e402
9 changed files with 75 additions and 63 deletions

View File

@@ -23,7 +23,7 @@ menu() {
sed 's/===/\n/g' |
sed 's/^\t//g' |
sort -t"$(printf '%b' '\t')" -rnk4 |
awk -F'\t' '{ printf "%4s", $3; print " " $4 " " $1 " " $2 }'
awk -F'\t' '{ printf "%4s", $3; print " " $4 " " $1 " " $2 }'
)"
while true; do

View File

@@ -19,7 +19,7 @@ notifyvol() {
if [ "$SXMO_WM" = "sway" ] && [ -z "$SXMO_WOB_DISABLE" ]; then
printf "%s\n" "$vol" > "$XDG_RUNTIME_DIR"/sxmo.wobsock
else
dunstify -r 999 " Volume $vol"
dunstify -r 999 "$icon_audio Volume $vol"
fi
}

View File

@@ -4,13 +4,15 @@
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
. sxmo_common.sh
# shellcheck source=configs/default_hooks/sxmo_hook_icons.sh
. sxmo_hook_icons.sh
notify() {
if [ "$SXMO_WM" = "sway" ] && [ -z "$SXMO_WOB_DISABLE" ]; then
light | grep -o "^[0-9]*" > "$XDG_RUNTIME_DIR"/sxmo.wobsock
else
light | xargs dunstify -r 888 " Brightness"
light | xargs dunstify -r 888 "$icon_brightness Brightness"
fi
}

View File

@@ -80,7 +80,7 @@ deletecontact() {
ENTRIES="$(printf "$icon_cls No\n$icon_chk Yes")"
PICKED="$(
printf %b "$ENTRIES" |
dmenu -p "$icon_del Delete $name ?"
dmenu -p "$icon_del Delete $name?"
)"
# reverse them

View File

@@ -76,11 +76,11 @@ swaywmmenu() {
)"
if [ -n "$CURRENT_LAYOUT" ]; then
if [ "$CURRENT_LAYOUT" = "splith" ]; then
LAYOUT_LINE="splith → splitv → tabbed"
LAYOUT_LINE="splith $icon_arr splitv $icon_arr tabbed"
elif [ "$CURRENT_LAYOUT" = "tabbed" ] ; then
LAYOUT_LINE="tabbed → splith → splitv"
LAYOUT_LINE="tabbed $icon_arr splith $icon_arr splitv"
else
LAYOUT_LINE="splitv → tabbed → splith"
LAYOUT_LINE="splitv $icon_arr tabbed $icon_arr splith"
fi
fi
CHOICES="$(grep . <<EOF

View File

@@ -65,19 +65,24 @@ sendtextmenu() {
while true
do
# We use them in printf statements
export icon_cls
export icon_att
export icon_usr
ATTACHMENTS=
if [ -f "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" ]; then
# shellcheck disable=SC2016
ATTACHMENTS="$(
tr '\n' '\0' < "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" |
xargs -0 -I{} sh -c 'printf "%s %s %s :: %s\n" "" "" "$(basename "{}")" "{}"'
xargs -0 -I{} sh -c 'printf "%s %s %s :: %s\n" "$icon_cls" "$icon_att" "$(basename "{}")" "{}"'
)"
fi
RECIPIENTS=
if [ "$(printf %s "$NUMBER" | xargs pnc find | wc -l)" -gt 1 ]; then
# shellcheck disable=SC2016
RECIPIENTS="$(printf %s "$NUMBER" | xargs pnc find | xargs -I{} sh -c 'printf "  "$(sxmo_contacts.sh --name {})" :: {}\n"')"
RECIPIENTS="$(printf %s "$NUMBER" | xargs pnc find | xargs -I{} sh -c 'printf "$icon_cls $icon_usr "$(sxmo_contacts.sh --name {})" :: {}\n"')"
fi
CHOICES="$(printf "%s Send to %s (%s)\n%b\n%s Add Recipient\n%b\n%s Add Attachment\n%s Edit '%s'\n%s Cancel\n" \
@@ -98,7 +103,7 @@ sendtextmenu() {
fi
;;
# Remove Attachment
" "*)
"$icon_cls $icon_att"*)
FILE="$(printf %s "$CONFIRM" | awk -F' :: ' '{print $2}')"
sed -i "\|$FILE|d" "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt"
if [ ! -s "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" ] ; then
@@ -106,7 +111,7 @@ sendtextmenu() {
fi
;;
# Remove Recipient
" "*)
"$icon_cls $icon_usr"*)
if [ "$(printf %s "$NUMBER" | xargs pnc find | wc -l)" -gt 1 ]; then
OLDNUMBER="$NUMBER"
RECIPIENT="$(printf %s "$CONFIRM" | awk -F' :: ' '{print $2}')"