From de41f99e6f56944deb972676e60b5bf98126e852 Mon Sep 17 00:00:00 2001 From: natemaia Date: Sun, 16 Dec 2018 02:04:25 -0800 Subject: [PATCH] Fix logout dialog --- base/bin/rofi_run | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/base/bin/rofi_run b/base/bin/rofi_run index 02429feb..2a9a032d 100755 --- a/base/bin/rofi_run +++ b/base/bin/rofi_run @@ -52,19 +52,24 @@ for arg in "$@"; do rofi -modi window -show window -hide-scrollbar -padding 50 -line-padding 4 ;; -q|--qalculate) - hash qalc &>/dev/null || { 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 ;; -c|--clipboard) - hash greenclip &>/dev/null || { echo "Requires 'greenclip' installed"; exit 1; } + 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; } + 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' | @@ -74,10 +79,10 @@ for arg in "$@"; do -padding 50 -line-padding 4)" ;; -l|--logout) - if grep -q 'exec startx'; then + 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 4 <<< " Lock| Reboot| Shutdown")" + -lines 3 <<< " Lock| Reboot| Shutdown")" else ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 \ -hide-scrollbar -line-padding 4 -padding 20 \