Compare commits

...

3 Commits

Author SHA1 Message Date
poeplva
15a092be8b
Merge 5ac6bde1d1be40392793f202b6981cc02d8d61b6 into 708d6c67317ca90138681d4a7892cc5db2e092cc 2023-10-06 16:40:59 +00:00
appeasementPolitik
708d6c6731
Change remaining tremc entry in script to stig (#1364) 2023-10-04 20:01:05 +00:00
poeplva
5ac6bde1d1
none of the encrypted devices are listed if no drives are decrypted already
The part
```
for open in $decrypted; do
		[ "$uuid" = "$open" ] && break 1
done
```
exits with `0` if the variable `$decrypted` is empty, causing none of the encrypted devices to be put into the `$unopenedluks` variable. This commit fixes this problem.
2023-06-09 18:34:30 +03:00
2 changed files with 3 additions and 3 deletions

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
uuid="${drive%% *}"
uuid="${uuid//-}" # This is a bashism.
for open in $decrypted; do
[ -n "$decrypted" ] && for open in $decrypted; do
[ "$uuid" = "$open" ] && break 1
done && continue 1
echo "🔒 $drive"

View File

@ -11,9 +11,9 @@ transmission-remote -l | grep % |
sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -
case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e tremc ;;
1) setsid -f "$TERMINAL" -e stig ;;
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.
- Shift click to edit script.
Module shows number of torrents: