[Feature Request] Add command line option to set window class
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!
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
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.