#sway #command #scratchpad #terminal #convert #mark #kitty

app sway-scratchpad

Convert a command to a scratchpad

5 releases

0.2.1 Jul 31, 2024
0.2.0 Apr 23, 2023
0.1.4 Mar 15, 2023
0.1.2 Jan 29, 2023
0.1.0 Jan 28, 2023

#271 in GUI

Download history 57/week @ 2024-07-25 66/week @ 2024-08-01 1/week @ 2024-08-08 5/week @ 2024-09-12 13/week @ 2024-09-19 16/week @ 2024-09-26 4/week @ 2024-10-03

295 downloads per month

BSD-2-Clause

11KB
182 lines

sway-scratchpad

Convert a command to a scratchpad, and toggle visibility

Install

cargo install sway-scratchpad

Usage

Usage: sway-scratchpad [OPTIONS] --mark <MARK>

Options:
  -s, --sock <SOCK>            Sway/i3 socket path [default: /run/user/1000/sway-ipc.1000.2107.sock]
  -c, --command <COMMAND>      Execute command with arguments
      --width <WIDTH>          Width of scratchpad in percent [default: 95]
      --height <HEIGHT>        Height of scratchpad in percent [default: 90]
      --width-px <WIDTH_PX>    Width of scratchpad in pixels [default: 0]
      --height-px <HEIGHT_PX>  Height of scratchpad in pixels [default: 0]
  -m, --mark <MARK>            Mark the container (executed command) with with this value
  -h, --help                   Print help
  -V, --version                Print version

Example config

Put this in you sway config (~/.config/sway/config)

bindsym F12 exec sway-scratchpad --command "kitty -d /home/user/projects" --mark terminal

for_window [con_mark="SCRATCHPAD_terminal"] border pixel 1

Dependencies

~10–21MB
~295K SLoC