Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- DMENU="rofi -p LoadLayout: -bg #222222 -dmenu"
- if ! command -v "jshon" >/dev/null 2>&1; then
- printf "%s\\n" "you need to install 'jshon' to run this program" >&2
- exit 1
- fi
- if ! command -v "rofi" >/dev/null 2>&1; then
- printf "%s\\n" "you need to install 'rofi' to run this program" >&2
- exit 1
- fi
- LNAME="$(ls ~/.i3/layouts | ${DMENU})"
- if [ -z "$LNAME" ]; then
- exit 1
- else
- WORKSPACE="$(i3-msg -t get_workspaces | jshon -a -e focused -u -p -e name -u | awk 'f{print;f=0} /true/{f=1}')"
- i3-msg "workspace ${WORKSPACE}; append_layout ~/.i3/layouts/${LNAME}"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement