Code Monkey home page Code Monkey logo

envlauncher's People

Contributors

shawnbrown avatar

Stargazers

 avatar

Watchers

 avatar

envlauncher's Issues

Support terminal emulators installed via Flatpak.

Currently, installing an application with Flatpak doesn't add an executable to the PATH (although Snaps seem to have this sorted out). While there aren't many terminal emulators available on Flathub, it would be good to support Flatpaks in the future.

To check if a specific application is installed via Flatpak:

import subprocess

def flatpak_app_is_available(app_id):
    process = subprocess.run(
        ['flatpak', 'info', app_id],
        stdout=subprocess.DEVNULL,
        stderr=subprocess.DEVNULL,
    )
    return process.returncode == 0

To get a list of all installed Application IDs:

import subprocess
import sys

def get_flatpack_apps():
    output = subprocess.check_output([
        'flatpak',
        'list',
        '--app',
        '--columns',
        'application:f',
    ])
    return [x.decode(sys.stdout.encoding) for x in output.split()]

Suppress common terminal emulator warnings?

Some common terminal emulators issue warning messages via stderr when they are launched. While these are not normally visible when starting EnvLauncher (since it's usually launched via the application icon), it might be desirable to suppress these warnings when they are issued erroneously.

Some frequently seen warning messages...

b"Display does not support owner-change; copy/paste will be broken!\n"

The above warning is erroneously issued when running gnome-terminal versions 3.40.1 and earlier with Wayland--it can be ignored without issue. Internally, gnome-terminal makes a call to the function gdk_display_supports_selection_notification() but this only works with X11 (not Wayland). The issue was fixed in gnome-terminal version 3.40.2.

b"Failed to register: Unable to acquire bus name 'com.github.shawnbrown.EnvLauncher'\n"

In gnome-terminal version 3.38.1 (and possibly in 3.38.2) and earlier, the --app-id command line option tries to register the D-Bus name every time it's used. But after the name has been registered once, the following error message is displayed on each additional attempt. This issue seems to be fixed in gnome-terminal version 3.38.3.

It may be best to let these warnings go to stderr--if that's the case, this issue can be closed without further changes.

Automatically add environments to the launcher menu.

Some users might like to have new environments automatically added to their EnvLauncher icon's context menu.

I'm filing this issue because I think it's natural for a user to request something like this but there are limits to how it can be implemented. Desktop environments are not consistent in how they refresh application icon updates while a session is running and an implementation that provides inconsistent results is not going to be satisfying.

I think that a decent compromise would be to create a service that scans for new environments when a session starts (with a systemd unit). If there is interest for something like this, I'm open to exploring a solution in the future but it's not going to be part of a 1.0 release.

Project Scope

Essential Properties

  • Application icon as a primary interface:
    • Clicking the desktop entry icon (on the dash, dock, or desktop) should open a terminal emulator and activate a Python virtual environment.
    • Right-clicking on the icon should offer a context menu with multiple desktop action choices. This list of actions should allow users to launch specific environments or choose to open a GUI window to configure EnvLauncher itself.
  • Streamlined installation:
    • The application should be installable with pip as well as common package managers (via rpm and deb archives).
    • Installation should not require users to manually copy files or edit shell scripts.
    • The application should not require any third-party dependencies not already available from a standard desktop environment installation.
  • Desktop environment integration:
    • The application should try to associate the terminal session with the EnvLauncher icon and name (when the terminal emulator supports it).
    • Should provide icons based on the utilities-terminal icon of popular distro themes (hicolor, Yaru, Mint-Y, etc.).
  • Support for multiple terminal emulators:
    • Support popular terminal emulators and less popular ones if users request.

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.