linux
pulseaudio
shell script
xfce
Learn More →
Se estiver no Arch Linux, instale os pacotes xfce4-genmon-plugin
e newaita-icons-git
:
sudo pikaur -Syu newaita-icons-git xfce4-genmon-plugin
Crie as pastas necessárias:
mkdir -p ~/bin/ ~/.config/xfce4/scripts/
Crie o script em ~/bin/select-sinks.sh
:
#!/usr/bin/env bash
sink=$(pactl list short sinks | awk 'NR==1{print $2}')
active=$(LANG=C pactl list sinks | awk '{if ($1 == "Active" && $2 == "Port:") {gsub(/[ \t]+$/, "", $2);print $3; exit;}}')
port_one=$(LANG=C pactl list sinks | awk '/Ports/{getline;gsub(":","");gsub(/[ \t]+$/, "", $2);print $1;}')
port_two=$(LANG=C pactl list sinks | awk '/Ports/{getline;getline;gsub(":","");gsub(/[ \t]+$/, "", $2);print $1;}')
if [[ $port_one == *"$active"* ]]; then
pacmd set-sink-port $sink $port_two
exit 0
fi
if [[ $port_two == *"$active"* ]]; then
pacmd set-sink-port $sink $port_one
exit 0
fi
Em seguida outro em ~/.config/xfce4/scripts/sinks.sh
:
#!/usr/bin/env bash
sink=$(pactl list short sinks | awk 'NR==1{print $2}')
active=$(LANG=C pactl list sinks | awk '{if ($1 == "Active" && $2 == "Port:") {print $3; exit;}}')
icon="/usr/share/icons/Newaita-dark/devices/22/audio-headset.svg"
if [[ $active != *"headphones"* ]]; then
icon="/usr/share/icons/Newaita-dark/.DP/22/speaker.svg"
fi
echo "<img>${icon}</img>"
echo "<click>bash -c $HOME/bin/select-sink.sh</click>"
Clique com o direito na barra de tarefas do XFCE e vá em Painel
> Adicionar novos itens...
:
Learn More →
Selecione Monitor genérico
e clique em Adicionar
:
Learn More →
No novo item que será criado, clique com o botão direito e vá em Propriedades
:
Learn More →
Em Comando
adicione o seguinte comando:
bash -c "$HOME/.config/xfce4/scripts/sinks.sh"
Desmarque Rótulo
e Período(s)
deixe em 10,00
depois clique em Salvar
:
Learn More →
Altofalante | Headset |
---|---|
Image Not Showing
Possible Reasons
|
Image Not Showing
Possible Reasons
|
Se esse artigo foi útil pra você de alguma maneira(eu espero que sim :grinning:) considere doar um valor simbólico ou me patrocinar para que eu possa ajudar sempre mais.
Learn More →
Learn More →
Learn More →
Learn More →
Learn More →
Learn More →
Learn More →
´´´
Apr 19, 2024https://vim.rtorr.com/
Jan 3, 2024https://wiki.archlinux.org/title/QEMU
Dec 30, 2023Composer Para começar é necessário ter o composer instalado. Baixe ele aqui, em seguida(opcional): sudo mv composer.phar /usr/local/bin/composer Laravel Instalação Primeiro vamos criar um novo projeto novo: composer create-project laravel/laravel --prefer-dist site
Sep 18, 2021or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up