Giter VIP home page Giter VIP logo

sway-launcher-desktop's Introduction

sway-launcher-desktop Build Status

screenshot_2019-10-25-213740

This is a TUI-based launcher menu made with bash and the amazing fzf. Despite its name, it does not (read: no longer) depend on the Sway window manager in any way and can be used with just about any WM.

Features

  • Lists and executes available binaries
  • Lists and executes .desktop files (entries as well as actions)
  • Does not depend on xdg-utils. Just pure bash and awk
  • Shows a preview window containing whatis info of binaries and the Comment= section of .desktop files
  • History support which will highlight recently used entries
  • Colored output and glyphs for the different entry types
  • Entries are lazily piped into fzf eliminating any lag during startup
  • Optional support for the XDG Autostart specification
  • Executes arbitrary custom commands (if there are no other matches)

Installation

Make sure you have fzf installed and download this repository. Arch Linux users can also grab it from the AUR (thanks @turtlewit)

Configure it in Sway like this:

for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10
set $menu exec $term -a launcher -e /path/to/repo/sway-launcher-desktop.sh
bindsym $mod+d exec $menu

(this example was made with term=foot in mind; it may need to be adjusted for other terminals)

You can override the default icons/glyphs by setting the appropriate GLYPH_ variable in your $menu command, e.g.:

set $menu exec $term -e env GLYPH_COMMAND="" GLYPH_DESKTOP="" GLYPH_PROMPT="? " sway-launcher

By default, the launcher will use a generic & WM-agnostic command to launch the selected program. However, it will detect if its output is being piped to another program and merely print the selected command in that case - instead of launching it by itself. You can use this to integrate the launcher with other tools. For example, if you wish to launch your programs with swaymsg exec, you can do that like this¹:

 swaymsg exec "$(./sway-launcher-desktop.sh)"

Set up a Terminal command

Some of your desktop entries will probably be TUI programs that expect to be launched in a new terminal window. Those entries have the Terminal=true flag set and you need to tell the launcher which terminal emulator to use. Pass the TERMINAL_COMMAND environment variable with your terminal startup command to the script to use your preferred terminal emulator. The script will default to $TERMINAL -e

Configure application autostart

If you want to be able to autostart applications , this script provides a function to handle them for you. Simply run sway-launcher-desktop.sh autostart in your .bashrc, at the end of your i3/sway config, or wherever else you deem fit.

Extending the launcher

In addition to desktop application entries and binaries, you can extend sway-launcher-desktop with custom item providers. It will read the configuration of custom item providers from $HOME/.config/sway-launcher-desktop/providers.conf. The structure looks like this:

[my-provider]
list_cmd=echo -e 'my-custom-entry\034my-provider\034  My custom provider'
preview_cmd=echo -e 'This is the preview of {1}'
launch_cmd=notify-send 'I am now launching {1}'
purge_cmd=command -v '{1}' || exit 43

The list_cmd generated the list of entries. For each entry, it has to print the following columns, separated by the \034 field separator character:

  1. The item to launch. This will get passed to preview_cmd and launch_cmd as {1}
  2. The name of your provider (the same as what what you put inside the brackets, so my-provider in this example)
  3. The text that appears in the fzf window. You might want to prepend it with a glyph and add some color via ANSI escape codes
  4. (optional) Metadata that you can pass to preview_cmd and launch_cmd as {2}. For example, this is used to specify a specific Desktop Action inside a .desktop file

The preview_cmd renders the contents of the fzf preview panel. You can use the template variable {1} in your command, which will be substituted with the value of the selected item.

The launch_cmd is fired when the user has selected one of the provider's entries.

The purge_cmd is used as part of the purge function. It tests any entry of a provider. If the test exits with 43, then the entry will be removed from the history file

Note: Pass the environment variable PROVIDERS_FILE to read custom providers from another file than the default providers.conf. The path in PROVIDERS_FILE can either be absolute or relative to ${HOME}/.config/sway-launcher-desktop/.

Keeping builtin providers

When a custom provider config is used, the default behaviour is to replace the hardcoded builtins. This is not always desirable if you merely wish to add something new. Luckily, the built-in providers only call specific functions of the main script, which are also accessible externally. So you can simply mimick their behaviour by placing this in your config file:

