From: Mart Lubbers Date: Fri, 26 Feb 2016 10:04:12 +0000 (+0100) Subject: added wifi script X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=597705ad735abef3def5a356f6e329eb2a978020;p=dotfiles.git added wifi script --- diff --git a/cal/.config/khal/khal.conf b/cal/.config/khal/khal.conf index 9f3745e..e945b99 100644 --- a/cal/.config/khal/khal.conf +++ b/cal/.config/khal/khal.conf @@ -31,3 +31,4 @@ firstweekday = 0 default_command = calendar default_calendar = mart show_all_days = True +editor = system diff --git a/shell/.bashrc b/shell/.bashrc index 0d6e71f..e199fb4 100644 --- a/shell/.bashrc +++ b/shell/.bashrc @@ -15,7 +15,7 @@ export PAGER=less export SUDO_ASKPASS=/usr/lib/ssh/ssh-askpass export NOTMUCH_CONFIG=/home/mart/.mutt/notmuch-config -export CLEAN_HOME=~/projects/clean +export CLEAN_HOME=~/projects/clean-itasks export PATH=$PATH:$CLEAN_HOME/lib/exe:$CLEAN_HOME/bin:~/.local/bin alias ls='ls --color=auto' diff --git a/x/.config/i3/config b/x/.config/i3/config index 06ef691..479c40c 100644 --- a/x/.config/i3/config +++ b/x/.config/i3/config @@ -28,6 +28,7 @@ bindsym $mod+l exec xautolock -locknow # put a password in the clipboard bindsym $mod+y exec passmenu bindsym $mod+b exec ~/.local/bin/network +bindsym $mod+Shift+b exec ~/.local/bin/wifi # font for window titles. font pango:$font 8 diff --git a/x/.local/bin/network b/x/.local/bin/network index a1cf48a..905ff44 100755 --- a/x/.local/bin/network +++ b/x/.local/bin/network @@ -1,3 +1,2 @@ #!/bin/bash -network="$(netctl list | cut -b 3- | dmenu)" -[[ $network != "" ]] && sudo -A netctl switch-to "$network" || true +netctl list | cut -b 3- | dmenu | ifne xargs sudo -A netctl switch-to diff --git a/x/.local/bin/wifi b/x/.local/bin/wifi new file mode 100755 index 0000000..f024272 --- /dev/null +++ b/x/.local/bin/wifi @@ -0,0 +1,5 @@ +#!/bin/bash +{ + sudo -A iw dev wlp2s0 scan | grep -Po "(?<=SSID: ).*" | sort -u; + netctl list | cut -b 3-; +} | sort | uniq -d | head -1 | ifne xargs sudo -A netctl switch-to