Coder Social home page Coder Social logo

launcher's Introduction

Pop Launcher

Modular IPC-based desktop launcher service, written in Rust. Desktop launchers may interface with this service via spawning the pop-launcher process and communicating to it via JSON IPC over the stdin and stdout pipes. The launcher service will also spawn plugins found in plugin directories on demand, based on the queries sent to the service.

Using IPC enables each plugin to isolate their data from other plugin processes and frontends that are interacting with them. If a plugin crashes, the launcher will continue functioning normally, gracefully cleaning up after the crashed process. Frontends and plugins may also be written in any language. The pop-launcher will do its part to schedule the execution of these plugins in parallel, on demand.

Installation

Requires the following dependencies:

And then must be used with a compatible pop-launcher frontend

just build-release # Build
just install # Install locally

If you are packaging, run just vendor outside of your build chroot, then use just build-vendored inside the build-chroot. Then you can specify a custom root directory and prefix.

# Outside build chroot
just vendor

# Inside build chroot
just build-vendored
sudo just rootdir=debian/tmp prefix=/usr install

Want to install specific plugins? Remove the plugins you don't want:

just plugins="calc desktop_entries files find pop_shell pulse recent scripts terminal web" install

Plugin Directories

  • User-local plugins: ~/.local/share/pop-launcher/plugins/{plugin}/
  • System-wide install for system administrators: /etc/pop-launcher/plugins/{plugin}/
  • Distribution packaging: /usr/lib/pop-launcher/plugins/{plugin}/

Plugin Config

A plugin's metadata is defined pop-launcher/plugins/{plugin}/plugin.ron.

(
    name: "PluginName",
    description: "Plugin Description: Example",
    bin: (
        path: "name-of-executable-in-plugin-folder",
    ),
    icon: Name("icon-name-or-path"),
    // Optional
    query: (
        // Optional -- if we should isolate this plugin when the regex matches
        isolate: true,
        // Optional -- Plugin which searches on empty queries
        persistent: true,
        // Optional -- avoid sorting results from this plugin
        no_sort: true,
        // Optional -- pattern that a query must have to be sent to plugin
        regex: "pattern",
        // Optional -- the launcher should keep a history for this plugin
        history: true,
    )
)

Script Directories

  • User-local scripts: ~/.local/share/pop-launcher/scripts
  • System-wide install for system administrators: /etc/pop-launcher/scripts
  • Distribution packaging: /usr/lib/pop-launcher/scripts

Example script

#!/bin/sh
#
# name: Connect to VPN
# icon: network-vpn
# description: Start VPN
# keywords: vpn start connect

nmcli connection up "vpn-name"

Logging

Available for the launcher itself and all plugins, logging is implemented with the tracing crate. It has been pre-configured and re-exported as part of this crate. The standard info!, warn!, error!, and debug! macros can be used, after this use statement:

use pop_launcher_toolkit::plugin_trait::tracing::*;

Per-plugin, a log file will be created in this directory: ~/.local/state/

Example log file paths:
~/.local/state/pop-launcher.log
               your-plugin.log
               ...

The log level of the launcher and all its plugins (official and community) can be changed per-user in the GNOME extension settings: Extensions > Pop Shell > Settings > Log Level

JSON IPC

Whether implementing a frontend or a plugin, the JSON codec used by pop-launcher is line-based. Every line will contain a single JSON message That will be serialized or decoded as a Request, PluginResponse, or Response. These types can be referenced in docs.rs. IPC is based on standard input/output streams, so you should take care not to write logs to stdout.

Frontend JSON IPC

The frontend will send Requests to the pop-launcher service through the stdin pipe. The stdout pipe will respond with Responses. It is ideal to design your frontend to accept responses asynchronously. Sending Interrupt or Search will cancel any active searches being performed, if the plugins that are still actively searching support cancellation.

Plugin JSON IPC

Plugins will receive Requests from pop-launcher through their stdin pipe. They should respond with PluginResponse messages.

Request

If you are writing a frontend, you are sending these events to the pop-launcher stdin pipe. If you are writing a plugin, the plugin will be receiving these events from its stdin.

pub enum Request {
    /// Activate on the selected item
    Activate(Indice),
    /// Activate a context item on an item.
    ActivateContext { id: Indice, context: Indice },
    /// Perform a tab completion from the selected item
    Complete(Indice),
    /// Request for any context options this result may have.
    Context(Indice),
    /// Request to end the service
    Exit,
    /// Requests to cancel any active searches
    Interrupt,
    /// Request to close the selected item
    Quit(Indice),
    /// Perform a search in our database
    Search(String),
}

