salman-abedin / devour Goto Github PK
View Code? Open in Web Editor NEWX11 window swallower
License: GNU General Public License v2.0
X11 window swallower
License: GNU General Public License v2.0
I have installed devour on my Rpi1 (don't think that the hardware makes a difference) and everytime that I have tried to open something using devour, it hides the terminal, opens the viewer, but when I close the viewer, the terminal doesn't come back. This has happened with everything that I have, so I don't think that it's an issue with the respective viewer/editor. (I'm running lxterm on awesomewm if that matters)
In order to close the terminal, the focus has to be on the terminal window.
Same as EmperorPenguin18/gobble#11.
The only thing that this repo is missing is license.
I see you have linked to the channel, why not link to the specific video?
https://youtu.be/mBNLzHcUtTo
or at when he starts talking about how to do it? (at 4:29)
https://youtu.be/mBNLzHcUtTo?t=259
Steps to reproduce:
Open a terminal and devour into any window.
While that window is still open, open another terminal and devour into any window again.
What will happen is that the new terminal window will disappear for a split second before defaulting to split view.
This happens on i3wm.
$("$@") > /dev/null 2>&1
doesn't recognize shell aliases
how about this?
SHELL=$(awk -F: -v user=$USER '$1 == user {print $NF}' /etc/passwd)
echo "$@" | $SHELL -i
[~] 0; find pix/screenshots/* | wc -l
36
[~] 0; devour feh pix/screenshots/*
Then it crashes (?)
The terminal goes after the milk and never returns.
All files in that directory are png
s and it doesn't work with other programs, like sxiv
, either.
Hello, thank you for the tool.
I copied and reduced sudo's zsh autocompletion, I thought I'd share. I would do a pull request, but I don't really understand how it works. Hope you merge it some day.
#compdef devour
setopt localoptions extended_glob
local environ e cmd
local -a args
local -a _comp_priv_prefix
zstyle -a ":completion:${curcontext}:" environ environ
for e in "${environ[@]}"
do local -x "$e"
done
args+=(
'(-)1:command: _command_names -e'
'*::arguments:{ _comp_priv_prefix=( $cmd -n ${(kv)opt_args[(I)(-[ugHEP]|--(user|group|set-home|preserve-env|preserve-groups))]} ) ; _normal }'
)
_arguments -s -S $args
Is there any way to enable auto complete (if present) for commands? If there is any, pls guide how to do it.
I am trying to use devour with mpv on hersbstuftwm, but the termial just fades out and then fades back in again. I know the script works because it works with emacs.
Manjaro KDE and Pop OS gnome3
using devour on mpv swallows my entire screen and all windows. I open the logout menu and that will get swallowed too. Any window I open will immediately get swallowed.
What I am typing:
devour mpv /path/to/vid
works totally fine, but if I use a bash alias
alias mpv='devour mpv'
and then devour mpv /path/to/vid then all windows get swallowed.
If I open gimp from terminal then it works fine with
devour gimp
but if I launch gimp from an alias of
alias gimp='devour gimp'
So there seems to be a problem when it comes to launching from a bash alias. I can replicate the problem with any program so long as I do it from an alias. Manually typing devour [program name] works everytime, but goes wrong every time from an alias
I was using devour fine until today when I installed it again with the new code changes and the problems began as described.
This should probably be an issue on your Crystal
repo.
But when Crystal
toggles solo
mode, it picks up already hidden windows. Meaning, when you navigate, it shows the devoured window, which I don't think is the desired effect for either scripts.
Hi, @salman-abedin sorry to bother you again but devour has the same issue I previously had, this time it is with filenames that have parentheses in them.
mpvd
is an alias for devour mpv
Originally posted by @rusty-electron in #13 (comment)
mpv --ytdl-format='bestvideo[height<=?1080]+bestaudio/best' https://www.youtube.com/watch\?v\=Ag1AKIl_2GM
works but
devour mpv --ytdl-format='bestvideo[height<=?1080]+bestaudio/best' https://www.youtube.com/watch\?v\=Ag1AKIl_2GM
doesn't,
manually needing to add \
before the <
,
Not sure if this issue is WM specific. When I open a new window in LeftWM with devour, it opens as if the terminal window wasn't devoured. As in, the new window is the size it would be without devour, but the terminal window disappears. And even more strangely, the window still exists( or technically replaced); and when I kill the new window the terminal window isn't visible but a window still exists. But its not actually the terminal window according to xprop. This window also doesn't resize itself. Has anyone else experienced similar issues? I'm using the version from the AUR.
are there any plans to make a version of this script for wayland?
$("$@") > /dev/null 2>&1
Should be replaced with:
("$@" >/dev/null 2>&1)
See SC2091 for more informations.
When I run devour, a new zsh instance is started.
By itself this isn't much of a problem, but when running devour in lf, it exits and outputs.
zsh: suspended (tty output) lf
This also happens in bash.
The terminal emulator that im using is alacritty.
Thanks!
to use devour to its maximum potential one would alias it as such
swallow=devour
alias vlc="$swallow vlc"
alias sxiv="$swallow sxiv"
alias zathura="$swallow zathura"
alias mpv="$swallow mpv"
alias feh="$swallow feh"
however doing it as such would cause an unwanted behavior when no window is generated by the command, so it would simply devour the terminal and set it back effectively clearing it and the text generated by the command
If this is too much of a hassle at least don't devour when obvious things like -h
and --help
are given as command arguments
Out of three terminal apps:
pantheon-terminal
Konsole
devour
hides a window only for Konsole
. gnome-terminal
and pantheon-terminal` don't hide the window. (Screenshot same as in #39.)On current Manjaro (stable Arch) Linux, x64, GNOME, X11. I've installed Devour from AUR (Arch Linux community repository) http://aur.archlinux.org/packages/devour, packaged on 16 Aug 2021:
Same as EmperorPenguin18/gobble#12.
Could you add a bash completion script?
It should complete the first argument as a command and then arguments for that command.
I think pretty much coping the bash completion script for sudo
should work.
here's a link: https://github.com/scop/bash-completion/blob/master/completions/sudo
When devouring respect if opening application was full screen
if I type devour brave-browser
, it keeps open a terminal window.
Sometimes the terminal won't reopen, for example after mpv stopped playing and quit the terminal still stays hidden.
Running xdo show -n xterm
unhides the terminal when this happens. I'm using xterm as my terminal and dwm as my wm.
Not sure what maybe triggering it.
I use AwesomeWM. When I use the super + r
hotkey to run a rofi
command, devour
swallows the last active window before running the command even though that window should not be swallowed.
Current Behavior
The last active window gets swallowed even if the command wasn't launched from that window.
Steps to Reproduce
devour
from there.devour
will swallow the Firefox window, even though it should not.Expected Behavior
The last active window should be swallowed if and only if the command was launched from that window.
Metadata
devour
version: 12
How to make this behave when opening with ranger or terminal? For now when I open them they open in separate windowses.
I am using i3wm with st terminal.
I got it work with my gui file manager by editing entries in /usr/share/applications/ and using bash aliases eased a bit. But how to get this work with ranger?
I edited rifle.conf like this
mime ^video, has mpv, X, flag f = devour mpv --fs -- "$@"
mime ^video, has mpv, X, flag f = devour mpv -- "$@"
but it doesnt seem to trigger devour it. Any tips?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.