[desktop]
list_cmd=/path/to/sway-launcher-desktop.sh list-entries
preview_cmd=/path/to/sway-launcher-desktop.sh describe-desktop "{1}"
launch_cmd=/path/to/sway-launcher-desktop.sh run-desktop '{1}' {2}
purge_cmd=test -f '{1}' || exit 43

[command]
list_cmd=/path/to/sway-launcher-desktop.sh list-commands
preview_cmd=/path/to/sway-launcher-desktop.sh describe-command "{1}"
launch_cmd=$TERMINAL_COMMAND {1}
purge_cmd=command -v '{1}' || exit 43

Launcher history file

By default, sway-launcher-desktop stores a history of commands to make frequently used entries available more quickly. This history is stored in a file in ~/.cache/ (or $XDG_CACHE_HOME, if that environment variable is set). You may change the file path and name by setting the environment variable HIST_FILE to the desired path. Setting the variable to an empty value disables the history feature entirely.

Housekeeping

After a while, this history might grow and contain some invalid entries due to removed/renamed programs etc. You can use ./sway-launcher-desktop.sh purge to identify broken entries and remove them. Consider adding this command to a cronjob, startup script, or maybe even hook it into your package manager.

Troubleshooting

Debug information is directed to file descriptor 3 and can be dumped using ./sway-launcher-desktop.sh 3>> ~/sway-launcher-desktop.log


¹ If you want to use this as a keybinding though, this kind of shell substitution will not work inside the config file. Here's a way to make it work

sway-launcher-desktop's People

Contributors

ahaasler avatar anakojm avatar biont avatar boredland avatar itspngu avatar j0057 avatar jaburjak avatar joefiorini avatar mapster avatar s-hamann avatar sirwrexes avatar svigerske avatar thal avatar turtlewit 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

sway-launcher-desktop's Issues

Prefer .desktop over commands

It has happened quite frequently that i want to start a program and instead it runs the command. Sometimes this is not an issue, for example with firefox. However, with others like Mumble or electron-stuff the Program won't appear unless started using the desktop entry.

Support XDG Autostart Specification

The Desktop Application Autostart Specification describes a procedure to handle applications that are supposed to start automatically after a desktop session has initialized.

This is widely used, and supported by many programs that have have builtin configuration options to toggle autostart (for example Nextcloud or Steam), this might be useful for some.

My hope is that much of the existing code can be reused to implement this. The launcher could then handle autostarts with a simple sway-launcher-desktop.sh autostart somewhere in the user's config

Honour NoDisplay=true

Some desktop entries have a NoDisplay=true. The spec specifies:

NoDisplay means "this application exists, but don't display it in the menus". This can be useful to e.g. associate this application with MIME types, so that it gets launched from a file manager (or other apps), without having a menu entry for it (there are tons of good reasons for this, including e.g. the netscape -remote, or kfmclient openURL kind of stuff).

Could desktop file entries that have this attribute be excluded form options shown by sway-launcher-desktop?

Swap to upside down/reversed output

The default output, with the prompt at the bottom feels unexpected to me. After a week of use I'm still looking up for a moment first.

Is there any straightforward way to reverse, or otherwise customise the order of the output?

I want to switch so that the prompt is at the top and the search list order shows the best match at the top.

Apologies if I missed something, I glanced through the .sh but it didn't leap out at me. I appreciate the simplicity of the project so I understand that this might be out of its scope or annoying to implement.

Thanks!

Applications sometimes silently don't launch

An issue I've been having for a long time is that applications will sometimes silently won't launch. There is no error output when running the launcher from an interactive shell, and the application will almost always launch after simply trying a second time. Subsequent applications launch without issue.

I've been reluctant to file a bug report because it seems like nobody else has experienced this issue, and I have yet to be able to consistently reproduce it. I've identified 2 common senarios where the bug will most likely occur:

  1. The first time using the launcher after starting the system.
  2. After not using the launcher for a few hours.

I've attempted to debug it a few times, but like I said, I haven't been able to consistently reproduce it (sometimes applications will launch first time after starting the system, etc.) Are there any particular things I should try to get more helpful output or otherwise attempt to debug it?