JSON Equivalent

  • { "Activate": number }
  • { "ActivateContext": { "id": number, "context": id }}
  • { "Complete": number }
  • { "Context": number }
  • "Exit"
  • "Interrupt"
  • { "Quit": number }
  • { "Search": string }

PluginResponse

If you are writing a plugin, you should send these events to your stdout.

pub enum PluginResponse {
    /// Append a new search item to the launcher
    Append(PluginSearchResult),
    /// Clear all results in the launcher list
    Clear,
    /// Close the launcher
    Close,
    // Additional options for launching a certain item
    Context {
        id: Indice,
        options: Vec<ContextOption>,
    },
    // Notifies that a .desktop entry should be launched by the frontend.
    DesktopEntry {
        path: PathBuf,
        gpu_preference: GpuPreference,
    },
    /// Update the text in the launcher
    Fill(String),
    /// Indicates that a plugin is finished with its queries
    Finished,
}

JSON Equivalent

  • { "Append": PluginSearchResult },
  • "Clear",
  • "Close",
  • { "Context": { "id": number, "options": Array<ContextOption> }}
  • { "DesktopEntry": { "path": string, "gpu_preference": GpuPreference }}
  • { "Fill": string }
  • "Finished"

Where PluginSearchResult is:

{
    id: number,
    name: string,
    description: string,
    keywords?: Array<string>,
    icon?: IconSource,
    exec?: string,
    window?: [number, number],
}

ContextOption is:

{
    id: number,
    name: string
}

GpuPreference is:

"Default" | "NonDefault"

And IconSource is either:

  • { "Name": string }, where the name is a system icon, or an icon referred to by path
  • { "Mime": string }, where the mime is a mime essence string, to display file-based icons

Response

Those implementing frontends should listen for these events:

pub enum Response {
    // An operation was performed and the frontend may choose to exit its process.
    Close,
    // Additional options for launching a certain item
    Context {
        id: Indice,
        options: Vec<ContextOption>,
    },
    // Notifies that a .desktop entry should be launched by the frontend.
    DesktopEntry {
        path: PathBuf,
        gpu_preference: GpuPreference,
    },
    // The frontend should clear its search results and display a new list
    Update(Vec<SearchResult>),
    // An item was selected that resulted in a need to autofill the launcher
    Fill(String),
}

JSON Equivalent

  • "Close"
  • { "DesktopEntry": string }
  • { "Update": Array<SearchResult>}
  • { "Fill": string }

Where SearchResult is:

{
    id: number,
    name: string,
    description: string,
    icon?: IconSource,
    category_icon?: IconSource,
    window?: [number, number]
}

launcher's People

Contributors

a-kenji avatar aadilayub avatar ahoneybun avatar aidenlangley avatar bramverb avatar canadaduane avatar chinchzilla avatar drakulix avatar friday avatar harshasrani avatar hverlin avatar jackpot51 avatar jacobgkau avatar jokeyrhyme avatar leviport avatar merelymyself avatar mmstick avatar n3m0-22 avatar nathansgithub avatar nkia-christoph avatar oknozor avatar ryanabx avatar sevenautumns avatar truprecht avatar wash2 avatar wiiznokes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

launcher's Issues

[Ubuntu 20.04] Launcher no longer shows opened windows

When I recently updated the launcher, it stopped showing opened windows. As you can see in the screenshot below, I have Calendar, Firefox, Inkscape and Alacritty opened, but none show in the launcher. Search is working normally.

image

System info
Ubuntu 20.04
GNOME 3.36.9

Latest commit
ed38f3a: chore!: Remove deprecated IconSource::Window

Steps to reproduce

  • Rebuild and install the launcher from this commit ed38f3a
  • Log out of your session and log back in
  • Open some windows
  • The launcher won't show the windows you've opened

Spotify (Flatpak) breaks open apps in launcher

As the title says - once I open the spotify app (which is a flatpak) the launcher does not show open apps anymore. Once the spotify app is closed, the open apps reappear.

with spotify open:
image

with spotify closed:
image

LE: Other flatpak applications work just fine - I have just noticed the spotify app doing that, so it might be the spotify app which is causing the problem 🧐

Separate launcher from pop-shell

Currently, disabling pop shell extension also disables the launcher (after reboot, somehow launcher works until reboot). It would be better if the launcher is a separate extension and not integrated into the pop shell extension. I don't use tiling functionality but wouldn't bother disabling extension but had to because of this pop-os/shell#1067. However, disabling the pop shell extension also disabled the pop launcher functionality.

Add Installation instructions to README

As the pop-launcher service has been separated from pop-shell, when you make a local install of pop-shell, you don't have the Launcher available anymore.

Please, add detailed instructions of how to install pop-launcher service and integrate it with pop-shell.

