Coder Social home page Coder Social logo

swayhide's Introduction

swayhide - A window swallower for sway

Description

swayhide hides the currently active terminal (by moving it to the scratchpad), then it executes the supplied command. When the child process has finished, the terminal is moved back. This is incredibly useful if your workflow includes opening graphical programs from the terminal, as the "locked" terminal won't have to take up any space.

Ideally this would be done using wlroots instead of swayipc, but I'm too lazy to figure out how that works.

This project will be deprecated when I find/build a wlroots alternative, since that would make it wm-independent and thus more future proof.

This project is heavily inspired by jamesofarrell/i3-swallow

Usage

$ swayhide firefox
$ alias hide="swayhide"
$ hide zathura document.pdf
$ hide "imv image.jpg"

Installation

$ cargo install swayhide

There's also an AUR package for ArchLinux users:

paru -S swayhide

Building from source

$ git clone https://github.com/NomisIV/swayhide
$ cd swayhide
$ cargo install --path .

License

This project is licensed under GPL 3.0

swayhide's People

Contributors

nomisiv avatar rehanzo avatar whynothugo 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

Watchers

 avatar  avatar

swayhide's Issues

Fish shell completions

Hey there!

Currently there are no shell completions for swayhide, since I am a fish-shell user I thought I'd write my own and share them here.

I am making this an issue instead of a PR as I'm unsure where and wether or not you want this in the repo.

The full completion file swayhide.fish:

#
# Completions for swayhide
#

complete -c swayhide -s h -l help -d "Display help and exit"
complete -c swayhide -xa "(__fish_complete_subcommand)"

Terminal jumps to another display on multi-monitor setup

I think the title of this issue is pretty self-explanatory.

When I run swayhide somethingsomething, after I close the program I just ran, the terminal from which the program was originally spawned jumps to a different monitor than the one I'm focused on. This happens on either monitor, i.e. it will jump to the second one.

I'm not sure what would happen on a three-monitor setup.

Ok, I built the program myself, but after testing both the master and AUR versions, they both don't have this bug. Strange... Will see if I can reproduce consistently.

New window does not replace the existing window

Say I have a vertical split like so:

| terminal | tabbed[multiple windows] |

If I run swayhide something on my terminal, the terminal disappears, and the
new window appears as a child of the container on the right.

I kind of expected swayhide to replace my current window with the new one,
rather than spawn the new one elsewhere.

I think this can be achieved by:

  • mark original window
  • split h
  • spawn new window
  • move marked to scratchpad
  • split none

The result is that the new window is dropped into the same place as the
original one, with affecting the exterior layout at all.

What are your thoughts on this? Does the idea/feature/change make sense?

Compiling on aarch64/musl

Hey there, I tried installing with both cargo as well as compiling the source but I get greeted with the following message:

error: failed to compile `swayhide v0.2.1 (/root/swayhide)`, intermediate artifacts can be found at `/root/swayhide/target`

Caused by:
  cannot produce proc-macro for `failure_derive v0.1.8` as the target `aarch64-unknown-linux-musl` does not support these crate types

Been wondering if proc-macro is any easy to substitute with an alternative so I could maybe get it running on my machine.

Continuation of Development

Hey!

I currently use sway and have prior experience with rust, and would be willing to take over development/maintenance of the repo.

Clarify license

Firstly, thanks so much for your work on this project!
I'd love to package it for the alpine linux repos, but in order to do so I need to clarify that this is free software. Would you be willing to pick a license and put it on the repo? GPLv3+ or MIT might be good choices :)

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.