Update configs

This commit is contained in:
natemaia 2019-03-03 01:04:41 -08:00
parent a88bfb53b6
commit 5ebbd10bc8
2 changed files with 53 additions and 76 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
NAME=$(basename "$0") NAME="${0##*/}"
VER="0.5" VER="0.6"
usage() usage()
{ {
@ -33,75 +33,56 @@ usage()
EOF EOF
} }
for arg in "$@"; do if (( $# == 0 )); then
case $arg in rofi -modi run,drun -show drun -line-padding 4 -columns 2 -padding 50 -hide-scrollbar -show-icons -drun-icon-theme "ArchLabs-Light"
-h|--help) else
usage for arg in "$@"; do
exit 0 case $arg in
;; -h|--help)
-v|--version) usage
echo -e "$NAME -- Version $VER" exit 0
exit 0 ;;
;; -v|--version)
-r|--run) echo -e "$NAME -- Version $VER"
rofi -modi run,drun -show drun -line-padding 4 \ exit 0
-columns 2 -padding 50 -hide-scrollbar \ ;;
-show-icons -drun-icon-theme "ArchLabs-Light" -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 -w|--window)
;; rofi -modi window -show window -hide-scrollbar -padding 50 -line-padding 4
-q|--qalculate) ;;
hash qalc &>/dev/null || -q|--qalculate)
{ echo "Requires 'libqalculate' installed"; exit 1; } 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
rofi -modi "calc:qalc +u8 -nocurrencies" -padding 50 \ ;;
-show "calc:qalc +u8 -nocurrencies" -line-padding 4 \ -c|--clipboard)
-hide-scrollbar 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
-c|--clipboard) ;;
hash greenclip &>/dev/null || -b|--browser)
{ echo "Requires 'greenclip' installed"; exit 1; } 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 -modi "clipboard:greenclip print" -padding 50 \ rofi -hide-scrollbar -kb-row-select 'Tab' -kb-row-tab 'Control+space' -dmenu -mesg 'Tab for Autocomplete' -i -p 'Web Search')"
-line-padding 4 -show "clipboard:greenclip print" \ ;;
-hide-scrollbar -l|--logout)
;; if grep -q 'exec startx' $HOME/.*profile; then
-b|--browser) ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 -hide-scrollbar -line-padding 4 -padding 20 -lines 3 <<< " Lock| Reboot| Shutdown")"
hash surfraw &>/dev/null || else
{ echo "Requires 'surfraw' installed"; exit 1; } ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 -hide-scrollbar -line-padding 4 -padding 20 -lines 4 <<< " Lock| Logout| Reboot| Shutdown")"
fi
surfraw -browser="$BROWSER" "$(sr -elvi | awk -F'-' '{print $1}' | case "$ANS" in
sed '/:/d' | awk '{$1=$1};1' | *Lock) i3lock-fancy ;;
rofi -hide-scrollbar -kb-row-select 'Tab' \ *Reboot) systemctl reboot ;;
-kb-row-tab 'Control+space' -dmenu \ *Shutdown) systemctl -i poweroff ;;
-mesg 'Tab for Autocomplete' -i -p 'Web Search' \ *Logout) session-logout || pkill -15 -t tty"$XDG_VTNR" Xorg ;;
-padding 50 -line-padding 4)" esac
;; ;;
-l|--logout) *)
if grep -q 'exec startx' $HOME/.*profile; then printf "\nOption does not exist: %s\n\n" "$arg"
ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 \ exit 2
-hide-scrollbar -line-padding 4 -padding 20 \ esac
-lines 3 <<< " Lock| Reboot| Shutdown")" done
else fi
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
exit 0 exit 0

View File

@ -9,10 +9,6 @@ sxhkd &
# launch compton # launch compton
al-compositor --start & 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 # panel
al-polybar-session & al-polybar-session &