Calculator plugin should display error when qalc is not installed

I observed this with the calculator, find, scripts, .... e.g. searching for = 5 + 7 results into the output 5 + 7 x = ? without any calculation happening.

I think the shell should also output stderr of the pop-launcher command, for easier debugging.

System Config
pop-launcher commit: 5cea115
pop-shell commit: pop-os/shell@5220303
Gnome-Shell 3.36.9

/etc/os-release

NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Pop-OS shell and launcher are compiled from scratch.

The aforementioned plugins are all present in the ~/.local/share/pop-launcher/plugins/ directory and their corresponding binaries start into the JSON pipeline mode using e.g. ./calc without problems.

Launcher not seeing plugins

The pop launcher seems to not be seeing any plugins, including the default ones. In my launcher directory I have the following:
image

But when I open the launcher, =1+1 yields no results, and ? only shows file search as done using file [FILENAME], which does work (unlike google bananas or anything along those lines). I'd include a screenshot, but doing so stops the launcher.

Basic front end example : getting nothing from stdout

Hello, I am planning to use pop launcher in a frontend application so I started to implement a simple example to test it.
I don't understand why but it seems I am getting only stderr content. Am I missing something obvious here ?

#[macro_use]
extern crate tokio;

use async_process::{Command, Stdio, ChildStdout, ChildStderr, ChildStdin};
use pop_launcher::{Request};
use futures_lite::{io::BufReader, prelude::*};
use tokio::task::JoinHandle;

#[tokio::main]
async fn main() {

    let child = Command::new("pop-launcher")
        .stdin(Stdio::piped())
        .stdout(Stdio::piped())
        .stderr(Stdio::piped())
        .spawn()
        .unwrap();

    let stdout = child.stdout;
    let stderr = child.stderr;
    let stdin = child.stdin.unwrap();

    let read_handle = handle_stdout(stdout);
    let err_handle = handle_stderr(stderr);
    let write_handle = write_handle(stdin);

    let _ = join!(read_handle, err_handle, write_handle);
}

fn write_handle(mut stdin: ChildStdin) -> JoinHandle<()> {
    tokio::spawn(async move {
        let request = Request::Search("cal".to_string());
        let json = serde_json::to_string(&request).unwrap();

        // Dummy search request, we get nothing from pop-launcher stdout, why ??? 
        stdin.write(json.as_bytes()).await.unwrap();
        stdin.write(b"\n").await.unwrap();
        stdin.flush().await.unwrap();

        // Json format error
        stdin.write(b"\n").await.unwrap();
        stdin.flush().await.unwrap();

    })
}

fn handle_stdout(mut stdout: Option<ChildStdout>) -> JoinHandle<()> {
    tokio::spawn(async move {
        let mut lines = BufReader::new(stdout.take().unwrap()).lines();

        loop {
            if let Some(line) = lines.next().await {
                println!("{}", line.unwrap());
            }
        }
    })
}

fn handle_stderr(mut stderr: Option<ChildStderr>) -> JoinHandle<()> {
    tokio::spawn(async move {
        let mut lines = BufReader::new(stderr.take().unwrap()).lines();

        loop {
            if let Some(line) = lines.next().await {
                println!("{}", line.unwrap());
            }
        }
    })
}

Also I was wondering If you are planning to upload pop launcher on crates.io ? It would be nice to have the crate doc available somewhere.

Launcher Calculator

(1) Issue/Bug Description:
When you use the Launcher Calculator, there is a small bug that makes the calculator to ignore the negative symbol.
This happens when you are using the negative symbol from a previous result at the calculator, and the problem is that the negative symbol that the calculator detects is different to the one from the calculator output.

(2) Steps to reproduce (if you know):
-100+90
Click enter and you will have
= −10
Now, if you add +1:
= −10+1
= 11
You can visually see that the first negative symbol - is not the same as the one from the output −, so probably, the calculator does not detect the symbol.

(3) Expected behavior:
-100+90
= -10
= -10 + 1
= -9

(4) Distribution (run cat /etc/os-release):
NAME="Pop!_OS"
VERSION="21.10"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.10"
VERSION_ID="21.10"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=impish
UBUNTU_CODENAME=impish
LOGO=distributor-logo-pop-os

(5) Gnome Shell version:
GNOME Shell 40.5

(6) Pop Shell version (run apt policy pop-shell or provide the latest commit if building locally):

pop-shell:
Installed: 1.1.0 ~ 1648206495 ~ 21.10 ~ 28c3a18
Candidate: 1.1.0 ~ 1648206495 ~ 21.10 ~ 28c3a18
Version table:
*** 1.1.0 ~ 1648206495 ~ 21.10 ~ 28c3a18 1001
1001 http://apt.pop-os.org/release impish/main amd64 Packages
1001 http://apt.pop-os.org/release impish/main i386 Packages
100 /var/lib/dpkg/status

