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,6 +33,9 @@ usage()
EOF EOF
} }
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 for arg in "$@"; do
case $arg in case $arg in
-h|--help) -h|--help)
@ -44,51 +47,30 @@ for arg in "$@"; do
exit 0 exit 0
;; ;;
-r|--run) -r|--run)
rofi -modi run,drun -show drun -line-padding 4 \ rofi -modi run,drun -show drun -line-padding 4 -columns 2 -padding 50 -hide-scrollbar -show-icons -drun-icon-theme "ArchLabs-Light"
-columns 2 -padding 50 -hide-scrollbar \
-show-icons -drun-icon-theme "ArchLabs-Light"
;; ;;
-w|--window) -w|--window)
rofi -modi window -show window -hide-scrollbar -padding 50 -line-padding 4 rofi -modi window -show window -hide-scrollbar -padding 50 -line-padding 4
;; ;;
-q|--qalculate) -q|--qalculate)
hash qalc &>/dev/null || hash qalc &>/dev/null || { echo "Requires 'libqalculate' installed"; exit 1; }
{ 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 \
-hide-scrollbar
;; ;;
-c|--clipboard) -c|--clipboard)
hash greenclip &>/dev/null || hash greenclip &>/dev/null || { echo "Requires 'greenclip' installed"; exit 1; }
{ echo "Requires 'greenclip' installed"; exit 1; } rofi -modi "clipboard:greenclip print" -padding 50 -line-padding 4 -show "clipboard:greenclip print" -hide-scrollbar
rofi -modi "clipboard:greenclip print" -padding 50 \
-line-padding 4 -show "clipboard:greenclip print" \
-hide-scrollbar
;; ;;
-b|--browser) -b|--browser)
hash surfraw &>/dev/null || hash surfraw &>/dev/null || { echo "Requires 'surfraw' installed"; exit 1; }
{ 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')"
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) -l|--logout)
if grep -q 'exec startx' $HOME/.*profile; then if grep -q 'exec startx' $HOME/.*profile; then
ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 \ ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 -hide-scrollbar -line-padding 4 -padding 20 -lines 3 <<< " Lock| Reboot| Shutdown")"
-hide-scrollbar -line-padding 4 -padding 20 \
-lines 3 <<< " Lock| Reboot| Shutdown")"
else else
ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 \ ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 -hide-scrollbar -line-padding 4 -padding 20 -lines 4 <<< " Lock| Logout| Reboot| Shutdown")"
-hide-scrollbar -line-padding 4 -padding 20 \
-lines 4 <<< " Lock| Logout| Reboot| Shutdown")"
fi fi
case "$ANS" in case "$ANS" in
*Lock) i3lock-fancy ;; *Lock) i3lock-fancy ;;
*Reboot) systemctl reboot ;; *Reboot) systemctl reboot ;;
@ -101,7 +83,6 @@ for arg in "$@"; do
exit 2 exit 2
esac esac
done done
fi
(( $# == 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 &