mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
Compare commits
4 Commits
3e153b8976
...
f16a1986b0
Author | SHA1 | Date | |
---|---|---|---|
f16a1986b0 | |||
a9151051f5 | |||
de4b0c124a | |||
82550fdc9b |
@ -36,22 +36,19 @@ 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://github.com/baskerville/sxhkd][sxhkd]]
|
- [[https://www.freedesktop.org/wiki/Software/udisks/][udisks]]
|
||||||
- [[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,6 +44,7 @@ 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,15 +57,9 @@ 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 -e vifm "$mountpoint" &
|
alacritty --class lf,lf -e lf "$mountpoint" &
|
||||||
done
|
done
|
||||||
|
|
||||||
usb_update
|
usb_update
|
||||||
|
@ -1,21 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
interfaces="$(sudo wg show | grep interface | awk -F ' ' '{print $2}')"
|
updown="$(sudo wg show "$1" 2> /dev/null)"
|
||||||
|
|
||||||
interfaces=(${interfaces// / })
|
if [ "$updown" ]; then
|
||||||
|
echo "嬨 $1"
|
||||||
# Make sure to toggle spaces between interfaces for legibility
|
|
||||||
spaceToggle=
|
|
||||||
space=
|
|
||||||
|
|
||||||
for interface in "${interfaces[@]}"
|
|
||||||
do
|
|
||||||
if [ ! $spaceToggle ]; then
|
|
||||||
space=""
|
|
||||||
spaceToggle=true
|
|
||||||
else
|
else
|
||||||
space=" "
|
echo "%{F#666}嬨 $1%{F-}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "$space"嬨 "$interface"
|
|
||||||
done
|
|
||||||
|
@ -41,6 +41,7 @@ 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]
|
||||||
@ -48,8 +49,8 @@ inherit = bar/base-laptop
|
|||||||
monitor = ${env:MONITOR:eDP1}
|
monitor = ${env:MONITOR:eDP1}
|
||||||
|
|
||||||
modules-left = bspwm
|
modules-left = bspwm
|
||||||
modules-center = battery0 battery1 wlan wireguard bluetooth
|
modules-center = battery0 battery1 wlan wg0 wg1 bluetooth
|
||||||
modules-right = xbacklight volume-laptop memory cpu temperature filesystem docker updates-arch-combined mail reddit github rss weather date
|
modules-right = xbacklight volume-laptop memory cpu temperature docker updates-arch-combined mail reddit github rss weather date
|
||||||
|
|
||||||
tray-position = right
|
tray-position = right
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ inherit = bar/base-desktop
|
|||||||
monitor = ${env:MONITOR:DP-1}
|
monitor = ${env:MONITOR:DP-1}
|
||||||
|
|
||||||
modules-left = bspwm
|
modules-left = bspwm
|
||||||
modules-center = player-mpris-tail
|
modules-center = mpd 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
|
||||||
@ -392,7 +393,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 newsup
|
click-middle = setsid ~/.local/bin/newsup
|
||||||
|
|
||||||
[module/mail]
|
[module/mail]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
@ -420,11 +421,17 @@ 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/wireguard]
|
[module/wg0]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
exec = ~/.config/polybar/bin/wireguard-status
|
exec = ~/.config/polybar/bin/wireguard-status wg0
|
||||||
;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
|
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
|
||||||
|
|
||||||
[module/weather]
|
[module/weather]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
###
|
###
|
||||||
# Switch wireguard vpns up/down
|
# Switch wireguard vpns up/down
|
||||||
###
|
###
|
||||||
|
|
||||||
STATUS="$(nmcli device status | grep -c wg0)"
|
STATUS="$(nmcli device status | grep -c $1)"
|
||||||
|
|
||||||
case $STATUS in
|
case $STATUS in
|
||||||
1)
|
1)
|
||||||
wg-quick down wg0
|
wg-quick down "$1"
|
||||||
notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-offline-symbolic Wireguard "Connection down" &
|
notify-send.py -a wireguard --replaces-process wireguard-status-"$1" -i network-vpn-offline-symbolic "Wireguard $1" "Connection down" &
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
wg-quick up wg0
|
wg-quick up "$1"
|
||||||
notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-symbolic Wireguard "Connection up" &
|
notify-send.py -a wireguard --replaces-process wireguard-status-"$1" -i network-vpn-symbolic "Wireguard $1" "Connection up" &
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user