All Projects → open-dynaMIX → raiseorlaunch

open-dynaMIX / raiseorlaunch

Licence: MIT license
A run-or-raise-application-launcher for i3 window manager.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to raiseorlaunch

I3 Gnome Pomodoro
🍅 Integrate gnome-pomodoro into i3
Stars: ✭ 159 (+354.29%)
Mutual labels:  i3, workspace, i3wm
Nwg Launchers
GTK-based launchers: application grid, button bar, dmenu for sway and other window managers
Stars: ✭ 211 (+502.86%)
Mutual labels:  launcher, i3, i3wm
I3 Config
i3wm configuration files
Stars: ✭ 81 (+131.43%)
Mutual labels:  i3, workspace, i3wm
i3blocks-gate
Extra i3blocks Scripts For arch Ubuntu very simple and very useful -
Stars: ✭ 42 (+20%)
Mutual labels:  i3, i3wm
Luastatus
universal status bar content generator
Stars: ✭ 195 (+457.14%)
Mutual labels:  i3, i3wm
i3-workspace-switcher
MRU (Most recently used) workspace switcher for i3 window manager
Stars: ✭ 20 (-42.86%)
Mutual labels:  i3, i3wm
Autotiling
Script for sway and i3 to automatically switch the horizontal / vertical window split orientation
Stars: ✭ 243 (+594.29%)
Mutual labels:  i3, i3wm
I3wm Config
my i3wm config
Stars: ✭ 196 (+460%)
Mutual labels:  i3, i3wm
hax
Zero-config Hacky Hackpecker setup
Stars: ✭ 16 (-54.29%)
Mutual labels:  i3, i3wm
Sway Launcher Desktop
TUI Application launcher with Desktop Entry support. Made for SwayWM, but runs anywhere
Stars: ✭ 188 (+437.14%)
Mutual labels:  launcher, i3wm
i3altlayout
i3wm efficient screen real estate
Stars: ✭ 40 (+14.29%)
Mutual labels:  i3, i3wm
I3 Battery Popup
A script that shows warning messages to the user when the battery is almost empty. For i3wm users.
Stars: ✭ 190 (+442.86%)
Mutual labels:  i3, i3wm
I3 Wm Gruvbox Theme
An i3-wm gruvbox theme implementation
Stars: ✭ 188 (+437.14%)
Mutual labels:  i3, i3wm
dotfiles
My main working machine setup. Here be cyber dragons, and optional bugs.
Stars: ✭ 35 (+0%)
Mutual labels:  i3, i3wm
Dotfiles
My [NeoVim + Tmux + Fish Shell] Setup /w install scripts
Stars: ✭ 180 (+414.29%)
Mutual labels:  i3, i3wm
I3 Gaps Deb
Tool to create and install Debian (or Ubuntu) packages of i3-gaps.
Stars: ✭ 236 (+574.29%)
Mutual labels:  i3, i3wm
i3blocks-airpods
i3blocks script for managing airpods and airpods pro.
Stars: ✭ 61 (+74.29%)
Mutual labels:  i3, i3wm
I3 Workspace Groups
Manage i3wm workspaces in groups you control
Stars: ✭ 139 (+297.14%)
Mutual labels:  i3, i3wm
Tmux Tilish
Plugin which makes tmux work and feel like i3wm
Stars: ✭ 149 (+325.71%)
Mutual labels:  i3, i3wm
Jgmenu
A simple X11 menu
Stars: ✭ 523 (+1394.29%)
Mutual labels:  launcher, i3

raiseorlaunch

PyPI Python versions Build Status Coverage Code style: black License

A run-or-raise-application-launcher for i3 window manager.

Features

  • If a provided application is running, focus it's window, otherwise run it
  • Provide a regex for window class, instance and/or title to compare with running windows
  • Optionally enable case-insensitive comparison
  • Optionally provide a workspace to use for raising and running
  • Optionally provide an initial workspace to run the application
  • Optionally use the scratchpad for raising and running
  • Optionally provide a con_mark for raising and running
  • workspace_auto_back_and_forth (if enabled) remains functional
  • Optionally cycle through matching windows (this will break workspace_auto_back_and_forth if more than one window matches the given properties)
  • Optionally leave fullscreen on target workspace

