Add pulseaudio config, fix up bash alises and fix up single instance checking in boot verification and signing.

This commit is contained in:
Captain ALM 2024-11-14 10:01:32 +00:00
parent 7c718d14b7
commit 174a7a3eaa
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1
5 changed files with 34 additions and 8 deletions

View File

@ -10,9 +10,10 @@ alias waydroid-launch="weston-phone && waydroid-start & read && waydroid-stop"
alias show-waydroid="waydroid-show" alias show-waydroid="waydroid-show"
alias swd="waydroid-show" alias swd="waydroid-show"
alias launch-waydroid="waydroid-launch" alias launch-waydroid="waydroid-launch"
alias screen-off="xset dpms force off" alias screen-off="sleep 0.1 && xset dpms force off"
alias boot-sign-verify="sudo sign-boot && sudo verify-boot" alias boot-sign-verify="sudo sign-boot && sudo verify-boot"
alias rdp-session-desktop-cvd="xfreerdp3 ~/Downloads/SessionDesktop.rdpw /gateway:type:arm /sec:aad +clipboard /w:1920 /h:1020 +auto-reconnect" alias rdp-session-desktop-cvd="xfreerdp3 ~/Downloads/SessionDesktop.rdpw /gateway:type:arm /sec:aad +clipboard /w:1920 /h:1000 +auto-reconnect"
alias pulse-restart="systemctl --user stop pulseaudio.socket pulseaudio.service && sleep 1 && systemctl --user start pulseaudio.socket pulseaudio.service"
function conda-activate() { function conda-activate() {
eval "$(~/anaconda3/bin/conda shell.bash hook)"; eval "$(~/anaconda3/bin/conda shell.bash hook)";
} }
@ -229,6 +230,9 @@ function record-screen-x11() {
cd "$cwd"; cd "$cwd";
} }
function search-in-files() { function search-in-files() {
grep -Rn "$1" -e "$2";
}
function search-word-in-files() {
grep -Rnw "$1" -e "$2"; grep -Rnw "$1" -e "$2";
} }
function apt-search() { function apt-search() {

View File

@ -0,0 +1,17 @@
#CALM DEF
#load-module module-alsa-sink device=hw:0,0 sink_name=internal_speakers
#update-sink-proplist internal_speakers device.icon_name="audio-speakers"
#load-module module-alsa-sink device=hw:0,3 sink_name=hdmi_speakers
#update-sink-proplist hdmi_speakers device.icon_name="audio-speakers"
load-module module-remap-sink sink_name=internal_speakers_left master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-center remix=no
update-sink-proplist internal_speakers_left device.description="Remapped internal speakers to front-left and front-center"
load-module module-remap-sink sink_name=hdmi_speakers_right master=alsa_output.pci-0000_00_1f.3.hdmi-stereo channels=2 master_channel_map=front-left,front-right channel_map=front-center,front-right remix=no
update-sink-proplist hdmi_speakers_right device.description="Remapped HDMI speakers to front-center and front-right"
load-module module-combine-sink sink_name=is_left_hs_right slaves=internal_speakers_left,hdmi_speakers_right channels=3 channel_map=front-left,front-center,front-right
update-sink-proplist is_left_hs_right device.description="Combined Internal and HDMI Speakers"
update-sink-proplist is_left_hs_right device.icon_name="audio-speakers"

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
if [ -f /run/sign-verify-boot-flag ]; then if [ -f /run/sign-verify-boot-flag ]; then
echo "[-] Waiting for in-progress Signing / Verifying!"; echo "[-] Waiting for in-progress Signing / Verifying!";
while lsof /run/sign-verify-boot-flag > /dev/null 2>&1; do sleep 0.1; done while /usr/bin/lsof /run/sign-verify-boot-flag > /dev/null 2>&1; do sleep 0.1; done
while [ -f /run/sign-verify-boot-flag ]; do sleep 0.1; done while /usr/bin/kill -0 "$(cat /run/sign-verify-boot-flag)" > /dev/null 2>&1; do sleep 1; done
fi; fi;
/usr/bin/touch /run/sign-verify-boot-flag; /usr/bin/echo -n "$$" > /run/sign-verify-boot-flag;
echo "[*] Preparing to sign!"; echo "[*] Preparing to sign!";
echo "[-] BMOK Un-Signing..."; echo "[-] BMOK Un-Signing...";
for i in $(/usr/bin/find /boot/grub -iname "*.efi" -type f -print) for i in $(/usr/bin/find /boot/grub -iname "*.efi" -type f -print)

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
if [ -f /run/sign-verify-boot-flag ]; then if [ -f /run/sign-verify-boot-flag ]; then
echo "[-] Waiting for in-progress Signing / Verifying!"; echo "[-] Waiting for in-progress Signing / Verifying!";
while lsof /run/sign-verify-boot-flag > /dev/null 2>&1; do sleep 0.1; done while /usr/bin/lsof /run/sign-verify-boot-flag > /dev/null 2>&1; do sleep 0.1; done
while [ -f /run/sign-verify-boot-flag ]; do sleep 0.1; done while /usr/bin/kill -0 "$(cat /run/sign-verify-boot-flag)" > /dev/null 2>&1; do sleep 1; done
fi; fi;
/usr/bin/touch /run/sign-verify-boot-flag; /usr/bin/echo -n "$$" > /run/sign-verify-boot-flag;
echo "[*] Preparing to verify!"; echo "[*] Preparing to verify!";
echo "[-] Missing Signatures:"; echo "[-] Missing Signatures:";
ec=0; ec=0;

View File

@ -0,0 +1,5 @@
#CALM DEF
[Profile output:analog-stereo+output:hdmi-stereo+input:analog-stereo]
description = Computer HDMI Output and Computer Input
output-mappings = analog-stereo hdmi-stereo
input-mappings = analog-stereo