diff options
author | Urbain Vaes <urbain@vaes.uk> | 2021-09-03 18:22:36 +0200 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2021-09-03 18:22:36 +0200 |
commit | 29cbb903a5c2bf074b26e3c87c4cbb69793b3e19 (patch) | |
tree | 30f892c515e32fc5338ea6383a62248955d6f1a5 /i3/.config | |
parent | fce46ed7e852dfc60466c50f348c0c2c7caba7fc (diff) |
Fix i3 bugs
Diffstat (limited to 'i3/.config')
-rw-r--r-- | i3/.config/i3/config | 2 | ||||
-rwxr-xr-x | i3/.config/i3blocks/bin/wifi | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/i3/.config/i3/config b/i3/.config/i3/config index e51e8ac..c55e14c 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -192,6 +192,8 @@ bindsym XF86MonBrightnessUp exec light -A 10 bindsym XF86MonBrightnessDown exec light -U 10 bindsym Prior exec light -A 10 bindsym Next exec light -U 10 +bindsym Shift+Prior exec amixer -D pulse sset Master 5%+ +bindsym Shift+Next exec amixer -D pulse sset Master 5%- bindsym Shift+XF86AudioRaiseVolume exec light -A 10 bindsym Shift+XF86AudioLowerVolume exec light -U 10 diff --git a/i3/.config/i3blocks/bin/wifi b/i3/.config/i3blocks/bin/wifi index bc24672..b545c24 100755 --- a/i3/.config/i3blocks/bin/wifi +++ b/i3/.config/i3blocks/bin/wifi @@ -1,15 +1,16 @@ #!/usr/bin/env bash -quality=$(iwconfig wlp2s0 2>/dev/null | grep -oP 'Link Quality=\K[0-9]*/[0-9]*' | awk -F'/' '{print int(100*$1/$2)}') -ssid=$(iwconfig wlp2s0 2>/dev/null | grep -oP '(?<=ESSID:").*(?=")') -wifi_address=$(ip addr show wlp2s0 2>/dev/null | grep -oP -m1 "(?<=inet ).*(?=/)") +wireless=$(ip link | grep -oP -m1 "(wlp[^:]*)") +quality=$(iwconfig $wireless 2>/dev/null | grep -oP 'Link Quality=\K[0-9]*/[0-9]*' | awk -F'/' '{print int(100*$1/$2)}') +ssid=$(iwconfig $wireless 2>/dev/null | grep -oP '(?<=ESSID:")[^\"]*') +wifi_address=$(ip addr show $wireless 2>/dev/null | grep -oP -m1 "(?<=inet ).*(?=/)") eth_address=$(ip addr show eno1 2>/dev/null | grep -oP -m1 "(?<=inet ).*(?=/)") if [[ -n $eth_address ]]; then full_text="eno1: $eth_address" ip_addr="$eth_address" elif [[ -n $wifi_address ]]; then - full_text="wlp2s0: (${quality}% at ${ssid}) ${wifi_address}" + full_text="${wifi_address} (${quality}% at ${ssid})" ip_addr="$wifi_address" else echo "No connection" |