From f16a1986b0e1a7906be2f0a8b86e912db3d37457 Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Fri, 13 Mar 2020 13:52:53 +0100 Subject: [PATCH] Added usb mount support to polybar --- README.org | 7 ++----- bspwm/.config/bspwm/bspwmrc | 1 + polybar/.config/polybar/bin/system-usb-udev | 8 +------- polybar/.config/polybar/config | 3 ++- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/README.org b/README.org index fda0596..6e9a1e0 100644 --- a/README.org +++ b/README.org @@ -36,22 +36,19 @@ 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://github.com/baskerville/sxhkd][sxhkd]] +- [[https://www.freedesktop.org/wiki/Software/udisks/][udisks]] - [[https://github.com/stoeckmann/xwallpaper][xwallpaper]] ** LSP Backends - [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]] diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index ac7eb69..6d9570b 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -44,6 +44,7 @@ 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 diff --git a/polybar/.config/polybar/bin/system-usb-udev b/polybar/.config/polybar/bin/system-usb-udev index 2665744..f3c984b 100755 --- a/polybar/.config/polybar/bin/system-usb-udev +++ b/polybar/.config/polybar/bin/system-usb-udev @@ -57,15 +57,9 @@ 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 -e vifm "$mountpoint" & + alacritty --class lf,lf -e lf "$mountpoint" & done usb_update diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index ea238a0..8553a1c 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -41,6 +41,7 @@ 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,7 +50,7 @@ monitor = ${env:MONITOR:eDP1} modules-left = bspwm 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