Specifics of my setup:

  • Arch Linux (linux 5.6.4-arch1-1-fsync)
  • Shell: zsh 5.8 (sway-launcher-desktop of course launches with bash 5.0.16)
  • Terminal: alacritty 0.4.2-dev (f7561850)
  • Using the aur package sway-launcher-desktop 1.2.1-2
  • Sway config for launching it: bindsym $mod+d exec alacritty -t "sway-launcher-desktop" -d 110 36 -e env TERMINAL_COMMAND="alacritty -e" /usr/bin/sway-launcher-desktop
  • This specific setup is my desktop, but the bug also happens on my laptop with a very similar setup.

$TERM or $TERMINAL

For TUI applications, the script defaults to $TERM -e, but am I wrong that $TERM is the convention for setting terminfo things like xterm-256-color and not the actual terminal emulator application? I think the latter is usually set with $TERMINAL instead.

See: https://linux.die.net/man/7/term

Customizing fzf output

As I described in #37, I'm using sway-launcher-desktop to display clipman's clipboard history. In such scenario, I'd like to have a bigger preview window than just two lines, and possibly also a border. Would it make sense to add some fzf configuration options, maybe in the providers file?

application does not detach from launcher terminal

When I start an application using sway-launcher-desktop, the terminal that runs sway-launcher-desktop.sh stays open until the application terminates. Apparently, the application does not detach from the terminal, thus keeping it open.

The behaviour is identical for sway-launcher-desktop-1.1.0 and latest master.

I use Sway and my terminal is kitty. Relevant parts of my Sway configuration:

set $term kitty
set $menu $term --class=launcher -e env TERMINAL_COMMAND='$term -e' sway-launcher-desktop.sh
bindsym $mod+r exec $menu

I tried adding --detach to $TERMINAL_COMMAND, which makes kitty detach from the controlling terminal. This works fine when I start applications that run in a terminal, but of course not for graphical applications that are launched directly.

Am I doing something wrong here?

No desktop entries: bad array subscript

Somehow I am missing desktop entries on Ubuntu 20.04, and therefore the script fails because of an empty PROVIDERS array:

sway-launcher-desktop provide
sway-launcher-desktop: line 81: PROVIDERS: bad array subscript

Can you tell me how I can debug the missing entries?

Some applications won't launch

Hello,
I try to run gnome-disks but nothing happens, if I try /usr/bin/gnome-disks it works correctly.
From my terminal, both of them run correctly.

I'm using Arch Linux testing with sway-launcher-desktop-git

Do you have any idea why they don't start, how can i debug this ?
Thanks

Env vars in .desktop files are not handled properly

I will just copy/paste the report of @nstickney here

PROBLEM:
Some *.desktop files include not just the command, but also environment variables, in the Exec line, i.e. "Exec=env GDK_BACKEND=x11 /opt/minecraft-launcher/minecraft-launcher". This is apparently a standard pattern, but swaymsg -t command "$command" leads to Error: Unknown/invalid command 'env'. I tried changing the Exec line to /usr/bin/env, but I get a similar message: Error: Unknown/invalid command '/usr/bin/env'.

SOLUTION:
I changed the way the $command variable is formatted by removing the line break and replacing it with a space. Then, when running the command, I cut out env using bash string substitution.

EDIT:
Note, I also changed the ordering of the $DIRS hoping to make the ~/.local entry override the others, but I don't believe it has any effect.


Personal note: I believe part of the problem is that awk will see additional columns in an Exec= line like this: Exec=env GDK_BACKEND=x11 /opt/minecraft-launcher/minecraft-launcher since there is one more equals sign in there which we are using as a delimiter

after launching an app, a urxvt window is left open and visible until app closes

More of an FYI as I found a solution without fully understanding what's going on. I haven't noticed any side effects.

I changed in my sway config from the original

-e env TERMINAL_COMMAND="urxvt -e "

to

-e env TERMINAL_COMMAND="exec setsid sh -c "

