Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ the old plugin link and `~/.local/bin/oma-cast`, and `omacast setup hyprland` mo
| `Esc` / `Shift+Esc` | Back / back to root |
| `Ctrl +` / `Ctrl −` / `Ctrl 0` | Zoom |

The All / Applications / Commands filter beside the root search is optional: set `"rootFilter": false` in
`~/.config/omacast/config.json` to hide it and its shortcut.

## CLI

```sh
Expand Down
5 changes: 4 additions & 1 deletion core/Schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ var configDefaults = {
remToPxRate: 16,
workHoursPerDay: 8,
// "auto" follows the Qt locale; "12h" or "24h" forces a clock. [D]
clockFormat: "auto"
clockFormat: "auto",
// The All / Applications / Commands filter button (Ctrl+P) beside the root
// search; false hides it and leaves every result in one list. [D]
rootFilter: true
}

// Values a config key or general setting may take, beyond its type.
Expand Down
3 changes: 3 additions & 0 deletions tests/migrate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,8 @@ test("config rejects out-of-range calculator values and unknown choices", () =>
assert.equal(c.workHoursPerDay, 8, "zero hours falls back to the default")
assert.equal(c.clockFormat, "24h")
assert.equal(Schema.withConfigDefaults({ clockFormat: "36h" }).clockFormat, "auto")
assert.equal(Schema.withConfigDefaults({}).rootFilter, true)
assert.equal(Schema.withConfigDefaults({ rootFilter: false }).rootFilter, false)
assert.equal(Schema.withConfigDefaults({ rootFilter: "no" }).rootFilter, true)
assert.deepEqual(Schema.generalChoices.navigationBindings, ["emacs", "vim-motions"])
})
4 changes: 2 additions & 2 deletions ui/LauncherWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ PanelWindow {
}

function toggleDropdown() {
if (window.dropdownOpen || !window.atRoot) { window.dropdownOpen = false; return }
if (window.dropdownOpen || !window.atRoot || !window.backend.config.rootFilter) { window.dropdownOpen = false; return }
window.dropdownOpen = true
dropdown.item.filter = ""
var at = RootSearch.FILTERS.map(function(f) { return f.id }).indexOf(window.rootFilter)
Expand Down Expand Up @@ -812,7 +812,7 @@ PanelWindow {

Rectangle {
id: filterButton
visible: window.atRoot && !window.compact
visible: window.atRoot && !window.compact && window.backend.config.rootFilter
anchors.right: parent.right
anchors.rightMargin: window.px(16)
anchors.verticalCenter: parent.verticalCenter
Expand Down