Compare commits

...

3 Commits

Author SHA1 Message Date
Trag Date
7b2d3355dc
Merge de8b25170dfa3c23b316978c5791ba3ef045e915 into ea3e1e14cc49d68c9900fb05d9ee7bb9e719688e 2023-10-30 15:31:00 +11:00
Joey-Pepperoni
ea3e1e14cc
Update sb-music (#1367)
The s/\\&/&/g operation only effect is to add "amp;" after any ampersand in the artist or song name. "&" displays just fine anyways, so there's no reason to include an operation to replace it.
2023-10-29 12:21:47 +00:00
Trag Date
de8b25170d
fixed selecting Romanian language
The script did not actually select Romanian language when picked, it was basically US layout
2023-10-17 12:47:33 +03:00
2 changed files with 10 additions and 6 deletions

View File

@ -5,12 +5,16 @@ kb="$(setxkbmap -query | grep -oP 'layout:\s*\K\w+')" || exit 1
case $BLOCK_BUTTON in
1) kb_choice="$(awk '/! layout/{flag=1; next} /! variant/{flag=0} flag {print $2, "- " $1}' /usr/share/X11/xkb/rules/base.lst | dmenu -l 15)"
[ -z "$kb_choice" ] && exit 0
kb="$(echo "$kb_choice" | awk '{print $3}')"
setxkbmap "$kb"
pkill -RTMIN+30 "${STATUSBAR:-dwmblocks}";;
kb="$(echo "$kb_choice" | awk '{print $3}')"
# actually pick romanian when selected
if [ "${kb}" = "ro" ]; then
setxkbmap -layout ro -variant std
else
setxkbmap "$kb"
fi
pkill -RTMIN+30 "${STATUSBAR:-dwmblocks}";;
3) notify-send "⌨ Keyboard/language module" "$(printf "%s" "\- Current layout: $(setxkbmap -query | grep -oP 'layout:\s*\K\w+')")
- Left click to change keyboard.";;
- Left click to change keyboard.";;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac

View File

@ -1,6 +1,6 @@
#!/bin/sh
filter() { sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;}
filter() { sed "/^volume:/d;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;}
pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 &