1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Compare commits

..

No commits in common. "f16a1986b0e1a7906be2f0a8b86e912db3d37457" and "3e153b8976a054264c9bb04ad2fb8d2f8595c5ee" have entirely different histories.

6 changed files with 43 additions and 31 deletions

View File

@ -36,19 +36,22 @@ A repository of my personal configuration files.
** Applications
- [[https://github.com/sharkdp/bat][bat]]
- [[https://brave.com/][brave]]
- [[https://github.com/baskerville/bspwm][bspwm]]
- [[https://github.com/caffeine-ng/caffeine-ng][caffeine-ng]]
- [[https://the.exa.website/][exa]]
- [[https://fishshell.com/][fish]]
- [[https://github.com/junegunn/fzf][fzf]]
- [[https://git-scm.com/][git]]
- [[https://github.com/cylgom/ly][Ly]]
- [[https://github.com/internalfx/mailcap][mailcap]]
- [[https://mpv.io/][mpv]]
- [[https://github.com/phuhl/notify-send.py][notify-send.py]]
- [[https://github.com/cdemoulins/pamixer][pamixer]]
- [[https://github.com/dylanaraps/pfetch][pfetch]]
- [[https://www.freedesktop.org/wiki/Software/PulseAudio/][Pulseaudio]]
- [[https://github.com/dylanaraps/pywal][pywal]]
- [[http://www.gnu.org/software/stow/][stow]]
- [[https://www.python.org/][Python]]
- [[https://www.freedesktop.org/wiki/Software/udisks/][udisks]]
- [[https://github.com/baskerville/sxhkd][sxhkd]]
- [[https://github.com/stoeckmann/xwallpaper][xwallpaper]]
** LSP Backends
- [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]]

View File

@ -44,7 +44,6 @@ bspc rule -a wttr state=floating
bspc rule -a neomutt state=floating
bspc rule -a newsboat state=floating
bspc rule -a updatearch state=floating
bspc rule -a lf state=floating
bspc rule -a Spotify desktop='^4'
bspc rule -a Spt desktop='^4'
bspc rule -a Emacs state=tiled

View File

@ -57,9 +57,15 @@ case "$1" in
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
for mount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint == null) | .name'); do
# udisksctl mount --no-user-interaction -b "$mount"
# mountpoint=$(udisksctl mount --no-user-interaction -b $mount)
# mountpoint=$(echo $mountpoint | cut -d " " -f 4 | tr -d ".")
# terminal -e "bash -lc 'filemanager $mountpoint'"
mountpoint=$(udisksctl mount --no-user-interaction -b "$mount")
mountpoint=$(echo "$mountpoint" | cut -d " " -f 4 | tr -d ".")
alacritty --class lf,lf -e lf "$mountpoint" &
alacritty -e vifm "$mountpoint" &
done
usb_update

View File

@ -1,9 +1,21 @@
#!/usr/bin/env bash
updown="$(sudo wg show "$1" 2> /dev/null)"
interfaces="$(sudo wg show | grep interface | awk -F ' ' '{print $2}')"
if [ "$updown" ]; then
echo "嬨 $1"
else
echo "%{F#666}嬨 $1%{F-}"
fi
interfaces=(${interfaces// / })
# Make sure to toggle spaces between interfaces for legibility
spaceToggle=
space=
for interface in "${interfaces[@]}"
do
if [ ! $spaceToggle ]; then
space=""
spaceToggle=true
else
space=" "
fi
echo -n "$space"嬨 "$interface"
done

View File

@ -41,7 +41,6 @@ inherit = bar/base-laptop
bottom = true
monitor = ${env:MONITOR:eDP1}
modules-right = system-usb-udev filesystem
modules-center = mpd player-mpris-tail
[bar/laptop-top]
@ -49,8 +48,8 @@ inherit = bar/base-laptop
monitor = ${env:MONITOR:eDP1}
modules-left = bspwm
modules-center = battery0 battery1 wlan wg0 wg1 bluetooth
modules-right = xbacklight volume-laptop memory cpu temperature docker updates-arch-combined mail reddit github rss weather date
modules-center = battery0 battery1 wlan wireguard bluetooth
modules-right = xbacklight volume-laptop memory cpu temperature filesystem docker updates-arch-combined mail reddit github rss weather date
tray-position = right
@ -59,7 +58,7 @@ inherit = bar/base-desktop
monitor = ${env:MONITOR:DP-1}
modules-left = bspwm
modules-center = mpd player-mpris-tail
modules-center = player-mpris-tail
modules-right = eth bluetooth volume memory cpu temperature system-usb-udev filesystem docker updates-arch-combined mail reddit github rss weather date
tray-position = right
@ -393,7 +392,7 @@ type = custom/script
exec = ~/.config/polybar/bin/rsscount
click-left = setsid alacritty --class newsboat,newsboat -e /usr/bin/newsboat
click-middle = setsid ~/.local/bin/newsup
click-middle = setsid newsup
[module/mail]
type = custom/script
@ -421,17 +420,11 @@ tail = true
click-left = sh ~/.config/polybar/bin/system-usb-udev --mount &
click-right = sh ~/.config/polybar/bin/system-usb-udev --unmount &
[module/wg0]
[module/wireguard]
type = custom/script
exec = ~/.config/polybar/bin/wireguard-status wg0
exec = ~/.config/polybar/bin/wireguard-status
;This doesn't work when run in the background for some reason
click-left = ~/.local/bin/wireguard-switch wg0
[module/wg1]
type = custom/script
exec = ~/.config/polybar/bin/wireguard-status wg1
;This doesn't work when run in the background for some reason
click-left = ~/.local/bin/wireguard-switch wg1
click-left = ~/.local/bin/wireguard-switch
[module/weather]
type = custom/script

View File

@ -1,19 +1,18 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
###
# Switch wireguard vpns up/down
###
STATUS="$(nmcli device status | grep -c $1)"
STATUS="$(nmcli device status | grep -c wg0)"
case $STATUS in
1)
wg-quick down "$1"
notify-send.py -a wireguard --replaces-process wireguard-status-"$1" -i network-vpn-offline-symbolic "Wireguard $1" "Connection down" &
wg-quick down wg0
notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-offline-symbolic Wireguard "Connection down" &
;;
*)
wg-quick up "$1"
notify-send.py -a wireguard --replaces-process wireguard-status-"$1" -i network-vpn-symbolic "Wireguard $1" "Connection up" &
wg-quick up wg0
notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-symbolic Wireguard "Connection up" &
;;
esac