File tree 2 files changed +8
-21
lines changed
2 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,9 @@ There's a stand-alone script `dmenu-power-menu` that can be used to run the
178
178
power menu with dmenu (or rofi in dmenu mode if dmenu isn't found). That script
179
179
takes the same command-line arguments as listed above for the main script
180
180
` rofi-power-menu ` . The stand-alone script might be easier to use but you cannot
181
- pass arguments to dmenu/rofi so their configuration is hardcoded.
181
+ pass arguments to dmenu/rofi so their configuration is hardcoded. Also, you need
182
+ to install
183
+ [ rofi-script-to-dmenu] ( https://github.com/jluttine/rofi-script-to-dmenu ) .
182
184
183
185
184
186
## Copyright
Original file line number Diff line number Diff line change 3
3
# Simple stand-alone wrapper for rofi-power-menu.
4
4
#
5
5
# This script takes the same CLI arguments as rofi-power-menu.
6
+ #
7
+ # rofi-script-to-dmenu needs to be installed
6
8
7
- # Use rofi if dmenu isn't found
8
- command -v dmenu > /dev/null
9
- dmenu_exists=$?
10
- if [ $dmenu_exists -eq 0 ]
11
- then
12
- dmenu=" dmenu"
13
- else
14
- dmenu=" rofi -dmenu"
15
- fi
16
-
9
+ # Use local rofi-power-menu if present. This makes developing easier.
17
10
command -v ./rofi-power-menu > /dev/null
18
11
powermenu_exists=$?
19
12
if [ $powermenu_exists -eq 0 ]
23
16
powermenu=" rofi-power-menu"
24
17
fi
25
18
26
- options=$( $powermenu $@ | xxd)
27
- while [ -n " $options " ]
28
- do
29
- choice=$( echo " $options " | xxd -r | $dmenu -p " Power menu" -i -show-icons)
30
- if [ $? -ne 0 ]
31
- then
32
- break
33
- fi
34
- options=$( $powermenu $@ " $choice " | xxd)
35
- done
19
+ cmd=" $powermenu $@ "
20
+ rofi-script-to-dmenu " $cmd "
You can’t perform that action at this time.
0 commit comments