dmenu instead of rofi.
This commit is contained in:
parent
9731f288e6
commit
aad6f775ba
4 changed files with 11 additions and 11 deletions
|
@ -271,7 +271,7 @@ show_menu() {
|
|||
fi
|
||||
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"
|
||||
chosen="$(echo -e "$options" | $rofi_command "Bluetooth:")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
|
@ -299,7 +299,7 @@ show_menu() {
|
|||
}
|
||||
|
||||
# Rofi command to pipe into, can add any options here
|
||||
rofi_command="rofi -dmenu -no-fixed-num-lines -yoffset -100 -i -p"
|
||||
rofi_command="dmenu -l 20 -i -p"
|
||||
|
||||
case "$1" in
|
||||
--status)
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
twoscreen() {
|
||||
mirror=$(printf "no\\nyes" | rofi -dmenu -i -p "Mirror displays?")
|
||||
mirror=$(printf "no\\nyes" | dmenu -l 20 -i -p "Mirror displays?")
|
||||
if [ "$mirror" = "yes" ]; then
|
||||
external=$(echo "$screens" | rofi -dmenu -i -p "Optimize resolution for")
|
||||
external=$(echo "$screens" | dmenu -l 20 -i -p "Optimize resolution for:")
|
||||
internal=$(echo "$screens" | grep -v "$external")
|
||||
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
|
||||
tail -n 1 | awk '{print $1}')
|
||||
|
@ -19,9 +19,9 @@ twoscreen() {
|
|||
--output "$internal" --auto --same-as "$external" \
|
||||
--scale "$scale_x"x"$scale_y"
|
||||
else
|
||||
primary=$(echo "$screens" | rofi -dmenu -i -p "Select primary display")
|
||||
primary=$(echo "$screens" | dmenu -l 20 -i -p "Select primary display:")
|
||||
secondary=$(echo "$screens" | grep -v "$primary")
|
||||
direction=$(printf "left\\nright" | rofi -dmenu -i -p "What side of $primary should $secondary be on?")
|
||||
direction=$(printf "left\\nright" | dmenu -l 20 -i -p "What side of $primary should $secondary be on?")
|
||||
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
|
||||
fi
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ screens=$(echo "$allposs" | awk '/ connected/ {print $1}')
|
|||
{ onescreen "$screens"; postrun; notify-send "💻 Only one screen detected."; exit ;}
|
||||
|
||||
# Get user choice including both and manual selection:
|
||||
chosen=$(printf -- "home-1\\nhome-2\\n----\\n%s\\n----\\nmulti" "$screens" | rofi -dmenu -i -p "Select display arangement") &&
|
||||
chosen=$(printf -- "home-1\\nhome-2\\n----\\n%s\\n----\\nmulti" "$screens" | dmenu -l 20 -i -p "Select display:") &&
|
||||
case "$chosen" in
|
||||
"home-1") home 0 ;;
|
||||
"home-2") home 1 ;;
|
Loading…
Add table
Add a link
Reference in a new issue