config/.local/bin/screenlayout

17 lines
274 B
Bash
Executable File

#!/bin/bash
layouts=($(ls "$HOME/.screenlayout/"))
add="add layout..."
layouts+=("$add")
choice=$( printf '%s\n' "${layouts[@]}" | dmenu -i -p 'Choose a screenlayout:') "$@" || exit
if [ "$choice" = "$add" ]
then
arandr &
else
exec "$HOME/.screenlayout/$choice"
fi