chezmoi/dot_config/rofi/executable_runrofi.sh
2023-08-30 22:17:40 +02:00

8 lines
514 B
Bash

#rofi -show run
#monitor="$(swaymsg -t get_outputs | jq '[.[].focused] | index(true)')"
#monitor=""$(swaymsg -t get_workspaces | jq -e "map(select(.focused == true).num)[0]-(.|length)" | tr -d "-")
# get the focused monitor - kanshi could mess up the order so we get the monitorname instead
monitor="$(swaymsg -t get_outputs | jq -c '.[] | select(.focused) | select(.id)' | jq -c '.name')"
# show rofi on the focused monitor
rofi -show run -modi "run,drun,ssh,window" -sidebar-mode -show-icons -monitor "$monitor"