Giter Site home page Giter Site logo

bspswallow's Introduction

bspswallow

Adds functionality provided by the dwm "swallow" patch to bspwm.

Dependencies

  • bspwm (obviously)
  • xprop

Installation

Add two files to ~/.config/bspwm

  • noswallow - list of classes of windows that you don't want to swallow the terminal

  • terminals - list of classes of terminals that you want to be swallowed

If a class isn't available (such as with xev) then the command of origin can be used.

(example files are included in "examples")

Place bspswallow into your PATH and add the following line to your bspwmrc.

pgrep bspswallow || bspswallow &

Now just restart bspwm and you're good to go.

Known Issues

  • Incompatability with LibreOffice due to it having a splash screen and spawning multiple windows, use --no-logo when launching and turn off "Tip of the day" in order to avoid this issue.
  • Due to the way the script works, programs opened with dmenu_run will still swallow the teminal. This issue can be avoided by using the script noswallow_dmenu in examples/scripts instead of dmenu_run. this is now only an issue with windows without the _NET_WM_PID xproperty (for example sxiv)

bspswallow's People

Contributors

0jdxt avatar jakeroggenbuck avatar jopstro avatar jwijenbergh avatar nnorakk avatar wisatong 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

bspswallow's Issues

Swallow everything spawned with the terminal on focus

Swallow everything spawned with the terminal on focus
Steps to reproduce:

  1. Open terminal (i am using st)
  2. spawn anything using sxhd (example : pcmanfm)
  3. pcmanfm gets swallowed by the terminal

if the terminal is not focused it works fine
or is it part of the feature

Won't Swallow Specified Terminals

Hello,

Really love the script, but I followed the instructions to the letter and restart bspwm it doesn't work. If I run bspswallow from a terminal and open another terminal it works fine. I am really confused as to where I went wrong if you could help that would be great!

get_class() only grab last class name from xprop

Hello, This is my xprop output

WM_CLASS(STRING) = "urxvt", "URxvt"
WM_COMMAND(STRING) = { "urxvt", "-cd", "/home/wendel" }

your script only grabs URxvt so I can't put urxvt in .config/bspwm/terminals
same goes with WM_COMMAND it only grabs /home/wendel

May I suggest grabbing all the class names and only the first in WM_COMMAND?

monocle layout breaks when a window swallowed

Hello there, using bspwm with monocle layout. My problem is when i make a window swallow the new window shows borders which is not expected in monocle layout, opening another window and then closing it fixes it but it always does the same thing. Could you please add a "reload nodes everytime swallow happened if the user is using monocle layout" code?

Problem with dmenu

I use dmenu often and when I use it to open up something like firefox while my active window is a terminal emulator, it behaves as if I launched it directly from the terminal instead of dmenu, meaning the terminal gets swallowed. Is there a workaround for this such as modifying the keybind command I use for dmenu?

Dmenu opens windows "swallowed" on focused terminal

If you have a terminal as your last selected window, and then run dmenu and open an application, this new applications window will swallow that terminal although the terminal was not the window than that opened it.

pidof bspswallow always exits with 1, even if bspswallow is running

Hi,
In my machine
pidof bspswallow
always exits with 1 even if bspswallow in running (I linked the binary to /usr/local/bin/ btw), and that causes bspswallow to run multiple time as I restart the window manager.
As I can tell the cause of that is the bspswallow script is running as a argument to /bin/sh and not standalone.
So changing:
pidof bspswallow || bspswallow &
with: (ps x | grep bspswallow | grep -v grep) || bspswallow &
solved the issue for me.

noswallow file gets ignored

i have xev in my no swallow file but it still gets swallowed. tried adding sxiv to test and sxiv also gets swallowed. seems to me like the noswallow files gets ignored

Not swallowing inside script

I'm using pandoc to convert markdown files to pdfs and piping the standard input into zathura:
pandoc file.md -f markdown -t pdf | zathura -
This works when run as a command in the terminal but when I put inside a script:

#! /bin/sh
pandoc $1 -f markdown -t pdf | zathura - 

The terminal does not get swallowed. How can I force bspswallow to swallow the terminal?

Bspswallow breaks bspc node switching

Steps to reproduce:

  1. Bind bspc node -f next.local.window to a shortcut of your choosing
  2. Disable bspswallow
  3. Open a couple of windows
  4. Try running the shortcut, see that it correctly switches between windows on current desktop
  5. Enable bspswallow
  6. Open a couple of windows, including a swallowed window (e.g. mpv started from a terminal)
  7. Try running the shortcut, see that bspc isn't able to "return" to the swallowed window.

Libreoffice breaks alot of swallowing

Due to how LibreOffice spawns another window, it breaks a lot of compatibility. here's the edge cases I found so far. One thing that's bugging me is it works unexpectedly, and I can't pinpoint why.

  • 1 Terminal: Sometimes it works, some times it doesn't.
    Output: URxvt X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 21 (X_ListProperties) Resource id in failed request: 0x3600001 Serial number of failed request: 12 Current serial number in output stream: 12 0x03600001 0x0120040B
  • 2 Terminal: the other terminal gets swallowed. If I try to open the same file with the other terminal, it does not work.

If need be I can supply video of this. I think all in all LibreOffice cannot be swallowed.

Krita doesn't work

Since Krita makes a Window for the loading screen then deletes it then loads the main window it doesn't swallow the terminal comes back after loading

ranger

is there a way to get ranger to swallow without using the alternative version or is it just a matter of making ranger swallow on its own separate from bspswallow

xdg-open is not swallowed

Swallowing is generally working when I execute a program.

When I do "xdg-open filename", the file is opened in the appropriate application, but not swallowed. It shows up as a new node next to the terminal window just like there is no swallowing.

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.