diff options
Diffstat (limited to '.config/scripts')
-rw-r--r-- | .config/scripts/mute_mac_chime.sh | 12 | ||||
-rwxr-xr-x | .config/scripts/network.sh | 9 |
2 files changed, 13 insertions, 8 deletions
diff --git a/.config/scripts/mute_mac_chime.sh b/.config/scripts/mute_mac_chime.sh new file mode 100644 index 00000000..a00c8e3e --- /dev/null +++ b/.config/scripts/mute_mac_chime.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# this needs to be ran as proper root (> su) + +# remove immutable flag +chattr -i /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82 + +# macos terminal uses BELL code (0x07) to audibly play system messages/warnings (such as the startup chime +# that simply confirms POST was successful and lets everyone else in the room know as well) so set it to null +printf "\x07\x00\x00\x00\x00" > /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82 + +# replace immutable flag +chattr +i /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82 diff --git a/.config/scripts/network.sh b/.config/scripts/network.sh index 3a71c743..789ebbc2 100755 --- a/.config/scripts/network.sh +++ b/.config/scripts/network.sh @@ -1,9 +1,2 @@ #!/bin/bash -iwgetid -r >&- 2> /dev/null - -if [ $? -eq 0 ] -then - iwgetid -r -else - echo "null" >&2 -fi +ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p' |