diff --git a/.local/scripts/show-wifi-password b/.local/scripts/show-wifi-password new file mode 100755 index 0000000..7130210 --- /dev/null +++ b/.local/scripts/show-wifi-password @@ -0,0 +1,20 @@ +#!/bin/bash + +curr_network=$(nmcli device wifi | rg "^\*" | awk '{print $3}') +if [ -z "$curr_network" ]; then + echo "Looks like we're not connected to any network" + exit 1 +fi + +path_to_net_conns="/etc/NetworkManager/system-connections" +fullpath="${path_to_net_conns}/${curr_network}.nmconnection" + +if [ ! -f "$fullpath" ]; then + echo "Could not find this wifi's Network Manager entry" + exit 1 +fi + +password=$(sudo cat $fullpath | rg "^psk" | cut -d "=" -f 2) + +echo Name: \ \ \ $curr_network +echo Password: $password diff --git a/.local/scripts/trackball.sh b/.local/scripts/trackball.sh new file mode 100755 index 0000000..0b3e7dc --- /dev/null +++ b/.local/scripts/trackball.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# Set mouse buttons for elecom +# 3 = 9 (forward) +# 8 = 3 (right click) +# 9 = 2 (middle click) +# 10 = 8 (back) +dev_id=$(xinput | rg "slave\s+pointer" | rg ELECOM | rg -o "id=(\d+)" -r '$1') +if [ -n "$dev_id" ]; then + xinput set-button-map $dev_id 1 2 9 4 5 6 7 2 3 8 + echo "Button mapping applied" >> /tmp/trackball.log +else + echo "No device found" >> /tmp/trackball.log +fi