Giter Club home page Giter Club logo

devour's People

Contributors

salman-abedin 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  avatar

devour's Issues

Only some terminals (Konsole) work (Manjaro, GNOME, X11)

Out of three terminal apps:

  • `gnome-terminal (the default that comes with GNOME),
  • pantheon-terminal
  • Konsole
    (all current), 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:
image

Same as EmperorPenguin18/gobble#12.

devouring everything

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.

License

The only thing that this repo is missing is license.

shell escaping and quotation

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 <,

Autocompletion

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

Devour can't devour more than 1 window at once.

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.

Devour doesn't open the terminal after closing the file viewer

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)

How to make this work with ranger?

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?

Terminal doesn't reopen

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.

Devour working incorrectly on LeftWM

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.

Running devour creates a new zsh session

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!

Mpv Problems

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.

Recognize shell aliases

$("$@") > /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 

Doesn't play nice with Crystal

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.

Hides Last Active Window When Launched From Run Launcher

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

  1. Open a random window. Firefox for example.
  2. Use the hotkey to get a command runner, and run devour from there.
  3. 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

Don't devour when the command doesn't create a window

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

Wayland support

are there any plans to make a version of this script for wayland?

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.