Giter Club home page Giter Club logo

sway-scratch's Introduction

sway-scratch

Automatically starting named scratchpads for sway.

Usage

sway-scratch show [OPTIONS] --exec <EXEC> <--app-id <APP_ID>|--class <CLASS>>

Options:

  • --app-id <APP_ID> the Wayland app_id of the application
  • --class <CLASS> the window_properties.class of the application (Xwayland)
  • --exec <EXEC> the command to open the scratch initially
  • --resize <RESIZE> resize command to run when the scratch is shown (e.g. set 90 ppt 90 ppt)
  • -h, --help

Examples

To toggle a python terminal:

sway-scratch show --app-id scratch_py --exec "kitty --class scratch_py -e python -q"

In your sway/config, you would put something like the following:

set $scratchpy scratch_py
for_window [app_id=$scratchpy] move scratchpad, scratchpad show
bindsym $mod+equal sway-scratch show $scratchpy "$term --class $scratchpy -e python -q"

As can be seen in the example above, terminal emulators such as kitty may include an option for you to manually set the app_id (--class in this example).

See my personal dotfiles for a few examples of various applications.

swaymsg -r -t get_tree is a useful tool to view the sway tree in order to verify identifiable information about windows.

Installation

AUR

sway-scratch is available as an AUR package:

yay -S sway-scratch

Manual

You can build the binary yourself:

git clone [email protected]:aokellermann/sway-scratch.git
cd sway-scratch
cargo build --release

and install it:

cargo install --path crates/sway-scratch

sway-scratch's People

Contributors

aokellermann avatar dependabot[bot] avatar

Stargazers

LilleAila avatar GreyXor avatar  avatar Janek Thomaschewski avatar Yahav Bahat avatar  avatar Célia Vytrac avatar

Watchers

 avatar

sway-scratch's Issues

Incorrect build instructions

Manual build instructions should be changed to

git clone [...]
cargo install --path sway-scratch/crates/sway-scratch

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.