feat: teams auto microphone adjusting fix
This commit is contained in:
@@ -19,6 +19,7 @@ BASE_PACKAGE_LIST=(
|
|||||||
gh
|
gh
|
||||||
fd-find
|
fd-find
|
||||||
flatpak
|
flatpak
|
||||||
|
jq
|
||||||
python3
|
python3
|
||||||
python3-pip
|
python3-pip
|
||||||
ripgrep
|
ripgrep
|
||||||
@@ -102,8 +103,8 @@ done
|
|||||||
if [ "$PACKAGE_MANAGER" == "apt" ] && command -v fdfind &>/dev/null && ! command -v fd &>/dev/null; then
|
if [ "$PACKAGE_MANAGER" == "apt" ] && command -v fdfind &>/dev/null && ! command -v fd &>/dev/null; then
|
||||||
if dpkg-query -W -f='${Status}' "fd-find" 2>/dev/null | grep -q "ok installed"; then
|
if dpkg-query -W -f='${Status}' "fd-find" 2>/dev/null | grep -q "ok installed"; then
|
||||||
echo "Creating symlink for fd from fdfind..."
|
echo "Creating symlink for fd from fdfind..."
|
||||||
sudo ln -sf /usr/bin/fdfind /usr/local/bin/fd # or ~/.local/bin/fd if preferred
|
sudo ln -sf /usr/bin/fdfind /usr/local/bin/fd
|
||||||
fi # Ensure this line is just 'fi' (and optional comment)
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# 04-config-symlinks.sh
|
# 04-config-symlinks.sh
|
||||||
# Copies Starship config and symlinks dotfiles.
|
# Copies Starship config, configures Teams for Linux, and symlinks dotfiles.
|
||||||
# Relies on SCRIPT_ROOT_DIR being set by the caller.
|
# Relies on SCRIPT_ROOT_DIR being set by the caller.
|
||||||
|
|
||||||
echo "--- Starting Configuration and Symlinking ---"
|
echo "--- Starting Configuration and Symlinking ---"
|
||||||
@@ -16,6 +16,7 @@ STARSHIP_CONFIG_SOURCE="${SCRIPT_ROOT_DIR}/terminal/starship.toml"
|
|||||||
STARSHIP_CONFIG_DEST_DIR="$HOME/.config"
|
STARSHIP_CONFIG_DEST_DIR="$HOME/.config"
|
||||||
STARSHIP_CONFIG_DEST_FILE="${STARSHIP_CONFIG_DEST_DIR}/starship.toml"
|
STARSHIP_CONFIG_DEST_FILE="${STARSHIP_CONFIG_DEST_DIR}/starship.toml"
|
||||||
|
|
||||||
|
echo ""
|
||||||
echo "Setting up Starship configuration..."
|
echo "Setting up Starship configuration..."
|
||||||
if [ -f "$STARSHIP_CONFIG_SOURCE" ]; then
|
if [ -f "$STARSHIP_CONFIG_SOURCE" ]; then
|
||||||
mkdir -p "$STARSHIP_CONFIG_DEST_DIR"
|
mkdir -p "$STARSHIP_CONFIG_DEST_DIR"
|
||||||
@@ -25,7 +26,37 @@ else
|
|||||||
echo "WARNING: Starship config source not found: $STARSHIP_CONFIG_SOURCE. Skipping copy."
|
echo "WARNING: Starship config source not found: $STARSHIP_CONFIG_SOURCE. Skipping copy."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Teams for Linux Configuration
|
||||||
|
echo ""
|
||||||
|
echo "Setting up Teams for Linux (Community/Flatpak) configuration..."
|
||||||
|
TEAMS_FLATPAK_DIR="$HOME/.var/app/com.github.IsmaelMartinez.teams_for_linux"
|
||||||
|
|
||||||
|
# Only proceed if the application data directory exists
|
||||||
|
if [ -d "$TEAMS_FLATPAK_DIR" ]; then
|
||||||
|
# Check for jq dependency
|
||||||
|
if ! command -v jq &> /dev/null; then
|
||||||
|
echo "WARNING: 'jq' is not installed. Skipping Teams for Linux config."
|
||||||
|
else
|
||||||
|
CONFIG_DIR="${TEAMS_FLATPAK_DIR}/config/teams-for-linux"
|
||||||
|
CONFIG_FILE="${CONFIG_DIR}/config.json"
|
||||||
|
|
||||||
|
# Ensure the target directory exists
|
||||||
|
mkdir -p "$CONFIG_DIR"
|
||||||
|
|
||||||
|
# Safely add/update the disableAutogain setting using jq
|
||||||
|
# This handles a non-existent file gracefully by creating an empty JSON object
|
||||||
|
cat "$CONFIG_FILE" 2>/dev/null || echo "{}" | jq '.disableAutogain = true' > "${CONFIG_FILE}.tmp"
|
||||||
|
mv "${CONFIG_FILE}.tmp" "$CONFIG_FILE"
|
||||||
|
|
||||||
|
echo "Successfully configured 'disableAutogain: true' in $CONFIG_FILE"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Teams for Linux Flatpak directory not found. Skipping configuration."
|
||||||
|
fi
|
||||||
|
|
||||||
# Symlink files (keeping the original simple approach)
|
# Symlink files (keeping the original simple approach)
|
||||||
|
|
||||||
|
echo ""
|
||||||
echo "Symlinking dotfiles..."
|
echo "Symlinking dotfiles..."
|
||||||
FILES=('vimrc' 'vim' 'bashrc' 'zsh' 'agignore' 'gitconfig' 'gitignore' 'commit-conventions.txt' 'aliases.zsh')
|
FILES=('vimrc' 'vim' 'bashrc' 'zsh' 'agignore' 'gitconfig' 'gitignore' 'commit-conventions.txt' 'aliases.zsh')
|
||||||
|
|
||||||
@@ -47,5 +78,5 @@ for file in "${FILES[@]}"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "--- Configuration and Symlinking Finished ---"
|
echo ""
|
||||||
|
echo "--- Configuration and Symlinking Finished ---"
|
||||||
Reference in New Issue
Block a user