The full lines are

  for_window [class="URxvt" instance="launcher"] floating enable, border pixel 10, sticky enable
  set $menu urxvt -geometry 55x18 -name launcher -e env TERMINAL_COMMAND="exec setsid sh -c " /home/michael/github/sway-launcher-desktop/sway-launcher-desktop.sh
  bindsym $mod+d exec $menu

[bug] command entries do not start

As seen in the logs (or also by piping ./sway-launcher-desktop | cat), for some reason, it prepends -e to every command, making it fail to start.

Logs:

Starting launcher instance with the following providers: desktop user command
Launching command:  -e firefox

feat: A helper to clean broken cache entries.

I'd like a script that goes through all cached entries and deletes any that no longer exist (e.g.: deleted desktop entries).

I'm wondering if some user or contributor already has a script that does that.

Old entries are still displayed

Desktop entries from uninstalled programs are still displayed in the list, even after running sudo update-desktop-databse and deleting the launcher history file

For example, I get an entry for Covergrid here even after uninstalling it
image
On the top you can see that sed can't find the desktop file, which probably comes from here

description=$(sed -ne '/^Comment=/{s/^Comment=//;p;q}' "$1")

Can I clear it somehow?

$PATH is not read when launched from i3wm configuration

This is probably not an issue with the script itself but with the way I use it, but somehow sway-launcher-desktop.sh doesn't find all my executable files in $PATH when I run it from my i3wm configuration (i.e., with a keybinding), but it does when I run it directly in a terminal. Any ideas of what I am doing wrong?

Is there any way to make a script run from Sway/i3 inherit environment variables in .bashrc? I have tried running the script with bash using set $menu exec kitty --name=launcher -e /bin/bash -c '~/Projects/sway-launcher-desktop/sway-launcher-desktop.sh' but that didn't help.

Respect XDG_STATE_HOME when storing history file

This is a rather new addition to the basedir-spec that looks useful for us.

See the raw specification and some dicussion here

I think it makes sense given that the current location in .cache can imply that -since it is called "cache"- it could be deleted at any point without causing any interruption save for a bit of added latency. That's not the case: It would absolutely be an interruption since all launcher history is now missing and must rebuild. So saving this under a different namespace sounds reasonable.

Run exact command when no matches

If I type firefox --no-remote there are no matches.

When I hit enter, nothing happens. Is it possible to, in this scenario, run the exact command I've typed?

Use it as a finder / search for files

Is it possible to configure sway-laucher-desktop to also search for files (fuzzy finding with fzf) and open them with xdg-open?

In other words, is it possible to use it for searching not only binaries and desktop entries but also search files and open them?

Can't launch gedit

For some reason I can't launch gedit. When I run sway-launcher-desktop from the command line and capture the debug log I get:

Starting launcher instance with the following providers: desktop user command
Launching command: screen-256color -e gedit

For comparison, here is what it looks like when I launch Firefox Nightly (from a .desktop file in my home directory):

Starting launcher instance with the following providers: desktop user command
Launching command: /usr/bin/sway-launcher-desktop run-desktop '/home/aorth/.local/share/applications/firefox-nightly.desktop'
Searching for pattern: ^\\[Desktop Entry\\]
Generated Launch command from .desktop file: /home/aorth/Downloads/firefox/firefox

I'm running Arch Linux on Sway. What's going on here? Thanks!

feature request: fall back to use default list/launch/preview if not specified in custom provider

I'd like to have my launcher focus on an already opened instance of an application or run a new one if one isn't running. This library works in the fashion I'd like when run from terminal: https://gitlab.com/wef/dotfiles/-/blob/master/bin/sway-run-or-raise. Stretch goal: shift-enter overrides this behavior and opens a new instance anyway (useful for say terminals)

I've authored the following custom provider in ~/.config/sway-launcher-desktop/providers.conf:

[my-provider]
launch_cmd=$HOME/.config/sway-launcher-desktop/scripts/sway-run-or-raise ${1}

When i run sway-launcher-desktop I see what looks like the launcher is broken. Output of 0/0 and nothing I type matches. From what I gather in this conversation #41 all three items are required to be specified in provider configs. But it's not clear to me what I should specify in a provider if I want default behavior.

Currently it looks like https://github.com/Biont/sway-launcher-desktop/blob/master/sway-launcher-desktop.sh#L35-L37 bails on setting up the provider unless all three are provided. Perhaps this could be modified to fallback to default behavior per-item instead?

