alfred2-layout icon indicating copy to clipboard operation
alfred2-layout copied to clipboard

How can I remove 'toggle full screen' as one of the options in the script filter?

Open nikivdev opened this issue 8 years ago • 6 comments

I am talking about this option :

2017-02-12 at 01 45

Can't quite figure it out from the code. Thank you.

nikivdev avatar Feb 12 '17 00:02 nikivdev

All options are configured in this file: https://github.com/untoldwind/alfred2-layout/blob/master/src/default_layouts.yaml

The full-screen toggle is actually the first line there. Just remove that line and it won't appear in Alfred any more

untoldwind avatar Feb 12 '17 19:02 untoldwind

I just did that. It is still there in the options though.

nikivdev avatar Feb 12 '17 19:02 nikivdev

Just realized that there might be a "bug".

The options are rendered by the "layout_select.pl" script. Which first reads:

~/Library/Application Support/Alfred 2/Workflow Data/de.leanovate.alfred.layout/layouts.yaml

(which is hardcoded atm and should be fixed) and only if that doesn't exists:

~/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.F213A19A-E45D-4010-82BF-4FEFB3D33AE5/default_layout.yaml

resp.

~/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.F213A19A-E45D-4010-82BF-4FEFB3D33AE5/default_layout.yaml

untoldwind avatar Feb 13 '17 07:02 untoldwind

The current version: https://github.com/untoldwind/alfred2-layout/raw/master/Layout.alfredworkflow

Now supports an environment variable LAYOUTS_FILE (this can be set in the Preference via "Configure workflow variables") The workflow will first try to load the options from there and then fallback to the defaults

untoldwind avatar Feb 16 '17 08:02 untoldwind

Hey @untoldwind

If I understood correctly, I just need to delete this line here :

2017-02-18 at 15 03

However I removed it and I still have it shown in Alfred :

2017-02-18 at 15 03

nikivdev avatar Feb 18 '17 14:02 nikivdev

I fear I need some more information why this is not working for you as indended.

If you are using Alfred 3 you can toggle a debug log on the workflow page: grafik

When using the workflow with this window open the current version (https://github.com/untoldwind/alfred2-layout/raw/master/Layout.alfredworkflow) should print out what file is read. E.g. when moving a window you should see an output like this:

[2017-02-19 22:05:43][STDERR: input.scriptfilter] Reading layout options from: /Users/untoldwind/Library/Application Support/Alfred 3/Workflow Data/de.leanovate.alfred.layout/layouts.yaml

or

[2017-02-19 22:13:12][STDERR: input.scriptfilter] Using default layout options

If it's the latter the default_layout.yaml is read.

Also: You can test the script inside a regular terminal like this:

cd ~/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.F213A19A-E45D-4010-82BF-4FEFB3D33AE5
perl layout_select.pl

This will produce a lot of xml which is actually read by Alfred to display the available options.

untoldwind avatar Feb 19 '17 21:02 untoldwind