my dotz
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add simple vpn suite

+39 -7
+5 -2
.config/sway/zora
··· 1 - output * bg /home/j3s/Pictures/whale.jpg fill 1 + output * bg /home/j3s/Pictures/flowers.jpg tile 2 2 3 3 # This will lock your screen after 300 seconds of inactivity, then turn off 4 4 # your displays after another 300 seconds, and turn your screens back on when ··· 13 13 for_window [class="Chromium"] inhibit_idle fullscreen 14 14 15 15 bindsym $mod+Shift+i exec jira-fuzzel 16 + bindsym $mod+Prior exec vpn 17 + bindsym $mod+Next exec vpn kill 16 18 17 19 # Laptop outputs are managed automatically using kanshi 18 - exec_always pkill kanshi; exec kanshi 20 + # see https://github.com/emersion/kanshi/issues/43 21 + exec_always pkill kanshi; exec kanshi &> /tmp/kanshi.debug
+14 -5
bin/zora/statusbar
··· 2 2 3 3 while true 4 4 do 5 - battery="🐟 $(cat /sys/class/power_supply/BAT0/capacity)%" 6 - wifi="🐡 $(nmcli ge status | grep -v STATE | awk '{print $1}')" 5 + vpn="disconnected" 6 + if ip link ls tun0 > /dev/null 2>&1; then 7 + vpn="connected" 8 + fi 9 + wifi="disconnected (0%)" 10 + if nmcli dev show wlp0s20f3 | grep GENERAL.STATE | grep -q connected; then 11 + wifiname="$(nmcli dev show wlp0s20f3 | awk '/GENERAL.CONNECTION/ {print $2}')" 12 + wifistrength="$(nmcli dev show wlp0s20f3 | awk '/GENERAL.STATE/ {print $2}')" 13 + wifi="$wifiname ($wifistrength%)" 14 + fi 15 + battery="$(cat /sys/class/power_supply/BAT0/capacity)%" 7 16 time=$(date +"%A %Y-%m-%d %I:%M %p") 8 - est_time=$(TZ=America/New_York date +"(%I:%M ET)") 9 - time="🦈 $time $est_time $(date -u +"(%H:%M UTC)")" 17 + est_time=$(TZ=America/New_York date +"(🗽%I:%M ET)") 18 + time="$time $est_time $(date -u +"(🤖%H:%M UTC)")" 10 19 # --date='TZ="America/New_York" 11 - printf "%s | %s | %s\n" "${wifi}" "${battery}" "${time}" 20 + printf "%s | %s | %s\n" "💓 ${wifi} (vpn $vpn)" "🥤 ${battery}" "${time}" 12 21 sleep 10 13 22 done
+20
bin/zora/vpn
··· 1 + #!/bin/sh 2 + # 3 + # connects or kills the gp 4 + # vpn tunnel 5 + 6 + if [ "$1" = "kill" ]; then 7 + notify-send '🤬 killing vpn' -t 2000 8 + sudo pkill openconnect 9 + else 10 + notify-send '👼 connecting vpn' -t 1000 11 + # the two-line pipe method used here was described 12 + # in this issue: https://github.com/dlenski/openconnect/issues/103#issuecomment-383416545 13 + if pgrep openconnect; then 14 + sleep 1 15 + notify-send '😳 vpn already running' -t 2000 16 + exit 17 + fi 18 + printf "%s\n%s" "$(pa show vpn)" "1" | 19 + sudo openconnect -u jolson --passwd-on-stdin --protocol=gp https://vpn-nyc3.digitalocean.com/ssl-vpn 20 + fi