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
32 changes: 32 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
extends:
- ./lint/eslintrc-gjs.yml
- ./lint/eslintrc-shell.yml

# ESM (GNOME Shell 45+); legacy gjs harnesses and unused helpers excluded
parserOptions:
ecmaVersion: 2022
sourceType: module

ignorePatterns:
- tests/
- drawing.js
- utils.js
- imports_extension.js
- imports_prefs.js

# Project uses 2-space indent and relaxed brace style; keep error detection without mass reformat
overrides:
- files:
- '*.js'
- 'effects/**/*.js'
- 'preferences/**/*.js'
rules:
indent: 'off'
curly: 'off'
comma-dangle: 'off'
nonblock-statement-body-position: 'off'
arrow-parens: 'off'
camelcase: 'off'
object-curly-spacing: 'off'
lines-between-class-members: 'off'
spaced-comment: 'off'
eqeqeq: 'off'
no-shadow: 'off'
no-extra-parens: 'off'
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## ROADMAP

## release 39

* add GNOME 50 support (`shell-version` in metadata)
* Makefile: run nested shell tests with `gnome-shell --devkit` instead of `--nested`
* extension: drop `affectsInputRegion` when adding chrome (GNOME 50)
* fix preferences: switch toggles no longer overwrite saved GSettings on load
* fix shortcut editor: attach key controller only when creating the accelerator window

## release 38

* fork gnome 48 from 47
Expand Down
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
all: build install lint
all: test install

.PHONY: build install
.PHONY: build install lint test

