Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete window layout preset #3

Open
xihnik opened this issue Aug 15, 2021 · 1 comment
Open

Delete window layout preset #3

xihnik opened this issue Aug 15, 2021 · 1 comment

Comments

@xihnik
Copy link

xihnik commented Aug 15, 2021

It's not entirely clear how you can use the GUI to delete the preset of the window arrangement

@gtirloni
Copy link
Contributor

gtirloni commented Feb 9, 2024

I don't think it's currently possible.

Here's a workaround using jq:

cd $HOME/.config/gSnap
jq '.definitions |= (map(select(.name != "LAYOUT_NAME_HERE")) | sort_by(.name))' layouts.json > temp.json && mv temp.json layouts.json

You have to disable/enable the extensions afterwards or just reload X (alt-F2 + 'r' + enter).

You can add it as a function in your .bashrc so it's easy to call:

function gsnap_remove_layout {
  GSNAP_LAYOUT_NAME=$1
  jq ".definitions |= (map(select(.name != \"$GSNAP_LAYOUT_NAME\")) | sort_by(.name))" $HOME/.config/gSnap/layouts.json > /tmp/gSnap-layouts.temp && mv /tmp/gSnap-layouts.temp $HOME/.config/gSnap/layouts.json
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants