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.
f16a1986b0
...
3e153b8976
@ -36,19 +36,22 @@ A repository of my personal configuration files.
|
|||||||
** Applications
|
** Applications
|
||||||
- [[https://github.com/sharkdp/bat][bat]]
|
- [[https://github.com/sharkdp/bat][bat]]
|
||||||
- [[https://brave.com/][brave]]
|
- [[https://brave.com/][brave]]
|
||||||
|
- [[https://github.com/baskerville/bspwm][bspwm]]
|
||||||
- [[https://github.com/caffeine-ng/caffeine-ng][caffeine-ng]]
|
- [[https://github.com/caffeine-ng/caffeine-ng][caffeine-ng]]
|
||||||
- [[https://the.exa.website/][exa]]
|
- [[https://the.exa.website/][exa]]
|
||||||
|
- [[https://fishshell.com/][fish]]
|
||||||
- [[https://github.com/junegunn/fzf][fzf]]
|
- [[https://github.com/junegunn/fzf][fzf]]
|
||||||
|
- [[https://git-scm.com/][git]]
|
||||||
|
- [[https://github.com/cylgom/ly][Ly]]
|
||||||
- [[https://github.com/internalfx/mailcap][mailcap]]
|
- [[https://github.com/internalfx/mailcap][mailcap]]
|
||||||
- [[https://mpv.io/][mpv]]
|
- [[https://mpv.io/][mpv]]
|
||||||
- [[https://github.com/phuhl/notify-send.py][notify-send.py]]
|
|
||||||
- [[https://github.com/cdemoulins/pamixer][pamixer]]
|
- [[https://github.com/cdemoulins/pamixer][pamixer]]
|
||||||
- [[https://github.com/dylanaraps/pfetch][pfetch]]
|
- [[https://github.com/dylanaraps/pfetch][pfetch]]
|
||||||
- [[https://www.freedesktop.org/wiki/Software/PulseAudio/][Pulseaudio]]
|
- [[https://www.freedesktop.org/wiki/Software/PulseAudio/][Pulseaudio]]
|
||||||
- [[https://github.com/dylanaraps/pywal][pywal]]
|
- [[https://github.com/dylanaraps/pywal][pywal]]
|
||||||
- [[http://www.gnu.org/software/stow/][stow]]
|
- [[http://www.gnu.org/software/stow/][stow]]
|
||||||
- [[https://www.python.org/][Python]]
|
- [[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]]
|
- [[https://github.com/stoeckmann/xwallpaper][xwallpaper]]
|
||||||
** LSP Backends
|
** LSP Backends
|
||||||
- [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]]
|
- [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]]
|
||||||
|
@ -44,7 +44,6 @@ bspc rule -a wttr state=floating
|
|||||||
bspc rule -a neomutt state=floating
|
bspc rule -a neomutt state=floating
|
||||||
bspc rule -a newsboat state=floating
|
bspc rule -a newsboat state=floating
|
||||||
bspc rule -a updatearch state=floating
|
bspc rule -a updatearch state=floating
|
||||||
bspc rule -a lf state=floating
|
|
||||||
bspc rule -a Spotify desktop='^4'
|
bspc rule -a Spotify desktop='^4'
|
||||||
bspc rule -a Spt desktop='^4'
|
bspc rule -a Spt desktop='^4'
|
||||||
bspc rule -a Emacs state=tiled
|
bspc rule -a Emacs state=tiled
|
||||||
|
@ -57,9 +57,15 @@ case "$1" in
|
|||||||
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
|
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
|
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=$(udisksctl mount --no-user-interaction -b "$mount")
|
||||||
mountpoint=$(echo "$mountpoint" | cut -d " " -f 4 | tr -d ".")
|
mountpoint=$(echo "$mountpoint" | cut -d " " -f 4 | tr -d ".")
|
||||||
alacritty --class lf,lf -e lf "$mountpoint" &
|
alacritty -e vifm "$mountpoint" &
|
||||||
done
|
done
|
||||||
|
|
||||||
usb_update
|
usb_update
|
||||||
|
@ -1,9 +1,21 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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
|
interfaces=(${interfaces// / })
|
||||||
echo "嬨 $1"
|
|
||||||
else
|
# Make sure to toggle spaces between interfaces for legibility
|
||||||
echo "%{F#666}嬨 $1%{F-}"
|
spaceToggle=
|
||||||
fi
|
space=
|
||||||
|
|
||||||
|
for interface in "${interfaces[@]}"
|
||||||
|
do
|
||||||
|
if [ ! $spaceToggle ]; then
|
||||||
|
space=""
|
||||||
|
spaceToggle=true
|
||||||
|
else
|
||||||
|
space=" "
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "$space"嬨 "$interface"
|
||||||
|
done
|
||||||
|
@ -41,7 +41,6 @@ inherit = bar/base-laptop
|
|||||||
bottom = true
|
bottom = true
|
||||||
monitor = ${env:MONITOR:eDP1}
|
monitor = ${env:MONITOR:eDP1}
|
||||||
|
|
||||||
modules-right = system-usb-udev filesystem
|
|
||||||
modules-center = mpd player-mpris-tail
|
modules-center = mpd player-mpris-tail
|
||||||
|
|
||||||
[bar/laptop-top]
|
[bar/laptop-top]
|
||||||
@ -49,8 +48,8 @@ inherit = bar/base-laptop
|
|||||||
monitor = ${env:MONITOR:eDP1}
|
monitor = ${env:MONITOR:eDP1}
|
||||||
|
|
||||||
modules-left = bspwm
|
modules-left = bspwm
|
||||||
modules-center = battery0 battery1 wlan wg0 wg1 bluetooth
|
modules-center = battery0 battery1 wlan wireguard bluetooth
|
||||||
modules-right = xbacklight volume-laptop memory cpu temperature docker updates-arch-combined mail reddit github rss weather date
|
modules-right = xbacklight volume-laptop memory cpu temperature filesystem docker updates-arch-combined mail reddit github rss weather date
|
||||||
|
|
||||||
tray-position = right
|
tray-position = right
|
||||||
|
|
||||||
@ -59,7 +58,7 @@ inherit = bar/base-desktop
|
|||||||
monitor = ${env:MONITOR:DP-1}
|
monitor = ${env:MONITOR:DP-1}
|
||||||
|
|
||||||
modules-left = bspwm
|
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
|
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
|
tray-position = right
|
||||||
@ -393,7 +392,7 @@ type = custom/script
|
|||||||
|
|
||||||
exec = ~/.config/polybar/bin/rsscount
|
exec = ~/.config/polybar/bin/rsscount
|
||||||
click-left = setsid alacritty --class newsboat,newsboat -e /usr/bin/newsboat
|
click-left = setsid alacritty --class newsboat,newsboat -e /usr/bin/newsboat
|
||||||
click-middle = setsid ~/.local/bin/newsup
|
click-middle = setsid newsup
|
||||||
|
|
||||||
[module/mail]
|
[module/mail]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
@ -421,17 +420,11 @@ tail = true
|
|||||||
click-left = sh ~/.config/polybar/bin/system-usb-udev --mount &
|
click-left = sh ~/.config/polybar/bin/system-usb-udev --mount &
|
||||||
click-right = sh ~/.config/polybar/bin/system-usb-udev --unmount &
|
click-right = sh ~/.config/polybar/bin/system-usb-udev --unmount &
|
||||||
|
|
||||||
[module/wg0]
|
[module/wireguard]
|
||||||
type = custom/script
|
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
|
;This doesn't work when run in the background for some reason
|
||||||
click-left = ~/.local/bin/wireguard-switch wg0
|
click-left = ~/.local/bin/wireguard-switch
|
||||||
|
|
||||||
[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
|
|
||||||
|
|
||||||
[module/weather]
|
[module/weather]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
###
|
###
|
||||||
# Switch wireguard vpns up/down
|
# Switch wireguard vpns up/down
|
||||||
###
|
###
|
||||||
|
|
||||||
STATUS="$(nmcli device status | grep -c $1)"
|
STATUS="$(nmcli device status | grep -c wg0)"
|
||||||
|
|
||||||
case $STATUS in
|
case $STATUS in
|
||||||
1)
|
1)
|
||||||
wg-quick down "$1"
|
wg-quick down wg0
|
||||||
notify-send.py -a wireguard --replaces-process wireguard-status-"$1" -i network-vpn-offline-symbolic "Wireguard $1" "Connection down" &
|
notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-offline-symbolic Wireguard "Connection down" &
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
wg-quick up "$1"
|
wg-quick up wg0
|
||||||
notify-send.py -a wireguard --replaces-process wireguard-status-"$1" -i network-vpn-symbolic "Wireguard $1" "Connection up" &
|
notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-symbolic Wireguard "Connection up" &
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user