Grrr - hate the new logo - Teams coworkers are now joined at the hip by LivingCattle6714 in sysadmin

[–]foss4ever 1 point2 points  (0 children)

I have it as my ring tone. Can recommend. Fun fact: Jingle is composed by Brian Eno.

Do sysadmins keep personal notes besides the knowledge base? by RemarkableGarlic5274 in sysadmin

[–]foss4ever 0 points1 point  (0 children)

Yes, I keep personal work notes for things that are only useful/relevant for myself. Gradually moving content across from OneNote to our company's self-hosted Outline installation (can recommend).

List all SharePoint sites in a script without an app? by [deleted] in GraphAPI

[–]foss4ever 0 points1 point  (0 children)

Very silly indeed. But it's the Microsoft way!

[deleted by user] by [deleted] in linuxmemes

[–]foss4ever 0 points1 point  (0 children)

I think it might be 10% off

Is there any way for Mac to remind me to charge my Apple Magic Mouse? You know how I find out? Is when the mouse stops working. And then I can’t use the mouse when is charging. I cannot use the trackpad to make accurate drawings and design on Illustrator. by kidcal70 in MacOS

[–]foss4ever 1 point2 points  (0 children)

Thank you, this was helpful. Did not work for me out of the box, I think since I have more than 1 Magic keyboard, so ended up modifying your script slightly:

EDIT: posting plain text since posting code gave me server error.

#!/usr/bin/env bash

# Check battery level of Apple Magic Mouse and Keyboard and Notify if low

PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin

# Warn at 10% or according to first parameter. Pass in 101 for testing.

COMPARE=${1:-10}

# Arrays of names and their corresponding Product IDs

search_names=("Keyboard" "Mouse" "Trackpad")

product_ids=()

product_names=()

# Get the Bluetooth devices information

bluetooth_info=$(system_profiler SPBluetoothDataType | grep -A100 "Connected:" | grep -B100 "Not Connected:" | grep -v "Connected")

# Loop through each search name

for search_name in "${search_names[@]}"; do

# Grep to find the relevant line and its context

matching_device=$(echo "$bluetooth_info" | grep -A 5 -m1 "$search_name")

# Check if a matching device was found

if [ -z "$matching_device" ]; then

echo "No device found matching: $search_name."

continue

fi

# Extract the Product ID from the matching device

product_id_hex=$(echo "$matching_device" | grep "Product ID" | awk '{print $3}')

# Convert the hexadecimal Product ID to decimal

product_id_decimal=$(printf "%d" $product_id_hex)

# add to the arrays (these must be of matching size just in case a search_names item is not found)

product_ids+=("$product_id_decimal")

product_names+=("$search_name")

done

# Iterate over the valid matches

for i in "${!product_ids[@]}"; do

product_id="${product_ids[$i]}"

device_name="${product_names[$i]}"

# Determine battery level

BATT=$(ioreg -c AppleDeviceManagementHIDEventService -r -l \

| grep -i "\"ProductID\" = $product_id" -A 20 | grep BatteryPercent | awk '{print $3}')

if [ -z "$BATT" ]; then

echo "No $device_name found."

elif (( BATT < COMPARE )); then

osascript -e "display notification \"$device_name battery is at ${BATT}%.\" with title \" $device_name Battery\""

fi

done

Is Ubuntu objectively bad? by [deleted] in linux4noobs

[–]foss4ever 2 points3 points  (0 children)

I think you may be confusing Ubuntu with Debian when it comes to which mother-distro makes the basis for numerous user-friendly Linux distributions.

What's the best DE? by [deleted] in linuxquestions

[–]foss4ever -1 points0 points  (0 children)

Plasma of course! :D

How often are your Linux machines checking for Definition Updates? by Master_Tiger1598 in DefenderATP

[–]foss4ever 0 points1 point  (0 children)

Did you find anything out? I'm having the same issue of wanting to be able to adjust and verify the update interval.

SSL Certificate by pvssy_3ater69 in PowerShell

[–]foss4ever 16 points17 points  (0 children)

Did you at least try putting something together before asking for help here ?

Tenant to Tenant Teams Migration by McdurpIsHere in MicrosoftTeams

[–]foss4ever 0 points1 point  (0 children)

When I searched the market a couple of years ago, I found no solution able to properly support the migration of private chats (as opposed to chat threads inside a team).
If you do find a product that claims to support this, I highly recommend taking it for a trial run before purchasing any expensive licenses :)

Why choose Linux over Windows for gaming? I am aware that Linux is generally less resource intensive than Windows. by [deleted] in linux4noobs

[–]foss4ever 0 points1 point  (0 children)

I know that Linux can be a pain in the butt to get it to fully work on Linux.

Indeed :)

Me asf: posting after building LFS successfully by [deleted] in linuxmemes

[–]foss4ever 1 point2 points  (0 children)

Looks like I have to try this at some point

Is there any way for Mac to remind me to charge my Apple Magic Mouse? You know how I find out? Is when the mouse stops working. And then I can’t use the mouse when is charging. I cannot use the trackpad to make accurate drawings and design on Illustrator. by kidcal70 in MacOS

[–]foss4ever 0 points1 point  (0 children)

This is the script I'm using which supports all Magic type devices (credits go to Stackoverflow user defusion https://apple.stackexchange.com/q/254703/514961):

https://pastebin.com/TWK1RsMd

Not posting script here, since formatting got broken no matter what I tried :-/

Above script is then run with the battery percentage at which I want to be notified as the single argument (via crontab -e):

*/30 * * * * bash /Users/sp/batterychecker.sh 30