; Module/File: Window_MoveForeignToDesktopNo.pb ; Function: Moving an foreign window to the desktop with no x - Linux ; Author: Omi ; Date: Feb. 12, 2016 ; Version: 0.1 ; Target Compiler: PureBasic 5.22/5.31/5.40 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- ; depends on window manager ; wmctrl must be installed !!! ; install: 'sudo apt-get install wmctrl' EnableExplicit Global.i gProgrammId Global.i gToDesk = 0; desired desktop number - numbers starts from '0' ; for german language: voller Titel nicht nötig! PB-Debugger -Titel abhängig von Sprache ;Global.s gWinTitle = "Debugger-Ausgabe" ; for english language: full title Not required! PB-Debugger title depends on language Global.s gWinTitle = "Debug Output"; english, " Debug "I will be moved to Desktop #"+ Str(gToDesk); opens the PB-Debugger-Window for demonstration Delay(1000) ; Move to desktop no? ... ; the Debug-Window is moved to desktop with index ? (0 to ?) ; '-r' specifies a window by the title ; '-t' moves specified window to desktop no x gProgrammId= RunProgram("wmctrl", "-r " + #DQUOTE$ + gWinTitle + #DQUOTE$ + " -t " + Str(gToDesk) , "", #PB_Program_Hide) ; IDE Options = PureBasic 5.45 LTS (Linux - x86) ; CursorPosition = 3 ; EnableUnicode ; EnableXP