Skip to content

Instantly share code, notes, and snippets.

View sanskar10100's full-sized avatar
👨‍💻
Writing Instant Legacy Code

Sanskar Agrawal sanskar10100

👨‍💻
Writing Instant Legacy Code
View GitHub Profile
@sanskar10100
sanskar10100 / switch.sh
Created October 9, 2023 19:49
Switch between audio profiles on Bluetooth Headset - Linux
#!/bin/bash
# Get the name of the Bluetooth headset
device_name=$(pactl list cards | grep -B 20 "device.form_factor = \"headset\"" | grep "Name" | awk '{print $2}')
# Get the current active profile for the headset
active_profile=$(pactl list cards | grep -A 40 "Name: $device_name" | grep "Active Profile" | cut -d ' ' -f3)
# Toggle between the two profiles
# Complete list of available profiles can be seen by using pactl list cards
@sanskar10100
sanskar10100 / .gitignore
Created October 29, 2021 08:05
Android Studio gitignore
# Created by .ignore support plugin (hsz.mobi)
### Android template
# Built application files
*.apk
*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex