big update
This commit is contained in:
parent
c9a826082a
commit
679a0ff8ce
2
emails
2
emails
@ -2,4 +2,4 @@
|
||||
|
||||
# We setup xauthority file to display stuff
|
||||
auth="$(xauth extract - "$DISPLAY" | base64)"
|
||||
exec sudo -u emails sh -c "echo -n '$auth' | base64 -d > ~/.Xauthority && . ~/.bashrc && cd ~/attachements && exec aerc"
|
||||
exec sudo -u emails sh -c "echo -n '$auth' | base64 -d > ~/.Xauthority && . ~/.bashrc && cd ~/attachements && exec neomutt"
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
# Lock screen and suspend if enabled in config file
|
||||
i3lock -e -c 000000 -u && [ -z "$(grep off "/run/user/1000/enable_suspend")" ] && systemctl suspend
|
||||
i3lock -e -c 000000 -u && [ "$(cat "$XDG_RUNTIME_DIR/enable_suspend")" != off ] && systemctl suspend
|
||||
|
20
startsync
20
startsync
@ -1,12 +1,8 @@
|
||||
nextcloud &
|
||||
feedreader &
|
||||
#jami-gnome &
|
||||
offlineimap
|
||||
vdirsyncer sync
|
||||
birthday_reminder
|
||||
while true ; do
|
||||
offlineimap -q
|
||||
#mpop -a
|
||||
#notmuch new
|
||||
sleep 30
|
||||
done
|
||||
#!/bin/bash
|
||||
|
||||
#feedreader &>/dev/null &
|
||||
#jami-gnome &>/dev/null &
|
||||
nicotine &>/dev/null &
|
||||
qbittorrent &>/dev/null &
|
||||
#vdirsyncer sync
|
||||
sudo -u emails syncmails
|
||||
|
5
term
5
term
@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
cd "$(readlink -f "/proc/$(pgrep -P $(xdotool getwindowpid "$(xdotool getactivewindow)"))/cwd")" &>/dev/null || cd "$HOME"
|
||||
#!/bin/bash
|
||||
pid="$(xdotool getactivewindow getwindowpid)"
|
||||
[ -n "$pid" ] && cd "$(readlink -f "/proc/$(pgrep -P "$pid")/cwd")" &>/dev/null || cd "$HOME"
|
||||
exec st "${SHELL:-bash}"
|
||||
|
22
wifi_chooser
22
wifi_chooser
@ -60,13 +60,29 @@ ssid="$(nmcli -f IN-USE,SSID,BARS d wifi list | dmenu -l 8)"
|
||||
ssid="$(echo "${ssid:2:-5}" | sed 's/^ *//g' | sed 's/ *$//g')"
|
||||
|
||||
# We get a clean version of SSIDs. It is a fix to connect to wifis that begin or end with spaces
|
||||
ssid="$(nmcli -f SSID -m multiline -t -c no d wifi list | grep -F "$ssid")"
|
||||
ssid="$(nmcli -f SSID -m multiline -t -c no d wifi list | grep -F -- "$ssid")"
|
||||
ssid="${ssid:5}"
|
||||
|
||||
[ $verb -gt 0 ] && echo "ssid: $ssid"
|
||||
[ -z "$ssid" ] && notify "No SSID selected" && exit 1
|
||||
|
||||
notify "Connecting to $ssid"
|
||||
out="$(nmcli d wifi connect "$ssid" 2>&1 | grep -i error)"
|
||||
#out="$(nmcli d wifi connect "$ssid" 2>&1 | grep -i error)"
|
||||
out="$(nmcli con up "$ssid" 2>&1 | grep -i error)"
|
||||
res="$?"
|
||||
[ -z "$out" ] && notify "Connected :)" || notify "Error connecting :(\n$out"
|
||||
# 10 If the connexion does not exist already #
|
||||
# 4 If the SSID got multiple bad connexion names #
|
||||
if [ "$res" -ne 0 ] ; then
|
||||
out2="$out"
|
||||
out="$(nmcli device wifi connect "$ssid" 2>&1 | grep -i error)"
|
||||
res="$?"
|
||||
fi
|
||||
if [ -n "$(echo $out | grep -i 'secrets were required')" ] ; then
|
||||
out2="$out2$out"
|
||||
notify "Need password"
|
||||
pass="$(zenity --password)"
|
||||
out="$(nmcli device wifi connect "$ssid" --password "$pass" 2>&1 | grep -i error)"
|
||||
res="$?"
|
||||
fi
|
||||
|
||||
[ -z "$out" ] && notify "Connected :)" || notify "Error connecting :(\n$out\n$out2"
|
||||
|
Loading…
Reference in New Issue
Block a user