From 5ebbd10bc82cbb688d6e36615899aba582122dca Mon Sep 17 00:00:00 2001 From: natemaia Date: Sun, 3 Mar 2019 01:04:41 -0800 Subject: [PATCH] Update configs --- base/bin/rofi_run | 125 +++++++++++++------------------ bspwm-home/.config/bspwm/bspwmrc | 4 - 2 files changed, 53 insertions(+), 76 deletions(-) diff --git a/base/bin/rofi_run b/base/bin/rofi_run index 2a9a032d..4942390f 100755 --- a/base/bin/rofi_run +++ b/base/bin/rofi_run @@ -1,7 +1,7 @@ #!/usr/bin/env bash -NAME=$(basename "$0") -VER="0.5" +NAME="${0##*/}" +VER="0.6" usage() { @@ -33,75 +33,56 @@ usage() EOF } -for arg in "$@"; do - case $arg in - -h|--help) - usage - exit 0 - ;; - -v|--version) - echo -e "$NAME -- Version $VER" - exit 0 - ;; - -r|--run) - rofi -modi run,drun -show drun -line-padding 4 \ - -columns 2 -padding 50 -hide-scrollbar \ - -show-icons -drun-icon-theme "ArchLabs-Light" - ;; - -w|--window) - rofi -modi window -show window -hide-scrollbar -padding 50 -line-padding 4 - ;; - -q|--qalculate) - hash qalc &>/dev/null || - { echo "Requires 'libqalculate' installed"; exit 1; } - - rofi -modi "calc:qalc +u8 -nocurrencies" -padding 50 \ - -show "calc:qalc +u8 -nocurrencies" -line-padding 4 \ - -hide-scrollbar - ;; - -c|--clipboard) - hash greenclip &>/dev/null || - { echo "Requires 'greenclip' installed"; exit 1; } - - rofi -modi "clipboard:greenclip print" -padding 50 \ - -line-padding 4 -show "clipboard:greenclip print" \ - -hide-scrollbar - ;; - -b|--browser) - hash surfraw &>/dev/null || - { echo "Requires 'surfraw' installed"; exit 1; } - - surfraw -browser="$BROWSER" "$(sr -elvi | awk -F'-' '{print $1}' | - sed '/:/d' | awk '{$1=$1};1' | - rofi -hide-scrollbar -kb-row-select 'Tab' \ - -kb-row-tab 'Control+space' -dmenu \ - -mesg 'Tab for Autocomplete' -i -p 'Web Search' \ - -padding 50 -line-padding 4)" - ;; - -l|--logout) - if grep -q 'exec startx' $HOME/.*profile; then - ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 \ - -hide-scrollbar -line-padding 4 -padding 20 \ - -lines 3 <<< " Lock| Reboot| Shutdown")" - else - ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 \ - -hide-scrollbar -line-padding 4 -padding 20 \ - -lines 4 <<< " Lock| Logout| Reboot| Shutdown")" - fi - - case "$ANS" in - *Lock) i3lock-fancy ;; - *Reboot) systemctl reboot ;; - *Shutdown) systemctl -i poweroff ;; - *Logout) session-logout || pkill -15 -t tty"$XDG_VTNR" Xorg ;; - esac - ;; - *) - printf "\nOption does not exist: %s\n\n" "$arg" - exit 2 - esac -done - -(( $# == 0 )) && "$0" -r +if (( $# == 0 )); then + rofi -modi run,drun -show drun -line-padding 4 -columns 2 -padding 50 -hide-scrollbar -show-icons -drun-icon-theme "ArchLabs-Light" +else + for arg in "$@"; do + case $arg in + -h|--help) + usage + exit 0 + ;; + -v|--version) + echo -e "$NAME -- Version $VER" + exit 0 + ;; + -r|--run) + rofi -modi run,drun -show drun -line-padding 4 -columns 2 -padding 50 -hide-scrollbar -show-icons -drun-icon-theme "ArchLabs-Light" + ;; + -w|--window) + rofi -modi window -show window -hide-scrollbar -padding 50 -line-padding 4 + ;; + -q|--qalculate) + hash qalc &>/dev/null || { echo "Requires 'libqalculate' installed"; exit 1; } + rofi -modi "calc:qalc +u8 -nocurrencies" -padding 50 -show "calc:qalc +u8 -nocurrencies" -line-padding 4 -hide-scrollbar + ;; + -c|--clipboard) + hash greenclip &>/dev/null || { echo "Requires 'greenclip' installed"; exit 1; } + rofi -modi "clipboard:greenclip print" -padding 50 -line-padding 4 -show "clipboard:greenclip print" -hide-scrollbar + ;; + -b|--browser) + hash surfraw &>/dev/null || { echo "Requires 'surfraw' installed"; exit 1; } + surfraw -browser="$BROWSER" "$(sr -elvi | awk -F'-' '{print $1}' | sed '/:/d' | awk '{$1=$1};1' | + rofi -hide-scrollbar -kb-row-select 'Tab' -kb-row-tab 'Control+space' -dmenu -mesg 'Tab for Autocomplete' -i -p 'Web Search')" + ;; + -l|--logout) + if grep -q 'exec startx' $HOME/.*profile; then + ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 -hide-scrollbar -line-padding 4 -padding 20 -lines 3 <<< " Lock| Reboot| Shutdown")" + else + ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 -hide-scrollbar -line-padding 4 -padding 20 -lines 4 <<< " Lock| Logout| Reboot| Shutdown")" + fi + case "$ANS" in + *Lock) i3lock-fancy ;; + *Reboot) systemctl reboot ;; + *Shutdown) systemctl -i poweroff ;; + *Logout) session-logout || pkill -15 -t tty"$XDG_VTNR" Xorg ;; + esac + ;; + *) + printf "\nOption does not exist: %s\n\n" "$arg" + exit 2 + esac + done +fi exit 0 diff --git a/bspwm-home/.config/bspwm/bspwmrc b/bspwm-home/.config/bspwm/bspwmrc index 331b9902..5d6105bf 100755 --- a/bspwm-home/.config/bspwm/bspwmrc +++ b/bspwm-home/.config/bspwm/bspwmrc @@ -9,10 +9,6 @@ sxhkd & # launch compton al-compositor --start & -# xfce settings, commented out due to issues -# see: https://bitbucket.org/archlabslinux/skel/issues/1/bspwm-not-working-properly-with -# xfsettingsd & - # panel al-polybar-session &