dotfiles/files/bin/rofi-screenlayout

16 lines
386 B
Bash
Executable File

#!/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