Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

[Feature Request] Add command line option to set window class #277

Open
ngortheone opened this issue Sep 9, 2020 · 2 comments
Open

[Feature Request] Add command line option to set window class #277

ngortheone opened this issue Sep 9, 2020 · 2 comments

Comments

@ngortheone
Copy link

ngortheone commented Sep 9, 2020

Hi, thanks for imv!
I use swaywm and sometimes I want to run programs in floating mode.

For example when I make a screenshot I want to show a floating imv window with a screenshot. But it seems that there is no way to set windows class explicitly

Here is my sway config snippet that shows how I run my terminal in floating mode:

bindsym $mod+Shift+Return exec alacritty --class "floating-terminal"
for_window [app_id="floating-terminal"] floating enable

A similar feature in imv would be great!

@eXeC64
Copy link
Owner

eXeC64 commented Dec 2, 2020

Sounds reasonable enough. I'll try to get around to this in the near-future but I've been putting little time towards imv this year

@kotochor
Copy link

I found a way around in SwayWM for now.

imv ~/Pictures/wallpapers \
    -c 'bind <Return> exec setbg "$imv_current_file" ' \
    -c 'exec swaymsg for_window [pid="$imv_pid"] floating enable' 

setbg is my own script, so only the third line is important.
imv offers environment variable imv_pid and swaymsg can change window state based on window pid.
The hack works, but sometimes it breaks Sway's tilling system in the current workspace.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants