Merge branch 'master' of github.com:LukeSmithxyz/voidrice

This commit is contained in:
Luke Smith 2023-10-28 08:41:43 -04:00
commit 0cc589bcad
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
11 changed files with 32 additions and 12 deletions

View file

@ -32,7 +32,7 @@
<family>monospace</family> <family>monospace</family>
<prefer> <prefer>
<family>Noto Sans Mono</family> <family>Noto Sans Mono</family>
<family>Liberatinus Mono</family> <family>Libertinus Mono</family>
<family>FontAwesome</family> <family>FontAwesome</family>
<family>Braille</family> <family>Braille</family>
</prefer> </prefer>

View file

@ -58,7 +58,22 @@ cmd extract ${{
printf "%s\n\t" "$fx" printf "%s\n\t" "$fx"
printf "extract?[y/N]" printf "extract?[y/N]"
read ans read ans
[ $ans = "y" ] && aunpack $fx [ $ans = "y" ] && {
case $fx in
*.tar.bz2) tar xjf $fx ;;
*.tar.gz) tar xzf $fx ;;
*.bz2) bunzip2 $fx ;;
*.rar) unrar e $fx ;;
*.gz) gunzip $fx ;;
*.tar) tar xf $fx ;;
*.tbz2) tar xjf $fx ;;
*.tgz) tar xzf $fx ;;
*.zip) unzip $fx ;;
*.Z) uncompress $fx ;;
*.7z) 7z x $fx ;;
*.tar.xz) tar xf $fx ;;
esac
}
}} }}
cmd delete ${{ cmd delete ${{

View file

@ -31,3 +31,4 @@ progressbar_elapsed_color = blue:b
statusbar_color = red statusbar_color = red
statusbar_time_color = cyan:b statusbar_time_color = cyan:b
execute_on_song_change="pkill -RTMIN+11 dwmblocks" execute_on_song_change="pkill -RTMIN+11 dwmblocks"
execute_on_player_state_change="pkill -RTMIN+11 dwmblocks"

View file

@ -13,5 +13,6 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then
else else
. "$HOME/.xprofile" . "$HOME/.xprofile"
fi fi
# Activate dbus variables
dbus-update-activation-environment --all
ssh-agent dwm ssh-agent dwm

View file

@ -12,7 +12,7 @@ inputaudio="$1"
ext="${1##*.}" ext="${1##*.}"
# Get a safe file name from the book. # Get a safe file name from the book.
escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")" escbook="$(echo "$booktitle" | iconv -c -f UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
! mkdir -p "$escbook" && ! mkdir -p "$escbook" &&
echo "Do you have write access in this directory?" && echo "Do you have write access in this directory?" &&
@ -31,7 +31,7 @@ do
cmd="$cmd -metadata artist=\"$author\" -metadata title=\"$title\" -metadata album=\"$booktitle\" -metadata year=\"$year\" -metadata track=\"$track\" -metadata total=\"$total\" -ss \"$start\" -to \"$end\" -vn -c:a copy \"$file\" " cmd="$cmd -metadata artist=\"$author\" -metadata title=\"$title\" -metadata album=\"$booktitle\" -metadata year=\"$year\" -metadata track=\"$track\" -metadata total=\"$total\" -ss \"$start\" -to \"$end\" -vn -c:a copy \"$file\" "
fi fi
title="$(echo "$x" | cut -d' ' -f2-)" title="$(echo "$x" | cut -d' ' -f2-)"
esctitle="$(echo "$title" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")" esctitle="$(echo "$title" | iconv -c -f UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
track="$((track+1))" track="$((track+1))"
start="$end" start="$end"
done < "$2" done < "$2"

View file

@ -36,7 +36,7 @@ filter() { sed "s/ /:/g" | awk -F':' '$7==""{printf "%s%s (%s) %s\n",$1,$3,$5,$6
unopenedluks="$(for drive in $allluks; do unopenedluks="$(for drive in $allluks; do
uuid="${drive%% *}" uuid="${drive%% *}"
uuid="${uuid//-}" # This is a bashism. uuid="${uuid//-}" # This is a bashism.
for open in $decrypted; do [ -n "$decrypted" ] && for open in $decrypted; do
[ "$uuid" = "$open" ] && break 1 [ "$uuid" = "$open" ] && break 1
done && continue 1 done && continue 1
echo "🔒 $drive" echo "🔒 $drive"

View file

@ -7,7 +7,7 @@ url="${WTTRURL:-wttr.in}"
weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
# Get a weather report from 'wttr.in' and save it locally. # Get a weather report from 'wttr.in' and save it locally.
getforecast() { curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; } getforecast() { timeout --signal=1 2s curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; }
# Forecast should be updated only once a day. # Forecast should be updated only once a day.
checkforecast() { checkforecast() {

View file

@ -25,9 +25,9 @@ elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ] ; then
fi fi
# Ethernet # Ethernet
[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="🌐 " || ethericon="❎ " [ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="🌐" || ethericon="❎"
# TUN # TUN
[ -n "$(cat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon="🔒 " [ -n "$(cat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon=" 🔒"
printf "%s%s%s\n" "$wifiicon" "$ethericon" "$tunicon" printf "%s%s%s\n" "$wifiicon" "$ethericon" "$tunicon"

View file

@ -4,7 +4,7 @@
# When clicked, brings up `neomutt`. # When clicked, brings up `neomutt`.
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e neomutt ;; 1) setsid -w -f "$TERMINAL" -e neomutt; pkill -RTMIN+12 "${STATUSBAR:-dwmblocks}" ;;
2) setsid -f mw -Y >/dev/null ;; 2) setsid -f mw -Y >/dev/null ;;
3) notify-send "📬 Mail module" "\- Shows unread mail 3) notify-send "📬 Mail module" "\- Shows unread mail
- Shows 🔃 if syncing mail - Shows 🔃 if syncing mail

View file

@ -11,9 +11,9 @@ transmission-remote -l | grep % |
sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' - sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e tremc ;; 1) setsid -f "$TERMINAL" -e stig ;;
2) td-toggle ;; 2) td-toggle ;;
3) notify-send "🌱 Torrent module" "\- Left click to open tremc. 3) notify-send "🌱 Torrent module" "\- Left click to open stig.
- Middle click to toggle transmission. - Middle click to toggle transmission.
- Shift click to edit script. - Shift click to edit script.
Module shows number of torrents: Module shows number of torrents:

3
.local/bin/xdg-terminal-exec Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
"$TERMINAL" -e "$@"