Opening programs in Xwayland

I recently switched to Sway and Wayland and one thing I noticed is sway-launcher-desktop now cannot open new windows for programs that would run in Xwayland, instead the launcher just silently fails. I was already using sway-launcher-desktop with urxvt before moving to Wayland, and those programs used to open correctly when I was still using Xorg. Is there anything that can be done about it?

Firefox desktop action entries not launching

E.g. [Desktop Action new-private-window] (file can be found in /usr/share/applications/firefox.desktop) does not launch with the current implementation, I tried adding new Desktop actions for launching my custom firefox profiles, but they also seem to not work.

Make `list_cmd` able to operate on null-terminated strings

First of all, compliments for this project. I really like how it makes me able to launch both executables and XDG desktop entries with one shortcut, without needing to remember which one of the two I'm filtering 😁

In fact, I like it so much, that I also use it to display the clipboard history with clipman. And here comes the request. Clipboard history entries contain newlines quite often, and this makes it impossible to use them as items in the first column in list_cmd. Many other unix tools (find, xargs, awk and even clipman itself) can work with null-terminated strings rather than lines, which would make it quite convenient if list_cmd would too.

Leaving bash open

Hello, should it be leaving a process open for each program launched? Until I close the program I get a lot of:
bash /usr/bin/sway-launcher-desktop run-desktop

In my px ux. One for each of my open GUI application that runs from the launcher.

I am using:
set $term termite
set $menu exec $term --class=launcher -e sway-launcher-desktop
I even tried kitty and got the same result. Any help would be great.

Desktop file ID priority

Right now all desktop files are loaded and displayed. But according to the specification this should not be the case. The problem arises when you override a desktop file by placing it in a preceded $XDG_DATA_DIR directory. If the Desktop file ID is identical. The one that occurred first should be shown and all others should be ignored.

I encounter this problem with firefox.desktop. I have a desktop file in ~/.local/share/applications/ to override the native desktop entry. This because I want to give it the env var GDB_BACKEND=wayland

I'll leave the exact specifications below and I won't try to reformulate what is said there. The spec is quite clear.

Relevant spec:

Is there any reason this depends on sway?

I had a quick glance over the code and the only part that seems to make this script Sway specific is the the line where you use swaymsg to start the program.

Is there any benefit to starting the program with swaymsg, rather than f.ex setsid $program? Being that this whole script uses nothing but the CLI, changing that line would make it compatible with just about any WM.

Pass Arguments to Commands

I like to run commands like killall waybar etc from my launcher, but unfortunately such commands do not seem to work using this launcher. An alternative would be to execute the search-input entered if no matching entry can be found.

Termite instead of URXVT?

I thought URXVT was for X and i3 whereas Termite is for Wayland and Sway, would it make more sense to default to Termite?

Implement XDG Autostart OnlyShowIn and NotShowIn keys.

According to the XDG Desktop Autostart spec, a desktop file should only be autostarted in desktop environments matching the "OnlyShowIn" values.

Similarly for NotShowIn, the application should only be started in desktop environments not matching the given values.

This would be great as I woudn't manually have to set XDG_CONFIG_DIRS=$XDG_CONFIG_HOME before calling autostart, and can rely on this command to not start e.g the gnome welcome screen in my sway session while still starting applicable applications in /etc/xdg/autostart.

README is confusing

--class=launcher: --class does not work for all terminals. for instance in foot it does not work and instead -a/--app-id may be used

Not floating

By default config, it's not floating unless i manually switch to floating

swaymsg -t get_tree | grep app_id

won't output launcher

.config

set $term termite
set $menu exec $term --class=launcher -e sway-launcher-desktop
bindsym $mod+d exec $menu
for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10

Aliases doesn't work

Helllo,

I am using zsh with oh-my-zsh and I'm storing aliases in $HOME/.oh-my-zsh/custom/aliases.zsh. How can I make it work with sway-launcher-desktop ?

Applications executed from sway-launcher-desktop don't read my environment variables

