Compare commits
4 Commits
862e50a6e0
...
90d2373ee2
Author | SHA1 | Date | |
---|---|---|---|
90d2373ee2 | |||
d49f19e48b | |||
35f8cdfba0 | |||
4735d58b77 |
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 "$@" | grep -i "$s"
|
[ "$#" -gt 0 ] && notmuch address "$s" | grep -i "$s"
|
||||||
|
5
emails
Executable file
5
emails
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/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
|
||||||
DISPLAY=:0 i3lock -e -c 000000 -u && [ -z "$(grep off "/run/user/1000/enable_suspend")" ] && systemctl suspend
|
i3lock -e -c 000000 -u && [ -z "$(grep off "/run/user/1000/enable_suspend")" ] && systemctl suspend
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#!/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 "/run/user/1000/enable_suspend")" ] ; then
|
if [ -z "$(grep off "$XDG_RUNTIME_DIR/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,6 +2,32 @@
|
|||||||
# 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=""
|
||||||
@ -13,10 +39,18 @@ 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 1
|
sleep 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
notify "Scanning networks in range..."
|
notify "Scanning networks in range..."
|
||||||
|
Loading…
Reference in New Issue
Block a user