dotfiles/files/bin/rofi-screenlayout

16 lines
386 B
Text
Raw Permalink Normal View History

2019-10-14 13:31:53 +01:00
#!/usr/bin/env bash
set -e
LAYOUTS_DIR=$HOME/.config/screen-layouts
IFS=
layouts=$(find $LAYOUTS_DIR -name "*.sh" | xargs realpath --relative-to $LAYOUTS_DIR)
chosen_layout=$(echo -e $layouts | rofi -dmenu -p "Select Layout" -no-custom -lines 5)
chosen_layout_file="${LAYOUTS_DIR}/${chosen_layout}"
echo "Setting layout to ${chosen_layout}"
bash $chosen_layout_file
i3-msg restart