From 732ec3fed4f234527082304042376d26ddeffe7d Mon Sep 17 00:00:00 2001 From: Jack Sangdahl <0x6A73@pm.me> Date: Sat, 21 Jan 2023 11:11:07 -0700 Subject: add mute startup chime script & misc stuff --- .config/scripts/mute_mac_chime.sh | 12 ++++++++++++ .config/scripts/network.sh | 9 +-------- .config/starship.toml | 2 ++ .config/sway/config | 5 +++-- .config/user-dirs.dirs | 4 ++++ .pkglist.txt | 2 +- 6 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 .config/scripts/mute_mac_chime.sh create mode 100644 .config/user-dirs.dirs 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' diff --git a/.config/starship.toml b/.config/starship.toml index dbad30f0..449debb2 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -12,3 +12,5 @@ disabled = true disabled = true [cmake] disabled = true +[perl] +disabled = true diff --git a/.config/sway/config b/.config/sway/config index 9ff13cf7..eb1778f5 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -54,6 +54,7 @@ bindsym $mod+Escape exec swaylock # audio bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioPlay exec playerctl play-pause bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous @@ -61,8 +62,8 @@ bindsym XF86AudioPrev exec playerctl previous # lighting bindsym XF86MonBrightnessDown exec brightnessctl -q set 10%- bindsym XF86MonBrightnessUp exec brightnessctl -q set +10% -bindsym XF86KbdBrightnessDown exec brightnessctl -q --device='smc::kbd_backlight' set 10%- -bindsym XF86KbdBrightnessUp exec brightnessctl -q --device='smc::kbd_backlight' set +10% +bindsym XF86KbdBrightnessDown exec brightnessctl -q --device='smc::kbd_backlight' set 10%- +bindsym XF86KbdBrightnessUp exec brightnessctl -q --device='smc::kbd_backlight' set +10% # reload configuration file bindsym $mod+Shift+c reload diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs new file mode 100644 index 00000000..611bdcb0 --- /dev/null +++ b/.config/user-dirs.dirs @@ -0,0 +1,4 @@ +XDG_DESKTOP_DIR="$HOME/" +XDG_DOCUMENTS_DIR="$HOME/Documents" +XDG_DOWNLOAD_DIR="$HOME/Downloads" +XDG_PICTURES_DIR="$HOME/" diff --git a/.pkglist.txt b/.pkglist.txt index 4f3deae4..7f6ea180 100644 --- a/.pkglist.txt +++ b/.pkglist.txt @@ -50,7 +50,7 @@ media-gfx/imv media-sound/playerctl media-sound/spotify media-video/pipewire -net-im/discord-bin +net-im/discord net-misc/adjtimex net-misc/chrony net-misc/dhcpcd -- cgit v1.2.3