Installation

Repositories

raiseorlaunch is in PyPI, so you can just

pip install raiseorlaunch

For Arch Linux users it's also available in the AUR.

Manual

Dependencies

Install

Installing it directly with the setup.py creates a script-entry-point that adds ~150ms delay. That's not acceptable for this kind of application.

This can be prevented, if creating a wheel first and installing that (needs wheel and pip):

python setup.py bdist_wheel
pip install ./dist/raiseorlaunch-${VERSION}-py3-none-any.whl

Run without installation

You can also just run raiseorlaunch without installing it:

python -m raiseorlaunch ${ARGUMENTS}

or:

./raiseorlaunch/__main__.py ${ARGUMENTS}

Usage and options

usage: raiseorlaunch [-h] [-c WM_CLASS] [-s WM_INSTANCE] [-t WM_TITLE]
                     [-e COMMAND] [-w WORKSPACE | -W TARGET_WORKSPACE | -r]
                     [-m CON_MARK] [-l EVENT_TIME_LIMIT] [-i] [-C] [-f] [-d]
                     [-v]

A run-or-raise-application-launcher for i3 window manager.

optional arguments:
  -h, --help            show this help message and exit
  -c WM_CLASS, --class WM_CLASS
                        the window class regex
  -s WM_INSTANCE, --instance WM_INSTANCE
                        the window instance regex
  -t WM_TITLE, --title WM_TITLE
                        the window title regex
  -e COMMAND, --exec COMMAND
                        command to run with exec. If omitted, -c, -s or -t
                        will be used (lower-case). Careful: The command will
                        not be checked prior to execution!
  -w WORKSPACE, --workspace WORKSPACE
                        workspace to use
  -W TARGET_WORKSPACE, --target-workspace TARGET_WORKSPACE, --init-workspace TARGET_WORKSPACE
                        target workspace
  -r, --scratch         use scratchpad
  -m CON_MARK, --mark CON_MARK
                        con_mark to use when raising and set when launching
  -l EVENT_TIME_LIMIT, --event-time-limit EVENT_TIME_LIMIT
                        Time limit in seconds to listen to window events after
                        exec. This is needed for setting a con_mark, or moving
                        the window to a specific workspace or the scratchpad.
                        Defaults to 2
  -i, --ignore-case     ignore case when comparing
  -C, --cycle           cycle through matching windows (this will break
                        workspace_back_and_forth if more than one window
                        matches the given properties)
  -f, --leave-fullscreen
                        Leave fullscreen on target workspace
  -d, --debug           display debug messages
  -v, --version         show program's version number and exit

Examples

CLI

Run or raise Firefox:

raiseorlaunch -c Firefox -s Navigator

Use the workspace SL for sublime text:

raiseorlaunch -w SL -c "^Sublime" -s sublime_text -e subl

Raise or launch SpeedCrunch and use the scratchpad:

raiseorlaunch -r -c SpeedCrunch

Use a script to start application:

raiseorlaunch -r -c SpeedCrunch -e "--no-startup-id /path/to/my-cool-script.sh"

Raise the window with the con_mark wiki. If not found, execute command and mark the new window matching the provided properties. Set the time limit to wait for a new window to 3 seconds:

raiseorlaunch -c Firefox -s Navigator -e "firefox --new-window https://wiki.archlinux.org/" -m wiki -l 3

i3 bindsym

In i3 config you can define a bindsym like that:

bindsym ${KEYS} exec --no-startup-id raiseorlaunch ${ARGUMENTS}

e.g.

bindsym $mod+s exec --no-startup-id raiseorlaunch -w SL -c "^Sublime" -s sublime_text -e subl

for binding $mod+s to raise or launch sublime text.

Quotation marks

The command will not be quoted when calling exec. Make sure you properly escape any needed quotation marks. For simple commands there is no need to do anything.

Known problems

Keybindings steal focus when fired. This can have a negative impact with applications that listen to FocusOut events and hide. This is due to how X works.

Example:

When using Guake Terminal with "Hide on lose focus" enabled, raiseorlaunch behaves as if the underlying window is focused.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].