Compare commits
No commits in common. "90d2373ee21b46a1bc4c8c8ece1f0d7c55259928" and "862e50a6e090b495e5eba3f8b76ce1db6f7b7485" have entirely different histories.
90d2373ee2
...
862e50a6e0
2
address
2
address
@ -2,4 +2,4 @@
|
|||||||
khard email "$@" | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b"
|
khard email "$@" | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b"
|
||||||
|
|
||||||
s="$@"
|
s="$@"
|
||||||
[ "$#" -gt 0 ] && notmuch address "$s" | grep -i "$s"
|
[ "$#" -gt 0 ] && notmuch address "$@" | grep -i "$s"
|
||||||
|
5
emails
5
emails
@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# We setup xauthority file to display stuff
|
|
||||||
xauthority="$(cat ~/.Xauthority)"
|
|
||||||
exec sudo -u emails sh -c "echo \"$xauthority\" > ~/.Xauthority && . ~/.bashrc && exec aerc"
|
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Lock screen and suspend if enabled in config file
|
# Lock screen and suspend if enabled in config file
|
||||||
i3lock -e -c 000000 -u && [ -z "$(grep off "/run/user/1000/enable_suspend")" ] && systemctl suspend
|
DISPLAY=:0 i3lock -e -c 000000 -u && [ -z "$(grep off "/run/user/1000/enable_suspend")" ] && systemctl suspend
|
||||||
|
8
switch-wifi
Executable file
8
switch-wifi
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [[ "$(nmcli radio wifi)" = "enabled" ]] ; then
|
||||||
|
nmcli radio wifi off
|
||||||
|
notify-send "Wifi is now" off
|
||||||
|
else
|
||||||
|
nmcli radio wifi on
|
||||||
|
notify-send "Wifi is now" on
|
||||||
|
fi
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ -z "$(grep off "$XDG_RUNTIME_DIR/enable_suspend")" ] ; then
|
if [ -z "$(grep off "/run/user/1000/enable_suspend")" ] ; then
|
||||||
echo off > "$XDG_RUNTIME_DIR/enable_suspend"
|
echo off > "$XDG_RUNTIME_DIR/enable_suspend"
|
||||||
notify-send "Sleep mode is now" "off"
|
notify-send "Sleep mode is now" "off"
|
||||||
else
|
else
|
||||||
|
36
wifi_chooser
36
wifi_chooser
@ -2,32 +2,6 @@
|
|||||||
# choose a wifi signal in range and try to connect to it
|
# choose a wifi signal in range and try to connect to it
|
||||||
|
|
||||||
verb=0
|
verb=0
|
||||||
action=start
|
|
||||||
|
|
||||||
while true ; do
|
|
||||||
case "$1" in
|
|
||||||
"-v")
|
|
||||||
verb=1
|
|
||||||
;;
|
|
||||||
"stop")
|
|
||||||
action=stop
|
|
||||||
;;
|
|
||||||
"start") ;;
|
|
||||||
"") break ;;
|
|
||||||
*)
|
|
||||||
echo "Invalid parameter '$1'"
|
|
||||||
break;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
# Remaining args are garbage
|
|
||||||
if [ "$#" -ne 0 ] ; then
|
|
||||||
echo "Usage: $0 [-v] [start|stop]"
|
|
||||||
echo "-v verbose output"
|
|
||||||
echo "start or stop the wifi"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
title="Wifi Selector"
|
title="Wifi Selector"
|
||||||
id=""
|
id=""
|
||||||
@ -39,18 +13,10 @@ notify () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stop the wifi if asked
|
|
||||||
if [ "$action" == "stop" ] ; then
|
|
||||||
nmcli radio wifi off
|
|
||||||
notify "Wifi stopped"
|
|
||||||
exit "$?"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Else, start it if needed
|
|
||||||
if ( nmcli radio wifi | grep disabled > /dev/null ) ; then
|
if ( nmcli radio wifi | grep disabled > /dev/null ) ; then
|
||||||
notify "Turning on"
|
notify "Turning on"
|
||||||
nmcli radio wifi on
|
nmcli radio wifi on
|
||||||
sleep 2
|
sleep 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
notify "Scanning networks in range..."
|
notify "Scanning networks in range..."
|
||||||
|
Loading…
Reference in New Issue
Block a user