
Enviado em 22/02/2025 - 16:57h
Na pasta $HOME/Desktop/back/1 tem dois arquivos .desktop
DIRS=(
"$HOME/Desktop/back/1"
)
DESKTOP_FILES=$(find "${DIRS[@]}" -type f -name "*.desktop")
if [ -z "$DESKTOP_FILES" ]; then
yad --center --text="Nenhum arquivo .desktop encontrado." --width=300 --height=100 --button="OK:0"
exit 1
fi
rm /tmp/arquivo.txt
# Processando arquivos com espaços
while IFS= read -r file; do
# Verifica se a linha contém um arquivo válido
if [ -n "$file" ]; then
NAME=$(grep ^Name= "$file" | cut -d= -f2 | head -n1)
COMMENT=$(grep ^Comment= "$file" | cut -d= -f2 | head -n1)
NODISPLAY=$(grep ^NoDisplay= "$file" | cut -d= -f2 | head -n1)
# Substituir valores vazios por string vazia
[ -z "$NAME" ] && NAME=""
[ -z "$COMMENT" ] && COMMENT=""
[ -z "$NODISPLAY" ] && NODISPLAY="false"
if [ "$NODISPLAY" == "false" ]; then
NODISPLAY="Ativado"
OPCAO="TRUE"
elif [ "$NODISPLAY" == "true" ]; then
NODISPLAY="Desativado"
OPCAO="FALSE"
fi
# Adiciona os dados no arquivo temporário
echo "$OPCAO|$NAME|$COMMENT|$NODISPLAY" >> /tmp/arquivo.txt
fi
done <<< "$DESKTOP_FILES"
yad --center \
--title="Arquivos .desktop" \
--list \
--text='<span foreground="blue" font="14">deseja ativar ou desativar os atalhos</span>' \
--radiolist --multiple --separator="|" \
--column="Selecionar:CHK" --column="Programas" --column="Comentário" --column="Status" \
$(cat /tmp/arquivo.txt) \
--button="Salvar":10 --button="Cancelar":1 \
--width="1200" --height="600"
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Linux em 2025: Segurança prática para o usuário
Desktop Linux em alta: novos apps, distros e privacidade marcam o sábado
IA chega ao desktop e impulsiona produtividade no mundo Linux
Novos apps de produtividade, avanços em IA e distros em ebulição agitam o universo Linux
Como instalar o repositório do DBeaver no Ubuntu
Como instalar o Plex Media Server no Ubuntu
Digitando underscore com "shift" + "barra de espaços"
Como ativar a lixeira e recuperar aquivos deletados em um servidor Linux
Como mudar o nome de dispositivos Bluetooth via linha de comando
Problemas com Driver NVIDIA (0)
Programa fora de escala na tela do pc (19)
Fedora KDE plasma 42 X Módulo de segurança BB (Warsaw-2) (1)