(7) Where was Pop Shell installed from:
Basic Pop!_OS installation

(8) Monitor Setup (2 x 1080p, 4K, Primary(Horizontal), Secondary(Vertical), etc):
2 x 1080p, Horizontal

(9) Other Installed/Enabled Extensions:

(10) Other Notes:

Remove "approx." keyword and improve decimal point/comma handling

If you use the calculator plugin to calculate a number with more numbers after the decimal place than can be shown, it puts the word "approx." in front of the result. Ex: Typing "= 8/7" returns the response "= approx. 1.1428571". This is a minor annoyance because if you want to make another calculation based on the first response, you have to delete the word at the beginning of the answer first.

Could we change this behavior to only show the numeric response? I found that setting the Unicode parameter "-u8" to the qalc command causes the output to use a "≈" instead of adding "approx.", and made a PR (#70) to do that. The existing code already handles "≈" the same way as an equals sign.

While testing this, I also found that if you set the decimal to be a comma in qalc, you have to explicitly change it back if you want to use a decimal point, so I also added that small change to #70.

Thanks! Let me know any feedback you have.


Pop!_OS 21.04
Gnome 3.38.5

pop-launcher:
  Installed: 1.1.0~1638290853~21.04~98e3866
  Candidate: 1.1.0~1638290853~21.04~98e3866
  Version table:
 *** 1.1.0~1638290853~21.04~98e3866 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu hirsute/main amd64 Packages
        100 /var/lib/dpkg/status

Gnome extensions doesn't open

When I use the pop-os launcher, I can search "Extensions" and the Gnome extensions application is found.

When I click on this link in the launcher, nothing happens. I am seeing this error appear in journalctl, but I don't know if it is related

pop-os gnome-shell[2445]: Could not create transient scope for PID 116180: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 116180 does not exist.

I can use the "Show Applications" menu to launch Gnome extensions, and it works fine. This issue only happens when I try to use the launcher.

Launcher: searching for "keyboard configurator"

(1) Issue/Bug Description:
Searching for "keyboard configurator" in the Launcher returns "Keyboard Layout" as the top search result

  1. This isn't the System76 Keyboard Configurator
  2. (Also, launching this "Keyboard Layout" appears to do nothing)

(2) Steps to reproduce (if you know):

  1. Start Launcher
  2. Enter "keyboard configurator"
  3. System76 Keyboard Configurator is the third result

(3) Expected behavior:
I'd expect System76 Keyboard Configurator to be the top result

(4) Distribution (run cat /etc/os-release):
NAME="Pop!_OS"
VERSION="21.04"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.04"
VERSION_ID="21.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute
LOGO=distributor-logo-pop-os

(9) Other Installed/Enabled Extensions:
Tweaks

(10) Other Notes:
Sounds similar to issues like pop-os/shell#979 and pop-os/shell#753

Getting no response from `Complete` request

I am trying to figure out how the Complete request works.
Sending the following, or any indice and never get any response.

[2021-10-10T11:58:17Z DEBUG onagre::app] Handle input : Tab
[2021-10-10T11:58:17Z DEBUG onagre::subscriptions::pop_launcher] wrote request "{\"Complete\":0}\n" to pop-launcher stdin

I suppose a Fill response is expected but it seems strange to try auto-completing something we already have (the selected desktop entry).

Can you explain how you use this in the official pop-launcher ?

By the way is the official pop-launcher client open source ? I did not found it on PopOS github organization.

Calculator, find plugins don't update results if characters are typed too quickly

I had this weird issue today.
I opened the launcher with the pop os shortcut, then proceeded to type =109-30. The result I got was 106. I tried it with a few different numbers, for example with a 40 it also gave me the wrong result. After tinkering around a bit, including using the normal numbers (not on the numblock), it worked for the 30 again, regardless if I typed the 30 on the numblock or not.
It seems to onluy happen with numbers between 100 and 110(at least when I tested I could only reproduce it there, but I'm not sure if that's one condition).

OS: Arch
Package source: aur/gnome-shell-extension-pop-shell-git
Are there any other important information I can supply?

Add to launcher

I added an app to the GNOME app list, but it is not showing up in the Launcher.
How can I manually add an app to the GNOME app menu and launcher?

Rewrite GJS plugins in Rust

  • Calculator (Switched from Math.JS to Qalc)
  • Desktop Entries
  • File Browser
  • File Find
  • PulseAudio
  • Recent Files
  • Scripts
  • Terminal
  • Web

Packaging for other distribution

I am aware this is a bit out of scope but since I rewrote onagre as suggested by @mmstick to use pop-launcher, I will soon want to package it for various distros (starting with ubuntu). This would require a pop-launcher package on the target distros.

I have very little knowledge about packaging for linux distributions other than arch.
I'd be willing to maintain an ubuntu package but I would need some guidance.

Also, as I understand pop-shell is planning to integrate in gnome in the future so you might want to maintain it yourself.

Let me know.

Libreoffice icon and app label are broken

Hi there,
i just noticed that the Libreoffice icon (stock installation method) in the launcher is missing, and it also shows up as "Soffice"

PopOS 21.10, everything is up to date as 02-02-2022

Thank you

Schermata da 2022-02-02 13-04-27

No icon for spotify in launcher when it's running

Issue:
Icon for Spotify(installed from it's repo, not flatpak) is missing when it's running.

Screenshot:
Screenshot-2021-12-09,20-24-58

Spotify version 1.1.72.439.gc253025e, Copyright (c) 2021, Spotify Ltd

pop-launcher version:

pop-launcher:
  Installed: 1.1.0~1638290853~21.04~98e3866
  Candidate: 1.1.0~1638290853~21.04~98e3866
  Version table:
 *** 1.1.0~1638290853~21.04~98e3866 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu hirsute/main amd64 Packages
        100 /var/lib/dpkg/status

Tested in 21.04 & 21.10 Beta

Some default web favicons not loading properly

The Amazon and Crates.io icons loaded properly as of #42, and still show up on my main work machine where they're cached:

Screenshot from 2022-03-28 11-18-38
Screenshot from 2022-03-28 11-18-40

However, on a fresh machine/fresh account without a cache, they're currently showing the Google API's default icon for when a website doesn't have a favicon:

Screenshot from 2022-03-28 11-19-42
Screenshot from 2022-03-28 11-19-46

This happens on d17acbd (not caused by #95, but still happening there too as of right now.)

Worth noting that it's possible something changed on the Google API's end, or else something changed between #42 and now that was missed.

Launcher does not start the application

I have installed launcher with make && make install and when I press the default keybinding it does pop up and when I search also shows the app and everything works fine until then but whenever I press enter to open the selected app the launcher does not open the app.
Although when I install the launcher using the command it does shows some errors
image

I wish you reply

OS - Ubuntu 20.04

Launcher not showing apps in a recently used order

(1) Issue/Bug Description:

After a recent update the launcher no longer shows app in a recently used order. The launcher now shows apps in a fixed order.

(2) Steps to reproduce (if you know):

Press super key or click in the dock launcher icon.

(3) Expected behavior:

Launcher shows apps being the most recently used app at the top.

(4) Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="21.04"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.04"
VERSION_ID="21.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute
LOGO=distributor-logo-pop-os

(5) Gnome Shell version:

Gnome 3.38.5

(6) Pop Shell version (run apt policy pop-shell or provide the latest commit if building locally):

  Installed: 1.1.0~1631643086~21.04~3215886
  Candidate: 1.1.0~1631643086~21.04~3215886
  Version table:
 *** 1.1.0~1631643086~21.04~3215886 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu hirsute/main amd64 Packages
       1001 http://ppa.launchpad.net/system76/pop/ubuntu hirsute/main i386 Packages
        100 /var/lib/dpkg/status``` 

**(7) Where was Pop Shell installed from:**

Standard Pop!_OS 21.04 installation

**(8) Monitor Setup (2 x 1080p, 4K, Primary(Horizontal), Secondary(Vertical), etc):**

Laptop primary display 1080p

**(9) Other Installed/Enabled Extensions:**

Audio switcher installed and enabled
Dash to dock installed but disabled

**(10) Other Notes:**

The issue started after an update (around 1 week ago). I have updated everything daily since the problem started and the issue has not been resolved yet.

Search engine seems broken

Hi,
I have some trouble with the launcher but i don't know how to debug it.

When i type a letter, the search engine seems broken... only one 's' clear the results list.
This is an example behavior :

Peek 2021-09-29 08-30

and my system log looks like that:

Sep 29 08:29:41 gael-laptop gnome-shell[7369]: st_label_set_text: assertion 'text != NULL' failed
Sep 29 08:29:46 gael-laptop gnome-shell[7369]: st_label_set_text: assertion 'text != NULL' failed
Sep 29 08:29:50 gael-laptop gnome-shell[7369]: st_label_set_text: assertion 'text != NULL' failed
Sep 29 08:29:51 gael-laptop gnome-shell[7369]: st_label_set_text: assertion 'text != NULL' failed
Sep 29 08:29:53 gael-laptop gnome-shell[7369]: st_label_set_text: assertion 'text != NULL' failed
Sep 29 08:29:54 gael-laptop gnome-shell[7369]: st_label_set_text: assertion 'text != NULL' failed
Sep 29 08:29:54 gael-laptop gnome-shell[7369]: JS ERROR: TypeError: b.title is null
                                               sorter@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:78:32
                                               search@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:90:21
                                               Search/<@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_search.js:36:34
Sep 29 08:29:56 gael-laptop gnome-shell[7369]: st_label_set_text: assertion 'text != NULL' failed
Sep 29 08:29:57 gael-laptop gnome-shell[7369]: st_label_set_text: assertion 'text != NULL' failed
Sep 29 08:29:57 gael-laptop gnome-shell[7369]: JS ERROR: TypeError: b.title is null
                                               sorter@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:78:32
                                               search@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:90:21
                                               Search/<@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_search.js:36:34
Sep 29 08:29:57 gael-laptop gnome-shell[7369]: JS ERROR: TypeError: haystack is null
                                               contains_pattern@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:55:29
                                               search@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:60:24
                                               Search/<@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_search.js:36:34
Sep 29 08:29:58 gael-laptop gnome-shell[7369]: JS ERROR: TypeError: haystack is null
                                               contains_pattern@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:55:29
                                               search@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:60:24
                                               Search/<@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_search.js:36:34
Sep 29 08:29:58 gael-laptop gnome-shell[7369]: JS ERROR: TypeError: haystack is null
                                               contains_pattern@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:55:29
                                               search@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:60:24
                                               Search/<@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_search.js:36:34
Sep 29 08:29:59 gael-laptop gnome-shell[7369]: JS ERROR: TypeError: haystack is null
                                               contains_pattern@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:55:29
                                               search@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_launcher.js:60:24
                                               Search/<@/home/prudprud/.local/share/gnome-shell/extensions/[email protected]/dialog_search.js:36:34

System info :

NAME="Pop!_OS"
VERSION="21.04"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.04"
VERSION_ID="21.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute
LOGO=distributor-logo-pop-os

❯ apt policy pop-shell
pop-shell:
  Installed: 1.1.0~1631809642~21.04~5220303
  Candidate: 1.1.0~1631809642~21.04~5220303
  Version table:
 *** 1.1.0~1631809642~21.04~5220303 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu hirsute/main amd64 Packages
       1001 http://ppa.launchpad.net/system76/pop/ubuntu hirsute/main i386 Packages
        100 /var/lib/dpkg/status


Hardware :
Lemur Pro (The best laptop i've ever had !! )

I don't know what I can do to fix it or debug it ? Do you have some advice ?

Disable `pulse` plugin on systems without PulseAudio

Have systems running Pipewire in mind. Not sure there is an alternative to pactl that will let you control the volume like you can w/ PulseAudio.

0 => ("pactl", "set-sink-mute", "toggle"),
1 => ("pactl", "set-sink-volume", "+5%"),
2 => ("pactl", "set-sink-volume", "-5%"),

check for both fdfind and fd

Based on my reading of the below code, the launcher currently checks for an fdfind executable.

let mut child = Command::new("fdfind")

Both Fedora and Arch provide this as fd, not fdfind. Could the code be updated to fall back to fd if fdfind is not found?

Desktop entries deduplication

If multiple files have the same desktop file ID, the first one in the $XDG_DATA_DIRS precedence order is used.

Currently I have Nautilus duplicated in these two directories:

  • ~/.local/share/applications/org.gnome.Nautilus.desktop
  • /usr/share/applications/org.gnome.Nautilus.desktop

I do this to override something in the desktop entries and avoid rewriting it when I update the package it belongs to.

My xdg_data_dirs: ~/.local/share, /usr/local/share and /usr/share (XDG_DATA_DIRS is actually not set, but these are the paths that should be used when this is the case)

Screenshot from 2021-09-13 21-03-38

(same thing with "Bulk Rename", which is part of Thunar).

If you want this I could try to implement it, but I'm a Rust noob at best and haven't looked into your code.

Bug: Poor font colour contrast on highlighted entry w/ dark GTK theme (Adwaita-Dark)

screenshot

I built this code from source manually on Fedora Silverblue, baseline image is Fedora 35 w/ Gnome 41. My installation required that I change BIN_DIR = $(HOME)/bin in my Makefile - ~/.local/bin isn't on my PATH by default, but ~/bin is.

It made sense to post this here as the bug is related to the launcher, but the code for styling is part of shell, so I'd be happy to create an issue there instead.

[Feature Request] Host a webpage that we can explore launcher plugins

Hello,
As I said in the title, a website where we can explore new plugins for the launcher would be great. While that would allow it easier for users to find plugins, it would also increase the attention of developers to develop new plugins.
It can be on a webpage or a readme file in this launcher repo.
Currently, Ulauncher, a very famous launcher on Linux, has this feature.
https://ext.ulauncher.io/

Web plugin breaks http links

I noticed that the web plugin always tries to use https even when supplied with a link that uses http. I have a situation where I want to use the launcher to quickly access a server on my local host, which uses http but the plugin adds https in front of it, thus, breaking the link. I would be thankful to see this issue fixed.

Add uninstallation instructions

Thank you for the launcher.
Would it be possible to add uninstallation instructions to README or, even better, an uninstall rule in the Makefile ?

Unable to launch applications

On Ubuntu 20.04 LTS with make and make install:

$ uname -vopr
5.11.0-38-generic #42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021 x86_64 GNU/Linux

[12:27:41|pvl@pvl-x1:~/src/repos/pop-launcher] (1.0.3)
$ rustc --version
rustc 1.56.0 (09c42c458 2021-10-18)

[12:27:45|pvl@pvl-x1:~/src/repos/pop-launcher] (1.0.3)
$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Launcher works with pop-shell. Can switch between open windows, and search displays list.

Issues:

  • Hitting "Enter" (or the Ctrl + x) on any result other than open windows have no action.
  • Color scheme: Currently highlighted item is dimmed out on dark mode, that's it's not at all visible.

image

Clicking calculator icon in Launcher adds "0" to input

Distribution (run cat /etc/os-release):
21.04

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

Issue/Bug Description:
Clicking on the Launcher calculator icon adds a "0" to the input box

Steps to reproduce (if you know):
Start the Launcher (press Super key)
Type "=" to take the first step into calculator mode
Click anywhere in the dark grey area (i.e. calculator icon, "Ctrl+1" text") or hit return key
Input text is changed to "= 0"

Expected behavior:
Input text is not changed

Other Notes:
Would prefer not to have to enter the "=" at all.

Selected Item's Font too Dark

The text of the selected search result is almost illegible as the font has almost the same color as it's background. The font color should really just stay the same (maybe become a teeny tiny bit darker).

This is of course using the system's Dark theme.
Running on Pop!_OS 21.4.

image

When does launcher re-load all plugins?

I'm writing my first launcher plugin. It isn't working. But I'm not sure if it isn't working because I don't know how to restart the launcher, or if I don't know where to look for logs.

Does the launcher read from all directories automatically, or is there a "reload" step?

If I've done something horribly wrong, how would I know (for example a .ron syntax error, or a missing bin executable)?

Custom icon not loaded in Launcher only

I have the following setup:

PopOS 21.10
My own single icon created in ~/.icons
image

The icon gets loaded correctly in the ~/.icons folder because it is shown correctly in the applications overview:
image

But in the launcher the placeholder icon is shown:
image

What am I doing wrong ?
Was my icon installed correctly ?
How can I make the icon load correctly on the launcher too ?

Launcher shows blank text for highlighted line

Since 21.04 upgrade, launcher has shown blank text on the highlighted line. When I open the launcher by hitting the super key, the first item shows up blank, as in this image:

first-item-blank

When I mouse over the second item and it is highlighted, it shows up blank:

second-item-blank

In both cases, only the icon is visible for the highlighted item. I should be able to see the text, even if highlighted.

[Feature Request] Add support to copy special characters to clipboard

It would be nice if the launcher could be extended to allow a user to search for a unicode char and then copy it to clipboard.

For example, if I want the greek letter theta then

  1. Run launcher with super+/
  2. Type unicode -- this causes the launcher to start listing unicode chars and additional information about them (symbol, name and codepoint)
  3. Further type theta and press enter -- this should close the launcher and copy the appropriate char to clipboard.

Example Hello-World Plugin Project

The Problem

I would be interested in making a few plugins for the Pop-Launcher. Sadly, there is not that much information available, especially if you are not familiar with the Rust programming language. I know you can build one in any programming language and the interface is documented (somewhat). I also know there are built-in plugins I can take for reference, but that doesn't help me if I can't figure out how the IPC launcher works. I don't know the build process and I don't know how I can see my plugin working.

Are the built-in plugins already in the launcher binary? Because in the makefile, it seems the launcher binary is just linked to each plugin directory. Does that mean the launcher gets instantiated multiple times? If not, how does this help with the recoverability and isolation of the plugins?

Is there an easy way to make a new plugin in Rust? If I make a new cargo project, it will create another src folder and I will have to extract the binary each time out of it into the correct directory. I didn't plan on making a (more) complicated makefile just because I wanted to program a simple plugin.

Solution

I find the pop launcher incredible and see great potential. I just want to be able to customize it and make it better suit my needs. I think it would be really helpful to the community if an example Hello-World project could be published as a template for other plugins. This could include a folder structure with a makefile or preferably a VSC devcontainer (with easy commands to build the project). Maybe start with Rust and proceed with a few different programming languages such as Python and JavaScript. I could see many people making custom plugins, but this launcher's learning curve is too high. A simple Getting-Started guide and a template would go a long way.

Cheers,
Ariel

Launcher plugin isn't getting detected.

I was playing around with rust and decided to make a pop-launcher plugin. But unfortunately it doesn't work, so I assume that my plugin fails somewhere.

Is there a way by which I can get the plugin logs. I used eprintln! to print all my errors.
Any tips as to how to set up a development environment to debug a pop-launcher plugin?

Thanks!
(For anyone wondering, here is my code)

Edit: Fixed a typo

[Feature request] - Per rule icon for web plugin

I would be nice to have an optional per rule icon for the web plugin, falling back to the default one when not specified :

        (
            matches: ["arch"],
            queries: [(name: "Arch Wiki", query: "wiki.archlinux.org/index.php/" )],
            icon: Name("archlinux")
        ),
        (
            // Should fallback to the icon defined in plugins/web/config.ron
            matches: ["bc", "bandcamp"],
            queries: [(name: "Bandcamp", query: "bandcamp.com/search?q=")]
        ),

Not able to start flatpak VSCodium from launcher

When I try to launch flatpak VSCodium using SUPER + /, the app launches but the app window is completely black. If I start VSCodium from Applications Menu, everything works just fine. I'm using the Nvidia 20.04 version of Pop!_OS.

Setting an alternate terminal for plugin does not work

Description

Running a terminal plugin command with a custom terminal launch the command with the default gnome-terminal instead.

Reproduce

  1. Set a symlink to an alternate terminal : /usr/bin/x-terminal-emulator -> /usr/bin/alacritty
  2. Activate the following pop response search result :
Ok(Update([SearchResult { id: 0, name: "run echo toto", description: "run command in terminal", icon: None, category_icon: Some(Name("utilities-terminal")), window: None }]))


{\"Activate\":0} // Send the activate request

Additional context

OS: archlinux
pop-launcher version: 1.0.1
front-end: onagre

I have tried this with several terminal emulator (xterm, tilix, termite, alacritty).
I am missing something obvious here or is this actually not working as expected ?

Edit : I think this happens because the detect_terminal function is trying to resolve the symlink twice :

fn detect_terminal() -> (PathBuf, &'static str) {
    use std::fs::read_link;

    const SYMLINK: &str = "/usr/bin/x-terminal-emulator";

    if let Ok(found) = read_link(SYMLINK) { // `Ok("/usr/bin/alacritty")` 
        if let Ok(found) = read_link(&found) { // `Err(Os { code: 22, kind: InvalidInput, message: "Invalid argument" })`
            return (found, "-e");
        }
    }

    (PathBuf::from("/usr/bin/gnome-terminal"), "--")
}

Tab Navigation in Launcher List

When opening the launcher, with either a list of open windows or by starting to type in the name of an application to start in order to generate a list of suggestions, it is not possible to navigate the list with the TAB key. I know this functionality used to be there, I don't recall exactly when it changed. I am assuming when some functionality was added for filename tab completion that this changed the behavior.

It is very natural to want to tab through the list of items. As it stands now, I have to move my fingers off of home row in order to move to the arrow keys to navigate, or I need to select the item with the ctrl+# option provided, which means I have to look for that option and then type it, which is not as quick for me as just tabbing through the items. The kicker is that SHIFT-TAB works just fine when going through the list in reverse order.

This is on Pop!_OS 21.04 with the latest updates.

[Feature Request] Allow launching apps into new/next workspace using shortcut like Alt+Enter

Problem:

Right now launcher opens app in the current workspace by default, which in a small screen(like 1920x1080) when already containing multiple apps can lead into disorganized workspace & windows because some apps do not behave well in small size. We have to manually resize them or move into new/another workspace & most of the time we know that we will have to do this even before launching an app.

Solution:

Allowing to launch apps into a new/next workspace(& switching to them) can help fasten our experience with the desktop & also keep workspace organized.
Shortcuts example: Alt+Enter to launch selected app & Ctrl+Alt+[1-8] to launch app in search-results/shown order.

While other tiling window managers provide shortcuts to launch apps in workspace of users choice, I'm not sure if something like that is in the current roadmap.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.