build:
glib-compile-schemas --strict --targetdir=schemas/ schemas
Expand Down Expand Up @@ -29,8 +29,11 @@ publish:
rm -rf ./build/chamfer.js
rm -rf ./build/imports_*
rm -rf ./*.zip
cd build ; \
zip -qr ../search-light@icedman.github.com.zip .
@if command -v zip >/dev/null 2>&1; then \
cd build && zip -qr ../search-light@icedman.github.com.zip .; \
else \
python3 -c "import os, shutil; os.chdir('build'); shutil.make_archive('../search-light@icedman.github.com', 'zip', '.');"; \
fi

install-zip: publish
echo "installing zip..."
Expand Down Expand Up @@ -82,7 +85,10 @@ test-shell: install
rm /run/user/1000/gnome-shell-disable-extensions

lint:
eslint ./
ESLINT_USE_FLAT_CONFIG=false npx --yes eslint@8.57.0 -c .eslintrc.yml ./

test: build lint
@echo "OK: schema compile and lint passed."

xml-lint:
cd ui ; \
Expand Down
75 changes: 45 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,77 @@
<h3 align="center">Search Light</h3>

<p align="center">
A GNOME Shell 42+ Extension
A GNOME Shell extension (GNOME Shell 48–50)
<br/>
<br/>
</p>
</p>

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/icedman)

![Contributors](https://img.shields.io/github/contributors/icedman/search-light?color=dark-green) ![Forks](https://img.shields.io/github/forks/icedman/search-light?style=social) ![Stargazers](https://img.shields.io/github/stars/icedman/search-light?style=social) ![Issues](https://img.shields.io/github/issues/icedman/search-light) ![License](https://img.shields.io/github/license/icedman/search-light)
![Contributors](https://img.shields.io/github/contributors/icedman/search-light?color=dark-green) ![Forks](https://img.shields.io/github/forks/icedman/search-light?style=social) ![Stargazers](https://img.shields.io/github/stars/icedman/search-light?style=social) ![Issues](https://img.shields.io/github/issues/icedman/search-light) ![License](https://img.shields.io/github/license/icedman/search-light)

![First Release](https://raw.githubusercontent.com/icedman/search-light/main/screenshots/Screenshot%20from%202022-11-03%2011-53-28.png)

This is a GNOME Shell extension that takes the applications search widget out of Overview, similar to macOS Spotlight or Alfred.

This is a Gnome Shell extension that takes the apps search widget out of Overview. Like the macOS spotlight, or Alfred.
### Compatibility

### Notice

* Gnome 48 ready for testing
* Gnome 47 and prior will now be numer gnome-47 branch
* Gnome 46 port is ready for testing
* Gnome 45 port is ready for testing
* Gnome 44 and prior will be under g44 branch
- **GNOME Shell 48, 49, and 50** are supported on this branch (see `shell-version` in `metadata.json`).
- Older GNOME releases may be available on other branches (for example upstream’s `gnome-47` or `g44`); check the repository branches if you are not on GNOME 48+.

### Features

* Popup search box
* Colors, background, borders customization
* Blurred background
* Multi-monitor support
- Popup search box outside Overview
- Colors, background, and border customization
- Optional blurred background (requires ImageMagick)
- Multi-monitor support (preferred monitor or cursor monitor)
- Primary and secondary keyboard shortcuts (configured in preferences)
- Optional panel search icon

## Blurred background

Blurred background feature requires **imagemagick** to be installed in the system which will generate the blurred image.
The blurred background option requires **ImageMagick** (`convert`) so the extension can generate a blurred copy of the desktop wallpaper.

## Installation

### Installation
**Before installing**, run checks from the repository root:

Manual Installation:
- Clone this repo
```bash
$ git clone https://github.com/icedman/search-light
make test
```
- Use the `Makefile` to build and install
```bash
$ cd search-light
$ make

That runs a strict GSettings schema compile and ESLint. Fix any failures before installing.

Manual installation:

```bash
git clone https://github.com/icedman/search-light
cd search-light
make test
make install
gnome-extensions enable search-light@icedman.github.com
```

From Gnome Extensions Repository
GNOME Shell **50** is Wayland-oriented; after installing or upgrading the extension, **log out and back in** (or restart GNOME Shell) so the session loads the updated code.

If you copy files with `make install`, the **Extensions** app may not list the extension until the next login. You can also install from a zip produced by `make publish` using `gnome-extensions install --force search-light@icedman.github.com.zip` (requires `zip` or Python for the zip step; see the `Makefile`).

From the GNOME Extensions site: [Search Light on extensions.gnome.org](https://extensions.gnome.org/extension/5489/search-light/)

## Keybindings

Visit [repository](https://extensions.gnome.org/extension/5489/search-light/)
- Default: **Ctrl+Super+Space** (see `shortcut-search` / `secondary-shortcut-search` in preferences). If no shortcut is stored in settings, that default is used.
- **Super** is the Windows or Command key; it is often labeled “Super” on Linux keyboards.
- Set or change shortcuts under the extension’s preferences (Extensions app → Search Light → settings).

### Keybinding
## Developing and manual UI harnesses

Ctrl+Cmd+Space (change at the preference page)
Cmd - your Windows logo, or the command logo on mac. Linux also calls this the 'Super' key.
- `make build` — `glib-compile-schemas --strict` into `schemas/`
- `make lint` — ESLint
- `make test` — `build` then `lint`
- From the repo root, with a graphical session: `gjs tests/test_prefs.js` or `gjs tests/test_prefs_legacy.js` to smoke-test loading preference UI files (interactive windows).

### Credits
## Credits

Blur-My-Shell for background blurring code.
Blur-My-Shell for background blurring ideas and shader-related code.
2 changes: 1 addition & 1 deletion effects/blur_effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const getTintShaderSource = (extensionDir) => {
try {
return Shell.get_file_contents_utf8_sync(SHADER_PATH);
} catch (e) {
console.log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
return null;
}
};
Expand Down
2 changes: 1 addition & 1 deletion effects/color_effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const getColorEffectShaderSource = (extensionDir) => {
try {
return Shell.get_file_contents_utf8_sync(SHADER_PATH);
} catch (e) {
console.log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
return null;
}
};
Expand Down
2 changes: 1 addition & 1 deletion effects/easing.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const Bounce = {
},
};

var Back = {
export const Back = {
easeIn: (t, b, c, d) => {
let s = 1.70158;
let postFix = (t /= d);
Expand Down
2 changes: 1 addition & 1 deletion effects/monochrome_effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const getMonochromeShaderSource = (extensionDir) => {
try {
return Shell.get_file_contents_utf8_sync(SHADER_PATH);
} catch (e) {
console.log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
return null;
}
};
Expand Down
2 changes: 1 addition & 1 deletion effects/tint_effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const getTintShaderSource = (extensionDir) => {
try {
return Shell.get_file_contents_utf8_sync(SHADER_PATH);
} catch (e) {
console.log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
return null;
}
};
Expand Down
Loading