From a6e3cd71d40642f9fa433e8cca683d5fb4e4bcf7 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Thu, 25 Feb 2021 09:55:11 +0000 Subject: [PATCH] Fixes rofi shutdown command I use an alias rather than an expanded variable so I can include an empty parameter. The rofi shutdown command now only needs a single click to select an option --- bin/.bin/dmenu/rofi-shutdown | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/.bin/dmenu/rofi-shutdown b/bin/.bin/dmenu/rofi-shutdown index a765b36f..bc4578e7 100755 --- a/bin/.bin/dmenu/rofi-shutdown +++ b/bin/.bin/dmenu/rofi-shutdown @@ -1,13 +1,13 @@ #!/usr/bin/sh if type -p rofi 2> /dev/null; then - selectcommand="rofi -dmenu -i -theme themes/four.rasi -me-select-entry '' -me-accept-entry 'Mouse1'" + alias selectcommand="rofi -dmenu -i -theme themes/four.rasi -me-select-entry '' -me-accept-entry MousePrimary" shutdown="" reboot="" lock="" suspend="" - logout="" + logout="﫼" else - selectcommand="dmenu -i -p 'Option'" + alias selectcommand="dmenu -i -p 'Option'" shutdown="Shutdown" reboot="Reboot" lock="Lock" @@ -17,8 +17,7 @@ fi selection=$( \ - #echo -e "$shutdown\n$reboot\n$lock\n$suspend\n$logout" | $selectcommand - echo -e "$shutdown\n$reboot\n$lock\n$suspend" | $selectcommand + echo -e "$shutdown\n$reboot\n$lock\n$logout\n$suspend" | selectcommand ); echo $selection;