Application name or title for devilspie?



  • I'm using devilspie under Linux to control my window geometry, placement, etc. With this program, an application window can be identified, and it can then be resized, moved, etc., automatically. I am trying to use this to place and size my Vivaldi windows, but it doesn't work.

    Normally, I can do this by filtering on the window title, but there is no standard title that Vivaldi uses when opening the browser window. It just uses the current URL or site name. In other browsers, the browser name is usually part of the window title, so I can filter on something like "Firefox" or "Chrome" within devilspie.

    Devilspie also offers matching by application name, but the name "Vivaldi" and "vivaldi" and other variations don't match. This can be matched by substring or regex, but even patterns like ".ivaldi.", etc. don't match.

    Because of this, I am unable to use devilspie to control the geometry and placement of Vivaldi browser windows.

    Does anyone know what Vivaldi's idea of an "application name" is under X Windows in Linux? ... since it appears to be something other than the program's path name or a subset thereof.

    Or does anyone know how to force a window title or even just a window title prefix to appear in the title bar?

    I have checked all the chromium command-line arguments, and I couldn't find anything I could use for this.

    Or perhaps has anyone actually gotten devilspie to recognize Vivaldi in some other way?

    Thanks in advance for any help any of you could offer.



  • Have you tried using native window in vivaldi://settings/appearance/ ?


  • Moderator

    The binary process is vivaldi-bin – is that the information you searched for.



  • I have tried "vivaldi-bin", and it doesn't match. Also, I have tried this both with "Native window" set and unset. It doesn't work in either case.

    The application name can be a substring or a regex, and I've tried various versions of this, to no avail. I also even tried the full path name: /opt/vivaldi/vivaldi-bin. It doesn't work with that, either.

    Is there some sort of X Windows call that sets an X property called "Application Name" or something similar? Perhaps the linux version of Vivaldi needs to make such a call ... ???



  • I thought maybe I could dispense with devilspie and just use the --window-size, --window-position, and --window-workspace arguments (from chromium). But none of those options seem to have any effect on Vivaldi. This is both with "Native window" set and unset.



  • I seem to be out of luck for using devilspie or command-line arguments to set the placement of the Vivaldi window, at least under linux.

    I thought that maybe I could compile a custom version of Vivaldi with code that interacts differently with the X Window Manager, but it turns out that the compile is not supported under my version of linux (linuxmint 17).

    I'm about to give up, but before I do, I'm wondering ... does anyone know of some other way to automatically control the position and workspace of a Vivaldi window under linux?



  • Well, I got it to work by hacking around with wmctrl and writing a shell script.

    If the script is named run-vivaldi, it runs like this ...

    run-vivaldi xposition yposition workspace [ ... vivaldi-args ... ]
    

    Here's the code ...

    #!/bin/zsh -f
    
    vivaldi=/opt/vivaldi/vivaldi-bin
    sleep=/bin/sleep
    wmctrl=/usr/bin/wmctrl
    
    [[ $# -lt 3 ]] && {
      print "usage: ${0##*/} xpos ypos desktop [ vivaldi-args ... ]"
      exit 1
    }
    
    xpos="${1}"
    ypos="${2}"
    desktop="${3}"
    shift
    shift
    shift
    
    ${vivaldi} "${@}" &
    pid=$!
    
    winid=
    width=
    height=
    while true
    do
      ${sleep} 1
      ${wmctrl} -lpG | while read i x0 winpid x1 x2 w h x3
      do
        [[ -z "${winpid:-}" ]] && continue
        [[ ${winpid} == ${pid} ]] && {
          winid=${i}
          width=${w}
          height=${h}
          break
        }
      done
      [[ -n "${height:-}" ]] && break
    done
    
    exec ${wmctrl} -ir ${winid} -t ${desktop} -e 0,${xpos},${ypos},${width},${height}
    
    exit 1

Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.