I've noticed that when I launch an application from sway-launcher-desktop some stuff that depends on my environment variables don't work on an application's runtime even though they should, and when launching straight away from the terminal they do work.
I'm using zsh and the sway-launcher-desktop script uses bash, so I presume it might have something to do with it.
For reference, this is how I launch sway-launcher-desktop:

set $menu exec $term -app_id=launcher -e env TERMINAL=foot sway-launcher-desktop

Why is the default -x and not -e?

In line 274, why is -x preferred?
fzf --ansi +s -x -d '\034' --nth ..3 --with-nth 3 \

Wouldn't
fzf --ansi +s -e -d '\034' --nth ..3 --with-nth 3
give quicker and cleaner results?

Execute when the Enter key (on the numpad) is pressed

Hi @Biont,
Thank you for this excellent launcher.
I happen to have a full sized keyboard and sometimes I use the "Enter" key (the one found on the numeric pad) which doesn't work.

Originally I wanted to make a PR, but I couldn't find where I can do it in the script, I'm not very good with bash.

Thank you

Icons are missing

Possibly not related with SLD but my icons are missing. I'm sure rocket icon was visible before some updates but I don't know what broke it

image

What is the equivalent of `--class` in Konsole?

Hi,

I'm using Konsole. I realized that in this line of the sway config: set $menu exec $term --class=launcher -e sway-launcher-desktop you would need to have the option --class available for the terminal command of your choice. Terminals like Alacritty have that option, but Konsole doesn't. Does anyone know what is Konsole's equivalent of --class?

Thanks!

Read input from pipe

What would be a good way to implement reading from STDIN and using it with sway-launcher-desktop just like dmenu does?

I think the following two methods might work :

  1. Make sway-launcher-desktop accept an argument similar to list-entries like dmenu or stdin which makes it call a function that reads from stdin
  2. use a PROVIDERS_FILE with the script that reads from stdin and present it to list_cmd

I think the latter might be a better choice given the flexibility that provider files provide.

launch a terminal with shortcut

I played around with getting a terminal for quick temporary sessions. It's not perfect but does the job.

meta+d to launch sway-launcher-desktop, then alt+space to launch a terminal.

diff --git a/sway-launcher-desktop.sh b/sway-launcher-desktop.sh
index 6e1d055..8c8dd22 100755
--- a/sway-launcher-desktop.sh
+++ b/sway-launcher-desktop.sh
@@ -13,6 +13,7 @@ DEL=$'\34'
 # this or override with an environment variable in your sway config
 # It would be good to move this to a config file eventually
 TERMINAL_COMMAND="${TERMINAL_COMMAND:="urxvt -e"}"
+SHELL_COMMAND="${SHELL_COMMAND:="urxvt  -geometry 55x18 -name launcher"}"
 GLYPH_COMMAND="  "
 GLYPH_DESKTOP="  "
 CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/sway-launcher-desktop"
@@ -249,6 +250,7 @@ COMMAND_STR=$(
   fzf +s -x -d '\034' --nth ..3 --with-nth 3 \
     --preview "$0 describe {2} {1}" \
     --preview-window=up:3:wrap --ansi \
+    --bind alt-space:execute:"$SHELL_COMMAND" \
     <"$FZFPIPE"
 ) || exit 1

Force only single launcher instance

We can force only single launcher instance by using lock file like so at line 143:

LOCK_FILE=/tmp/sway_launcher_desktop.lock
[ -f "$LOCK_FILE" ] && exit 1
touch "$LOCK_FILE"
FZFPIPE=$(mktemp)
PIDFILE=$(mktemp)
trap 'rm "$FZFPIPE" "$PIDFILE" "$LOCK_FILE"' EXIT INT

To make is easy to switch between single/multiple instances, we can have a flag at the top of the script

override command to add swaymsg exec

Hello, thank you for this project which helps me every day to have a fast and minimal environment.
I use Sway and I would like my windows to appear on the same workspace where I ran sway-launcher-desktop. swaymsg exec ... can help for that.

Since this commit df557aa sway-launcher-desktop no longer uses swaymsg exec ... but it's a need I have. How can I modify the command sent to /bin/sh to make it run `swaymsg exec ...' before my command and thus find the spawn of my windows on the right workspace ?
Thanks

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.