dm
Publicado por Perfil removido (última atualização em 09/02/2017)
[ Hits: 2.484 ]
dm = dtach manager
Script utilizado para facilitar o uso do programa dtach, que tem a mesma função de attach do Tmux so que sem multiplexer.
Sintaxe:
dm *nome* *programa
Exemplo
dm irc irssi # inicia irssi com um FIFO em /tmp/dtach/irc
<Ctrl + f>
dm irc # Volta a sua sessão do irssi
#!/bin/sh
# dtach manager
# simplifies communication with dtach by removing options i don't use,
# settings nice defaults i can use and automate socket creation
# it takes the following args
# -h -- list usage, can also be show by just invoking dm
# -l -- lists sockets by reading all folders inside /tmp/dtach
# -d -- deletes a socket, used to remove dead sockets that weren't removed
# <alias> -- name that will be show in dm -l
# [command] -- name of the program, this is only necessary in the first time
# in the following times it will read /tmp/$NAME-socket and will open in the
# correct application, like << dm mail mutt >> then << ctrl-z >> , then typ
# ing << dm mail >> will open mutt anways
CMD="$1"
printusage() {
printf "%s [-hl] [-d alias] <alias> [command]\n" "$(basename "$0")"
}
listsockets() {
for socket in /tmp/dtach/*; do
printf "%s\n" "$( basename "$socket")";
done
}
if [ -z "$1" ]; then
printusage
exit 1
fi
if [ ! -d /tmp/dtach ]; then
mkdir /tmp/dtach
fi
case "$CMD" in
-h)
printusage
;;
-l)
listsockets
;;
-d)
rm -fv /tmp/dtach/"$2"
;;
*)
NAME="$1"
PROGRAM="$2"
exec dtach -A /tmp/dtach/"$NAME" -e "^f" "$PROGRAM"
;;
esac
usando o jSMS direto do pendrive (v2.0)
Autenticando no Velox Empresarial
Restaura gerenciador de boot grub
sbogrupo - ferramenta de consulta à base de dados do sbopkg
zswapdeslig.sh - Um "Desligador" de ZSWAP, SWAP em RAM para Sabayon Linux
Nenhum comentário foi encontrado.
Berry Bank: Criando um Banco Digital Gamificado para seus Filhos com Gentoo, Flask e Tailscale
Papagaiando o XFCE com temas e recursos
Instale o DOOM Retro no Gentoo facilmente via Overlay
Steam (Flatpak) rodando jogos em partição NTFS
O dock Plank + U-Launcher deixam qualquer desktop mais produtivo
Instalar Linux em notebook Sony Vaio VPCEG13EB (17)
Alguém tem que acabar com ANATEL!!! (10)
O que você está ouvindo agora? [2] (229)









